/* ------------------------------------------------------------
   Themes: the whole page shifts as each chapter takes over.
   body[data-theme] is set by script.js from whichever chapter
   is in the middle of the screen.
------------------------------------------------------------ */
:root {
  --bg: #fbf7f2;
  --ink: #2b2420;
  --muted: #6d625a;
  --accent: #c9826b;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body[data-theme="intro"]     { --bg:#fbf7f2; --ink:#2b2420; --muted:#7a6d63; --accent:#c9826b; }
body[data-theme="hinge"]     { --bg:#f4f2ef; --ink:#121212; --muted:#5f5f5f; --accent:#121212; }
body[data-theme="brewery"]   { --bg:#2a1a0b; --ink:#fbe9c6; --muted:#d8b98a; --accent:#f2a93b; }
body[data-theme="text"]      { --bg:#0b0e1e; --ink:#e8ecff; --muted:#9aa3c7; --accent:#4f8cff; }
body[data-theme="maggianos"] { --bg:#f7efe2; --ink:#3b1d14; --muted:#7b5545; --accent:#b3261e; }
body[data-theme="garden"]    { --bg:#e6f1df; --ink:#1d3a26; --muted:#4c6b52; --accent:#4f8a3c; }
body[data-theme="trucks"]    { --bg:#2b1d3a; --ink:#fff3e0; --muted:#cdb8e0; --accent:#ffb347; }
body[data-theme="home"]      { --bg:#f4e6d4; --ink:#3a2a1e; --muted:#7a6352; --accent:#d9734e; }
body[data-theme="tbc"]       { --bg:#1a1512; --ink:#f5ead8; --muted:#bfae95; --accent:#e7b24a; }
body[data-theme="family"]    { --bg:#fff1e6; --ink:#4a2617; --muted:#8a5a44; --accent:#e2683c; }
body[data-theme="sub"]       { --bg:#062a40; --ink:#d6f3ff; --muted:#7fb6cc; --accent:#3fd0c9; }
body[data-theme="apart"]     { --bg:#dde5ec; --ink:#22303f; --muted:#5d6f82; --accent:#b8324a; }
body[data-theme="nye"]       { --bg:#0c0b10; --ink:#f7ecd0; --muted:#b9ab88; --accent:#d9b45a; }
body[data-theme="mardi"]     { --bg:#2d1446; --ink:#fff6d6; --muted:#d3b9ef; --accent:#f5c518; }
body[data-theme="golden"]    { --bg:#2c1b3d; --ink:#fff8ec; --muted:#ffd9b0; --accent:#ffb347; }
body[data-theme="beach"]     { --bg:#fdf1d8; --ink:#0f4a5e; --muted:#4a7d8c; --accent:#ff7f50; }
body[data-theme="house"]     { --bg:#e9f1e2; --ink:#2f3a2a; --muted:#5e6d55; --accent:#c8553d; }
body[data-theme="growing"]   { --bg:#fff3f1; --ink:#4a2d34; --muted:#8c6670; --accent:#e07a95; }
body[data-theme="perrys"]    { --bg:#1c1310; --ink:#f3e3cf; --muted:#b89d84; --accent:#c8343a; }
body[data-theme="athens"]    { --bg:#f8f6f1; --ink:#0d3b66; --muted:#55708c; --accent:#1f6fb2; }
body[data-theme="rain"]      { --bg:#56636f; --ink:#f1f4f7; --muted:#c3ccd5; --accent:#e9d9a6; }
body[data-theme="santorini"] { --bg:#f4f8fd; --ink:#0b3d91; --muted:#4f6e99; --accent:#1565c0; }
body[data-theme="surprise"]  { --bg:#0f1b2d; --ink:#eaf1ff; --muted:#9db0cf; --accent:#ffcf5c; }
body[data-theme="venice"]    { --bg:#f2dfca; --ink:#3c2a21; --muted:#7b5d4b; --accent:#1f6f6a; }
body[data-theme="reunion"]   { --bg:#fff6e6; --ink:#3a2a1e; --muted:#7a6352; --accent:#e0913a; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 "DM Sans", system-ui, sans-serif;
  transition: background-color 1.1s var(--ease), color 1.1s var(--ease);
  overflow-x: hidden;
}
h1, h2 { margin: 0 0 .4em; line-height: 1.05; font-weight: 700; }
p { margin: 0 0 1em; }
em { font-style: italic; }

/* ---------- Chapters ---------- */
.ch {
  position: relative;
  min-height: 110vh;
  overflow-x: clip;
  display: grid;
  place-items: center;
  padding: 18vh 16px 22vh 56px;
  z-index: 2;
}
@media (min-width: 1100px) { .ch { padding-inline: 190px; } }
.inner { width: 100%; max-width: 980px; text-align: center; }
.inner.narrow { max-width: 620px; }
.inner.split {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px;
  align-items: center; text-align: left;
}
.kicker {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.ch h2 { font-size: clamp(40px, 7vw, 84px); }

/* Reveal on enter */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.in .reveal { opacity: 1; transform: none; }
.in .reveal:nth-child(2) { transition-delay: .12s; }
.in .reveal:nth-child(3) { transition-delay: .24s; }
.in .reveal:nth-child(4) { transition-delay: .36s; }
.in .reveal:nth-child(5) { transition-delay: .48s; }

/* ---------- 0 · Intro ---------- */
.ch-intro h1 {
  font-family: "Playfair Display", serif; font-weight: 600;
  font-size: clamp(54px, 11vw, 140px); letter-spacing: -.02em;
}
.ch-intro h1 em { font-weight: 500; color: var(--accent); }
.ch-intro .lede { font-family: "Playfair Display", serif; font-style: italic; font-size: clamp(22px, 3vw, 32px); }
.scroll-hint { margin-top: 10vh; font-size: 14px; color: var(--muted); letter-spacing: .08em; }
.scroll-hint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

/* ---------- 1 · Hinge (a light nod: stark, minimal) ---------- */
.ch-hinge h2 { font-weight: 800; letter-spacing: -.03em; }
.ch-hinge p { max-width: 520px; margin-inline: auto; color: var(--muted); }
.like {
  width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--ink);
  background: transparent; display: inline-grid; place-items: center;
  margin-bottom: 28px; cursor: pointer;
}
.like svg { width: 38px; fill: transparent; stroke: var(--ink); stroke-width: 1.6; transition: fill .4s, stroke .4s; }
.in .like svg { animation: liked .5s 1s var(--ease) forwards; }
@keyframes liked { 40% { transform: scale(1.35); } 100% { fill: #e2475b; stroke: #e2475b; transform: scale(1); } }

/* ---------- 2 · Brewery ---------- */
.ch-brewery h2 { font-family: "Alfa Slab One", serif; font-weight: 400; color: var(--accent); }
.glass {
  justify-self: center; width: 170px; height: 280px; position: relative;
  border: 5px solid rgba(251, 233, 198, .85); border-top: none;
  border-radius: 6px 6px 26px 26px; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
}
.beer {
  position: absolute; inset: 0; transform-origin: bottom;
  transform: scaleY(calc(.15 + var(--p, 0) * 1.4));
  background: linear-gradient(#f6b941, #d9861b);
}
.foam { position: absolute; top: 0; left: 0; right: 0; height: 26px; background: #fff6e2; border-radius: 0 0 12px 12px; }

/* ---------- 3 · The text ---------- */
.ch-text h2 { font-weight: 800; }
.ch-text h2 s { color: var(--muted); font-weight: 400; font-size: .5em; display: block; text-decoration-thickness: 3px; text-decoration-color: var(--accent); }
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; text-align: left; }
.msg {
  max-width: 78%; padding: 12px 18px; border-radius: 22px; font-size: 17px;
  opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.msg.out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.in { align-self: flex-start; background: #23284a; color: var(--ink); border-bottom-left-radius: 6px; }
.msg.show { opacity: 1; transform: none; }
.msg.typing { display: flex; gap: 5px; padding: 16px 18px; }
.msg.typing.gone { display: none; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .5; } }

/* ---------- 4 · Maggiano's ---------- */
.ch-maggianos h2 { font-family: "Playfair Display", serif; font-style: italic; color: var(--accent); }
.ch-maggianos .at { display: block; font-size: .38em; font-style: normal; color: var(--ink); letter-spacing: .04em; margin-top: .3em; }
.plate { width: min(380px, 80vw); justify-self: center; filter: drop-shadow(0 18px 30px rgba(59, 29, 20, .25)); }
.meatball { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.in .meatball { animation: plop .9s .5s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes plop { to { transform: scale(1); } }
.counter {
  display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 2px 18px;
  margin-top: 10px; padding: 14px 22px; border: 2px dashed var(--accent); border-radius: 14px; background: #fffaf2;
}
.counter-label { grid-column: 2; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.counter-num { grid-column: 1; grid-row: 1 / span 2; font: 700 56px/1 "Playfair Display", serif; color: var(--accent); }
.counter-note { grid-column: 2; font-family: "Caveat", cursive; font-size: 24px; }

/* ---------- 5 · Garden walks ---------- */
.ch-garden h2 { font-family: "Fraunces", serif; }
.trail { position: relative; height: 320px; margin: 40px auto 30px; max-width: 860px; }
.trail svg { width: 100%; height: 100%; overflow: visible; }
.trail path { fill: none; stroke-linecap: round; }
.trail-bg { stroke: rgba(29, 58, 38, .12); stroke-width: 14; }
.trail-draw {
  stroke: var(--accent); stroke-width: 6;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - min(1, var(--p, 0) * 1.6));
}
.stops { list-style: none; margin: 0; padding: 0; }
.stops li {
  position: absolute; left: var(--x); top: var(--y); transform: translate(var(--tx, -50%), 0);
  font-family: "Fraunces", serif; font-weight: 700; font-size: clamp(14px, 2vw, 19px);
  background: #fff; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(29, 58, 38, .15);
}
.stops li.reveal { transform: translate(var(--tx, -50%), 28px); }
.in .stops li.reveal { transform: translate(var(--tx, -50%), 0); }

/* ---------- 6 · Food trucks ---------- */
.ch-trucks h2 { font-family: "Bungee", sans-serif; font-weight: 400; font-size: clamp(30px, 5.4vw, 64px); color: var(--accent); }
.ch-trucks p { max-width: 560px; margin-inline: auto; }
.stamp {
  display: inline-block; margin: 26px 0; padding: 10px 22px;
  font: 400 clamp(20px, 3vw, 30px) "Bungee", sans-serif; color: #ff6b6b;
  border: 4px solid #ff6b6b; border-radius: 10px; text-transform: uppercase;
}
.in .stamp { animation: stamp .6s .7s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes stamp { from { transform: scale(2.4) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-7deg); opacity: 1; } }

/* ---------- 7 · Home ---------- */
.ch-home h2 { font-family: "Caveat", cursive; font-size: clamp(48px, 8vw, 96px); }
.week { list-style: none; display: flex; justify-content: center; gap: 12px; padding: 0; margin: 30px 0 10px; }
.week li {
  width: 56px; height: 64px; display: grid; place-items: center;
  border: 2px solid rgba(58, 42, 30, .2); border-radius: 12px; font-weight: 800; color: var(--muted);
  transition: background .5s, color .5s, border-color .5s;
}
.in .week li.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.in .week li:nth-child(1) { transition-delay: .6s; }
.in .week li:nth-child(2) { transition-delay: .8s; }
.in .week li:nth-child(4) { transition-delay: 1.0s; }
.in .week li:nth-child(5) { transition-delay: 1.2s; }
.week-note { font-family: "Caveat", cursive; font-size: 26px; }

/* ---------- 8 · To be continued ---------- */
.ch-tbc h2 { font-family: "Playfair Display", serif; font-style: italic; }
.tease { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 30px 0; font: 700 64px/1 "Playfair Display", serif; color: var(--accent); }
.tease .arrow { font-size: 32px; color: var(--muted); }
.details { margin-top: 40px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Polaroids (hidden until a photo exists) ---------- */
.polaroid { display: none; margin: 28px auto 0; width: 220px; padding: 10px 10px 0; background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.25); transform: rotate(-3deg); }
.polaroid.has-photo { display: block; }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.polaroid figcaption { font: 700 22px/2 "Caveat", cursive; color: #333; text-align: center; }
.polaroid.reveal { transform: rotate(-3deg) translateY(28px); }
.in .polaroid.reveal { transform: rotate(-3deg); }

/* ---------- Ambient layers ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 1.2s var(--ease); overflow: hidden; }
body[data-theme="brewery"]   .fx-bubbles,
body[data-theme="text"]      .fx-stars,
body[data-theme="maggianos"] .fx-tablecloth,
body[data-theme="garden"]    .fx-leaves,
body[data-theme="trucks"]    .fx-lights,
body[data-theme="home"]      .fx-lamp,
body[data-theme="tbc"]       .fx-stars { opacity: 1; }

.fx-bubbles span { position: absolute; bottom: -20px; border-radius: 50%; border: 1.5px solid rgba(246, 185, 65, .55); animation: rise linear infinite; }
@keyframes rise { to { transform: translate(var(--drift), -115vh); } }

.fx-stars span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }

.fx-tablecloth {
  top: auto; height: 22vh;
  background:
    linear-gradient(90deg, rgba(179,38,30,.85) 50%, transparent 0) 0 0 / 56px 56px,
    linear-gradient(rgba(179,38,30,.55) 50%, #fffaf2 0) 0 0 / 56px 56px;
  -webkit-mask: linear-gradient(transparent, #000 60%); mask: linear-gradient(transparent, #000 60%);
}
.fx-tablecloth::before {
  content: ""; position: fixed; inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(255, 196, 120, .35), transparent 45%);
}

.fx-leaves span { position: absolute; top: -30px; width: 14px; height: 22px; border-radius: 0 100% 0 100%; background: #6aa84f; animation: fall linear infinite; }
@keyframes fall { to { transform: translate(var(--drift), 115vh) rotate(540deg); } }

.fx-lights svg { position: absolute; top: 0; left: 0; width: 100%; height: 120px; }
.fx-lights circle { fill: #ffd27a; filter: drop-shadow(0 0 6px #ffb347); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .55; } }

.fx-lamp { background: radial-gradient(ellipse at 85% 10%, rgba(255, 190, 110, .45), transparent 55%); }

/* ---------- Timeline thread ---------- */
.thread { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); height: 76vh; z-index: 5; }
.thread-line { position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: color-mix(in srgb, var(--ink) 15%, transparent); }
.thread-fill { width: 100%; height: calc(var(--progress, 0) * 100%); background: var(--accent); transition: background 1.1s; }
.thread-dots { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.thread-dots a {
  display: block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
  position: relative; transition: background .4s, border-color .4s, transform .3s;
}
.thread-dots a.past { background: var(--accent); border-color: var(--accent); }
.thread-dots a.current { transform: scale(1.5); }
.thread-dots a span {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  opacity: 0; transition: opacity .3s;
}
.thread-dots a:hover span { opacity: 1; }

/* ---------- Winnie ---------- */
#winnie {
  position: fixed; bottom: 14px; left: 0; z-index: 6; width: 120px;
  transform: translateX(var(--wx, 70px)); transition: transform .5s var(--ease);
}
.winnie-dog { width: 120px; display: block; overflow: visible; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)) drop-shadow(0 4px 6px rgba(0, 0, 0, .18)); }
#winnie.facing-left .winnie-dog { transform: scaleX(-1); }
.winnie-dog .tail { transform-origin: 14px 50px; animation: wag .45s ease-in-out infinite alternate; }
@keyframes wag { from { transform: rotate(-12deg); } to { transform: rotate(16deg); } }
.winnie-dog .leg { transform-box: fill-box; transform-origin: top center; }
#winnie.walking .leg-front-a, #winnie.walking .leg-back-b { animation: step .32s ease-in-out infinite alternate; }
#winnie.walking .leg-front-b, #winnie.walking .leg-back-a { animation: step .32s ease-in-out infinite alternate-reverse; }
@keyframes step { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
#winnie.walking .head { animation: bob .32s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(2px); } }
.winnie-dog .acc { opacity: 0; transition: opacity .6s; }
body[data-theme="maggianos"] .acc-bib,
body[data-theme="trucks"] .acc-bandana,
body[data-theme="tbc"] .acc-hat { opacity: 1; }

.winnie-bubble {
  position: absolute; bottom: 100%; left: 50%; width: max-content; max-width: min(240px, 70vw);
  transform: translateX(var(--bx, -20%)); margin-bottom: 6px;
  padding: 10px 14px; border-radius: 16px; background: #fff; color: #2b2420;
  font: 600 14px/1.35 "DM Sans", sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: opacity .3s, transform .5s var(--ease);
}
.winnie-bubble.swap { opacity: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .ch { padding: 14vh 16px 26vh 40px; }
  .inner.split { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .glass { width: 120px; height: 200px; }
  .thread { left: 12px; }
  .thread-dots a span { display: none; }
  .trail { height: 260px; }
  .stops li { font-size: 13px; padding: 6px 10px; }
  .week { gap: 6px; }
  .week li { width: 38px; height: 48px; }
  #winnie, .winnie-dog { width: 90px; }
  .winnie-bubble { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .msg { opacity: 1; transform: none; }
  .meatball { transform: none; }
}

/* ============================================================
   Part two of the story
============================================================ */

/* Long chapters reveal beat by beat instead of all at once */
.beat { margin-bottom: 26vh; }
.beat:last-child { margin-bottom: 0; }
.ch.in .beat:not(.in) .reveal { opacity: 0; transform: translateY(28px); }
.big-line { font: italic 600 clamp(28px, 4vw, 40px)/1.2 "Playfair Display", serif; }
.shout { font: 700 26px/1.3 "Caveat", cursive; color: var(--accent); }

/* Counters that flip to the next number (meatball callbacks) */
.counter-num.flip { animation: flip .7s var(--ease); }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }

/* ---------- Thanksgiving: the whole family ---------- */
.ch-family h2 { font-family: "Abril Fatface", serif; font-weight: 400; }
.ch-family .whole { color: var(--accent); display: inline-block; transform: rotate(-3deg); font-size: 1.15em; }
.crowd { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; max-width: 560px; margin: 30px auto 24px; }
.person { width: 26px; height: 46px; position: relative; transform: scale(0); transform-origin: bottom; }
.person::before { content: ""; position: absolute; top: 0; left: 6px; width: 14px; height: 14px; border-radius: 50%; background: #e8b894; }
.person::after { content: ""; position: absolute; bottom: 0; left: 1px; width: 24px; height: 28px; border-radius: 12px 12px 4px 4px; background: var(--c); }
.in .person { animation: pop .5s calc(.4s + var(--i) * 70ms) cubic-bezier(.3, 1.7, .5, 1) forwards; }
@keyframes pop { to { transform: scale(1); } }
.roll-call span { display: inline-block; font-weight: 800; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.in .roll-call span { opacity: 1; transform: none; }
.roll-call span:nth-child(1) { transition-delay: 1s; }   .roll-call span:nth-child(2) { transition-delay: 1.2s; }
.roll-call span:nth-child(3) { transition-delay: 1.4s; } .roll-call span:nth-child(4) { transition-delay: 1.6s; }
.roll-call span:nth-child(5) { transition-delay: 1.8s; } .roll-call span:nth-child(6) { transition-delay: 2s; }

/* ---------- Escape room: under the sea ---------- */
.ch-sub h2 { font-family: "Special Elite", monospace; font-weight: 400; color: var(--accent); }
.ch-sub::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, #01111c); opacity: var(--p, 0);
  -webkit-mask: linear-gradient(transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
.porthole {
  justify-self: center; width: 260px; height: 260px; border-radius: 50%; position: relative; overflow: hidden;
  border: 18px solid #b08d57; box-shadow: 0 0 0 6px #6f5631, inset 0 0 40px rgba(0,0,0,.6);
  background: radial-gradient(circle at 40% 35%, #1a7fa0, #04263a 70%);
}
.porthole::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle, transparent 0 34px, rgba(63,208,201,.25) 35px 36px); }
.sonar { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(63,208,201,.55), transparent 22%); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.log { font-family: "Special Elite", monospace; color: var(--accent); }
.fx-sea { background: linear-gradient(165deg, rgba(255,255,255,.09), transparent 45%); }
.fx-sea span { position: absolute; bottom: -20px; border-radius: 50%; border: 1.5px solid rgba(160, 230, 255, .5); animation: rise linear infinite; }

/* ---------- Christmas apart: the split closes as you scroll ---------- */
.ch-apart { --m: clamp(0, calc((var(--p, 0) - .2) * 4), 1); }
.ch-apart h2 { font-family: "Playfair Display", serif; }
.xmas { display: flex; justify-content: center; margin: 34px auto; position: relative; }
.xmas .half {
  width: min(250px, 38vw); height: 190px; display: grid; place-items: center; align-content: center; gap: 10px;
  background: #fff; box-shadow: 0 14px 30px rgba(34, 48, 63, .15);
}
.xmas .left  { border-radius: 18px 0 0 18px; transform: translateX(calc((1 - var(--m)) * -16vw)); }
.xmas .right { border-radius: 0 18px 18px 0; transform: translateX(calc((1 - var(--m)) * 16vw)); }
.xmas b { font: 700 22px "Caveat", cursive; }
.tree { width: 70px; height: 90px; background: #2f7d4f; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.xmas::after {
  content: "♥"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(calc(.5 + var(--m) * .7));
  font-size: 46px; color: var(--accent); opacity: calc((var(--m) - .85) * 7);
}
.fx-snow span { position: absolute; top: -10px; border-radius: 50%; background: #fff; animation: fall linear infinite; }

/* ---------- New Year's Eve in Tampa ---------- */
.ch-nye h2 { font-family: "Abril Fatface", serif; font-weight: 400; color: var(--accent); }
.countdown { font: 400 clamp(90px, 16vw, 170px)/1 "Abril Fatface", serif; margin: 10px 0 20px; min-height: 1em; }
.countdown.done { font-size: clamp(40px, 7vw, 72px); color: var(--accent); }
.fx-fireworks .burst { position: absolute; width: 0; height: 0; }
.fx-fireworks .burst span {
  position: absolute; left: -1.5px; top: 0; width: 3px; height: 14px; border-radius: 3px; background: var(--c);
  transform: rotate(var(--a)) translateY(0); opacity: 0; animation: burst 2.6s var(--d) ease-out infinite;
}
@keyframes burst { 0% { transform: rotate(var(--a)) translateY(0); opacity: 1; } 75% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-90px); opacity: 0; } }
.fx-gold span, .fx-pastel span { position: absolute; top: -20px; width: 8px; height: 12px; background: var(--c); animation: fall linear infinite; }

/* ---------- Mardi Gras ---------- */
.ch-mardi .mg { font-family: "Abril Fatface", serif; font-weight: 400; font-size: clamp(48px, 9vw, 110px); white-space: nowrap; }
.mg span { display: inline-block; animation: wobble 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.4s); }
.mg span:nth-child(3n+1) { color: #f5c518; --i: 1; }
.mg span:nth-child(3n+2) { color: #3ddc84; --i: 2; }
.mg span:nth-child(3n)   { color: #d3a6ff; --i: 3; }
@keyframes wobble { 50% { transform: translateY(-6px) rotate(-3deg); } }
.strand { width: min(560px, 90%); margin: 0 auto 20px; display: block; overflow: visible; }
.strand path { fill: none; stroke: #f5c518; stroke-width: 16; stroke-linecap: round; stroke-dasharray: .0001 .028; }
.fx-beads span { position: absolute; top: -20px; border-radius: 50%; background: var(--c); box-shadow: inset -2px -2px 0 rgba(0,0,0,.2); animation: fall linear infinite; }

/* ---------- Golden hour: the sun sets as you scroll ---------- */
.ch-golden { min-height: 150vh; color: #fff8ec; }
.ch-golden h2 { font-family: "Fraunces", serif; text-shadow: 0 2px 24px rgba(120, 40, 40, .35); }
.ch-golden .kicker { color: #fff1d6; }
.sky {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(#ffcf7a, #ff8c5a 55%, #c2577a);
  -webkit-mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.sky-dusk { position: absolute; inset: 0; background: linear-gradient(#2c1b3d, #5a2d5c 60%, #8a3d5c); opacity: calc(var(--p, 0) * 1.5 - .35); }
.sun {
  position: absolute; left: 78%; width: 170px; height: 170px; border-radius: 50%; transform: translateX(-50%);
  top: calc(14% + var(--p, 0) * 62%);
  background: radial-gradient(circle, #fff6d0, #ffc56b 60%, #ff9a4a); box-shadow: 0 0 90px 30px rgba(255, 190, 110, .6);
}
.hills { position: absolute; left: 0; bottom: 8%; width: 100%; height: 28%; }

/* ---------- Beach weekend ---------- */
.ch-beach h2 { font-family: "Pacifico", cursive; font-weight: 400; color: var(--accent); font-size: clamp(44px, 8vw, 88px); }
.umbrella { width: 180px; height: 150px; margin: 30px auto 0; position: relative; }
.umbrella::before {
  content: ""; position: absolute; top: 0; left: 0; width: 180px; height: 90px; border-radius: 90px 90px 0 0;
  background: repeating-conic-gradient(from -90deg at 50% 100%, #ff7f50 0 22.5deg, #fff 22.5deg 45deg);
  animation: sway 4s ease-in-out infinite; transform-origin: 50% 100%;
}
.umbrella::after { content: ""; position: absolute; left: 88px; top: 88px; width: 4px; height: 62px; background: #8a6a4a; }
@keyframes sway { 50% { transform: rotate(4deg); } }
.fx-waves i, .fx-canal i { position: absolute; left: 0; bottom: 0; width: 200%; background-repeat: repeat-x; background-position: bottom left; animation: wave linear infinite; }
.fx-waves i:nth-child(1) {
  height: 130px; animation-duration: 14s; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='130'%3E%3Cpath d='M0 50 Q75 20 150 50 T300 50 V130 H0z' fill='%237fd3df'/%3E%3C/svg%3E");
}
.fx-waves i:nth-child(2) {
  height: 100px; animation-duration: 9s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='100'%3E%3Cpath d='M0 40 Q60 10 120 40 T240 40 V100 H0z' fill='%233fb6c9'/%3E%3C/svg%3E");
}
@keyframes wave { to { transform: translateX(-50%); } }

/* ---------- Home, officially ---------- */
.ch-house h2 { font-family: "Fraunces", serif; }
.in .week li:nth-child(3) { transition-delay: .9s; }
.in .week li:nth-child(6) { transition-delay: 1.4s; }
.in .week li:nth-child(7) { transition-delay: 1.6s; }
.sticky {
  display: block; max-width: 420px; margin: 40px auto 0; padding: 18px 22px; text-align: left;
  background: #fff7a8; color: #3a3320; font: 600 24px/1.25 "Caveat", cursive;
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
}
.in .sticky.reveal { transform: rotate(1.5deg); }
.fx-fence {
  top: auto; height: 110px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='90'%3E%3Cpath d='M8 90V16l10-12 10 12v74z' fill='%23fffdf8'/%3E%3Crect y='38' width='40' height='8' fill='%23fffdf8'/%3E%3Crect y='70' width='40' height='8' fill='%23fffdf8'/%3E%3C/svg%3E") repeat-x left bottom 20px / 40px 90px,
    linear-gradient(transparent calc(100% - 26px), #8cbf6a 0);
}

/* ---------- Family, growing ---------- */
.ch-growing h2 { font-family: "Playfair Display", serif; }
.welcome { display: inline-grid; margin: 24px 0; padding: 18px 40px; border: 2px dashed var(--accent); border-radius: 24px; background: #fff; }
.welcome small { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; color: var(--muted); }
.welcome strong { font: 400 76px/1.1 "Great Vibes", cursive; color: var(--accent); }
.greece-hint { margin-top: 30px; }
.greece-hint span { color: #1f6fb2; font-style: italic; font-weight: 600; }

/* ---------- Anniversary plot twist ---------- */
.ch-twist { min-height: 150vh; }
.ch-twist h2 { font-family: "Playfair Display", serif; font-style: italic; font-size: clamp(36px, 6vw, 68px); }
.sign { position: relative; width: 240px; height: 110px; margin: 80px auto 50px; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.3, 1.4, .5, 1); }
.sign::before { content: ""; position: absolute; left: 50%; top: -46px; width: 120px; height: 46px; transform: translateX(-50%); background: linear-gradient(to top right, transparent calc(50% - 1px), var(--muted) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1px), var(--muted) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.sign-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; font: 400 50px "Abril Fatface", serif; color: #fff; box-shadow: 0 14px 28px rgba(0,0,0,.25); }
.sign-face.front { background: #2f7d32; }
.sign-face.back { background: #b3261e; transform: rotateY(180deg); }
body[data-theme="perrys"] .sign { transform: rotateY(180deg); }
.ch-twist .late { opacity: 0; transform: translateY(30px); transition: opacity 1s .5s, transform 1s .5s; }
body[data-theme="perrys"] .ch-twist .late { opacity: 1; transform: none; }
body[data-theme="perrys"] .ch-twist .late h2 { color: var(--accent); font-style: normal; }
.fx-candle { background: radial-gradient(ellipse at 50% 100%, rgba(255, 170, 80, .35), transparent 60%); animation: flicker 3s ease-in-out infinite; }
@keyframes flicker { 30% { filter: brightness(1.15); } 60% { filter: brightness(.9); } }

/* ---------- Athens ---------- */
.ch-athens h2 { font-family: "Cinzel", serif; letter-spacing: .08em; }
.parthenon { width: min(520px, 92%); margin: 10px auto 26px; display: block; }
.parthenon path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - min(1, var(--p, 0) * 2.1)); }
.fx-greek i {
  position: absolute; left: 0; right: 0; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='28'%3E%3Cpath d='M2 26 H38 V2 H10 V18 H28 V10 H18' fill='none' stroke='%231f6fb2' stroke-width='3'/%3E%3C/svg%3E") repeat-x;
}
.fx-greek i:first-child { top: 10px; } .fx-greek i:last-child { bottom: 10px; }

/* ---------- Santorini ---------- */
.ch-santorini h2 { font-family: "Playfair Display", serif; font-style: italic; }
.flute { width: 70px; height: 170px; margin: 30px auto 0; position: relative; }
.flute::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 110px; border: 3px solid rgba(255,255,255,.8); border-top: 0;
  border-radius: 0 0 35px 35px; background: linear-gradient(transparent 20%, #f3d27a 20%, #e7b24a);
}
.flute::after { content: ""; position: absolute; left: 33px; top: 110px; width: 4px; height: 54px; background: rgba(255,255,255,.85); border-bottom: 4px solid #fff; }
.flute i { position: absolute; left: 30px; bottom: 70px; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: fizz 1.6s linear infinite; box-shadow: 10px 12px 0 -1px #fff, -10px 26px 0 -1px #fff; }
@keyframes fizz { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-80px); opacity: 0; } }
.ringbox { background: none; border: 0; padding: 0; margin: 26px auto 0; display: block; cursor: pointer; }
.ringbox svg { width: 150px; transform: rotate(180deg); transition: transform 1.3s cubic-bezier(.3, 1.5, .5, 1); filter: drop-shadow(0 12px 18px rgba(0,0,0,.3)); }
body[data-theme="santorini"] .ringbox svg, .ringbox.flipped svg { transform: rotate(0); }
.yes { font: 400 clamp(100px, 18vw, 170px)/1 "Great Vibes", cursive; color: var(--accent); margin: 10px 0 20px; }
.fx-rain span { position: absolute; top: -40px; width: 1.5px; height: 26px; background: linear-gradient(transparent, rgba(255,255,255,.65)); animation: rain linear infinite; }
@keyframes rain { to { transform: translate(-60px, 115vh); } }
.fx-domes svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 22vh; }

/* ---------- The second surprise ---------- */
.ch-surprise h2 { font-family: "Playfair Display", serif; font-size: clamp(34px, 5.5vw, 62px); }
.secret { list-style: none; padding: 0; margin: 30px auto; text-align: left; max-width: 480px; }
.secret li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(234, 241, 255, .12); }
.secret time { font-weight: 800; color: var(--accent); }
.routes { width: 100%; max-width: 600px; overflow: visible; margin-top: 10px; }
.route { fill: none; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: calc(1 - min(1, var(--p, 0) * 2.2)); }
.route.a { stroke: var(--accent); } .route.b { stroke: #8fd3ff; }
.routes circle { fill: var(--ink); }
.routes text { fill: var(--muted); font: 600 15px "DM Sans", sans-serif; }
.surprise-word { font: 400 clamp(80px, 14vw, 130px)/1 "Great Vibes", cursive; color: var(--accent); margin: 20px 0; }
.fx-flights span { position: absolute; font-size: 18px; color: rgba(234, 241, 255, .35); animation: fly linear infinite; }
@keyframes fly { from { transform: translateX(-10vw); } to { transform: translateX(115vw); } }

/* ---------- Venice ---------- */
.ch-venice { min-height: 130vh; }
.ch-venice h2 { font-family: "Playfair Display", serif; font-style: italic; color: var(--accent); }
.gondola { position: fixed; z-index: 1; left: 0; bottom: calc(18vh - 46px); transition: opacity .8s; width: 240px; transform: translateX(calc(-260px + var(--p, 0) * (100vw + 260px))); }
.fx-canal { top: auto; height: calc(18vh + 20px); background: linear-gradient(transparent 20px, #1f6f6a 20px); }
body:not([data-theme="venice"]) .gondola { opacity: 0; }
.fx-canal i { height: 40px; top: 0; bottom: auto; animation-duration: 12s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='40'%3E%3Cpath d='M0 20 Q40 8 80 20 T160 20 V40 H0z' fill='%231f6f6a'/%3E%3C/svg%3E"); }
.fx-canal i:nth-child(2) { top: 50px; height: 20px; opacity: .4; animation-duration: 7s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20'%3E%3Cpath d='M10 10 h40 M70 14 h30' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E"); }

/* ---------- Home to Winnie ---------- */
.ch-reunion { min-height: 140vh; }
.ch-reunion .inner { align-self: start; }
.ch-reunion h2 { font-family: "Caveat", cursive; font-size: clamp(56px, 9vw, 100px); }
body[data-theme="reunion"] #winnie { transform: translateX(calc(50vw - 60px)) translateY(-26vh) scale(1.7); }
body[data-theme="reunion"] .winnie-dog { animation: hop .5s ease-in-out infinite alternate; }
body[data-theme="reunion"] .winnie-dog .tail { animation-duration: .15s; }
@keyframes hop { to { translate: 0 -14px; } }
.fx-hearts span { position: absolute; bottom: -30px; color: var(--c); animation: rise linear infinite; }

/* ---------- Finale ---------- */
.signoff { font: 400 clamp(52px, 8vw, 80px)/1.1 "Great Vibes", cursive; color: var(--accent); margin-top: 20px; }

/* ---------- Which ambient layer belongs to which chapter ---------- */
body[data-theme="sub"]       .fx-sea,
body[data-theme="apart"]     .fx-snow,
body[data-theme="nye"]       .fx-fireworks,
body[data-theme="nye"]       .fx-gold,
body[data-theme="mardi"]     .fx-beads,
body[data-theme="beach"]     .fx-waves,
body[data-theme="house"]     .fx-fence,
body[data-theme="growing"]   .fx-pastel,
body[data-theme="perrys"]    .fx-candle,
body[data-theme="athens"]    .fx-greek,
body[data-theme="rain"]      .fx-rain,
body[data-theme="santorini"] .fx-domes,
body[data-theme="surprise"]  .fx-stars,
body[data-theme="surprise"]  .fx-flights,
body[data-theme="venice"]    .fx-canal,
body[data-theme="reunion"]   .fx-hearts { opacity: 1; }

/* ---------- Winnie's wardrobe, and her FaceTime cameo while we're abroad ---------- */
body[data-theme="mardi"] .acc-beads,
body[data-theme="beach"] .acc-shades { opacity: 1; }
body[data-theme="athens"] .winnie-dog, body[data-theme="rain"] .winnie-dog, body[data-theme="santorini"] .winnie-dog,
body[data-theme="surprise"] .winnie-dog, body[data-theme="venice"] .winnie-dog {
  height: 104px; width: 104px; margin-left: 8px; padding: 10px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px var(--accent), 0 12px 24px rgba(0,0,0,.25); overflow: hidden;
}
#winnie::after {
  content: "FaceTime from Grandma's"; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff;
  font: 700 10px "DM Sans", sans-serif; letter-spacing: .04em; opacity: 0; transition: opacity .4s;
}
body[data-theme="athens"] #winnie::after, body[data-theme="rain"] #winnie::after, body[data-theme="santorini"] #winnie::after,
body[data-theme="surprise"] #winnie::after, body[data-theme="venice"] #winnie::after { opacity: 1; }

@media (max-width: 760px) {
  .beat { margin-bottom: 18vh; }
  .porthole { width: 200px; height: 200px; border-width: 14px; }
  .xmas .half { height: 150px; }
  .tree { width: 50px; height: 66px; }
  .sun { width: 110px; height: 110px; }
  .welcome strong { font-size: 60px; }
  .secret li { grid-template-columns: 76px 1fr; }
  .gondola { width: 170px; }
  body[data-theme="reunion"] #winnie { transform: translateX(calc(50vw - 45px)) translateY(-24vh) scale(1.6); }
  body[data-theme="athens"] .winnie-dog, body[data-theme="rain"] .winnie-dog, body[data-theme="santorini"] .winnie-dog,
  body[data-theme="surprise"] .winnie-dog, body[data-theme="venice"] .winnie-dog { width: 80px; height: 80px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .person, .roll-call span { transform: none; opacity: 1; }
}

/* At the reunion Winnie is center stage, so her bubble centers above her */
body[data-theme="reunion"] .winnie-bubble { transform: translateX(-50%) !important; max-width: min(220px, 56vw); text-align: center; }

/* ============================================================
   Part three: Bills, Broadway, and Wednesday Music Bingo
============================================================ */
body[data-theme="bills"] { --bg:#00338d; --ink:#ffffff; --muted:#b9c8ea; --accent:#c60c30; }
body[data-theme="beast"] { --bg:#151032; --ink:#f8e9c8; --muted:#c9b98f; --accent:#e2b84a; }
body[data-theme="bingo"] { --bg:#fff4dc; --ink:#2a1e12; --muted:#7a6248; --accent:#e8501f; }

/* ---------- Go Bills ---------- */
.ch-bills h2 { font-family: "Alfa Slab One", serif; font-weight: 400; font-size: clamp(36px, 6vw, 70px); }
.football { width: 170px; margin: 20px auto; display: block; }
.in .football { animation: spiral 1.2s .3s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes spiral { from { transform: translateX(-60vw) rotate(-720deg) scale(.4); } }
.go-bills {
  display: inline-block; margin-top: 10px; padding: 8px 26px;
  font: 400 clamp(48px, 9vw, 96px)/1.05 "Alfa Slab One", serif; color: #fff;
  background: var(--accent); border: 5px solid #fff; border-radius: 14px;
}
.in .go-bills { animation: stamp .6s 1.2s cubic-bezier(.3, 1.8, .5, 1) both; }
.fx-footballs span { position: absolute; top: -40px; animation: fall linear infinite; }
body[data-theme="bills"] .acc-bandana { opacity: 1; }
body[data-theme="bills"] .acc-bandana path { fill: #c60c30; }

/* ---------- Beauty and the Beast: the curtains part as you scroll ---------- */
.ch-beast { --o: clamp(0, calc((var(--p, 0) - .12) * 3.2), 1); min-height: 140vh; }
.ch-beast h2 { font-family: "Playfair Display", serif; font-style: italic; color: var(--accent); }
.curtain {
  position: absolute; top: 0; bottom: 0; width: 51%; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(90deg, #6e0d1a 0 18px, #a3192b 18px 34px, #7f1020 34px 48px);
  box-shadow: inset 0 -40px 60px rgba(0,0,0,.35);
}
.curtain::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: #e2b84a; }
.curtain.left  { left: 0;  transform: translateX(calc(var(--o) * -100%)); }
.curtain.right { right: 0; transform: translateX(calc(var(--o) * 100%)); }
.rose { width: 170px; display: block; margin: 10px auto 20px; overflow: visible; }
.rose .petal { animation: petal 4.5s ease-in infinite; transform-box: fill-box; }
.rose .petal.p2 { animation-delay: 2.2s; }
@keyframes petal { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(-8px, 40px) rotate(160deg); opacity: 0; } }
.encore { margin-top: 26px; font-style: italic; }
.encore small {
  display: block; margin-bottom: 6px; font: 700 12px "DM Sans", sans-serif; font-style: normal;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
}
.fx-petals span { position: absolute; top: -20px; border-radius: 50% 0 50% 0; background: var(--c); animation: fall linear infinite; }

/* ---------- Music Bingo ---------- */
.ch-bingo h2 { font-family: "Bungee", sans-serif; font-weight: 400; font-size: clamp(32px, 5vw, 56px); color: var(--accent); }
.bingo-card {
  justify-self: center; position: relative; width: min(340px, 82vw); padding: 14px;
  background: #fff; border-radius: 18px; border: 4px solid #7cb342; box-shadow: 0 18px 36px rgba(42, 30, 18, .18);
}
.bingo-head, .bingo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bingo-head b { text-align: center; font: 400 30px/1.3 "Bungee", sans-serif; color: var(--c, #e8501f); }
.bingo-head b:nth-child(even) { color: #7cb342; }
.bingo-grid i {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; font-style: normal; font-size: 22px;
  color: #7a6248; background: #fff8ea; border-radius: 8px;
}
.bingo-grid i::after {
  content: ""; position: absolute; inset: 12%; border-radius: 50%; background: rgba(232, 80, 31, .75);
  opacity: clamp(0, calc((var(--p, 0) - .25) * 70 - var(--k)), 1); transition: opacity .2s;
}
.bingo-grid i.on::after { opacity: 1; }
.bingo-call {
  position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%) rotate(-10deg);
  font: 400 clamp(46px, 8vw, 70px)/1 "Bungee", sans-serif; color: #fff; text-shadow: 0 4px 0 #7cb342, 0 8px 24px rgba(0,0,0,.3);
  opacity: clamp(0, calc((var(--p, 0) - .62) * 12), 1); pointer-events: none;
}
.fx-notes span { position: absolute; bottom: -40px; color: var(--c); animation: rise linear infinite; }

/* Wednesday interludes: little bands that keep interrupting the story, like bingo did */
.interlude {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap;
  padding: 7vh 16px 7vh 56px; background: #fff4dc; color: #2a1e12;
  border-block: 6px dashed #7cb342;
}
.interlude p { margin: 0; font: 400 clamp(20px, 3vw, 30px)/1.3 "Bungee", sans-serif; color: #e8501f; max-width: 460px; }
.interlude p strong { display: block; color: #2a1e12; font-weight: 400; }
.bingo-card.mini { width: 150px; padding: 8px; border-width: 3px; border-radius: 12px; transform: rotate(-4deg); }
.bingo-card.mini .bingo-head b { font-size: 14px; }
.bingo-card.mini .bingo-grid { gap: 3px; }
.bingo-card.mini .bingo-grid i { font-size: 10px; border-radius: 4px; }
.interlude .bingo-card.mini { opacity: 0; transform: rotate(-4deg) scale(.8); transition: opacity .6s, transform .6s var(--ease); }
.interlude.in .bingo-card.mini { opacity: 1; transform: rotate(-4deg); }

body[data-theme="bills"] .fx-footballs,
body[data-theme="beast"] .fx-petals,
body[data-theme="bingo"] .fx-notes { opacity: 1; }

/* ---------- Winnie, a bit bigger on computer screens ---------- */
@media (min-width: 1100px) {
  #winnie, .winnie-dog { width: 160px; }
  body[data-theme="athens"] .winnie-dog, body[data-theme="rain"] .winnie-dog, body[data-theme="santorini"] .winnie-dog,
  body[data-theme="surprise"] .winnie-dog, body[data-theme="venice"] .winnie-dog { width: 136px; height: 136px; padding: 14px; }
  body[data-theme="reunion"] #winnie { transform: translateX(calc(50vw - 80px)) translateY(-26vh) scale(1.6); }
}
@media (max-width: 760px) {
  .interlude { padding-left: 40px; gap: 16px; }
  .bingo-card.mini { width: 120px; }
}

/* ============================================================
   Wedding details + the always-visible shortcut
============================================================ */
body[data-theme="details"] { --bg:#f6f1e8; --ink:#2b2420; --muted:#7a6d63; --accent:#9c5b3c; }
body[data-theme="details"] .acc-hat { opacity: 1; }

.jump {
  position: fixed; top: 14px; right: 16px; z-index: 7;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  font: 700 14px/1 "DM Sans", sans-serif; letter-spacing: .02em;
  background: var(--accent); color: var(--bg);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: background-color 1.1s var(--ease), color 1.1s var(--ease), transform .2s;
}
.jump:hover { transform: translateY(-2px); }
.jump:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.ch-details { align-items: start; padding-top: 16vh; padding-bottom: 30vh; }
.ch-details h2 { font-family: "Playfair Display", serif; font-style: italic; font-size: clamp(54px, 9vw, 104px); margin-bottom: 0; }
.details-names { font: 400 clamp(40px, 6vw, 64px)/1.1 "Great Vibes", cursive; color: var(--accent); margin: 0 0 10px; }
.details-date { font: 600 clamp(18px, 2.4vw, 24px) "Playfair Display", serif; letter-spacing: .04em; }
.countdown-days { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; }
.tba { font-style: italic; color: var(--muted); font-weight: 400; }

.rsvp-button {
  display: inline-block; margin: 14px 0 46px; padding: 16px 42px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 700 16px "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(156, 91, 60, .3);
}
.rsvp-button.soon { background: transparent; color: var(--muted); border: 2px dashed var(--muted); box-shadow: none; letter-spacing: .06em; text-transform: none; cursor: default; }

.registry-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 18px; }
.registry-button {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 700 13px "DM Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(156, 91, 60, .25);
}
.dcard a.registry-button { color: #fff; }
.registry-button.soon { background: transparent; color: var(--muted); border: 2px dashed var(--muted); box-shadow: none; letter-spacing: .04em; text-transform: none; padding: 8px 18px; }
.dcard .registry-winnie { font-style: italic; font-size: 14px; color: var(--muted); margin: 0; }

.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: left; }
.dcard { background: #fffdf9; border: 1px solid #eadfce; border-radius: 18px; padding: 26px 28px; box-shadow: 0 10px 26px rgba(43, 36, 32, .06); }
.dcard.wide { grid-column: 1 / -1; }
.dcard h3 { margin: 0 0 14px; font: 700 13px "DM Sans", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.dcard p { margin: 0 0 10px; }
.dcard a { color: var(--accent); }
.dcard.wide:first-child { display: block; }
.dcard.wide:first-child .place { display: inline-block; vertical-align: top; width: calc(50% - 12px); margin-right: 12px; }
.place-label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.place-venue { font: 600 22px/1.3 "Playfair Display", serif; }

.schedule { list-style: none; margin: 0; padding: 0; }
.schedule li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0e7da; }
.schedule li:last-child { border-bottom: 0; }
.schedule time { font-weight: 700; }

.dcard details { border-bottom: 1px solid #f0e7da; padding: 10px 0; }
.dcard details:last-child { border-bottom: 0; }
.dcard summary { cursor: pointer; font-weight: 600; }
.dcard details p { margin: 8px 0 0; }

.austin { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.austin li { display: grid; gap: 2px; }
.austin strong { font-family: "Playfair Display", serif; font-size: 18px; }
.austin span { color: var(--muted); }

@media (max-width: 760px) {
  .jump { top: 10px; right: 10px; padding: 8px 14px; font-size: 13px; }
  .details-grid, .austin { grid-template-columns: 1fr; }
  .dcard { padding: 20px; }
  .dcard.wide:first-child .place { display: block; width: auto; margin: 0 0 12px; }
  .schedule li { grid-template-columns: 110px 1fr; }
}
.austin li { align-content: start; }
@media (max-width: 760px) { body[data-theme="details"] .winnie-bubble { opacity: 0; } }

/* Around Austin: photo cards */
.austin { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.austin li { display: flex; flex-direction: column; gap: 6px; }
.austin-pic { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #efe5d6; }
.austin-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.austin-pic:hover img { transform: scale(1.04); }
.austin-icon { display: grid; place-items: center; width: 100%; height: 100%; font-size: 54px; background: linear-gradient(135deg, #f3e6d2, #e9d3b6); }
.austin .credit { font-size: 11px; color: var(--muted); text-decoration: none; margin-top: -2px; }
.austin .credit:hover { text-decoration: underline; }
.austin-name { font: 600 18px/1.3 "Playfair Display", serif; color: var(--ink); text-decoration: none; }
.austin-name:hover { color: var(--accent); }
.austin-name span { font-size: 13px; color: var(--accent); }
.austin-note { color: var(--muted); font-size: 15px; line-height: 1.45; }
@media (max-width: 1000px) { .austin { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .austin { grid-template-columns: 1fr; } }
.schedule li { grid-template-columns: 150px 1fr; }
.schedule time { white-space: nowrap; }
.austin-pic { text-decoration: none; }
@media (max-width: 760px) { .schedule li { grid-template-columns: 130px 1fr; } }

/* ============================================================
   Part five: Kobe hibachi, the first Bills game, big Winnie, the rest of the weekend
============================================================ */
body[data-theme="hibachi"] { --bg:#1c1412; --ink:#fff3e6; --muted:#d9b9a0; --accent:#ff7a2b; }
body[data-theme="hibachi"] .fx-embers { opacity: 1; }
.fx-embers span { position: absolute; bottom: -10px; border-radius: 50%; background: var(--c, #ff8a1f); box-shadow: 0 0 8px var(--c, #ff8a1f); animation: rise linear infinite; }

/* ---------- Kobe Steakhouse: the onion volcano erupts as it comes into view ---------- */
.ch-kobe h2 { font-family: "Alfa Slab One", serif; font-weight: 400; font-size: clamp(36px, 6vw, 68px); color: var(--accent); }
.volcano { width: 220px; display: block; margin: 18px auto 10px; overflow: visible; }
.volcano .flames { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); }
.in .volcano .flames { animation: erupt .9s .5s cubic-bezier(.3, 1.6, .5, 1) forwards, flicker .18s 1.4s ease-in-out infinite alternate; }
@keyframes erupt { to { transform: scale(1); } }
@keyframes flicker { from { transform: scale(1, 1); } to { transform: scale(.94, 1.08); } }
.ch-kobe .roll-call span:nth-child(5) { color: var(--accent); }

/* ---------- Bills: the first game, in small print ---------- */
.fine-print { max-width: 520px; margin: 22px auto 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Escape room shout-out ---------- */
.shout { font-family: "Caveat", cursive; font-size: 26px; color: var(--accent); }

/* ---------- Officially our dog: Winnie takes center stage, big ---------- */
.winnie-stage { height: 300px; }
body[data-theme="trucks"] #winnie { width: 260px; transform: translateX(calc(50vw - 130px)); transition: transform .5s var(--ease), width .5s var(--ease); }
body[data-theme="trucks"] .winnie-dog { width: 260px; transition: width .5s var(--ease); }
body[data-theme="trucks"] .winnie-bubble { transform: translateX(-50%) !important; text-align: center; bottom: 62%; }
#winnie, .winnie-dog { transition: transform .5s var(--ease), width .5s var(--ease); }
@media (min-width: 1100px) {
  body[data-theme="trucks"] #winnie, body[data-theme="trucks"] .winnie-dog { width: 340px; }
  body[data-theme="trucks"] #winnie { transform: translateX(calc(50vw - 170px)); }
  .winnie-stage { height: 360px; }
}
@media (max-width: 760px) {
  body[data-theme="trucks"] #winnie, body[data-theme="trucks"] .winnie-dog { width: 200px; }
  body[data-theme="trucks"] #winnie { transform: translateX(calc(50vw - 100px)); }
  .winnie-stage { height: 220px; }
}

/* ---------- The rest of the weekend ---------- */
.weekend-day + .weekend-day { margin-top: 16px; }
.weekend-day .schedule { margin-top: 4px; }
