:root {
  --cream: #fff9fc;
  --pink: #fbe7ef;
  --pink-deep: #e9bfd2;
  --lavender: #e9e0f8;
  --lavender-deep: #cbb9e3;
  --blue: #dfedfb;
  --blue-deep: #b9d4ec;
  --ink: #594b62;
  --muted: #93849a;
  --white: #fff;
  --shadow: 0 22px 65px rgba(87, 67, 101, .10);
  --line: rgba(113, 87, 127, .15);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 4% 9%, rgba(251,231,239,.68), transparent 30rem),
    radial-gradient(ellipse at 96% 82%, rgba(223,237,251,.62), transparent 32rem),
    radial-gradient(ellipse at 76% 0%, rgba(233,224,248,.58), transparent 27rem),
    linear-gradient(135deg, #fffafd 0%, #fff9fc 52%, #fbfaff 100%);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
.site-shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 27px 0 34px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
.brand { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 15px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.96); border-radius: 14px; background: linear-gradient(135deg, #fbe7ef, #e9e0f8 56%, #dfedfb); color: #c18eab; font-size: 22px; box-shadow: 0 7px 20px rgba(88,65,99,.09); }
.brand:hover .brand-mark { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(88,65,99,.12); }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 11px; letter-spacing: .055em; transition: .2s ease; }
.nav a span { text-transform: uppercase; letter-spacing: .09em; }
.nav a:hover, .nav a.active { color: var(--ink); background: rgba(255,255,255,.82); border-color: var(--line); box-shadow: 0 5px 18px rgba(91,67,105,.06); }
.nav a.active { font-weight: 700; }
main { position: relative; }
.page-card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: clamp(36px, 6vw, 82px); align-items: center; min-height: 610px; padding: clamp(34px, 6vw, 78px); border: 1px solid rgba(255,255,255,.96); border-radius: 36px; background:
  radial-gradient(ellipse at 0% 100%, rgba(var(--wash-rgb, 233,224,248), .22), transparent 43%),
  radial-gradient(ellipse at 100% 0%, rgba(var(--wash-alt-rgb, 251,231,239), .24), transparent 39%),
  rgba(255,255,255,.86); box-shadow: 0 22px 65px rgba(87,67,101,.10), 0 0 42px rgba(var(--wash-rgb, 233,224,248), .12); backdrop-filter: blur(14px); }
.page-card::before { content: ""; position: absolute; z-index: -1; width: 440px; height: 440px; border-radius: 50%; right: -210px; top: -235px; background: var(--wash, var(--lavender)); opacity: .74; filter: blur(1px); }
.page-card::after { content: ""; position: absolute; z-index: -1; width: 230px; height: 230px; border-radius: 50%; left: -165px; bottom: -160px; background: var(--wash, var(--pink)); opacity: .43; }
.page-copy { position: relative; z-index: 1; max-width: 570px; }
.symbol-box { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 0 22px; border: 1px solid rgba(201,174,218,.60); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(237,225,248,.82)); color: #9a7ab0; font-family: Georgia, serif; font-size: 20px; box-shadow: 0 8px 20px rgba(91,67,105,.08), 0 0 18px rgba(203,185,227,.18); }
h1, h2 { margin: 0; color: #594866; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; line-height: 1.04; }
h1 { font-size: clamp(48px, 6.3vw, 79px); }
.accent { color: #a17db7; font-style: italic; }
.poem { max-width: 520px; margin-top: 29px; color: #74677c; font-family: Georgia, "Times New Roman", serif; font-size: clamp(16px, 1.45vw, 18px); line-height: 1.86; }
.poem p { margin: 0 0 17px; }
.poem p:last-child { margin-bottom: 0; }
.poem-you { font-size: 16px; line-height: 1.8; }
.poem-you p { margin-bottom: 14px; }
.poem-you p:last-child { margin-bottom: 0; }
.memory-quote { max-width: 470px; margin-top: 34px; color: #6f6680; font-family: Georgia, "Times New Roman", serif; font-size: clamp(19px, 2vw, 24px); font-style: italic; line-height: 1.8; }
.memory-quote p { margin: 0 0 21px; }
.memory-quote p:last-child { margin-bottom: 0; color: #8a789a; }
.signature-line { margin: 20px 0 0; color: #c18eab; font-size: 20px; }

/* Repeated hidden-photo interaction used on every page. */
.reveal-side { position: relative; z-index: 1; width: min(100%, 390px); justify-self: center; }
.memory-reveal { overflow: hidden; border: 1px solid rgba(255,255,255,.98); border-radius: 22px; background: rgba(255,255,255,.78); box-shadow: 0 22px 52px rgba(74,55,88,.13); }
.memory-reveal summary { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 24px; list-style: none; cursor: pointer; text-align: center; background:
  radial-gradient(circle at 15% 16%, rgba(255,255,255,.9), transparent 28%),
  radial-gradient(circle at 86% 83%, rgba(255,255,255,.72), transparent 29%),
  linear-gradient(145deg, #fcebf2, #eee7fa 56%, #e5f0fb); transition: filter .2s ease, min-height .25s ease; }
.memory-reveal summary::-webkit-details-marker { display: none; }
.memory-reveal summary:hover { filter: saturate(1.06); }
.memory-reveal summary:focus-visible { outline: 3px solid rgba(161,125,183,.55); outline-offset: -5px; }
.reveal-heading { color: #735f80; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 2.3vw, 27px); font-style: italic; line-height: 1.25; }
.reveal-button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 9px 19px; border: 1px solid rgba(180,151,197,.48); border-radius: 999px; background: rgba(255,255,255,.76); color: #705b7e; font-size: 13px; font-weight: 650; box-shadow: 0 7px 18px rgba(91,67,105,.08); }
.memory-reveal[open] summary { min-height: 0; gap: 10px; padding: 17px 15px; border-bottom: 1px solid rgba(185,160,205,.18); }
.memory-reveal[open] .reveal-heading { font-size: 18px; }
.memory-reveal[open] .reveal-button { min-height: 35px; padding: 6px 14px; font-size: 12px; }
.revealed-media { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px; background: rgba(255,255,255,.74); animation: reveal-in .42s ease both; }
.revealed-media img { display: block; max-width: 100%; max-height: 480px; width: auto; height: auto; object-fit: contain; border: 1px solid rgba(255,255,255,.98); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(72,56,82,.12); }
.single-media img { width: 100%; }
.heart-media img { max-width: 270px; }
.portrait-media img { max-width: 330px; }
.landscape-media img { width: 100%; max-height: 370px; }

/* Page 03: keep the real game screenshot, but give its greens a softer, intentional frame. */
.game-photo {
  padding: 17px;
  border: 1px solid rgba(188, 168, 211, .34);
  border-radius: 0 0 21px 21px;
  background:
    radial-gradient(ellipse at 12% 10%, rgba(251, 231, 239, .72), transparent 48%),
    radial-gradient(ellipse at 90% 88%, rgba(223, 237, 251, .88), transparent 50%),
    linear-gradient(145deg, #f0e8f8, #f8f4fb 52%, #eaf2fb);
}
.game-photo img {
  padding: 6px;
  border: 1px solid rgba(255,255,255,.98);
  border-radius: 15px;
  background: #fffdfd;
  filter: saturate(.88) contrast(1.07) brightness(1.02);
  box-shadow: 0 12px 28px rgba(61, 54, 83, .17), 0 0 0 1px rgba(184, 164, 207, .18);
}
.paired-media { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; padding: 12px; }
.paired-media img { width: 100%; height: auto; max-height: 340px; align-self: center; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.page-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 23px 5px 0; }
.page-count { display: inline-flex; align-items: center; gap: 10px; color: #9e91a4; font-size: 11px; letter-spacing: .14em; }
.page-count i { display: inline-block; width: 25px; height: 1px; background: #ccb9d3; }
.page-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 45px; padding: 11px 19px; border: 1px solid rgba(255,255,255,.95); border-radius: 999px; background: linear-gradient(110deg, #f6dce8, #e8ddf9 60%, #dceeff); color: #604e6a; text-decoration: none; font-size: 13px; font-weight: 650; box-shadow: 0 8px 20px rgba(91,67,105,.10); transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(91,67,105,.14); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,.76); color: #84758b; box-shadow: none; }
.footer { display: flex; justify-content: center; margin-top: 25px; color: #d19db8; font-family: Georgia, serif; font-size: 17px; }

/* Page-specific pastel atmospheres */
.theme-blush { --wash: var(--pink); --wash-rgb: 251,231,239; --wash-alt-rgb: 233,224,248; }
.theme-lilac { --wash: var(--lavender); --wash-rgb: 233,224,248; --wash-alt-rgb: 251,231,239; }
.theme-blue { --wash: var(--blue); --wash-rgb: 223,237,251; --wash-alt-rgb: 233,224,248; }

/* The final page is intentionally letter-like rather than another poem card. */
.letter-page { position: relative; overflow: hidden; padding: clamp(30px, 5vw, 62px); border: 1px solid rgba(255,255,255,.96); border-radius: 36px; background:
  radial-gradient(ellipse at 100% 0%, rgba(233,224,248,.34), transparent 40%),
  radial-gradient(ellipse at 0% 100%, rgba(251,231,239,.24), transparent 44%),
  rgba(255,255,255,.86); box-shadow: 0 22px 65px rgba(87,67,101,.10), 0 0 42px rgba(233,224,248,.14); }
.letter-page::before { content: ""; position: absolute; z-index: 0; width: 440px; height: 440px; border-radius: 50%; top: -260px; right: -170px; background: var(--lavender); opacity: .64; }
.letter-heading { position: relative; z-index: 1; margin-bottom: 25px; }
.letter-heading .symbol-box { margin-bottom: 18px; }
.letter-heading h1 { font-size: clamp(43px, 5.6vw, 66px); }
.letter-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); gap: clamp(26px, 5vw, 60px); align-items: center; }
.letter-paper { position: relative; padding: clamp(24px, 4vw, 43px); border: 1px solid rgba(205,184,232,.48); border-radius: 7px 22px 22px 7px; background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,250,253,.90) 72%, rgba(248,244,253,.88)); box-shadow: 0 15px 38px rgba(91,67,105,.08), 0 0 28px rgba(233,224,248,.10); }
.letter-paper::before { content: ""; position: absolute; top: 0; bottom: 0; left: 17px; width: 1px; background: rgba(226,190,211,.55); }
.letter-paper p { margin: 0 0 19px; padding-left: 12px; color: #716477; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.9; }
.letter-paper p:last-of-type { margin-bottom: 15px; }
.letter-signoff { padding: 4px 0 0 12px; color: #a082ad; font-family: Georgia, serif; font-size: 16px; font-style: italic; text-align: right; }
.letter-signoff span { padding-left: 5px; color: #d797b4; font-size: 20px; }
.letter-photo-side { position: relative; width: min(100%, 330px); justify-self: center; }
.letter-photo-side .memory-reveal summary { min-height: 280px; }
.letter-photo-side .paired-media img { max-height: 310px; }
.theme-letter { --wash: var(--lavender); }

@media (max-width: 780px) {
  .site-shell { width: min(100% - 26px, 580px); padding-top: 17px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
  .nav { width: 100%; justify-content: flex-start; gap: 4px; }
  .nav a { padding: 7px 10px; font-size: 10px; }
  .nav a span { letter-spacing: .06em; }
  .page-card { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 30px 24px 34px; border-radius: 27px; }
  .page-copy { max-width: none; }
  h1 { font-size: clamp(46px, 13vw, 64px); }
  .poem { margin-top: 23px; font-size: 16px; }
  .poem-you { font-size: 15px; }
  .reveal-side { width: min(100%, 360px); }
  .memory-reveal summary { min-height: 210px; }
  .revealed-media img { max-height: 450px; }
  .paired-media img { max-height: 290px; }
  .page-bottom { align-items: flex-start; flex-direction: column; margin-top: 18px; }
  .page-actions { width: 100%; justify-content: space-between; }
  .button { flex: 1; }
  .letter-page { padding: 28px 20px 26px; border-radius: 27px; }
  .letter-heading { margin-bottom: 22px; }
  .letter-layout { grid-template-columns: 1fr; gap: 24px; }
  .letter-paper { padding: 24px 20px 24px 25px; }
  .letter-paper::before { left: 13px; }
  .letter-paper p { padding-left: 8px; font-size: 15px; line-height: 1.82; }
  .letter-signoff { padding-left: 8px; }
  .letter-photo-side { width: min(100%, 360px); }
  .letter-photo-side .memory-reveal summary { min-height: 210px; }
  .letter-photo-side .paired-media img { max-height: 310px; }
}
@media (max-width: 380px) {
  .brand-mark { width: 39px; height: 39px; }
  .nav a { gap: 5px; padding: 7px 8px; }
  .nav a span { font-size: 9px; }
  .page-card { padding-right: 19px; padding-left: 19px; }
  .poem-you { font-size: 14px; }
  .paired-media { gap: 6px; padding: 8px; }
  .paired-media img { max-height: 250px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
