/* ===== Tokens ======================================================== */
:root {
  --bg: #EEF0F8;          /* snowy day sky */
  --surface: #FFFFFF;
  --ink: #1C2345;         /* night ink */
  --muted: #5B6185;
  --line: #D6D9EA;
  --brick: #9E2B3B;       /* cranberry brick */
  --brick-dark: #7A1F2D;
  --mortar: #B4475A;
  --glass: #2B335E;       /* unlit window */
  --glow: #FFCF5C;        /* lit window */
  --glow-deep: #F2A93B;
  --green: #1E6A50;       /* evergreen */
  --snow: #FFFFFF;
  --focus: #1C2345;
  --on-brick: #FFFFFF;
  --num-bg: #4A5590;
  --bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='24'%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.2' stroke-width='1.5'%3E%3Cpath d='M0 .75H52M0 12.75H52M26 0V12M13 12V24M39 12V24'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151B38; --surface: #1E2549; --ink: #F3F1FB; --muted: #A9AECB; --line: #323A66;
    --brick: #8A2636; --brick-dark: #651A27; --mortar: #9C3546; --glass: #10152E;
    --snow: #EDEFFA; --focus: #FFCF5C; --num-bg: #39437A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151B38; --surface: #1E2549; --ink: #F3F1FB; --muted: #A9AECB; --line: #323A66;
  --brick: #8A2636; --brick-dark: #651A27; --mortar: #9C3546; --glass: #10152E;
  --snow: #EDEFFA; --focus: #FFCF5C; --num-bg: #39437A; color-scheme: dark;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-variation-settings: "opsz" 96; letter-spacing: -0.025em; line-height: 1.04; margin: 0; }
p { margin: 0 0 1rem; max-width: 62ch; }

/* ===== Buttons ======================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--brick); color: var(--on-brick); border: 0; border-radius: 999px;
  padding: .9rem 1.6rem; font-weight: 700; font-size: 1.02rem; text-decoration: none;
  box-shadow: 0 3px 0 var(--brick-dark);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brick-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-quiet {
  background: transparent; color: var(--ink); border: 2px solid var(--line); border-radius: 999px;
  padding: .7rem 1.2rem; font-weight: 600;
}
.link-btn { background: none; border: 0; padding: .25rem 0; color: var(--muted); text-decoration: underline; }

/* ===== The building ================================================== */
.building { position: relative; width: 100%; max-width: 420px; margin: 0 auto; --stone: #E9DCCB; }
.roof { position: relative; height: 92px; }
.tower { position: absolute; right: 14%; bottom: -2px; width: 74px; height: 96px; color: var(--ink); }
.tower svg { width: 100%; height: 100%; display: block; }
.cornice {
  position: relative; height: 22px; background: var(--brick-dark); border-radius: 4px 4px 0 0; margin: 0 -10px;
}
.cornice::before, .cornice::after { content: ""; position: absolute; background: var(--snow); }
.cornice::before { /* snow drift along the roofline */
  left: 2px; right: 4px; top: -11px; height: 14px;
  border-radius: 12px 18px 6px 10px / 14px 14px 4px 4px;
}
.cornice::after { /* a few lumps so it isn't a perfect strip */
  left: 0; right: 0; top: -17px; height: 8px; background:
    radial-gradient(12% 100% at 20% 100%, var(--snow) 97%, transparent 100%),
    radial-gradient(9% 100% at 52% 100%, var(--snow) 97%, transparent 100%),
    radial-gradient(14% 90% at 83% 100%, var(--snow) 97%, transparent 100%);
}
.facade, .stoop { background-color: var(--brick); background-image: var(--bricks); background-size: 52px 24px; }
.facade {
  padding: 30px 18px 22px; border-left: 6px solid var(--brick-dark); border-right: 6px solid var(--brick-dark);
}
.windows { display: grid; grid-template-columns: repeat(5, 1fr); gap: 36px 14px; }
.win {
  position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 6px 6px 2px 2px;
  background: var(--glass); outline-offset: 4px;
  box-shadow: inset 0 0 0 3px var(--brick-dark), inset 0 0 0 5px var(--stone);
}
.win::before { /* the mullion cross */
  content: ""; position: absolute; inset: 5px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1.5px), var(--stone) calc(50% - 1.5px), var(--stone) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(transparent calc(48% - 1.5px), var(--stone) calc(48% - 1.5px), var(--stone) calc(48% + 1.5px), transparent calc(48% + 1.5px));
  pointer-events: none;
}
.win::after { /* wooden sill */
  content: ""; position: absolute; left: -6px; right: -6px; bottom: -7px; height: 7px; border-radius: 2px;
  background: linear-gradient(#A8713F 0 3px, #8A5A30 3px); box-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.win .num {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
  font-weight: 800; font-size: clamp(.82rem, 3.4vw, 1.05rem); color: #EEF0FB; font-variant-numeric: tabular-nums;
  background: var(--num-bg); padding: .05em .3em; border-radius: 5px; line-height: 1.25;
}
.win.lit { background: radial-gradient(120% 90% at 50% 35%, #FFF1C2 0%, var(--glow) 45%, var(--glow-deep) 100%); }
.win.lit .num { color: var(--brick-dark); background: #FFE7A8; }
.win.today { box-shadow: inset 0 0 0 3px var(--brick-dark), inset 0 0 0 5px var(--stone), 0 0 22px 4px rgba(255, 207, 92, .65); }
.win.done .num { opacity: 0; }
.wreath {
  position: absolute; left: 50%; top: 48%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; z-index: 2; opacity: 0;
  background: radial-gradient(circle, transparent 46%, var(--green) 48%, #2E8A68 62%, var(--green) 74%, transparent 76%);
}
.wreath::after { /* the bow */
  content: ""; position: absolute; left: 50%; bottom: 4%; width: 34%; height: 22%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 25% 50%, #D8344A 55%, transparent 58%), radial-gradient(ellipse at 75% 50%, #D8344A 55%, transparent 58%);
}
.win.done .wreath { opacity: 1; }
.win:not(.lit) { cursor: default; }

/* Front door: about 1.5x a window's height */
.stoop { position: relative; height: 150px; border-left: 6px solid var(--brick-dark); border-right: 6px solid var(--brick-dark); }
.door {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 80px; height: 130px;
  border-radius: 40px 40px 0 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(0,0,0,.25) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(rgba(0,0,0,.14) 0 0) 14px 52px / 18px 30px no-repeat,
    linear-gradient(rgba(0,0,0,.14) 0 0) right 14px top 52px / 18px 30px no-repeat,
    linear-gradient(rgba(0,0,0,.14) 0 0) 14px 92px / 18px 28px no-repeat,
    linear-gradient(rgba(0,0,0,.14) 0 0) right 14px top 92px / 18px 28px no-repeat,
    var(--green);
  box-shadow: inset 0 0 0 4px var(--stone), 0 0 0 5px var(--brick-dark);
}
.transom { /* warm arched window above the door */
  position: absolute; left: 9px; right: 9px; top: 9px; height: 30px; border-radius: 31px 31px 0 0;
  background: radial-gradient(120% 120% at 50% 100%, #FFF1C2, var(--glow) 60%, var(--glow-deep));
  box-shadow: 0 3px 0 var(--stone);
}
.door::before { /* doorknobs, one on each door */
  content: ""; position: absolute; right: 30px; top: 78px; width: 6px; height: 6px; border-radius: 50%; background: var(--glow);
  box-shadow: -14px 0 0 var(--glow);
}

@media (prefers-reduced-motion: no-preference) {
  .win.today { animation: twinkle 2.8s ease-in-out 1s 2; }
  @keyframes twinkle { 50% { filter: brightness(1.18); } }
}

/* Snowman and a potted tree on either side of the door */
.decor { position: absolute; bottom: 0; height: 74px; }
.decor svg { height: 100%; width: auto; display: block; }
.decor.snowman { right: calc(50% + 58px); }
.decor.tree { left: calc(50% + 60px); }

/* Falling snow in the top section of the sales page */
.sky { position: relative; overflow: hidden; }
.sky > canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.sky > :not(canvas) { position: relative; z-index: 1; }
:root { --flake: 165, 177, 214; }
:root[data-theme="dark"] { --flake: 255, 255, 255; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --flake: 255, 255, 255; } }

/* ===== Sales page ==================================================== */
.top { display: flex; justify-content: space-between; align-items: center; max-width: 1080px; margin: 0 auto; padding: 1.1rem 1.25rem; }
.wordmark { font-weight: 800; font-size: 1.02rem; text-decoration: none; }
.hero {
  max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem 0;
  display: grid; gap: 2.5rem; align-items: end;
}
.hero > div:first-child { padding-bottom: 1rem; }
@media (min-width: 860px) { .hero > div:first-child { padding-bottom: 3.5rem; } }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; padding-top: 3rem; } }
.hero h1 { font-size: clamp(2.5rem, 7.6vw, 4.4rem); font-weight: 800; margin-bottom: 1.25rem; max-width: 15ch; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1.75rem; }
.price { font-size: 1.05rem; color: var(--muted); }
.price strong { color: var(--ink); font-size: 1.6rem; font-weight: 800; }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { max-width: 1080px; margin: 0 auto; padding: 3rem 1.25rem; display: grid; gap: 2rem; }
@media (min-width: 860px) { .band-inner { grid-template-columns: repeat(3, 1fr); } }
.band h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.band p { color: var(--muted); }

/* ===== What's inside ================================================ */
.inside { max-width: 1080px; margin: 0 auto; padding: 3.5rem 1.25rem 1rem; }
.inside h2 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 1.5rem; }
.inside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem 2.5rem; }
@media (min-width: 860px) { .inside-list { grid-template-columns: 1fr 1fr; } }
.inside-list li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; align-items: start; }
.inside-list strong { font-size: 1.2rem; }
.inside-list p { margin: .25rem 0 0; color: var(--muted); }
.mini-win {
  display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 6px 6px 2px 2px;
  font-weight: 800; font-size: 1.5rem; color: var(--brick-dark);
  background: radial-gradient(120% 90% at 50% 35%, #FFF1C2 0%, var(--glow) 45%, var(--glow-deep) 100%);
  box-shadow: inset 0 0 0 3px var(--brick-dark);
}

/* ===== Order form ==================================================== */
.order { max-width: 40rem; margin: 0 auto; padding: 3.5rem 1.25rem 5rem; }
.order h2 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: .6rem; }
.progress { display: flex; gap: .4rem; margin: 1.25rem 0 2rem; }
.progress span { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.progress span.on { background: var(--brick); }
.step h3 { font-size: 1.55rem; margin-bottom: 1rem; }
.hint { color: var(--muted); font-size: .95rem; }
.choices { display: grid; gap: .7rem; }
.choice {
  text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  padding: 1rem 1.1rem; display: grid; gap: .15rem;
}
.choice strong { font-size: 1.08rem; }
.choice span { color: var(--muted); font-size: .95rem; }
.choice[aria-pressed="true"] { border-color: var(--brick); box-shadow: inset 0 0 0 1px var(--brick); }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: .8rem .9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--brick); outline: none; }
.fieldset-title { font-weight: 700; margin: 1.5rem 0 .75rem; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; }
.error { color: var(--brick); font-weight: 600; min-height: 1.5rem; margin-top: .75rem; }
:root[data-theme="dark"] .error { color: var(--glow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .error { color: var(--glow); } }

.area-top { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.search { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); padding: .5rem 0; z-index: 3; }
.picked { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 2.2rem; margin: .5rem 0 1rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; background: var(--brick); color: var(--on-brick); border-radius: 999px; padding: .3rem .4rem .3rem .8rem; font-size: .9rem; font-weight: 600; border: 0; }
.pill b { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: rgba(255,255,255,.22); font-weight: 700; }
.borough { margin: 1.4rem 0 .5rem; font-size: 1.05rem; color: var(--muted); font-weight: 700; }
.area {
  width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
  padding: .75rem .95rem; margin-bottom: .5rem; display: grid; gap: .1rem;
}
.area .hoods { color: var(--muted); font-size: .88rem; }
.area[aria-pressed="true"] { border-color: var(--brick); background: color-mix(in srgb, var(--brick) 9%, var(--surface)); }
.area[disabled] { opacity: .45; cursor: not-allowed; }
.review { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.review dl { margin: 0; display: grid; gap: .7rem; }
.review dt { font-weight: 700; }
.review dd { margin: 0; color: var(--muted); }

.promo-row { margin-top: 1.25rem; }
.promo-input { display: flex; gap: .5rem; }
.promo-input input { flex: 1; min-width: 0; }
.pay-area { margin-top: 1.5rem; max-width: 26rem; }
.pp-btns { display: grid; gap: .6rem; margin-top: .6rem; }
.fake-pp, .fake-venmo { border: 0; border-radius: 999px; height: 46px; font-weight: 800; font-size: 1.1rem; font-style: italic; }
.fake-pp { background: #FFC439; color: #003087; }
.fake-venmo { background: #008CFF; color: #FFFFFF; }
.faq { max-width: 40rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.faq h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.faq details { border-top: 1px solid var(--line); padding: .9rem 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: .88rem; padding: 2rem 1rem 3rem; }

/* ===== Portal ======================================================== */
.portal-head { max-width: 560px; margin: 0 auto; padding: 1.5rem 1.25rem .5rem; }
.portal-head h1 { font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 800; }
.portal-head p { color: var(--muted); margin-top: .6rem; }
.portal-main { max-width: 560px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.gift-note { background: var(--surface); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: .9rem 1rem; margin: 1rem 0 0; }
.gift-note p { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); font-size: .9rem; margin: 1.5rem 0 0; }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend-win { /* tiny window with its cross bars */
  position: relative; display: inline-block; width: 1rem; height: 1.3rem; border-radius: 3px 3px 1px 1px; flex: none;
  box-shadow: inset 0 0 0 2px var(--brick-dark);
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #E9DCCB calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent calc(48% - 1px), #E9DCCB calc(48% - 1px) calc(48% + 1px), transparent calc(48% + 1px)),
    var(--glass);
}
.legend-win.on {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #E9DCCB calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent calc(48% - 1px), #E9DCCB calc(48% - 1px) calc(48% + 1px), transparent calc(48% + 1px)),
    radial-gradient(120% 90% at 50% 35%, #FFF1C2 0%, var(--glow) 45%, var(--glow-deep) 100%);
}
.legend-wreath { /* tiny wreath with a red bow */
  position: relative; display: inline-block; width: 1.2rem; height: 1.2rem; border-radius: 50%; flex: none;
  background: radial-gradient(circle, transparent 40%, var(--green) 43%, #2E8A68 62%, var(--green) 76%, transparent 79%);
}
.legend-wreath::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 45%; height: 30%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 25% 50%, #D8344A 55%, transparent 58%), radial-gradient(ellipse at 75% 50%, #D8344A 55%, transparent 58%);
}

/* Day sheet */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh;
  background: var(--bg); color: var(--ink); border-radius: 22px 22px 0 0; overflow: hidden;
}
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 22px; max-height: 88dvh; } }
dialog.sheet::backdrop { background: rgba(12, 16, 38, .62); }
.sheet-scroll { overflow-y: auto; max-height: inherit; padding: 1.4rem 1.35rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sheet-date { font-weight: 700; color: var(--brick); }
:root[data-theme="dark"] .sheet-date { color: var(--glow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet-date { color: var(--glow); } }
.close { border: 0; background: var(--surface); width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
.sheet h2 { font-size: clamp(1.7rem, 6vw, 2.2rem); margin-bottom: .8rem; }
.sheet .intro { color: var(--muted); font-size: 1.05rem; }
.card { background: var(--surface); border-radius: 16px; padding: 1.1rem 1.15rem; margin: 1rem 0; }
.quest-card .area-name { color: var(--muted); font-size: .92rem; margin-bottom: .2rem; }
.quest-card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.quest-card .hours { font-size: .93rem; color: var(--muted); margin: 0; }
.saved { color: var(--green); font-weight: 600; font-size: .92rem; min-height: 1.4rem; margin-top: .6rem; }
:root[data-theme="dark"] .saved { color: #6FD3A5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .saved { color: #6FD3A5; } }

.stars { display: flex; gap: .45rem; flex-wrap: wrap; }
.star {
  width: 3.1rem; height: 3.1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 800; font-size: 1.15rem;
}
.star[aria-pressed="true"] { background: var(--glow); border-color: var(--glow-deep); color: #1C2345; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 1rem; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: .45rem .9rem; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--brick); background: var(--brick); color: var(--on-brick); }

.q { margin: 1.4rem 0; }
.q .emoji { font-size: 2.4rem; letter-spacing: .1em; margin-bottom: .4rem; }
.q h3 { font-size: 1.2rem; margin-bottom: .7rem; line-height: 1.25; }
.opts { display: grid; gap: .5rem; }
.opt { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: .8rem .95rem; font-weight: 600; }
.opt.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.opt.wrong { border-color: var(--brick); background: color-mix(in srgb, var(--brick) 10%, var(--surface)); }
.opt[disabled] { cursor: default; }
.reaction { margin: .6rem 0 0; color: var(--muted); }
.score { font-size: 1.15rem; font-weight: 700; }

.photo-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-slot { background: var(--surface); border: 2px dashed var(--line); border-radius: 14px; padding: .6rem; display: grid; gap: .5rem; align-content: start; }
.photo-slot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.photo-slot .ph { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; text-align: center; padding: .6rem; color: var(--muted); font-size: .9rem; background: var(--bg); }
.photo-slot label.upload { text-align: center; }
.photo-slot input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.swatch-green .ph { background: color-mix(in srgb, #1E6A50 18%, var(--bg)); }
.swatch-red .ph { background: color-mix(in srgb, #C42F46 16%, var(--bg)); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.ticks label { display: flex; gap: .8rem; align-items: center; background: var(--surface); border-radius: 12px; padding: .8rem .95rem; cursor: pointer; }
.ticks input { width: 1.4rem; height: 1.4rem; accent-color: var(--green); flex: none; }

.counter { display: flex; align-items: center; gap: 1.2rem; margin: 1rem 0; }
.counter button { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 1.6rem; font-weight: 700; }
.counter output { font-size: 3rem; font-weight: 800; min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }

.story { font-size: 1.15rem; line-height: 1.6; background: var(--surface); border-radius: 16px; padding: 1.2rem; }
.story mark { background: var(--glow); color: #1C2345; padding: 0 .25em; border-radius: 4px; }
.starter { display: block; width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: .8rem .95rem; margin-bottom: .5rem; }
.ending { background: var(--brick); color: #FFFFFF; border-radius: 16px; padding: 1.3rem; }
.ending h3 { font-size: 1.6rem; margin-bottom: .4rem; color: var(--glow); }
.ending p { margin: 0; }
.subway-frame { width: 100%; height: 72dvh; border: 0; border-radius: 16px; background: var(--surface); }

/* Recap */
.recap-msg { font-size: 1.2rem; line-height: 1.55; }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.timeline li { background: var(--surface); border-radius: 14px; padding: .9rem 1rem; display: grid; grid-template-columns: 2.6rem 1fr; gap: .8rem; }
.timeline .d { font-weight: 800; font-size: 1.2rem; color: var(--brick); }
:root[data-theme="dark"] .timeline .d { color: var(--glow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timeline .d { color: var(--glow); } }
.timeline .t { font-weight: 700; }
.timeline .v { color: var(--muted); }
.timeline img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; margin: .4rem .4rem 0 0; }

/* Plain pages (thanks, unsubscribe) */
body.plain { display: grid; place-items: center; min-height: 100dvh; padding: 1.5rem; }
.plain-main { max-width: 34rem; }
.plain-main h1 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 1rem; }
.toast-bar { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; z-index: 50; }
