/* GiftDoors "printed advent calendar" layer. Loaded after season.css.
   One bold idea: the door grid is a calendar board, with doors cut into the calendar's own picture. Everything else stays quiet. */
@font-face { font-family: 'Young Serif'; src: url('fonts/young-serif-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-var.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
:root {
  --night: #14283b; --evergreen: #174a39; --holly: #9e2338; --gilt: #e8bd5c; --gilt-deep: #b8892f; --snow: #f2f4ef;
  --display: 'Young Serif', Georgia, serif; --text: 'Figtree', system-ui, sans-serif;
  --foil: linear-gradient(170deg, #fff1c4 0%, #e8bd5c 38%, #b8892f 62%, #f6dc94 100%);
}
.season { font-family: var(--text); background: radial-gradient(ellipse at 20% -10%, #1f4a5c 0%, transparent 38rem), radial-gradient(ellipse at 100% 0%, #3a1d27 0%, transparent 30rem), #0f2230; }
.season h1, .season h2, .season h3, .season .collection-card h3, .season .wordmark { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.season .eyebrow { letter-spacing: .02em; text-transform: none; font-size: .95rem; font-weight: 600; color: var(--gilt); }
.season header.top { background: #0c1c28; border-bottom-color: #e8bd5c40; }
.season .wordmark::before { content: none; }
.season .wordmark { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.6rem; }

/* ---------- Home: hero headline as the one big type moment, plus a live advent countdown ---------- */
.winter-hero { background: var(--night); border-color: #e8bd5c55; }
.winter-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; max-width: 11ch; }
.countdown-wrap { margin-top: 30px; width: 100%; max-width: 420px; }
.countdown { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.countdown .cd { aspect-ratio: 1; display: grid; place-items: center; font: 400 .72rem/1 var(--display); color: #cfe0e6; border: 1px dashed #e8bd5c66; border-radius: 3px; background: #ffffff08; }
.countdown .cd.past { background: #e8bd5c22; color: #e8bd5c; border-style: solid; border-color: #e8bd5c55; }
.countdown .cd.now { background: var(--foil); color: #3a2a0c; border: 0; box-shadow: 0 0 0 3px #e8bd5c33, 0 0 18px #e8bd5c88; }
.countdown-note { margin: 10px 0 0; font-weight: 600; color: var(--gilt); }
.season .collection-card { background: var(--snow); border-color: #d8c48f; }
.season .collection-copy .eyebrow { color: var(--holly); font-size: .9rem; }
.season .collection-actions .btn { background: var(--evergreen); }
.calendar-section .section-intro h2 { font-size: clamp(2rem, 4vw, 3.2rem); }

/* ---------- Play: the calendar board ---------- */
.season .play-shell .season-banner { background: var(--night); border-color: #e8bd5c55; }
.season .play-shell .season-banner h1 { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.season nav.tabs button { background: #ffffff10; border: 1px solid #e8bd5c44; }
.board { position: relative; isolation: isolate; padding: clamp(10px, 2.2vw, 22px); border-radius: 18px; background: var(--night); border: 3px solid var(--gilt-deep); box-shadow: inset 0 0 0 6px #0c1c28, inset 0 0 0 7px #e8bd5c66, 0 22px 50px #050d1499; overflow: hidden; }
.board-art { position: absolute; inset: 0; z-index: -1; }
.board-art svg { width: 100%; height: 100%; display: block; }
.board-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0c1c2833, #0c1c2866); }
.board #prog { position: relative; margin: 12px 4px 0; color: #e7eef0; font-weight: 600; text-shadow: 0 1px 2px #000a; }
.season .board .grid { margin: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(84px, auto); gap: clamp(6px, 1.2vw, 12px); }
.season .board .door {
  --paper: var(--evergreen);
  position: relative; aspect-ratio: auto; min-height: 84px; border-radius: 6px; border: 0;
  background: var(--paper) radial-gradient(ellipse at 30% 20%, #ffffff1f, transparent 60%);
  box-shadow: 0 2px 0 #0007, 0 6px 14px #0005;
  outline: 1.5px dashed #f2f4ef55; outline-offset: -6px;
  font: 400 clamp(1.5rem, 3.6vw, 2.5rem)/1 var(--display); color: #f6dc94; text-shadow: 0 1px 0 #6b4c12, 0 2px 6px #0008;
  transition: transform .25s ease, background-color .25s ease;
}
.season .board .door:nth-child(4n+2) { --paper: var(--holly); }
.season .board .door:nth-child(4n+3) { --paper: #1d3d5a; }
.season .board .door:nth-child(4n) { --paper: #7c5a1e; }
.season .board .door:nth-child(7), .season .board .door:nth-child(15), .season .board .door:nth-child(21) { grid-column: span 2; }
.season .board .door:nth-child(24) { grid-column: 5 / 7; grid-row: 4 / 6; font-size: clamp(2.6rem, 6vw, 4.4rem); --paper: var(--holly); }
.season .board .door small { font: 600 .7rem/1.1 var(--text); color: #f2f4efcc; margin-top: .4rem; letter-spacing: .01em; }
.season .board .door:hover:not(.locked) { transform: translateY(-2px) rotate(-.4deg); }
/* opened doors become windows onto the picture */
.season .board .door.open { background: #0c1c2833; outline-color: #e8bd5c99; box-shadow: inset 0 0 0 2px #e8bd5c88, inset 0 0 24px #e8bd5c44; }
.season .board .door.locked { opacity: 1; filter: saturate(.55) brightness(.78); }
.season .board .door.paid::after { content: ''; position: absolute; top: 0; right: 14px; width: 10px; height: 100%; background: linear-gradient(#c9374f, #8a1b2e); opacity: .85; border-radius: 0 0 2px 2px; }
.season .board .door.solved::after { content: '\2713'; position: absolute; top: 6px; right: 8px; color: var(--gilt); font: 700 .95rem var(--text); }
.season .board .door.today { box-shadow: 0 0 0 3px var(--gilt), 0 0 26px #e8bd5caa; filter: none; }
@media (prefers-reduced-motion: no-preference) {
  .season .board .door.today { animation: glow 2.4s ease-in-out infinite alternate; }
  @keyframes glow { from { box-shadow: 0 0 0 3px var(--gilt), 0 0 12px #e8bd5c66; } to { box-shadow: 0 0 0 3px var(--gilt), 0 0 30px #e8bd5ccc; } }
}

/* ---------- Chapter: a reading page with a storybook opening ---------- */
.season .chapter { background: #102434; border-color: #e8bd5c3d; }
.season .chapter h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.season .chapter > .scene + p::first-letter { float: left; font: 400 3.4em/.82 var(--display); margin: .06em .1em 0 0; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.season .chapter > p { font-size: 1.07rem; line-height: 1.75; color: #e9eff0; }

@media (max-width: 600px) {
  .season .board .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(70px, auto); }
  .season .board .door { min-height: 70px; }
  .season .board .door:nth-child(7), .season .board .door:nth-child(15), .season .board .door:nth-child(21) { grid-column: auto; }
  .season .board .door:nth-child(23) { grid-column: span 2; }
  .season .board .door:nth-child(24) { grid-column: 1 / -1; grid-row: auto; min-height: 96px; }
  .countdown { grid-template-columns: repeat(12, 1fr); }
}

/* ---------- Painted images ---------- */
.season .scene, .season .collection-art, .board-art { background: #0c1c28; }
.season .scene img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; box-shadow: 0 14px 34px #050d1488; }
.season .collection-art img, .board-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.season .char { grid-template-columns: 84px 1fr; align-items: start; background: #0c1c2866; border: 1px solid #e8bd5c33; }
.season .char .portrait img, .season .char .portrait svg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gilt-deep); display: block; }

/* ---------- Narration player ---------- */
.player { margin: 16px 0 6px; padding: 14px 16px; border-radius: 14px; background: #0c1c28; border: 1px solid #e8bd5c55; }
.pl-label { margin: 0 0 10px; font: 400 1.05rem var(--display); color: var(--gilt); }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.season .player button { min-height: 40px; padding: 8px 14px; }
.season .player .pl-play { min-width: 92px; }
.pl-bar { flex: 1 1 220px; accent-color: var(--gilt); padding: 0; background: transparent; border: 0; min-height: 32px; }
.pl-time { font-variant-numeric: tabular-nums; color: #dfe8ea; min-width: 92px; text-align: right; }
.player.playing { box-shadow: 0 0 0 2px #e8bd5c55, 0 0 22px #e8bd5c33; }
.demo-note { border-left-color: var(--holly); }
.season .scene { overflow: hidden; border-radius: 12px; }
.score-toggle { display: block; margin-top: .75rem; color: var(--muted); font-size: .9rem; }
.read-mode { position: relative; z-index: 1; margin: 0 0 .9rem; }
.chapter-pages { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0 0; }
.chapter-pages button, .read-mode button, .keepsake { min-height: 44px; }
/* Accountless unlock offers (shop.js) */
.offer-panel{margin:1.25rem 0;padding:1.1rem;border-radius:18px;background:rgba(18,26,59,.72);border:1px solid rgba(246,220,148,.35)}
.offer-panel h2{margin:.1rem 0 .4rem}
.offers{display:grid;gap:.8rem;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin:.8rem 0}
.offer{padding:.9rem 1rem;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12)}
.offer-now{border-color:#f6dc94;box-shadow:0 0 0 1px rgba(246,220,148,.35) inset}
.offer h3{margin:0 0 .2rem}.offer .price{font-size:1.35rem;color:#f6dc94;margin:.1rem 0 .4rem}
.offer .row,.restore .row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.offer button,.restore button,.restore input{min-height:44px}
.restore{margin-top:.6rem}.restore input{flex:1 1 220px;font-family:ui-monospace,monospace}
.codes{list-style:none;padding:0;display:grid;gap:.6rem}.codes li{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.codes code{word-break:break-all;font-size:.85rem;background:rgba(255,255,255,.06);padding:.3rem .5rem;border-radius:8px}
.album-card{padding:1rem 1.1rem}
/* larger tap targets for small toggles */
.player label,.season-footer label{display:inline-flex;align-items:center;gap:.5rem;min-height:44px}
.player input[type=checkbox],.season-footer input[type=checkbox]{width:22px;height:22px}
.season-footer a{display:inline-flex;align-items:center;min-height:44px}
.door small.countdown{font-variant-numeric:tabular-nums;letter-spacing:.02em;color:#f6dc94}
.door-clock{font-variant-numeric:tabular-nums;color:#f6dc94;margin:.2rem 0 .8rem;font-weight:600}
.season .board .door small,.season .board .door small.countdown{position:relative;z-index:2;display:block;width:100%;text-align:center;white-space:nowrap;font-size:.72rem;line-height:1.2;margin-top:.15rem;padding:0 .2rem;text-shadow:0 1px 2px rgba(0,0,0,.8)}
.choice h3{margin-top:0}.choice-options{display:grid;gap:.6rem}.choice-options button{min-height:52px;text-align:left;padding:.7rem 1rem;font-size:1rem}
.choice-options button[aria-pressed=true]{outline:2px solid #f6dc94}
.end-art{margin:.6rem 0 1rem;border-radius:14px;overflow:hidden;position:relative}
.end-art img{position:static;display:block;width:100%;height:auto}
/* Season Pass invitation chip above the doors; the full offer sits under the calendar */
.pass-chip{display:inline-flex;align-items:center;gap:.4rem;min-height:44px;margin:.4rem 0 .8rem;padding:.45rem 1rem;border-radius:999px;background:linear-gradient(180deg,#f6dc94,#d9b25c);color:#3a1d1d;font-weight:700;text-decoration:none;box-shadow:0 2px 0 #8a6a2a}
.pass-chip::before{content:'✦'}
.offer-panel.flat{background:none;border:0;padding:0;margin:.4rem 0 0}
.offer-panel.flat .offers{grid-template-columns:1fr}
.offer-panel.flat .offer{background:rgba(255,255,255,.04)}

/* One large Open/Continue action above the doors */
.read-mode .open-cta{display:block;width:100%;min-height:54px;font:600 1.12rem/1.2 var(--display,Georgia,serif);letter-spacing:.01em;border-radius:14px;background:linear-gradient(180deg,#d9a441,#b37a22);color:#2a1606;border:1px solid #f3d58b;box-shadow:0 2px 0 #6e4610,0 8px 22px #0006}
.read-mode .open-cta:disabled{background:#ffffff14;color:#f2e6c9;border-color:#e8bd5c55;box-shadow:none}
.read-mode .open-cta:focus-visible{outline:3px solid #fff2c4;outline-offset:3px}
.season .board .door.paid small{color:#f6dc94;font-style:italic}
.gd-toast{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom));transform:translate(-50%,140%);max-width:min(92vw,420px);padding:.7rem 1rem;border-radius:12px;background:#2b1a0e;color:#fbe9c2;border:1px solid #d9a441;font:500 .95rem/1.3 var(--text,system-ui);box-shadow:0 10px 30px #0008;transition:transform .35s ease;z-index:50;pointer-events:none}
.gd-toast.show{transform:translate(-50%,0)}
@media (prefers-reduced-motion:reduce){.gd-toast{transition:none}}
.door-clock{display:inline-block;background:#1c1210cc;color:#fbe7b8;padding:.35rem .7rem;border-radius:10px;font-variant-numeric:tabular-nums;text-shadow:none}
.season .board .door.paid small{font-size:.66rem;letter-spacing:0}
