:root {
  --bg: #090807;
  --bg-raise: #12100e;
  --cream: #f4efe6;
  --cream-dim: #c9c2b6;
  --gold: #e4c89a;
  --gold-deep: #c6a06a;
  --rose: #f3b6c8;
  --rose-deep: #d47a96;
  --blush: #ffd6e4;
  --ink: #14110e;
  --line: rgba(228, 200, 154, 0.32);
  --line-soft: rgba(244, 239, 230, 0.12);
  --gutter: max(1.15rem, env(safe-area-inset-left, 0px), 5vw);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --fast: 160ms;
  --move: 480ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header: calc(3.25rem + env(safe-area-inset-top, 0px));
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: auto;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(228, 200, 154, 0.08), transparent 42%),
    var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

html.is-today {
  --header: calc(4.55rem + env(safe-area-inset-top, 0px));
}
html.is-today body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(243, 182, 200, 0.16), transparent 46%),
    var(--bg);
}

button, a { -webkit-tap-highlight-color: transparent; }
button, .dest, .letter-door, .pit, .card, .mote, .hold {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
body.is-curtained { overflow: hidden; }
img { max-width: 100%; height: auto; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection { background: var(--gold-deep); color: var(--ink); }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.6rem;
  z-index: 70;
  transform: translateY(-140%);
  background: var(--cream);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}
.skip:focus { transform: none; }

.progress {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.bar {
  position: fixed;
  z-index: 25;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--header);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0.4rem;
  background: linear-gradient(to bottom, rgba(9, 8, 7, 0.94) 0 70%, rgba(9, 8, 7, 0));
  pointer-events: none;
}
.bar-slot, .bar-end, .bar button { pointer-events: auto; }
.bar-end { justify-self: end; display: flex; gap: 0.35rem; }
.bar-title {
  margin: 0;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.text, .quiet, .solid, .choice {
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 400;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.text {
  background: transparent;
  border: 0;
  color: var(--cream);
  padding-inline: 0.2rem;
}
.text[aria-pressed="true"] { color: var(--gold); }
.quiet {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}
.solid, .choice.is-on {
  background: var(--gold-deep);
  color: var(--ink);
  border: 1px solid var(--gold-deep);
}
.choice {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}
.text:active, .quiet:active, .solid:active, .choice:active, .dest:active, .letter-door:active {
  transform: scale(0.98);
}

.screen { min-height: 100vh; min-height: 100dvh; }
.screen:focus { outline: none; }
.home-frame {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding:
    calc(var(--header) + 1.4rem)
    var(--gutter)
    calc(2.5rem + env(safe-area-inset-bottom));
}
.eyebrow {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--gold);
}
h1, .block-title, .dest-title {
  font-family: var(--serif);
  font-weight: 560;
  font-style: italic;
  letter-spacing: -0.035em;
}
.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html.is-today .hero h1,
html.is-kept .hero h1 {
  position: static;
  width: auto;
  height: auto;
  margin: 0.45rem 0 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  font-size: clamp(4.2rem, 18vw, 7.5rem);
  line-height: 0.88;
  font-style: normal;
  letter-spacing: -0.055em;
  color: var(--cream);
}
.hero { position: relative; }
.hero.is-leaving .count {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease);
}

.count-days {
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(4.6rem, 22vw, 8.4rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}
.count-days span:last-child {
  margin-left: 0.35rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.count-rest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.3rem;
  margin: 0.7rem 0 0;
}
.count-rest b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--gold);
}
.count-rest i {
  margin-left: 0.35rem;
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.tick { animation: tick 0.45s var(--ease); }

.today-line {
  display: none;
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: -0.03em;
}
html.is-today .count,
html.is-kept .count { display: none; }
html.is-today .today-line,
html.is-kept .today-line { display: block; }
.today-line.is-new { animation: arrive 0.9s var(--ease); }
.next-note {
  max-width: 22rem;
  margin: 0.8rem 0 0;
  color: var(--cream-dim);
  font-size: 0.92rem;
}
@property --day-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}
@property --day-y {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 8%;
}
@property --day-a {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.08;
}
html.is-today {
  transition: --day-x 1.1s linear, --day-y 1.1s linear, --day-a 1.1s linear;
}
html.is-today body {
  background:
    radial-gradient(ellipse 68% 46% at var(--day-x) var(--day-y), rgba(228, 200, 154, var(--day-a)), transparent 58%),
    radial-gradient(ellipse 42% 34% at 12% 92%, rgba(212, 122, 150, 0.2), transparent 58%),
    radial-gradient(ellipse 36% 28% at calc(var(--day-x) + 6%) calc(var(--day-y) + 10%), rgba(243, 182, 200, calc(var(--day-a) * 0.7)), transparent 52%),
    #120c10;
}
.day-clock {
  display: none;
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
html.is-today .day-clock { display: block; }
.hours {
  display: none;
  gap: 0.22rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
html.is-today .hours { display: flex; }
.hours li {
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: rgba(228, 200, 154, 0.16);
}
.hours li.is-past { background: rgba(228, 200, 154, 0.5); }
.hours li.is-now {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(228, 200, 154, 0.85);
}
html[data-phase="dawn"] body {
  background: radial-gradient(ellipse at 50% -8%, rgba(228, 200, 154, 0.16), transparent 46%), var(--bg);
}
html[data-phase="day"] body,
html[data-phase="afternoon"] body {
  background: radial-gradient(ellipse at 50% -12%, rgba(228, 200, 154, 0.12), transparent 44%), var(--bg);
}
html[data-phase="gold"] body {
  background: radial-gradient(ellipse at 50% -6%, rgba(228, 200, 154, 0.28), transparent 48%), var(--bg);
}
html[data-phase="evening"] body {
  background: radial-gradient(ellipse at 50% -10%, rgba(228, 200, 154, 0.14), transparent 42%), var(--bg);
}
html[data-phase="night"] body,
html[data-phase="late"] body {
  background: radial-gradient(ellipse at 50% -18%, rgba(228, 200, 154, 0.05), transparent 38%), #070605);
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: calc(var(--header) + 1.2rem) var(--gutter) calc(1.6rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 38%, rgba(228, 200, 154, 0.22), transparent 52%),
    #090807;
}
.veil-name {
  margin: 0 0 0.4rem;
  max-width: 8em;
  font-family: var(--serif);
  font-weight: 560;
  font-style: italic;
  font-size: clamp(3.4rem, 16vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.veil-line {
  max-width: 18em;
  margin: 0;
  color: var(--cream-dim);
  font-size: 1.05rem;
}
.veil-promise {
  max-width: 22em;
  margin: 0;
  color: var(--cream);
  font-size: 1.02rem;
}
.veil.is-waiting {
  background:
    radial-gradient(ellipse 55% 42% at 50% 78%, rgba(228, 200, 154, 0.08), transparent 62%),
    #070605;
}
.veil.is-waiting .veil-name {
  max-width: none;
  font-style: normal;
  font-size: clamp(6.4rem, 32vw, 12rem);
  letter-spacing: -0.07em;
}
.wait-note {
  max-width: 22rem;
  margin: 0.85rem 0 0;
  color: var(--gold);
  font-size: 0.95rem;
}
body.is-veiled { overflow: hidden; }
body.is-opening,
body.is-opening .bar button { pointer-events: none; }
html[data-phase="gold"] .veil {
  background:
    radial-gradient(ellipse at 50% 36%, rgba(228, 200, 154, 0.34), transparent 54%),
    #0c0a08;
}
html[data-phase="night"] .veil,
html[data-phase="late"] .veil {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(228, 200, 154, 0.08), transparent 46%),
    #070605;
}
html.is-today .veil {
  background:
    radial-gradient(ellipse 80% 52% at var(--day-x) var(--day-y), rgba(228, 200, 154, var(--day-a)), transparent 56%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(212, 122, 150, 0.22), transparent 58%),
    #120c10;
}
.wheel-stage {
  position: relative;
  width: min(78vw, 18.5rem);
  margin: 1.1rem auto 0;
  aspect-ratio: 1;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(228, 200, 154, 0.45);
  background: conic-gradient(#241c14, #14110e);
}
.wheel-pointer {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid var(--gold);
}
.wheel-hub {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: #090807;
  border: 1px solid rgba(228, 200, 154, 0.4);
  pointer-events: none;
}

.marks {
  display: flex;
  gap: 0.42rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}
.marks li {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  border: 1px solid rgba(228, 200, 154, 0.5);
}
.marks li.is-lit {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(228, 200, 154, 0.65);
}
.marks-caption {
  max-width: 22rem;
  margin: 0.7rem 0 0;
  color: var(--cream-dim);
  font-size: 0.82rem;
}

.rail-col { margin-top: 2.6rem; }
.block-title {
  margin: 0.4rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.dests { display: grid; gap: 0.6rem; margin-top: 1rem; }
.dest, .letter-door {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  color: var(--cream);
  background: rgba(244, 239, 230, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 1.1rem;
  padding: 0.95rem 1rem 1rem;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.dest:hover, .letter-door:hover, .dest:focus-visible, .letter-door:focus-visible {
  border-color: var(--line);
  background: rgba(244, 239, 230, 0.05);
}
.dest-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.64rem;
  color: var(--gold);
}
.dest-title {
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  line-height: 1.05;
}
.dest-note {
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 34rem;
}
.dest-oware { background:
  radial-gradient(ellipse at 100% 120%, rgba(198, 160, 106, 0.18), transparent 55%),
  rgba(244, 239, 230, 0.03);
}
.dest-lights { box-shadow: inset 0 0 40px rgba(228, 200, 154, 0.04); }
.letter-door { margin-top: 0.85rem; background: transparent; }
.colophon {
  margin: 1.1rem 0 0;
  color: var(--cream-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.66rem;
}
.birthday-colophon,
.feast,
.veil-wish,
.veil-feast,
.veil-age,
.age-mark,
.age-ribbon,
.edge-candles,
.party,
.party-rail { display: none; }

html.is-today .birthday-colophon {
  display: block;
  margin: 1.2rem 0 0;
  color: var(--rose);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
html.is-today .bar-title { color: var(--rose); }
html.is-today .bar {
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  padding-top: 0.35rem;
  min-height: 2.85rem;
  background: linear-gradient(to bottom, rgba(18, 10, 14, 0.94) 0 72%, rgba(18, 10, 14, 0));
}
html.is-today .progress {
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  background: rgba(243, 182, 200, 0.18);
}
html.is-today .progress span {
  background: linear-gradient(90deg, var(--rose), var(--gold));
}
html.is-today .eyebrow { color: var(--rose); }
html.is-today .dest,
html.is-today .letter-door {
  border-color: rgba(243, 182, 200, 0.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(243, 182, 200, 0.08), transparent 46%),
    rgba(244, 239, 230, 0.03);
}
html.is-today .dest-kicker { color: var(--rose); }
html.is-today .solid,
html.is-today .choice.is-on {
  background: linear-gradient(180deg, var(--rose), var(--rose-deep));
  border-color: var(--rose-deep);
  color: #1a1014;
}
html.is-today .hours li.is-now {
  background: var(--rose);
  box-shadow: 0 0 8px rgba(243, 182, 200, 0.9);
}
html.is-today .marks li.is-lit:nth-child(odd) {
  background: var(--rose);
  border-color: var(--rose);
  box-shadow: 0 0 8px rgba(243, 182, 200, 0.7);
}
html.is-today .hero::before {
  content: "Happy birthday";
  position: absolute;
  top: 0.2rem;
  left: -0.1em;
  z-index: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3.4rem, 16vw, 7rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--rose);
  opacity: 0.08;
  pointer-events: none;
  white-space: nowrap;
}
html.is-after .hero::before { content: "Eighteen"; }
html.is-today .hero > * { position: relative; z-index: 1; }
html.is-today .age-mark {
  display: block;
  margin: 0.45rem 0 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(5.2rem, 22vw, 9.5rem);
  line-height: 0.76;
  letter-spacing: -0.08em;
  color: var(--rose);
  text-shadow: 0 0 42px rgba(243, 182, 200, 0.38);
}
html.is-after .hero h1 {
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  margin-top: 0.15rem;
  color: var(--blush);
  font-style: italic;
}
html.is-after .today-line {
  max-width: 22rem;
  font-size: clamp(1.35rem, 5.2vw, 2.05rem);
}
html.is-today .age-ribbon {
  display: inline-block;
  margin: 0.7rem 0 0;
  padding: 0.48rem 0.95rem;
  border: 1px solid rgba(243, 182, 200, 0.5);
  border-radius: 999px;
  color: var(--blush);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  background: rgba(26, 16, 20, 0.45);
}
html.is-today .feast {
  display: block;
  margin: 1.15rem 0 0;
  max-width: 26rem;
}
html.is-today .still-stage {
  position: relative;
  width: min(17.5rem, 100%);
}
html.is-today .companions {
  position: static;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  margin: 0.15rem 0 0;
  pointer-events: none;
}
.still {
  display: block;
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
}
.still-rose { width: 48%; }
.still-coupe { width: 42%; margin-bottom: 0.15rem; }
.feast-kicker {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--rose);
}
.feast-name {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3.6vw, 1.65rem);
  letter-spacing: -0.03em;
  color: var(--cream);
}
.cake {
  position: relative;
  width: min(16.5rem, 100%);
  margin: 0.85rem 0 0;
  display: grid;
  justify-items: center;
}
html.is-today .cake-hero { width: min(17.5rem, 100%); }
html.is-today .still-stage .cake-hero { width: 100%; }
.cake-photo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.48));
}
.candles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.28rem;
  height: 2.1rem;
  margin-bottom: -0.15rem;
  z-index: 2;
}
.candles-18 {
  flex-wrap: wrap;
  width: 82%;
  height: auto;
  gap: 0.2rem 0.28rem;
  padding-bottom: 0.2rem;
}
.candles-18 i { height: 1.05rem; }
.candles i {
  position: relative;
  display: block;
  width: 0.28rem;
  height: 1.15rem;
  border-radius: 1px 1px 0 0;
  background: linear-gradient(#fff6ea, #f3b6c8);
}
.candles i:nth-child(even) { background: linear-gradient(#fff8e4, #e4c89a); height: 1.35rem; }
.candles i:nth-child(3n) { background: linear-gradient(#ffe4ee, #d47a96); }
.candles i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.62rem;
  width: 0.42rem;
  height: 0.7rem;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 40% 30%, #fff6c8, #ffb347 42%, #ff6b4a 70%, transparent 74%);
  animation: flicker 0.9s ease-in-out infinite alternate;
}
.candles i:nth-child(even)::before { animation-duration: 0.7s; }
.candles i:nth-child(3n)::before {
  animation-duration: 1.1s;
  background: radial-gradient(circle at 40% 30%, #fff, #f3b6c8 48%, #d47a96 72%, transparent 76%);
}
.tier {
  border-radius: 0.45rem 0.45rem 0.2rem 0.2rem;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.12);
}
.tier-3 {
  width: 58%;
  height: 1.35rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.45), transparent 28%),
    linear-gradient(180deg, #ffe4ee, #f3b6c8 55%, #d47a96);
}
.tier-2 {
  position: relative;
  width: 74%;
  height: 1.7rem;
  margin-top: -0.12rem;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 32%),
    linear-gradient(180deg, #f7efe4, #e4c89a 60%, #c6a06a);
}
.tier-2::after {
  content: "18";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--serif);
  font-weight: 560;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #6b3a48;
}
.tier-1 {
  position: relative;
  width: 90%;
  height: 2rem;
  margin-top: -0.12rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 214, 228, 0.5), transparent 36%),
    linear-gradient(180deg, #f3b6c8, #c45d7c);
  border-radius: 0.5rem 0.5rem 0.35rem 0.35rem;
}
.tier-1::before,
.tier-1::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 0.55rem;
  height: 0.7rem;
  background: #d47a96;
  border-radius: 0 0 40% 40%;
}
.tier-1::before { left: 22%; }
.tier-1::after { left: 68%; background: #e4c89a; }
.dish {
  width: 100%;
  height: 0.38rem;
  margin-top: 0.12rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4efe6, #c6a06a);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}
.cake-veil { width: min(16.5rem, 72vw); }
html.is-today .veil:not(.is-waiting) .veil-age {
  display: block;
  margin: 0 0 0.1rem;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(4.8rem, 22vw, 8.5rem);
  line-height: 0.78;
  letter-spacing: -0.08em;
  color: var(--rose);
  text-shadow: 0 0 36px rgba(243, 182, 200, 0.4);
}
html.is-today .veil:not(.is-waiting) .veil-wish {
  display: block;
  margin: 0 0 0.15rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  letter-spacing: -0.03em;
  color: var(--rose);
}
html.is-today .veil:not(.is-waiting) .veil-feast { display: block; margin: 0.35rem 0 0.2rem; }
html.is-today body::before {
  content: "";
  position: fixed;
  inset: calc(1.55rem + env(safe-area-inset-top, 0px)) 0.45rem calc(1.6rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  pointer-events: none;
  border: 1px solid rgba(243, 182, 200, 0.32);
  border-radius: 14px;
  box-shadow: inset 0 0 90px rgba(243, 182, 200, 0.07);
}
html.is-after .hours { display: none; }
html.is-kept .birthday-colophon {
  display: block;
  margin: 1.2rem 0 0;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
html.is-today .party-rail {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 62;
  overflow: hidden;
  pointer-events: none;
  color: var(--blush);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.62rem;
  white-space: nowrap;
}
.party-rail-top {
  top: 0;
  height: calc(1.5rem + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(90deg, #1a1014, #2a1420 50%, #1a1014);
  border-bottom: 1px solid rgba(243, 182, 200, 0.28);
}
.party-rail-foot {
  bottom: 0;
  height: calc(1.55rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(90deg, #1a1014, #24180f 50%, #1a1014);
  border-top: 1px solid rgba(228, 200, 154, 0.28);
}
.party-run {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: max-content;
  height: 1.5rem;
  padding-inline: 1rem;
  animation: marquee 32s linear infinite;
}
.party-run-rev { animation-duration: 38s; animation-direction: reverse; }
.party-run span { color: var(--cream); }
.party-run span.is-rose { color: var(--rose); }
.party-run span.is-gold { color: var(--gold); }
.tiny-cake,
.tiny-candle {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}
.tiny-cake {
  width: 0.85rem;
  height: 0.72rem;
  border-radius: 0.12rem 0.12rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, #ffe4ee, #d47a96);
  box-shadow: 0 0.28rem 0 -0.08rem #e4c89a;
}
.tiny-cake.gold { background: linear-gradient(180deg, #fff1d4, #c6a06a); }
.tiny-cake.cream { background: linear-gradient(180deg, #fff, #f4efe6); }
.tiny-cake::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.42rem;
  width: 0.22rem;
  height: 0.38rem;
  transform: translateX(-50%);
  background: #fff6ea;
  box-shadow: 0 -0.22rem 0.18rem #ffb347;
}
.tiny-candle {
  width: 0.22rem;
  height: 0.7rem;
  background: linear-gradient(#fff6ea, #f3b6c8);
  box-shadow: 0 -0.28rem 0.22rem #ffc14a;
}
.tiny-candle.gold { background: linear-gradient(#fff8e4, #e4c89a); }
html.is-today .home-frame,
html.is-today .game-frame,
html.is-today .finale {
  padding-bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px));
}
html.is-today .party { display: block; }
.petal,
.float-cake,
.float-candle {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}
.petal { z-index: 0; }
.petal {
  width: 0.55rem;
  height: 0.8rem;
  border-radius: 70% 10% 70% 10%;
  background: linear-gradient(135deg, var(--blush), var(--rose-deep));
  opacity: 0.55;
  animation: petal-fall 14s linear infinite;
}
.petal:nth-child(2n) { background: linear-gradient(135deg, #fff1d4, var(--gold-deep)); }
.petal:nth-child(3n) { width: 0.4rem; height: 0.62rem; background: linear-gradient(135deg, #fff, #f3b6c8); }
.petal:nth-child(1) { left: 6%; animation-delay: -1s; animation-duration: 16s; }
.petal:nth-child(2) { left: 14%; animation-delay: -4s; animation-duration: 12s; }
.petal:nth-child(3) { left: 22%; animation-delay: -8s; }
.petal:nth-child(4) { left: 31%; animation-delay: -2s; animation-duration: 18s; }
.petal:nth-child(5) { left: 39%; animation-delay: -6s; }
.petal:nth-child(6) { left: 48%; animation-delay: -11s; animation-duration: 13s; }
.petal:nth-child(7) { left: 56%; animation-delay: -3s; }
.petal:nth-child(8) { left: 64%; animation-delay: -9s; animation-duration: 17s; }
.petal:nth-child(9) { left: 72%; animation-delay: -5s; }
.petal:nth-child(10) { left: 79%; animation-delay: -12s; }
.petal:nth-child(11) { left: 86%; animation-delay: -7s; animation-duration: 15s; }
.petal:nth-child(12) { left: 92%; animation-delay: -10s; }
.petal:nth-child(13) { left: 10%; animation-delay: -13s; animation-duration: 19s; }
.petal:nth-child(14) { left: 44%; animation-delay: -15s; }
.petal:nth-child(15) { left: 68%; animation-delay: -2.5s; }
.petal:nth-child(16) { left: 83%; animation-delay: -17s; }
.float-cake,
.float-candle {
  width: 2.4rem;
  height: 2.1rem;
  border-radius: 0.3rem 0.3rem 0.45rem 0.45rem;
  animation: cake-drift 9s ease-in-out infinite;
}
.float-cake {
  background: linear-gradient(180deg, #ffe4ee 40%, #d47a96);
  box-shadow: 0 0.45rem 0 -0.12rem #e4c89a, 0 10px 18px rgba(0, 0, 0, 0.25);
}
.float-cake::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.7rem;
  width: 0.28rem;
  height: 0.7rem;
  transform: translateX(-50%);
  background: #fff6ea;
  box-shadow: 0 -0.35rem 0.28rem #ffb347;
}
.float-cake.rose { top: 18%; left: 4%; }
.float-cake.gold {
  top: 58%;
  right: 5%;
  left: auto;
  background: linear-gradient(180deg, #fff1d4 38%, #c6a06a);
  animation-delay: -3s;
}
.float-cake.cream {
  bottom: 16%;
  left: auto;
  right: 7%;
  top: auto;
  background: linear-gradient(180deg, #fff 40%, #f4efe6);
  animation-delay: -6s;
}
.float-candle {
  width: 0.38rem;
  height: 1.4rem;
  background: linear-gradient(#fff6ea, #f3b6c8);
  box-shadow: 0 -0.45rem 0.3rem #ffc14a;
  animation-name: candle-bob;
}
.float-candle.a { top: 28%; right: 9%; left: auto; }
.float-candle.b { top: 72%; left: 6%; animation-delay: -2s; }
.float-candle.c { top: 42%; left: 90%; animation-delay: -5s; background: linear-gradient(#fff8e4, #e4c89a); }
html.is-today .balloon {
  display: block;
  position: fixed;
  z-index: 0;
  width: 2.35rem;
  height: 3rem;
  pointer-events: none;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  animation: balloon-rise 22s linear infinite;
}
html.is-today .balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 3.4rem;
  background: rgba(244, 239, 230, 0.38);
}
.balloon.rose {
  left: 2%;
  background: radial-gradient(circle at 32% 28%, #fff, var(--rose) 44%, var(--rose-deep));
}
.balloon.gold {
  left: auto;
  right: 3.5%;
  animation-delay: -6s;
  animation-duration: 26s;
  background: radial-gradient(circle at 32% 28%, #fff, var(--gold) 46%, var(--gold-deep));
}
.balloon.blush {
  left: auto;
  right: 11%;
  animation-delay: -11s;
  animation-duration: 20s;
  background: radial-gradient(circle at 32% 28%, #fff, var(--blush) 48%, var(--rose));
}
.balloon.cream {
  left: auto;
  right: 19%;
  animation-delay: -3s;
  animation-duration: 24s;
  background: radial-gradient(circle at 32% 28%, #fff, #f4efe6 50%, #c6a06a);
}
.edge-candles i {
  position: relative;
  width: 0.34rem;
  height: 1.4rem;
  border-radius: 1px 1px 0 0;
  background: linear-gradient(#fff6ea, #f3b6c8);
}
.edge-candles i:nth-child(even) { background: linear-gradient(#fff8e4, #e4c89a); height: 1.55rem; }
.edge-candles i:nth-child(3n) { background: linear-gradient(#ffe4ee, #d47a96); }
.edge-candles i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.62rem;
  width: 0.42rem;
  height: 0.7rem;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 40% 30%, #fff6c8, #ffb347 42%, #ff6b4a 70%, transparent 74%);
  animation: flicker 0.9s ease-in-out infinite alternate;
}
.edge-candles i:nth-child(even)::before { animation-duration: 0.75s; }
.edge-candles i:nth-child(3n)::before {
  animation-duration: 1.15s;
  background: radial-gradient(circle at 40% 30%, #fff, #f3b6c8 48%, #d47a96 72%, transparent 76%);
}
.party-run { animation-duration: 58s; }
.party-run-rev { animation-duration: 68s; }
html.is-today .float-cake {
  width: 3.15rem;
  height: 2.75rem;
}
html.is-today .float-cake,
html.is-today .float-candle,
html.is-today .balloon { display: none; }

@media (min-width: 760px) {
  html.is-today .edge-candles {
    display: flex;
    position: fixed;
    top: calc(2.4rem + env(safe-area-inset-top, 0px));
    bottom: calc(2.4rem + env(safe-area-inset-bottom, 0px));
    z-index: 21;
    flex-direction: column;
    justify-content: space-evenly;
    pointer-events: none;
  }
  html.is-today .edge-left { left: 0.45rem; }
  html.is-today .edge-right { right: 0.45rem; }
}

@media (max-width: 959px) {
  html.is-today .hero::before { content: none; }
  html.is-today .age-ribbon {
    max-width: 100%;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-align: center;
  }
  html.is-today .veil {
    overflow: auto;
    justify-content: flex-start;
    gap: 0.4rem;
    padding-bottom: calc(2.7rem + env(safe-area-inset-bottom, 0px));
  }
  html.is-today .veil:not(.is-waiting) .veil-name {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  html.is-today .veil:not(.is-waiting) .veil-age {
    font-size: clamp(3.6rem, 18vw, 5.2rem);
  }
  .cake-veil { width: min(11.25rem, 54vw); }
  html.is-today .home-frame,
  html.is-today .game-frame,
  html.is-today .finale {
    padding-bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  }
  html.is-today .petal { display: none; }
  .bar-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 960px) {
  html.is-today .companions {
    position: absolute;
    left: -28%;
    right: -22%;
    bottom: -0.2rem;
    width: auto;
    margin: 0;
  }
  .still-rose { width: 46%; }
  .still-coupe { width: 40%; margin-bottom: 0.8rem; }
  .home-frame {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    gap: clamp(2rem, 5vw, 5.5rem);
    align-items: center;
    min-height: 100dvh;
  }
  html.is-today .home-frame { align-items: start; }
  .rail-col { margin-top: 0; }
  .count-days { font-size: clamp(7.2rem, 11vw, 10.5rem); }
}

.game-frame {
  width: min(44rem, 100%);
  margin-inline: auto;
  padding:
    calc(var(--header) + 1.2rem)
    var(--gutter)
    calc(2.2rem + env(safe-area-inset-bottom));
}
.game-frame h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 0.95;
}
.lede {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  color: var(--cream-dim);
  font-size: 1rem;
  line-height: 1.55;
}
.score {
  margin: 1rem 0 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.score span, .who b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}
.score .best {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.done {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
}
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.record { margin: 0.8rem 0 0; color: var(--cream-dim); font-size: 0.85rem; }
.turn {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  letter-spacing: -0.03em;
}
#oware-again, #game-begin, #game-again, #pairs-begin, #pairs-again { margin-top: 1rem; }

.xo-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(22rem, 100%);
  margin-top: 0.9rem;
}
.xo-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.03);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  line-height: 1;
  color: var(--cream);
}
.xo-cell.is-o { color: var(--gold); }
.xo-cell.is-open { cursor: pointer; }
.xo-cell.is-open:active { transform: scale(0.97); }
.xo-cell.is-win { box-shadow: inset 0 0 0 2px var(--gold); }
.xo-cell:disabled { opacity: 1; cursor: default; }

.oware-table { margin-top: 0.9rem; }
.who {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--cream-dim);
}
.who.is-playing, .who.is-playing b { color: var(--gold); }
#oware-south { margin-top: 0.4rem; }
.oware-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.35rem 0;
  padding: 0.75rem;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(228, 200, 154, 0.14), transparent 46%),
    linear-gradient(#3a2a1c, #140f0c 46%, #120e0b 54%, #3a291c);
  box-shadow: inset 0 0 0 5px rgba(12, 9, 7, 0.35), var(--shadow);
}
.pit {
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(228, 200, 154, 0.22);
  background: radial-gradient(circle at 38% 32%, #5c4532, #120e0b 72%);
  color: var(--gold);
  cursor: default;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.pit b {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.8rem, 2.4vw, 1.05rem);
}
.pit .seeds {
  position: absolute;
  inset: 14%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 2px;
}
.pit .seeds i {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e4, #e4c89a 40%, #7a5a32);
}
.pit.is-legal { cursor: pointer; border-color: rgba(228, 200, 154, 0.85); }
.pit.is-legal:active { transform: scale(0.94); }
.pit.is-last { box-shadow: inset 0 0 0 2px var(--gold); }
.pit.is-taken { background: radial-gradient(circle at 40% 35%, #8d734c, #2a2118 70%); }
.pit:disabled { opacity: 1; }

.curtain {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  padding:
    calc(var(--header) + 1rem)
    var(--gutter)
    calc(1.4rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 30%, rgba(228, 200, 154, 0.14), transparent 55%),
    rgba(9, 8, 7, 0.94);
}
.curtain .ready-line { margin-top: auto; }
.curtain .quiet, .curtain .solid { align-self: flex-start; }

.code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}
.code-row input {
  min-height: 2.75rem;
  min-width: 8rem;
  flex: 1 1 8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
}
.adult-block { margin-top: 1.4rem; }
.gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 28rem;
  margin-top: 1.2rem;
}

@media (max-width: 380px) {
  :root { --gutter: max(0.85rem, env(safe-area-inset-left, 0px)); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .overture, .nameplate, .verse { min-height: auto; padding-block: 5.5rem; }
  .sky { height: 14rem; }
  .count-days { font-size: 3.4rem; }
  .home-frame { min-height: auto; }
}

.sky {
  position: relative;
  height: min(62dvh, 32rem);
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(198, 160, 106, 0.2), transparent 55%),
    #0c0b09;
}
.sky.is-won {
  height: 7rem;
  box-shadow: inset 0 0 80px rgba(228, 200, 154, 0.28);
}
.mote {
  position: absolute;
  bottom: -8%;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6e8 0 18%, rgba(228, 200, 154, 0.75) 34%, transparent 70%);
  cursor: pointer;
  animation-name: rise-mote;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.mote.is-caught { animation: none; opacity: 0; pointer-events: none; }
.mote:active { transform: scale(0.9); }

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  max-width: 28rem;
  margin-top: 1.1rem;
}
.card {
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 800px;
}
.card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
}
.card.is-open .card-inner,
.card.is-matched .card-inner { transform: rotateY(180deg); }
.card-back, .card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  backface-visibility: hidden;
  padding: 0.4rem;
}
.card-back {
  background: #161310;
  border: 1px solid var(--line);
}
.card-back::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gold-deep);
}
.card-face {
  background: var(--cream);
  color: var(--ink);
  transform: rotateY(180deg);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.85rem, 2.4vw, 1.15rem);
  line-height: 1.1;
}
.card.is-matched .card-face { box-shadow: inset 0 0 0 2px var(--gold-deep); }

.pass-frame { min-height: 100dvh; }
.ready-line, .pass-hand p {
  margin: 1.4rem 0 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 8vw, 4rem);
  letter-spacing: -0.04em;
}
.round {
  margin: 1.2rem 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--gold);
}
.prompt {
  margin: 0.7rem 0 0;
  min-height: 6.5em;
  max-width: 18em;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.play-group { margin-top: 1.4rem; }
.puzzle-face, .puzzle-target {
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-weight: 560;
  font-style: italic;
  font-size: clamp(2.4rem, 10vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.08em;
}
.puzzle-nums {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.12em;
  color: var(--gold);
}
.puzzle-target { color: var(--cream); letter-spacing: -0.04em; }
.play-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1rem;
}
.play-input {
  min-height: 2.75rem;
  width: min(18rem, 100%);
  flex: 1 1 12rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 1rem;
}
textarea.play-input { border-radius: 1.2rem; }
.added {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  max-width: 28rem;
}
.added li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
}
#scramble-show, #chain-stuck, #make-pass, #closer-begin, #still-begin, #between-begin, #trade-begin { margin-top: 0.8rem; }
.pass-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.4rem; }
.pass-hand { min-height: 40vh; display: grid; align-items: center; }

.story { padding-bottom: 8vh; }
.overture, .nameplate, .verse, .plate, .letter-wrap, .finale {
  scroll-margin-top: calc(var(--header) + 0.6rem);
}
.overture {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: calc(var(--header) + 2rem) var(--gutter);
}
.overture-line {
  margin: 0;
  max-width: 12em;
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.nameplate {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh var(--gutter);
}
.nameplate h1 {
  margin: 0.6rem 0 0;
  font-style: normal;
  font-weight: 560;
  font-size: clamp(3.4rem, 12vw, 8rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
}
.nm { display: block; }
.by, .scroll-hint {
  margin: 1.2rem 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cream-dim);
}
.verse {
  min-height: 70dvh;
  display: grid;
  align-items: center;
  padding: 8vh var(--gutter);
}
.verse p {
  margin: 0;
  max-width: 10em;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.plate { margin: 0; padding: 6vh var(--gutter) 2vh; }
.plate .frame { max-width: 26rem; }
.plate.wide .frame { max-width: min(52rem, 100%); }
.frame img { display: block; width: 100%; height: auto; }
figcaption {
  margin-top: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--cream-dim);
}
.letter-wrap { padding: 12vh var(--gutter) 8vh; }
.letter { max-width: 38rem; }
.dateline, .sign {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cream-dim);
}
.greeting {
  margin: 0.4rem 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
}
.letter p { margin: 1.15rem 0 0; font-size: 1.12rem; line-height: 1.65; max-width: 36em; }
.letter .lead::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.2rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.4rem;
  color: var(--gold);
}
.spoken {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.1rem) !important;
  letter-spacing: -0.03em;
}
.finale { padding: 8vh var(--gutter) 12vh; }
.hold {
  display: grid;
  place-items: center;
  width: min(40rem, 100%);
  min-height: 70dvh;
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 1.4rem;
  cursor: pointer;
}
.hold-rest, .hold-secret { display: grid; gap: 0.45rem; justify-items: center; }
.hold-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: -0.04em;
}
.hold-secret { display: none; }
.finale.is-holding .hold-rest { display: none; }
.finale.is-holding .hold-secret { display: grid; }
.finale.is-holding .hold {
  background: radial-gradient(ellipse at 50% 40%, rgba(228, 200, 154, 0.16), transparent 62%);
  border-color: var(--line);
}
.secret-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.secret-from {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--cream-dim);
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(0.4rem); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes tick {
  from { opacity: 0.35; transform: translateY(0.12em); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-mote {
  from { transform: translateY(0); }
  to { transform: translateY(-115vh); }
}
@keyframes flicker {
  from { transform: translateX(-50%) scale(0.92); opacity: 0.75; }
  to { transform: translateX(-50%) scale(1.08); opacity: 1; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes petal-fall {
  from { transform: translateY(-8vh) rotate(0deg); }
  to { transform: translateY(108vh) rotate(220deg); }
}
@keyframes cake-drift {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}
@keyframes candle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes balloon-rise {
  from { transform: translateY(108vh) rotate(-6deg); }
  to { transform: translateY(-28vh) rotate(8deg); }
}

@media (max-width: 380px) {
  .count-days { font-size: 4rem; }
  .oware-board { gap: 0.2rem; padding: 0.35rem; }
  .board { gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .mote { position: relative; bottom: auto; left: auto !important; }
  .sky {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 0.35rem;
    height: auto;
    min-height: 14rem;
    padding: 1rem;
  }
  .card-inner { transform: none !important; }
  .card-back, .card-face { position: absolute; }
  .card:not(.is-open):not(.is-matched) .card-face { visibility: hidden; }
  .card.is-open .card-back,
  .card.is-matched .card-back { visibility: hidden; }
  html.is-today .petal {
    top: 18%;
    opacity: 0.4;
    transform: none;
  }
  html.is-today .petal:nth-child(odd) { top: 62%; }
  html.is-today .candles i::before { transform: translateX(-50%); }
  html.is-today .balloon { top: 22%; animation: none; }
  html.is-today .balloon.gold { top: 58%; }
  html.is-today .balloon.blush { top: 36%; }
  html.is-today .balloon.cream { top: 70%; }
}
