/* The Thread — IMPACT Youth.
   The app is night; the journal page is paper. That one rule is the whole design:
   a kid scrolling a dark app hits an actual sheet of paper and knows to write on
   it before reading a word.
   Six tokens below are SURFACE-RELATIVE — they mean "on whatever I'm sitting on".
   They resolve to night at :root and are re-declared as paper on .book-page, which
   is why every .bp-* rule re-resolves warm for free and none of them changed. */
:root{
  /* ============ NIGHT — the app shell ============ */
  --night:#0d1120;          /* body base, tab bar, sky floor */
  --card:#191634;           /* OPAQUE card face — no glass, so the animated sky is
                               provably not in any text's contrast path */
  --plum:#241f4a;           /* raised dark: .card.ink, #toast */
  --btn-face:#2a2450;       /* secondary button face */
  --sky-ink:#ece9f6;        /* text on night */
  --sky-line:rgba(236,233,246,.16);
  --glass-line:rgba(245,198,90,.14);   /* warm card hairline */
  --focus:#5a2fe0;          /* one focus identity app-wide (every input here is paper) */
  --halo:rgba(90,47,224,.30);

  /* ==== surface-relative — .book-page re-declares all six as paper ==== */
  --muted:#bdb7d8;
  --line:var(--sky-line);
  --gold:#f5c65a;           /* fills/strokes on dark */
  --gold-deep:#eeb833;      /* gold as TEXT on dark */
  --bad:#ff8f70;            /* error text on dark */
  --good:#3e7d4f;           /* unchanged: .btn.done is a filled surface, white on it passes */

  /* ============ PAPER — FROZEN. textarea.bp-lines is calibrated to these. ============ */
  --paper:#f7f2e6; --paper-2:#fffdf8;
  --paper-line:#e5dcc6;     /* hairline on a paper input (was --line) */
  --ink:#14110c;            /* ink ON paper — reached by .sharebtn.on/.sharedchip/.bp-rule */
  --ink-2:#20190f;
  --gold-edge:#a97e2f;      /* the empty-field outline, frozen at the shipped value */
  --amber:#ffc95e;

  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,Roboto,sans-serif;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
/* sans on dusk reads "app"; serif is re-anchored on .book-page, where it's a journal */
body{font-family:var(--sans);color:var(--sky-ink);background:var(--night);min-height:100dvh}
#app{position:relative;z-index:1;max-width:640px;margin:0 auto;padding:env(safe-area-inset-top,0px) 18px calc(84px + var(--safe-b))}
.prewrap{white-space:pre-wrap}
.boot{display:flex;flex-direction:column;align-items:center;gap:22px;padding-top:38vh}
.boot-spin{width:26px;height:26px;border:3px solid var(--line);border-top-color:var(--gold);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

h1,h2,h3{font-weight:700;letter-spacing:.01em}
.eyebrow{font-family:var(--sans);font-size:11px;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--gold-deep)}
.goldnum{font-family:var(--sans);font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.muted{color:var(--muted)}
.small{font-size:13.5px}
a{color:inherit}

/* header */
header.app{display:flex;align-items:center;gap:12px;padding:18px 0 4px;position:relative}
/* the wordmark PNG is a single colour, rgb(20,17,12) — pixel-verified. On night
   it would be an invisible hole; invert makes it white, alpha untouched. */
header.app img.wm{height:34px;width:auto;filter:invert(1)}
header.app .hdr-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.chip{font-family:var(--sans);font-size:12px;font-weight:700;background:var(--gold);color:var(--ink);
  border-radius:999px;padding:5px 11px;display:inline-flex;align-items:center;gap:5px;border:0}
.chip.ghost{background:transparent;color:var(--sky-ink);border:1.5px solid var(--line)}

/* thread divider */
.thread-div{display:block;width:100%;height:26px;margin:6px 0 2px}
.thread-div path{fill:none;stroke:var(--gold);stroke-width:1.6;opacity:.85}

/* cards */
.card{background:var(--card);border:1px solid var(--glass-line);border-radius:18px;padding:18px;
  box-shadow:0 1px 2px rgba(0,0,0,.30), 0 18px 40px -24px rgba(0,0,0,.6);margin:14px 0}
.card.ink{background:var(--plum);color:var(--sky-ink);border-color:var(--sky-line)}
.card.ink .muted{color:var(--muted)}
.card h2{font-size:21px;margin:2px 0 6px}
.card h3{font-size:17px;margin:2px 0 6px}

/* buttons */
.btn{font-family:var(--sans);font-weight:700;font-size:15.5px;border:0;border-radius:13px;
  padding:14px 18px;width:100%;cursor:pointer;background:var(--btn-face);color:var(--gold-deep);
  border:1px solid var(--glass-line);
  display:flex;align-items:center;justify-content:center;gap:8px;transition:transform .06s}
.btn:active{transform:scale(.98)}
.btn.gold{background:var(--gold);color:var(--ink)}
.btn.ghost{background:transparent;border:1.5px solid var(--sky-line);color:var(--sky-ink)}
.btn.sm{width:auto;padding:9px 14px;font-size:13.5px;border-radius:10px}
.btn[disabled]{opacity:.5;pointer-events:none}
.btn.done{background:var(--good);color:#fff}

/* forms */
input,textarea,select{font-family:var(--serif);font-size:16px;color:var(--ink-2);width:100%;
  background:var(--paper-2);border:1.5px solid var(--paper-line);border-radius:12px;padding:13px 14px;outline:0}
/* was gold at 2.14:1 — under the 3:1 minimum for a UI indicator */
input:focus,textarea:focus{border-color:var(--focus);box-shadow:0 0 0 3px var(--halo)}
label{display:block;font-family:var(--sans);font-size:12px;font-weight:700;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);margin:14px 0 6px}

/* tabbar */
#tabbar{position:fixed;bottom:0;left:0;right:0;z-index:40;display:flex;justify-content:space-around;
  background:var(--night);padding:8px 4px calc(8px + var(--safe-b))}
#tabbar a{flex:1;max-width:110px;display:flex;flex-direction:column;align-items:center;gap:3px;text-decoration:none;
  color:#9aa2b8;font-family:var(--sans);font-size:10.5px;font-weight:700;letter-spacing:.04em}
#tabbar a svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#tabbar a.on{color:var(--amber)}

/* hero (today) */
.today-hero{padding:10px 0 2px}
.today-hero h1{font-size:33px;line-height:1.15;letter-spacing:-.012em;margin:6px 0 8px}
.statrow{display:flex;gap:10px;margin:14px 0}
.stat{flex:1;background:var(--card);border:1px solid var(--glass-line);border-radius:14px;padding:12px;text-align:center}
.stat b{display:block;font-size:22px}
.stat span{font-family:var(--sans);font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.stat .flame{color:var(--gold-deep)}

/* devotion */
.dev-verse{font-family:var(--serif);font-style:italic;font-size:18.5px;line-height:1.5;margin:10px 0 4px}
.dev-ref{font-family:var(--sans);font-weight:700;font-size:13px;color:var(--gold-deep)}
.dev-body p{margin:13px 0;line-height:1.62;font-size:16.5px}
.dev-body p.challenge{font-weight:700}
.cardimg{width:100%;border-radius:12px;border:1px solid var(--line)}
.dev-day-head{display:flex;align-items:baseline;justify-content:space-between;margin-top:8px}
.dev-day-head .goldnum{font-size:22px}
details.origcard summary{font-family:var(--sans);font-size:13px;font-weight:700;color:var(--muted);cursor:pointer;margin:10px 0}

/* journal */
.journal textarea{min-height:130px;line-height:1.55;resize:vertical}
.journal .savemeta,.bp-think .savemeta{font-family:var(--sans);font-size:12.5px;font-weight:700;
  color:var(--muted);margin-top:10px;min-height:18px}
.bp-think .savemeta.ok{color:var(--gold-deep)}
.bp-think .savemeta.err{color:var(--bad)}

/* ---- share a photo/video with the leader ---- */
.upl{margin-top:14px}
/* The caption box and Send button carry the `hidden` attribute until a file is
   picked, but .upl-cap{display:block} and .btn{display:block} outrank the UA's
   [hidden]{display:none} on specificity, so they showed anyway. (0,2,0) here
   beats both and puts `hidden` back in charge inside this card. */
.upl [hidden]{display:none}
.upl-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  margin-top:12px;padding:22px 14px;min-height:112px;cursor:pointer;text-align:center;
  border:2px dashed var(--gold);border-radius:16px;background:rgba(245,198,90,.10);
  transition:background .15s, border-color .15s}
.upl-drop:active{background:rgba(245,198,90,.18);border-color:var(--gold-deep)}
.upl-plus{font-family:var(--sans);font-size:26px;font-weight:300;line-height:1;color:var(--gold-deep)}
.upl-cta{font-family:var(--sans);font-size:15px;font-weight:700;color:var(--sky-ink)}
.upl-hint{font-family:var(--sans);font-size:11.5px;color:var(--muted)}
.upl-picked{font-family:var(--sans);font-size:12.5px;font-weight:700;color:var(--gold-deep);
  margin-top:10px;word-break:break-all}
.upl-cap{display:block;width:100%;margin-top:10px;padding:11px 12px;font-family:var(--serif);
  font-size:16px;   /* 16px: iOS zooms the page on any smaller input */
  color:var(--ink-2);background:var(--paper-2);
  border:1.5px solid var(--paper-line);border-radius:12px;outline:0;-webkit-appearance:none}
.upl-cap:focus{border-color:var(--focus);box-shadow:0 0 0 3px var(--halo)}
.upl .btn{margin-top:10px}
.upl-msg{font-family:var(--sans);font-size:12.5px;font-weight:700;color:var(--muted);
  margin-top:8px;min-height:16px}
.upl-msg.ok{color:var(--gold-deep)}
.upl-msg.err{color:var(--bad)}
.upl-list-head{font-family:var(--sans);font-size:10px;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--muted);margin:16px 0 6px;
  padding-top:12px;border-top:1px solid var(--line)}
.upl-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.upl-row:last-child{border-bottom:0}
.upl-thumb{flex:none;width:38px;height:38px;display:flex;align-items:center;justify-content:center;
  border-radius:9px;background:rgba(245,198,90,.14);font-size:16px}
.upl-thumb.vid{background:var(--plum);color:var(--gold-deep)}
.upl-meta{flex:1;min-width:0}
.upl-name{font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upl-when{font-family:var(--sans);font-size:10.5px;color:var(--muted);margin-top:2px}
.upl-status{flex:none;font-family:var(--sans);font-size:9.5px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;padding:3px 8px;border-radius:999px;white-space:nowrap}
.upl-status.wait{background:rgba(245,198,90,.18);color:var(--gold-deep)}
.upl-status.ok{background:var(--gold);color:var(--ink)}
.upl-status.no{background:rgba(255,143,112,.16);color:var(--bad)}
.upl-x{flex:none;width:30px;height:30px;border:0;border-radius:8px;background:transparent;
  color:var(--muted);font-size:14px;cursor:pointer}
.upl-x:active{background:rgba(236,233,246,.10)}

/* first-run alerts prompt */
.alert-overlay{position:fixed;inset:0;z-index:80;background:rgba(6,8,18,.66);
  display:flex;align-items:center;justify-content:center;padding:22px}
.alert-overlay .ap-card{max-width:420px;width:100%;margin:0;
  box-shadow:0 18px 60px -18px rgba(0,0,0,.5)}

/* share-with-leader */
.sharebtn{display:block;width:100%;margin-top:12px;padding:10px 14px;cursor:pointer;
  font-family:var(--sans);font-size:13px;font-weight:700;color:var(--gold-deep);
  background:transparent;border:1.5px dashed var(--gold-deep);border-radius:12px;transition:transform .06s}
.sharebtn:active{transform:scale(.98)}
.sharebtn.on{background:var(--ink);color:var(--amber);border-style:solid;border-color:var(--ink)}
.sharebtn[disabled]{opacity:.5;pointer-events:none}
/* Wednesday class-notes bonus line: a quiet invite on paper, a solid gold receipt
   once earned. On .book-page the surface tokens resolve to paper, so this reads warm. */
.n-bonus{margin:10px 0 2px;font-family:var(--sans);font-size:12.5px;font-weight:700;
  color:var(--gold-deep);padding:8px 12px;border:1.5px dashed var(--gold-deep);border-radius:12px;text-align:center}
.n-bonus.on{background:var(--ink);color:var(--amber);border-style:solid;border-color:var(--ink)}
.sharedchip{font-family:var(--sans);font-size:10px;font-weight:700;letter-spacing:.06em;
  background:var(--ink);color:var(--amber);border-radius:999px;padding:2px 8px;vertical-align:1px}

/* ---- book page (styled after the Tracing the Thread journal) ---- */
/* The one sheet of paper left in the app. Re-declaring the six surface tokens
   here is what makes every .bp-* rule below re-resolve warm without being
   touched — and it fixes two live AA failures on the way past:
     --muted    #7c7262 -> #6f6558  (placeholder 4.31 -> 5.21)
     --gold-deep #a97e2f -> #8a6318 (gold TEXT on paper 3.62 -> 5.33)
   --gold stays frozen: it is the writing field's invitation colour. */
.book-page{
  --muted:#6f6558; --line:#d8c9a6; --gold:#c9a050; --gold-deep:#8a6318;
  --bad:#b3543a; --good:#3e7d4f;
  color:var(--ink-2);font-family:var(--serif);
  position:relative;background:var(--paper-2);border:1px solid var(--line);border-radius:18px;
  padding:30px 20px 20px;margin:14px 0;overflow:hidden;
  box-shadow:0 0 0 1px rgba(245,198,90,.18),
             0 10px 26px -10px rgba(245,198,90,.10),
             0 32px 70px -30px #000}
.bp-thread{position:absolute;top:-8px;right:-24px;width:270px;height:170px;color:var(--gold);opacity:.10;pointer-events:none}
/* Wednesday notes: same book page, a touch tighter — it sits inside the week
   page rather than being the whole screen. */
.notes-page{padding-top:24px}
.notes-page .bp-weeknum{font-size:34px}
.bp-head{text-align:center;margin:0 0 20px;position:relative}
.bp-weeknum{font-family:var(--sans);font-weight:800;font-size:42px;line-height:1;letter-spacing:.04em}
.bp-rule{width:52px;height:3px;background:var(--ink);margin:7px auto 9px}
.bp-day{font-family:var(--sans);font-weight:600;font-size:16px;letter-spacing:.48em;text-indent:.48em;
  color:var(--muted);text-transform:uppercase}
.bp-sub{font-family:var(--sans);font-size:10.5px;font-weight:700;color:var(--gold-deep);
  letter-spacing:.18em;text-transform:uppercase;margin-top:8px}
.bp-listen{display:flex;align-items:center;gap:12px;margin:0 0 18px;padding:10px 12px;
  border:1px solid var(--line);border-radius:12px;background:rgba(201,160,80,.07)}
.bp-play{width:42px;height:42px;border-radius:50%;border:0;background:var(--ink);color:var(--amber);
  font-size:14px;line-height:1;cursor:pointer;flex:none;display:flex;align-items:center;justify-content:center;
  transition:transform .06s}
.bp-play:active{transform:scale(.94)}
.bp-au-mid{flex:1;min-width:0}
.bp-au-label{font-family:var(--sans);font-size:10.5px;font-weight:700;letter-spacing:.13em;
  text-transform:uppercase;color:var(--gold-deep);margin-bottom:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bp-au-bar{height:6px;border-radius:3px;background:var(--line);cursor:pointer}
.bp-au-fill{height:100%;width:0;border-radius:3px;background:var(--gold);transition:width .25s linear}
.bp-verse{font-family:var(--sans);font-weight:700;font-size:12.5px;letter-spacing:.08em;line-height:1.8;
  text-transform:uppercase;margin:0 0 4px}
.bp-verse .bp-ref{color:var(--gold-deep);white-space:nowrap}
.bp-body p{margin:13px 0;line-height:1.66;font-size:16px}
.bp-body p.challenge{font-weight:700}
.bp-think{margin-top:22px}
.bp-think-head{font-weight:700;font-size:17px;margin:20px 0 2px}
/* the line that tells a kid to write was set in the app's quietest possible
   register — 11.5px muted grey, indistinguishable from fine print */
.bp-note{font-family:var(--sans);font-size:13px;color:var(--muted);line-height:1.55;margin:4px 0 2px}
.bp-note b{color:var(--ink-2);font-weight:700}
.bp-priv{display:block;font-size:12.5px;margin-top:4px}
.bp-prompt{display:flex;gap:9px;margin:14px 0 0;line-height:1.5;font-size:15.5px}
.bp-prompt .bp-bullet{color:var(--gold-deep)}
/* ---- the writing field ------------------------------------------------
   These were the only typable things on the page and they were drawn in the
   same 1px var(--line) as the decorative rule above the footer — the same
   contrast against the paper, so nothing said "you can write here". An empty
   box is now a printed workbook blank: gold hairline, a warm gold wash, and a
   placeholder saying what it's for. The moment a kid writes in it the
   invitation is withdrawn (.has-text) — tint off, border back to var(--line) —
   so a page they've filled in reads as a book page with their handwriting on
   the rules, not as a form.
   16px, not 15.5: under 16px iOS Safari zooms the whole page on focus, which
   lurches the page at exactly the kid who just decided to write.
   background-origin:content-box + background-size keep the rules locked to the
   text baseline at any padding or height. */
textarea.bp-lines{
  display:block;width:100%;
  font-family:var(--serif);font-size:16px;font-style:italic;line-height:30px;color:var(--ink-2);
  border:1px solid var(--gold-edge);border-radius:12px;
  box-shadow:inset 0 0 0 1px var(--gold-edge);
  background-color:rgba(201,160,80,.10);
  padding:0 12px 10px;margin-top:6px;min-height:92px;resize:vertical;outline:0;
  caret-color:var(--focus);
  background-image:linear-gradient(to bottom, transparent 0 29px, var(--line) 29px 30px);
  background-size:100% 30px;background-repeat:repeat;
  background-origin:content-box;background-attachment:local;
  -webkit-appearance:none;appearance:none;   /* iOS: keep our border/radius, not the UA's */
  transition:border-color .15s, background-color .15s, box-shadow .15s}
textarea.bp-lines::placeholder{color:var(--muted);opacity:1;font-style:italic}
/* driven from JS off value.trim(), not :placeholder-shown, so a box holding
   only spaces can't disagree with what the save code counts as empty */
textarea.bp-lines.has-text{background-color:transparent;border-color:var(--line);box-shadow:none}
/* a question flagged as too short to finish the devotion: red hairline. Placed AFTER
   .has-text so it wins on a filled-but-short box, and BEFORE :focus so the box being
   fixed still shows the normal focus ring. JS clears .bp-short once it's long enough. */
textarea.bp-lines.bp-short{
  border-color:var(--bad);background-color:rgba(255,143,112,.08);
  box-shadow:inset 0 0 0 1px var(--bad)}
/* MUST stay last: .has-text and :focus are both (0,2,1), so source order is what
   lets the box you're actually in win. Do not reorder. */
/* ---- contest a question ---- */
.tq-contest{display:block;width:100%;margin-top:10px;padding:9px 12px;border-radius:10px;
  border:1px dashed rgba(255,255,255,.34);background:transparent;color:var(--muted);
  font:inherit;font-size:13px;cursor:pointer}
.tq-contest:hover{border-color:var(--gold);color:var(--gold)}
.ct-overlay{position:fixed;inset:0;z-index:70;display:flex;align-items:center;
  justify-content:center;padding:18px;background:rgba(6,8,18,.78);backdrop-filter:blur(3px)}
.ct-box{width:100%;max-width:420px;max-height:86vh;overflow-y:auto;background:var(--card);
  border:1px solid var(--line);border-radius:16px;padding:20px 18px;
  box-shadow:0 18px 50px rgba(0,0,0,.55)}
.ct-box h3{margin:0 0 4px;font-size:18px}
.ct-tag{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.ct-q{margin:12px 0 14px;font-size:15px;line-height:1.45}
.ct-row{display:flex;gap:9px;align-items:flex-start;margin:8px 0;font-size:14px;line-height:1.4}
.ct-row .ct-k{flex:0 0 auto;font-size:15px;line-height:1.3}
.ct-yours{color:var(--bad)}
.ct-right{color:var(--good)}
.ct-why{margin:14px 0 0;padding:12px 13px;border-radius:11px;
  background:rgba(255,255,255,.05);font-size:14px;line-height:1.5}
.ct-src{display:block;margin-top:8px;font-size:12px;color:var(--muted)}
.ct-actions{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.ct-actions .btn{width:100%;margin:0}
.ct-left{margin-top:10px;text-align:center;font-size:12px;color:var(--muted)}
.ct-note{margin:14px 0 0;font-size:14px;line-height:1.5}
.ct-award{margin-top:14px;padding:12px;border-radius:11px;text-align:center;
  background:rgba(201,160,80,.13);border:1px solid var(--gold);color:var(--gold);
  font-weight:700}
.tq-sum-wrong{margin-top:16px;text-align:left}
.tq-sum-wrong h4{margin:0 0 8px;font-size:13px;color:var(--muted);font-weight:600;
  letter-spacing:.04em;text-transform:uppercase}
.tq-sum-wrong .tq-contest{margin-top:6px;text-align:left}

textarea.bp-lines:focus{
  border-color:var(--focus);background-color:rgba(201,160,80,.14);
  box-shadow:inset 0 0 0 1px var(--focus), 0 0 0 3px var(--halo);
  background-image:linear-gradient(to bottom, transparent 0 29px, rgba(201,160,80,.55) 29px 30px)}
/* the receipt, at the box the thumb just left — same gold eyebrow idiom as
   .bp-sub, so it reads as bookmaking rather than a status badge */
.bp-stamp{font-family:var(--sans);font-size:10.5px;font-weight:700;letter-spacing:.13em;
  text-transform:uppercase;color:var(--muted);text-align:right;margin-top:5px;min-height:13px}
.bp-stamp.ok{color:var(--gold-deep)}
.bp-stamp.err{color:var(--bad)}
.bp-foot{font-family:var(--sans);font-size:10px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  color:var(--muted);text-align:center;margin-top:22px;padding-top:12px;border-top:1px solid var(--line)}

/* day chips */
.daychips{display:flex;gap:8px;margin:12px 0}
.daychip{flex:1;text-align:center;border:1.5px solid var(--line);border-radius:12px;padding:10px 4px;
  text-decoration:none;background:var(--card)}
.daychip .d{font-family:var(--sans);font-weight:800;font-size:15px}
.daychip .s{font-family:var(--sans);font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.daychip.done{background:var(--gold);border-color:var(--gold);color:var(--ink)}
.daychip.done .s{color:rgba(20,17,12,.72)}
.daychip.today{border-color:var(--gold);box-shadow:0 0 0 2px rgba(245,198,90,.32)}

/* journey map */
.unit-label{margin:20px 0 4px}
.weekrow{display:flex;align-items:center;gap:12px;padding:11px 4px;border-bottom:1px dashed var(--line);text-decoration:none}
.weekrow .num{font-family:var(--sans);font-weight:800;width:34px;height:34px;border-radius:50%;flex:none;
  display:flex;align-items:center;justify-content:center;border:1.6px solid var(--sky-line);font-size:13px}
.weekrow.locked{opacity:.45}
.weekrow.locked .num{border-color:var(--muted);color:var(--muted)}
.weekrow.done .num{background:var(--gold);color:var(--ink);border-color:var(--gold)}
.weekrow .t{flex:1;font-size:15.5px}
.weekrow .prog{font-family:var(--sans);font-size:11.5px;font-weight:700;color:var(--muted)}

/* leaderboard */
.lb-row{display:flex;align-items:center;gap:12px;padding:10px 2px;border-bottom:1px dashed var(--line)}
.lb-row .rank{font-family:var(--sans);font-weight:800;width:26px;color:var(--muted)}
.lb-row.me{background:rgba(245,198,90,.16);border-radius:10px;padding:10px 8px}
.lb-row .nm{flex:1}
.lb-row .pts{font-family:var(--sans);font-weight:800}

/* toast + confetti */
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(96px + var(--safe-b));z-index:60;
  background:var(--plum);color:var(--sky-ink);border:1px solid var(--sky-line);
  font-family:var(--sans);font-weight:600;font-size:14px;
  padding:12px 18px;border-radius:12px;box-shadow:0 10px 30px -8px rgba(0,0,0,.4);max-width:86vw;text-align:center}
.spark{position:fixed;width:7px;height:7px;border-radius:2px;z-index:70;pointer-events:none}

/* points page */
.bigpts{text-align:center;padding:18px 0 6px}
.bigpts b{font-size:52px;letter-spacing:-.02em}
.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}
.badge{text-align:center;border:1px solid var(--glass-line);border-radius:14px;padding:12px 6px;background:var(--card)}
.badge.off{opacity:.35;filter:grayscale(1)}
.badge .e{font-size:26px}
.badge .n{font-family:var(--sans);font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-top:4px}

/* announcements */
.ann{border-left:3px solid var(--gold);padding:4px 0 4px 12px;margin:14px 0}
.ann .when{font-family:var(--sans);font-size:11.5px;color:var(--muted)}

/* auth */
.auth-hero{text-align:center;padding:34px 0 8px}
.auth-hero img{width:min(78vw,340px);filter:invert(1)}
.auth-hero p{margin-top:10px}
.pinrow{display:flex;gap:10px}
.seg{display:flex;background:var(--card);border:1.5px solid var(--glass-line);border-radius:12px;overflow:hidden;margin-bottom:4px}
.seg button{flex:1;font-family:var(--sans);font-weight:700;font-size:14px;padding:11px;border:0;background:transparent;color:var(--muted)}
.seg button.on{background:var(--gold);color:var(--ink)}

.err{color:var(--bad);font-family:var(--sans);font-size:13.5px;font-weight:600;margin-top:10px;min-height:18px}
hr.dash{border:0;border-top:1px dashed var(--line);margin:16px 0}
.listlink{display:flex;align-items:center;justify-content:space-between;padding:15px 4px;border-bottom:1px dashed var(--line);text-decoration:none;font-size:16px}
.listlink small{color:var(--muted);font-family:var(--sans)}

/* ================= animated sky =================
   Composited-only: transform and opacity, nothing else. No JS, no rAF, no canvas,
   no background-position. Opacity is FIXED and never animated — that's what makes
   the contrast ceiling below a proof rather than a measurement. */
#sky{
  position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden;
  contain:layout paint style;   /* not `strict`: no size containment, so inset:0 still sizes */
  background:
    radial-gradient(ellipse 118% 74% at 50% -10%, #2b1f52 0%, transparent 60%),
    radial-gradient(ellipse 92% 58% at 86% 106%, #241a4e 0%, transparent 56%),
    linear-gradient(#171d3d 0%, #131831 58%, #0d1120 100%);
}
#sky .glow{position:absolute; border-radius:50%; display:block;
  will-change:transform; backface-visibility:hidden}
/* vmin, not vmax: on a 1080x2400 phone 56vmin is ~605px; vmax would be 1344px
   (~7MB of layer) and look identical. */
#sky .g1{width:56vmin; height:56vmin; left:-16vmin; top:-14vmin;
  background:radial-gradient(closest-side, rgba(240,192,79,.20), rgba(240,192,79,.07) 52%, transparent 76%);
  animation:drift-a 42s ease-in-out infinite}
#sky .g2{width:50vmin; height:50vmin; right:-18vmin; bottom:8vh;
  background:radial-gradient(closest-side, rgba(155,110,224,.16), rgba(155,110,224,.05) 52%, transparent 76%);
  animation:drift-b 57s ease-in-out infinite}
@keyframes drift-a{0%,100%{transform:translate3d(0,0,0) scale(1)}
                   50%{transform:translate3d(8vw,6vh,0) scale(1.14)}}
@keyframes drift-b{0%,100%{transform:translate3d(0,0,0) scale(1.10)}
                   50%{transform:translate3d(-7vw,-5vh,0) scale(1)}}

/* the thread strands — same single-stroke idiom as THREAD_SVG. Each strand is 200%
   wide holding one wave tiled twice, so translating -50% advances exactly one tile:
   a seamless loop with no JS and no wrap logic. */
#sky .strand{position:absolute; left:0; width:200%; height:90px;
  will-change:transform; backface-visibility:hidden}
#sky .strand svg{display:block; width:100%; height:90px; overflow:visible}
#sky .s1{top:14vh; color:#f0c04f; opacity:.22; animation:weave 46s linear infinite}
#sky .s2{top:47vh; color:#9b6ee0; opacity:.20; animation:weave 77s linear infinite}
#sky .s3{top:78vh; color:#f0c04f; opacity:.16; animation:weave 61s linear infinite}
@keyframes weave{from{transform:translate3d(0,0,0)} to{transform:translate3d(-50%,0,0)}}

/* THE VEIL — a static quad painted above everything in #sky. Not decoration: it is
   the contrast ceiling every text-on-sky number depends on. Don't remove it, and
   don't take it below .42. */
#sky::after{content:""; position:absolute; inset:0; background:rgba(13,17,32,.42)}

@media (prefers-reduced-motion:reduce){
  #sky .glow, #sky .strand{animation:none; will-change:auto}
  #sky .g1{transform:translate3d(4vw,3vh,0) scale(1.07)}
  #sky .g2{transform:translate3d(-3vw,-2vh,0) scale(1.05)}
}

/* ================= library =================
   Browse view stays NIGHT — the book covers are the warm things that glow out of
   the dark. The one sheet of paper rule still holds: paper appears when you open a
   book (the PDF page itself), not while you're browsing the shelf. */
.lib-intro{padding:6px 0 2px}
.shelf-h{display:flex;align-items:baseline;gap:8px;margin:22px 0 2px}
.shelf-h h3{font-size:16px}
.shelf-h .count{font-family:var(--sans);font-size:11.5px;font-weight:700;color:var(--muted)}
.shelf-h.folder{cursor:pointer;user-select:none;align-items:center}
.shelf-h .fold-caret{font-size:12px;line-height:1;color:var(--muted);transition:transform .15s ease}
.shelf-h.folder:hover .fold-caret{color:#fff}
.shelf.collapsed .fold-caret{transform:rotate(-90deg)}
.shelf.collapsed .book-grid{display:none}
.shelf-h.folder:focus-visible{outline:2px solid #6c7bff;outline-offset:3px;border-radius:6px}
.book-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 12px;margin:12px 0 4px}
@media(max-width:360px){.book-grid{grid-template-columns:repeat(2,1fr)}}
.bookcard{text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:7px}
.bk-cover{position:relative;aspect-ratio:2/3;border-radius:12px;overflow:hidden;
  background:linear-gradient(150deg,#241f4a,#191634);border:1px solid var(--glass-line);
  box-shadow:0 2px 4px rgba(0,0,0,.3), 0 16px 30px -18px rgba(0,0,0,.7);
  display:flex;align-items:center;justify-content:center}
.bk-cover img{width:100%;height:100%;object-fit:cover;display:block}
/* title-only fallback cover when a PDF's first page couldn't be rendered */
.bk-cover .bk-fallback{font-family:var(--serif);font-size:14px;line-height:1.3;color:var(--sky-ink);
  text-align:center;padding:14px 12px;font-style:italic}
.bk-cover .bk-prog{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(0,0,0,.4)}
.bk-cover .bk-prog i{display:block;height:100%;background:var(--gold)}
.bk-cover .bk-bm{position:absolute;top:6px;right:6px;font-size:12px;background:rgba(13,17,32,.72);
  color:var(--amber);border-radius:999px;padding:1px 7px;font-family:var(--sans);font-weight:700}
.bk-meta .t{font-size:13.5px;line-height:1.25;font-weight:600;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bk-meta .a{font-family:var(--sans);font-size:11px;color:var(--muted);margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* continue-reading strip: horizontal scroll of in-progress books */
.cont-row{display:flex;gap:12px;overflow-x:auto;margin:12px -18px 4px;padding:2px 18px 8px;
  scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.cont-row .bookcard{flex:0 0 96px;width:96px;scroll-snap-align:start}
.lib-empty{text-align:center;color:var(--muted);padding:38px 10px}

/* ================= reader =================
   Full-screen over the app. Night chrome (top + bottom bars); the PDF page is the
   warm thing in the middle — the book's own paper. */
#reader{position:fixed;inset:0;z-index:90;background:#08060f;display:flex;flex-direction:column;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.rd-bar{display:flex;align-items:center;gap:6px;padding:9px 10px;background:var(--night);
  border-bottom:1px solid var(--sky-line);flex:none}
.rd-bar.bot{border-bottom:0;border-top:1px solid var(--sky-line)}
.rd-title{flex:1;min-width:0;font-size:14px;font-weight:700;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-btn{flex:none;width:40px;height:40px;border:0;border-radius:10px;background:transparent;
  color:var(--sky-ink);font-size:17px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.rd-btn:active{background:rgba(236,233,246,.10)}
.rd-btn.on{color:var(--amber)}
.rd-btn[disabled]{opacity:.32;pointer-events:none}
.rd-stage{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;position:relative;
  display:flex;align-items:flex-start;justify-content:center;background:#08060f}
.rd-canvas-wrap{position:relative;margin:auto}
#rd-canvas{display:block;max-width:100%;height:auto;background:#fffdf8;
  box-shadow:0 10px 40px -10px rgba(0,0,0,.8)}
/* invisible tap zones: left third = prev page, right third = next, middle = toggle chrome */
.rd-tap{position:absolute;top:0;bottom:0;width:33%;z-index:2}
.rd-tap.l{left:0}.rd-tap.r{right:0}.rd-tap.m{left:33%;width:34%}
.rd-page{flex:none;font-family:var(--sans);font-size:12.5px;font-weight:700;color:var(--muted);
  text-align:center;min-width:78px}
.rd-page b{color:var(--sky-ink)}
.rd-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  color:var(--muted);font-family:var(--sans);font-size:13px;z-index:3}
.rd-chrome-hide .rd-bar{transform:translateY(0)}
/* bookmarks / notes sheet */
.rd-sheet{position:absolute;left:0;right:0;bottom:0;z-index:5;max-height:66%;overflow:auto;
  background:var(--card);border-top-left-radius:18px;border-top-right-radius:18px;
  border-top:1px solid var(--glass-line);padding:14px 16px calc(16px + var(--safe-b));
  box-shadow:0 -20px 50px -20px rgba(0,0,0,.7)}
.rd-sheet h4{font-size:15px;margin-bottom:4px}
.rd-sheet .close{position:absolute;top:10px;right:10px}
.bm-row{display:flex;align-items:flex-start;gap:10px;padding:11px 0;border-bottom:1px dashed var(--sky-line)}
.bm-row:last-child{border-bottom:0}
.bm-jump{flex:none;font-family:var(--sans);font-weight:800;font-size:12px;color:var(--ink);
  background:var(--gold);border:0;border-radius:8px;padding:6px 9px;cursor:pointer;min-width:52px}
.bm-note{flex:1;min-width:0}
.bm-note textarea{font-family:var(--sans);font-size:13.5px;min-height:38px;line-height:1.4;
  background:var(--plum);color:var(--sky-ink);border:1px solid var(--sky-line);border-radius:9px;
  padding:8px 10px;resize:vertical}
.bm-note textarea:focus{border-color:var(--focus);box-shadow:0 0 0 3px var(--halo)}
.bm-del{flex:none;width:34px;height:34px;border:0;border-radius:8px;background:transparent;
  color:var(--muted);font-size:14px;cursor:pointer}
.bm-del:active{background:rgba(236,233,246,.10)}
.rd-sheet .empty{color:var(--muted);font-family:var(--sans);font-size:13px;padding:14px 2px}

/* ---- reading rewards ---- */
/* book-card badge: what a book is worth, or that it's been earned (top-left, opposite
   the bookmark count). Solid gold once earned so a finished book reads as "done". */
.bk-cover .bk-pts{position:absolute;top:6px;left:6px;font-family:var(--sans);font-weight:800;
  font-size:11px;letter-spacing:.02em;border-radius:999px;padding:2px 8px;
  background:rgba(13,17,32,.72);color:var(--gold)}
.bk-cover .bk-pts.earned{background:var(--gold);color:var(--ink)}
/* the finish pill: floats above the bottom bar, only when you're on the last page of a
   book worth points and haven't earned it (JS toggles .show). */
.rd-finish{position:absolute;left:50%;bottom:calc(64px + var(--safe-b));z-index:6;
  transform:translate(-50%,14px);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;
  font-family:var(--sans);font-weight:800;font-size:14px;color:var(--ink);background:var(--gold);
  border:0;border-radius:999px;padding:12px 20px;cursor:pointer;
  box-shadow:0 10px 30px -8px rgba(0,0,0,.7)}
.rd-finish.show{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
/* the reflection sheet reuses .rd-sheet; these style its innards */
.rd-sheet.finish .fin-q{font-family:var(--serif);font-size:15.5px;line-height:1.4;
  color:var(--sky-ink);margin:2px 0 10px}
.rd-sheet.finish #fin-a{width:100%;font-family:var(--sans);font-size:16px;line-height:1.5;
  min-height:120px;background:var(--plum);color:var(--sky-ink);
  border:1px solid var(--sky-line);border-radius:12px;padding:11px 12px;resize:vertical}
.rd-sheet.finish #fin-a:focus{border-color:var(--focus);box-shadow:0 0 0 3px var(--halo);outline:0}
.fin-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.fin-count{font-family:var(--sans);font-size:12.5px;font-weight:700;color:var(--muted);flex:none}
.fin-count.ok{color:var(--gold-deep)}
.fin-foot .btn{width:auto;flex:none;padding:12px 18px}
.fin-foot .btn[disabled]{opacity:.4;pointer-events:none}

/* Study & Research (KERYGMA v2) embedded assistant */
.study-intro{margin:6px 0 10px}
.study-intro h1{font-size:24px;margin:0 0 2px}
.study-frame-wrap{margin:0 -4px}
.study-frame{width:100%;height:calc(100dvh - 232px);min-height:440px;border:0;border-radius:14px;
  background:#0e1220;box-shadow:0 10px 30px -14px rgba(0,0,0,.7)}

/* ======================= DAILY TRIVIA ======================= */
/* Deliberately BRIGHT — the game is the one playful, high-colour corner of an
   otherwise night-toned devotional app. Everything here is self-contained and
   scoped to .trivia-* / .tq-* / .tsp-* so it can't leak into the dark theme. */

/* Home-tab entry card, sits directly above Today's devotion */
.trivia-link{position:relative;display:flex;align-items:center;gap:14px;margin:14px 0;
  padding:16px 16px;border-radius:18px;overflow:hidden;color:#1a1030;
  background:linear-gradient(120deg,#ff5ea8 0%,#ff8a3d 38%,#ffd23f 66%,#3dd6ff 100%);
  background-size:200% 200%;animation:tl-grad 8s ease infinite;
  box-shadow:0 12px 26px -12px rgba(255,94,168,.7)}
.trivia-link:active{transform:scale(.99)}
.trivia-link .tl-shine{position:absolute;top:0;left:-60%;width:45%;height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);
  transform:skewX(-18deg);animation:tl-shine 4.5s ease-in-out infinite}
.tl-emoji{font-size:30px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));animation:tl-bob 2.6s ease-in-out infinite}
.tl-body{flex:1;min-width:0;position:relative;z-index:1}
.tl-badge{font-family:var(--sans);font-size:10px;font-weight:800;letter-spacing:.2em;
  background:rgba(26,16,48,.85);color:#fff;display:inline-block;padding:3px 8px;border-radius:20px}
.tl-title{font-family:var(--sans);font-weight:800;font-size:18px;margin-top:5px;color:#1a1030}
.tl-sub{font-family:var(--sans);font-size:12.5px;font-weight:600;color:#3a2450;margin-top:1px}
.tl-go{position:relative;z-index:1;font-size:15px;font-weight:800;color:#1a1030;
  background:rgba(255,255,255,.65);width:34px;height:34px;border-radius:50%;
  display:grid;place-items:center;flex:none}
@keyframes tl-grad{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes tl-shine{0%,100%{left:-60%}55%,100%{left:130%}}
@keyframes tl-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-4px) rotate(4deg)}}

/* The game view */
.trivia-view{position:relative;min-height:100dvh;margin:0 -18px;padding:0}
.trivia-bg{position:fixed;inset:0;z-index:0;
  background:linear-gradient(150deg,#5b2bd9 0%,#c72bd9 34%,#ff5e8a 62%,#ff9d3d 100%);
  background-size:220% 220%;animation:tl-grad 12s ease infinite}
#trivia-stage{position:relative;z-index:1;max-width:560px;margin:0 auto;
  padding:calc(env(safe-area-inset-top,0px) + 14px) 18px calc(96px + var(--safe-b))}

.tq-top{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.tq-x{width:34px;height:34px;flex:none;border-radius:50%;display:grid;place-items:center;
  background:rgba(255,255,255,.22);color:#fff;font-size:16px;font-weight:800;text-decoration:none}
.tq-score{margin-left:auto;color:#fff;font-family:var(--sans);font-weight:700;font-size:15px;
  background:rgba(0,0,0,.22);padding:6px 12px;border-radius:20px}
.tq-dots{display:flex;gap:6px;flex-wrap:wrap;flex:1}
.tq-dots i{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.35);transition:all .3s}
.tq-dots i.now{background:#fff;transform:scale(1.35);box-shadow:0 0 0 3px rgba(255,255,255,.3)}
.tq-dots i.ok{background:#3ff0a2}
.tq-dots i.no{background:#ff5b6e}
.tq-dots.big{justify-content:center;margin:14px 0 4px}
.tq-dots.big i{width:12px;height:12px}

.tq-card{background:#fff;border-radius:22px;padding:20px 18px 18px;
  box-shadow:0 22px 46px -18px rgba(0,0,0,.55);animation:tq-in .5s cubic-bezier(.2,.9,.3,1.2) both}
.tq-card.cat-bible{border-top:6px solid #6a5cff}
.tq-card.cat-christian{border-top:6px solid #ff7a3d}
.tq-card.cat-fun{border-top:6px solid #2fbf71}
.tq-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.tq-tier{font-family:var(--sans);font-size:11px;font-weight:800;letter-spacing:.1em;
  text-transform:uppercase;color:#8a3df0}
.tq-cat{font-family:var(--sans);font-size:12px;font-weight:700;color:#555}
.tq-q{font-family:var(--sans);font-weight:800;font-size:20px;line-height:1.3;color:#1a1030;margin-bottom:16px}
.tq-choices{display:flex;flex-direction:column;gap:10px}
.tq-choice{display:flex;align-items:center;gap:12px;width:100%;text-align:left;cursor:pointer;
  border:2px solid #eae6f5;background:#faf9ff;border-radius:14px;padding:13px 14px;
  font-family:var(--sans);font-size:15.5px;font-weight:600;color:#231640;
  animation:tq-choice-in .45s cubic-bezier(.2,.9,.3,1.2) both}
.tq-choice:active{transform:scale(.98)}
.tq-choice .tq-key{flex:none;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;
  background:#efeafc;color:#7a3df0;font-weight:800;font-size:14px;transition:all .2s}
.tq-choice .tq-txt{flex:1}
.tq-choice[disabled]{cursor:default}
.tq-choice.correct{border-color:#2fbf71;background:#e9fbf1;color:#0f7a45}
.tq-choice.correct .tq-key{background:#2fbf71;color:#fff}
.tq-choice.wrong{border-color:#ff5b6e;background:#fff0f2;color:#c8283a}
.tq-choice.wrong .tq-key{background:#ff5b6e;color:#fff}
.tq-choice.pop{animation:tq-pop .5s ease}
.tq-choice.shake{animation:tq-shake .45s ease}
.tq-fact{margin-top:14px;font-family:var(--sans);font-size:13.5px;line-height:1.45;color:#3a2b52;
  background:#f4f0ff;border-radius:12px;padding:11px 13px;opacity:0;transform:translateY(6px);
  border-left:4px solid #8a3df0}
.tq-fact.show{animation:tq-fade .4s ease forwards}
.tq-next{margin-top:14px;background:#1a1030;color:#fff;opacity:0}
.tq-next.show{animation:tq-fade .4s ease .1s forwards}

.tq-summary{background:#fff;border-radius:24px;padding:26px 20px;text-align:center;
  box-shadow:0 22px 46px -18px rgba(0,0,0,.55);animation:tq-in .5s cubic-bezier(.2,.9,.3,1.2) both;
  max-width:420px;margin:8vh auto 0}
.tq-sum-emoji{font-size:56px;animation:tl-bob 2.4s ease-in-out infinite}
.tq-sum-score{font-family:var(--sans);font-weight:900;font-size:52px;color:#1a1030;line-height:1}
.tq-sum-score span{font-size:26px;color:#9a8fb5}
.tq-sum-pts{font-family:var(--sans);font-weight:800;font-size:16px;color:#8a3df0;margin-top:4px}
.tq-sum-msg{font-family:var(--sans);font-size:14px;color:#4a3a63;margin:8px 0 0}

/* the 5-second launch splash */
.trivia-splash{position:fixed;inset:0;z-index:200;display:grid;place-items:center;overflow:hidden;
  cursor:pointer;touch-action:none;opacity:0;transition:opacity .35s ease;
  background:linear-gradient(150deg,#5b2bd9,#c72bd9 40%,#ff5e8a 70%,#ff9d3d)}
.trivia-splash.in{opacity:1}
.trivia-splash.out{opacity:0}
.tsp-rays{position:absolute;width:180vmax;height:180vmax;top:50%;left:50%;margin:-90vmax 0 0 -90vmax;
  background:repeating-conic-gradient(from 0deg,rgba(255,255,255,.10) 0deg 8deg,transparent 8deg 16deg);
  animation:tsp-spin 20s linear infinite}
.tsp-pieces i{position:absolute;top:-6vh;width:11px;height:14px;opacity:.95;
  animation-name:tsp-fall;animation-timing-function:linear;animation-iteration-count:infinite}
.tsp-center{position:relative;z-index:2;text-align:center;color:#fff;padding:20px;
  animation:tsp-rise .6s cubic-bezier(.2,.9,.3,1.2) both}
.tsp-emoji{font-size:74px;filter:drop-shadow(0 6px 12px rgba(0,0,0,.3));animation:tl-bob 2.2s ease-in-out infinite}
.tsp-title{font-family:var(--sans);font-weight:900;font-size:64px;letter-spacing:.06em;line-height:1;
  margin-top:6px;text-shadow:0 6px 20px rgba(0,0,0,.35)}
.tsp-sub{font-family:var(--sans);font-weight:700;font-size:15px;margin-top:10px;opacity:.95}
.tsp-tap{font-family:var(--sans);font-weight:700;font-size:12px;letter-spacing:.15em;
  text-transform:uppercase;margin-top:22px;opacity:.85;animation:tsp-pulse 1.4s ease-in-out infinite}

/* ======================= BIRTHDAYS ======================= */
.bday-overlay,.bgift-overlay{position:fixed;inset:0;z-index:210;display:grid;place-items:center;
  padding:22px;background:rgba(13,17,32,.72);backdrop-filter:blur(4px);
  opacity:0;transition:opacity .3s ease}
.bday-overlay.in,.bgift-overlay.in{opacity:1}
.bday-sheet,.bgift-sheet{background:#fff;border-radius:22px;padding:24px 22px;max-width:360px;width:100%;
  text-align:center;box-shadow:0 24px 50px -18px rgba(0,0,0,.6);
  transform:translateY(16px) scale(.96);transition:transform .34s cubic-bezier(.2,.9,.3,1.2)}
.bday-overlay.in .bday-sheet,.bgift-overlay.in .bgift-sheet{transform:none}
.bday-sheet h2,.bgift-sheet h2{font-family:var(--sans);font-weight:800;font-size:22px;color:#1a1030;margin:6px 0 4px}
.bday-sheet .muted,.bgift-sheet .muted{color:#5a4a70}
.bday-cake{font-size:52px;animation:tl-bob 2.6s ease-in-out infinite}
.bgift-gift{font-size:58px;animation:tq-pop 1.6s ease-in-out infinite}
.bday-input{margin:16px 0 4px;text-align:center;font-family:var(--sans);font-size:16px;
  border:2px solid #eae6f5;border-radius:12px;padding:12px;color:#1a1030;background:#faf9ff}
.bday-sheet .btn.gold,.bgift-sheet .btn.gold{margin-top:12px}
.bday-later{background:none;border:0;color:#8a7ba0;font-family:var(--sans);font-weight:700;
  font-size:13px;margin-top:10px;cursor:pointer;width:100%;padding:6px}

/* full-screen birthday celebration graphic (after the splash) */
.bday-cel{position:fixed;inset:0;z-index:210;display:grid;place-items:center;overflow:hidden;
  cursor:pointer;touch-action:none;opacity:0;transition:opacity .4s ease;
  background:radial-gradient(circle at 50% 30%,#ff8a3d,#c72bd9 55%,#3b1e8f 100%)}
.bday-cel.in{opacity:1}
.bday-cel.out{opacity:0}
.bcel-pieces i{position:absolute;top:-6vh;width:12px;height:15px;opacity:.95;
  animation-name:tsp-fall;animation-timing-function:linear;animation-iteration-count:infinite}
.bcel-center{position:relative;z-index:2;text-align:center;color:#fff;padding:20px;
  animation:tsp-rise .6s cubic-bezier(.2,.9,.3,1.2) both}
.bcel-balloons{font-size:60px;animation:tl-bob 2.4s ease-in-out infinite}
.bcel-hb{font-family:var(--sans);font-weight:800;font-size:22px;letter-spacing:.14em;
  text-transform:uppercase;opacity:.95;margin-top:8px}
.bcel-name{font-family:var(--sans);font-weight:900;font-size:44px;line-height:1.05;margin-top:4px;
  text-shadow:0 6px 20px rgba(0,0,0,.35)}
.bcel-tap{font-family:var(--sans);font-weight:700;font-size:12px;letter-spacing:.15em;
  text-transform:uppercase;margin-top:24px;opacity:.85;animation:tsp-pulse 1.4s ease-in-out infinite}

/* confetti bits flung from JS */
.confetti-bit{position:fixed;top:0;width:10px;height:14px;z-index:320;pointer-events:none}

/* ---- keyframes ---- */
@keyframes tq-in{from{opacity:0;transform:translateY(24px) scale(.96)}to{opacity:1;transform:none}}
@keyframes tq-choice-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes tq-fade{to{opacity:1;transform:none}}
@keyframes tq-pop{0%{transform:scale(1)}40%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes tq-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(4px)}}
@keyframes tsp-spin{to{transform:rotate(360deg)}}
@keyframes tsp-fall{0%{transform:translateY(0) rotate(0)}100%{transform:translateY(112vh) rotate(540deg)}}
@keyframes tsp-rise{from{opacity:0;transform:translateY(26px) scale(.9)}to{opacity:1;transform:none}}
@keyframes tsp-pulse{0%,100%{opacity:.5}50%{opacity:1}}

@media (prefers-reduced-motion:reduce){
  .trivia-link,.trivia-bg,.tl-shine,.tl-emoji,.tsp-rays,.tsp-pieces i,.bcel-pieces i,
  .tsp-emoji,.bday-cake,.bgift-gift,.bcel-balloons,.tsp-tap,.bcel-tap,.tq-sum-emoji{animation:none!important}
  .tq-card,.tq-choice,.tq-summary,.tsp-center,.bcel-center{animation-duration:.01ms!important}
}
