/* SEND ME $1,000,000 — unnecessarily magnificent. */

:root {
  --gold: #d4af6a;
  --gold-bright: #ffd98a;
  --gold-deep: #8a6a2c;
  --ink: #f2efe6;
  --dim: rgba(242, 239, 230, 0.55);
  --faint: rgba(242, 239, 230, 0.32);
  --glass: rgba(9, 11, 22, 0.58); /* legacy alias; prefer --surface */
  --glass-solid: rgba(7, 9, 18, 0.94);
  --line: rgba(212, 175, 106, 0.28);
  --line-strong: rgba(212, 175, 106, 0.55);
  /* Three registers, each with a job: inscription, book, typewriter. */
  --display: "Marcellus", "Times New Roman", serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --mono: "Courier Prime", "Courier New", monospace;
  /* Flat surfaces, two hairlines, one motion family. No frosted glass. */
  --surface: linear-gradient(180deg, rgba(13, 15, 28, 0.9), rgba(8, 10, 18, 0.94));
  --surface-solid: linear-gradient(180deg, rgba(11, 13, 24, 0.97), rgba(7, 9, 16, 0.98));
  --r-s: 4px;
  --r-m: 8px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-emph: cubic-bezier(0.2, 0, 0, 1);
}

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #05060f;
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: var(--mono); }

/* Keyboard focus: one gold ring, everywhere. */
:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Stage layers ─────────────────────────────────────────────────────── */

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse 72% 62% at 50% 44%, transparent 58%, rgba(2, 2, 8, 0.62) 100%);
}

#dimmer {
  position: fixed; inset: 0; pointer-events: none; z-index: 8;
  background: #000; opacity: 0; transition: opacity 1.1s ease;
}

.lbar {
  position: fixed; left: 0; width: 100%; height: 11vh; background: #000;
  z-index: 40; pointer-events: none; transition: transform 0.8s cubic-bezier(0.6, 0, 0.2, 1);
}
#barTop { top: 0; transform: translateY(-101%); }
#barBottom { bottom: 0; transform: translateY(101%); }
body.letterbox #barTop { transform: translateY(0); }
body.letterbox #barBottom { transform: translateY(0); }
/* During a ceremony the utility chrome bows out. */
#hint, #proximity, #watching, #zoomCtrls, #historyBar, #latest {
  transition: opacity 0.9s ease;
}
body.letterbox #hint, body.letterbox #proximity, body.letterbox #watching,
body.letterbox #zoomCtrls, body.letterbox #historyBar, body.letterbox #latest {
  opacity: 0; pointer-events: none;
}

/* ── Header ───────────────────────────────────────────────────────────── */

#top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  text-align: center; padding-top: clamp(16px, 3.6vh, 40px);
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

#overline {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 10px; letter-spacing: 0.55em; color: var(--gold);
  opacity: 0.72; text-indent: 0.55em;
}
#overline::before, #overline::after {
  content: ""; width: 64px; height: 1px;
}
#overline::before { background: linear-gradient(90deg, transparent, var(--line-strong)); }
#overline::after { background: linear-gradient(90deg, var(--line-strong), transparent); }

h1 {
  margin: 0.35em 0 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 5vw, 56px);
  letter-spacing: 0.12em; text-indent: 0.12em;
  line-height: 1.05;
}

#tagline {
  margin-top: 0.5em;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(15px, 1.8vw, 21px);
  letter-spacing: 0.05em; opacity: 0.78;
}

#motto {
  margin-top: 8px;
  font-size: 9px; letter-spacing: 0.5em; text-indent: 0.5em;
  color: var(--gold); opacity: 0.5;
}

#hint {
  margin-top: 16px;
  font-family: var(--serif); font-style: italic;
  font-size: 15px; letter-spacing: 0.02em; color: var(--dim);
  opacity: 0.85; transition: opacity 1.2s ease;
}
#hint.gone { opacity: 0; }

#counter {
  margin-top: clamp(8px, 2.4vh, 26px);
  font-size: clamp(40px, 8.4vw, 96px);
  font-weight: 500; line-height: 1;
  display: inline-flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
}
#counter .sym { color: var(--gold); }
#counter .digit {
  display: inline-block; height: 1em; overflow: hidden; position: relative;
}
#counter .reel {
  display: block;
  transition: transform 1s cubic-bezier(0.18, 0.85, 0.22, 1);
}
#counter .reel span { display: block; height: 1em; line-height: 1; }

#counterSub {
  margin-top: 10px; font-size: 11px; letter-spacing: 0.2em;
  color: var(--dim); text-indent: 0.2em;
}

#zeroNote {
  margin-top: 12px; font-family: var(--serif); font-style: italic;
  font-size: 18px; opacity: 0.8;
}

#proximity {
  margin-top: 14px; font-family: var(--serif); font-style: italic;
  font-size: clamp(15px, 1.7vw, 19px); color: var(--gold-bright);
  animation: proxIn 1.2s ease both;
  pointer-events: auto;
}
#proximity b { font-family: var(--mono); font-style: normal; font-size: 0.85em; }
#proximity button {
  display: block; margin: 10px auto 0;
  background: transparent; color: var(--gold);
  border: 1px solid var(--line-strong); border-radius: var(--r-s);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-indent: 0.24em;
  padding: 8px 16px; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
#proximity button:hover { background: rgba(212, 175, 106, 0.14); color: var(--gold-bright); }

#latest {
  position: fixed; left: 22px; bottom: 48px; z-index: 24;
  font-size: 10px; letter-spacing: 0.18em; color: var(--faint);
}
#latest b { color: var(--gold); font-weight: 500; }

.gold.urge { animation: urge 1.1s ease 3; }
@keyframes urge {
  50% {
    filter: brightness(1.18);
    box-shadow: 0 0 40px rgba(255, 217, 138, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}
@keyframes proxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#watching {
  position: fixed; top: 18px; right: 22px; z-index: 20;
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
}

/* ── History mode ─────────────────────────────────────────────────────── */

#historyBar {
  position: fixed; top: 16px; left: 22px; z-index: 24;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 9px 14px; font-size: 10px; letter-spacing: 0.2em; color: var(--dim);
}
#historyBar button {
  background: none; border: none; color: var(--gold);
  font-size: 10px; letter-spacing: 0.2em; padding: 0;
}
#historyBar button:hover { color: var(--gold-bright); }

/* ── Name card ────────────────────────────────────────────────────────── */

/* The dedication: an engraved title card, unveiled slowly. */
#nameCard {
  position: fixed; left: 50%; top: 54%; transform: translate(-50%, -50%);
  z-index: 35; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 1.1s ease;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.75);
}
#nameCard.show { opacity: 1; }
.dedOver {
  font-size: 11px; letter-spacing: 0.52em; text-indent: 0.52em;
  color: var(--gold); opacity: 0.85;
}
.dedAmt {
  margin-top: 6px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(46px, 7vw, 88px); line-height: 1.05;
  color: var(--gold-bright);
  text-shadow: 0 0 42px rgba(255, 217, 138, 0.4), 0 2px 20px rgba(0, 0, 0, 0.7);
}
#nameCard.big .dedAmt { font-size: clamp(60px, 10vw, 128px); }
.dedRule {
  margin: 14px auto 12px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold); font-size: 11px;
}
.dedRule span {
  display: block; width: 90px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.75));
}
.dedRule span:last-child {
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.75), transparent);
}
.dedName {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 4.6vw, 58px);
  color: var(--ink);
  letter-spacing: 0.5em; text-indent: 0.5em;
  transition: letter-spacing 2.6s cubic-bezier(0.16, 0.7, 0.2, 1), text-indent 2.6s cubic-bezier(0.16, 0.7, 0.2, 1);
}
#nameCard.big .dedName { font-size: clamp(36px, 6.4vw, 84px); }
#nameCard.show .dedName { letter-spacing: 0.12em; text-indent: 0.12em; }
.dedName.anon {
  font-style: italic; font-weight: 500;
  font-size: clamp(20px, 3vw, 34px); color: var(--dim);
}

/* ── Toasts ───────────────────────────────────────────────────────────── */

#toasts {
  position: fixed; right: 22px; top: 64px; z-index: 30;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: linear-gradient(168deg, rgba(58, 46, 28, 0.96), rgba(30, 23, 13, 0.97));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(201, 165, 94, 0.16), inset 0 0 0 4px rgba(0, 0, 0, 0.14);
  border-radius: var(--r-s); padding: 12px 18px;
  font-size: 11px; letter-spacing: 0.14em; color: #eeddb0;
  opacity: 0; transform: translateX(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast .dia { color: var(--gold-bright); margin-right: 6px; }
.toast .by { display: block; margin-top: 4px; color: var(--dim); font-size: 10px; }

/* ── Cards ────────────────────────────────────────────────────────────── */

#stepCard, #ownCard {
  position: fixed; z-index: 34;
  background: var(--surface-solid);
  border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 18px 22px;
  opacity: 0; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
#stepCard {
  max-width: 340px; transform: translateY(8px);
  background: linear-gradient(168deg, rgba(48, 38, 22, 0.95), rgba(26, 20, 11, 0.97));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(201, 165, 94, 0.16), inset 0 0 0 5px rgba(0, 0, 0, 0.12);
}
#stepCard.show { opacity: 1; transform: none; }

#stairTip {
  position: fixed; z-index: 33; pointer-events: none;
  background: linear-gradient(180deg, rgba(52, 41, 24, 0.96), rgba(30, 23, 13, 0.96));
  border: 1px solid var(--line-strong); border-radius: var(--r-s);
  padding: 6px 11px;
  font-size: 10px; letter-spacing: 0.14em; color: #e8cf96;
  white-space: nowrap;
}
#stairTip b { color: #f4e3b8; font-weight: 600; }

#zoomCtrls {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 24; display: flex; flex-direction: column; gap: 8px;
}
#zoomCtrls button {
  width: 38px; height: 38px; border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--line); color: var(--gold);
  font-family: var(--serif); font-size: 20px; line-height: 1;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
#zoomCtrls button:hover { border-color: var(--line-strong); color: var(--gold-bright); }
#ownCard {
  left: 50%; top: 46%; transform: translate(-50%, -50%) scale(0.96);
  text-align: center; min-width: 300px;
}
#ownCard.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.cardClose {
  position: absolute; top: 0; right: 0;
  background: none; border: none; color: var(--dim); font-size: 18px;
  padding: 12px 16px; /* visual size unchanged; hit area is not */
}
.cardClose:hover { color: var(--ink); }

.stepTitle {
  font-size: 12px; letter-spacing: 0.3em; color: #cfa860;
  border-bottom: 1px solid rgba(201, 165, 94, 0.3); padding-bottom: 8px;
}
.artifact { margin-top: 10px; font-family: var(--serif); font-size: 17px; color: var(--gold-bright); }
.stepBy { margin-top: 10px; font-family: var(--serif); font-size: 19px; color: #f0e3c0; }
.stepBy b { font-weight: 600; }
.stepPart { margin-top: 6px; font-size: 10px; letter-spacing: 0.12em; color: rgba(232, 207, 150, 0.55); }
.stepMsg { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 16px; color: rgba(240, 227, 192, 0.7); }
.ownPerp { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--dim); }

.ownStep { font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: 0.1em; color: var(--gold-bright); }
.ownSub { margin-top: 4px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--dim); }
#ownCard .ghost { margin-top: 16px; }

/* ── Donate bar ───────────────────────────────────────────────────────── */

#bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
  display: flex; justify-content: center;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
}
#donate {
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 20px 32px 12px;
}

#amounts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.amt {
  background: transparent; color: var(--ink);
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  padding: 6px 17px; letter-spacing: 0.04em;
  opacity: 0.72;
  transition: opacity 0.25s, border-color 0.25s, color 0.25s;
}
.amt:hover { opacity: 1; border-color: rgba(212, 175, 106, 0.3); }
.amt.selected {
  opacity: 1; color: var(--gold-bright);
  border-color: rgba(212, 175, 106, 0.7);
  box-shadow: inset 0 0 16px rgba(212, 175, 106, 0.1);
}

#customWrap { display: flex; align-items: baseline; gap: 8px; color: var(--gold); font-family: var(--serif); font-size: 17px; }
#customWrap input {
  width: 120px; background: transparent; color: var(--ink);
  border: none; border-bottom: 1px solid rgba(242, 239, 230, 0.22);
  border-radius: 0; padding: 4px 8px;
  font-family: var(--serif); font-size: 17px; text-align: center;
}
#customWrap input:focus { outline: none; border-bottom-color: var(--line-strong); }

#fields { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
#fields input {
  width: 250px; background: transparent; color: var(--ink);
  border: none; border-bottom: 1px solid rgba(242, 239, 230, 0.16);
  border-radius: 0; padding: 5px 10px 7px;
  font-family: var(--serif); font-size: 16px; text-align: center;
}
#fields input::placeholder, #customWrap input::placeholder {
  color: rgba(242, 239, 230, 0.44); font-style: italic; font-family: var(--serif);
}
#fields input:focus { outline: none; border-bottom-color: var(--line-strong); }

.gold {
  background: linear-gradient(180deg, #eacf90, #cba254);
  color: #191106; border: none; border-radius: var(--r-s);
  font-family: var(--serif); font-weight: 600; font-size: 16px;
  letter-spacing: 0.3em; text-indent: 0.3em;
  padding: 12px 46px;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 0 0 5px rgba(212, 175, 106, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: filter 0.2s var(--ease), transform 0.15s var(--ease);
}
.gold:hover { filter: brightness(1.07); }
.gold:active { transform: translateY(1px); }
.gold.busy { opacity: 0.6; }

#donateNote {
  min-height: 12px; font-size: 9px; letter-spacing: 0.3em; text-indent: 0.3em;
  color: rgba(242, 239, 230, 0.3);
  opacity: 0; transition: opacity 0.4s;
}
#donateNote.show { opacity: 1; }

.completeMsg { font-family: var(--serif); font-style: italic; font-size: 20px; padding: 4px 10px; }

/* ── Corners ──────────────────────────────────────────────────────────── */

#cornerLeft, #cornerRight {
  position: fixed; bottom: 20px; z-index: 26; display: flex; gap: 18px;
}
#cornerLeft { left: 22px; }
#cornerRight { right: 22px; }
#cornerLeft button, #cornerRight button {
  background: none; border: none; color: var(--dim);
  font-size: 10px; letter-spacing: 0.3em; padding: 14px 4px;
  transition: color 0.2s;
}
#cornerLeft button:hover, #cornerRight button:hover { color: var(--gold-bright); }
#soundBtn.off { opacity: 0.5; }

/* ── Panels ───────────────────────────────────────────────────────────── */

#panelScrim {
  position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 3, 0.55);
  opacity: 0; transition: opacity 0.45s;
}
#panelScrim.show { opacity: 1; }

.panel {
  position: fixed; top: 0; right: 0; height: 100%; z-index: 50;
  width: min(440px, 100vw);
  background: #0a0c15;
  border-left: 1px solid var(--line);
  padding: 30px 30px 60px; overflow-y: auto;
  transform: translateX(103%); transition: transform 0.5s var(--ease-emph);
}
.panel.open { transform: translateX(0); }
.panel h2 {
  margin: 0 0 14px; font-family: var(--display); font-weight: 400;
  font-size: 26px; letter-spacing: 0.14em;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.panel h3 {
  margin: 30px 0 6px; font-size: 11px; letter-spacing: 0.35em; color: var(--gold);
}
.panelClose {
  position: absolute; top: 4px; right: 4px;
  background: none; border: none; color: var(--dim); font-size: 22px;
  padding: 12px 16px;
}
.panelClose:hover { color: var(--ink); }

.recTotals { margin-top: 12px; }
.recBig { font-size: 34px; font-weight: 500; font-variant-numeric: tabular-nums; }
.recSub { margin-top: 4px; font-size: 10px; letter-spacing: 0.22em; color: var(--dim); }
.recLargest { margin-top: 10px; font-size: 11px; color: var(--dim); }
.recLargest b { color: var(--gold-bright); }
.recHint { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--dim); margin: 4px 0 10px; }

.artRow {
  display: flex; align-items: baseline; gap: 9px;
  padding: 7px 0; border-bottom: 1px solid rgba(242, 239, 230, 0.07);
  font-size: 12px;
}
.artRow .dia { color: var(--gold); font-size: 10px; }
.artRow.open .dia { opacity: 0.35; }
.artTitle { font-family: var(--serif); font-size: 16px; flex: 1; }
.artRow.open .artTitle { color: var(--dim); }
.artWho { font-size: 10px; letter-spacing: 0.08em; color: var(--dim); text-align: right; }
.artRow.open .artWho { color: var(--gold); opacity: 0.75; font-style: italic; }

.feedRow {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid rgba(242, 239, 230, 0.06);
  font-size: 11px;
}
.feedRow .feedAmt { color: var(--gold-bright); min-width: 58px; }
.feedRow .feedWho { flex: 1; }
.feedRow .feedStep { color: var(--faint); font-size: 10px; }
.feedRow.empty { color: var(--faint); }

.faq dt {
  margin-top: 24px; font-family: var(--serif); font-weight: 600; font-size: 20px;
  line-height: 1.3;
}
.faq dd {
  margin: 7px 0 0; font-family: var(--serif); font-size: 17px; color: var(--dim);
  line-height: 1.55;
}
.finePrint {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 10px; line-height: 1.75; color: var(--faint); letter-spacing: 0.03em;
}

/* ── Finale ───────────────────────────────────────────────────────────── */

#finaleTitle, #epilogue {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 60; text-align: center; pointer-events: none;
  font-family: var(--serif); width: min(90vw, 900px);
  opacity: 0; transition: opacity 1.8s ease;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8);
}
#finaleTitle { font-style: italic; font-size: clamp(24px, 4vw, 46px); }
#epilogue { font-weight: 600; font-size: clamp(22px, 3.4vw, 40px); letter-spacing: 0.08em; }
#finaleTitle.show, #epilogue.show { opacity: 1; }

#museum {
  position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%);
  z-index: 55; text-align: center;
  opacity: 0; transition: opacity 2s ease;
}
#museum.show { opacity: 1; }
.musTitle { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 3vw, 32px); }
.musSub { margin-top: 8px; font-size: 11px; letter-spacing: 0.3em; color: var(--dim); }
#museum .ghost { margin-top: 16px; }

body.finale #top, body.finale #bottom, body.finale #watching,
body.finale #historyBar, body.finale #toasts, body.finale #cornerLeft,
body.finale #cornerRight, body.finale #stepCard, body.finale #ownCard {
  opacity: 0; pointer-events: none; transition: opacity 2s ease;
}

/* ── Misc ─────────────────────────────────────────────────────────────── */

.ghost {
  background: transparent; color: var(--gold);
  border: 1px solid var(--line); border-radius: var(--r-s);
  font-size: 11px; letter-spacing: 0.25em; text-indent: 0.25em;
  padding: 10px 20px; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.ghost:hover { background: rgba(212, 175, 106, 0.12); color: var(--gold-bright); }

#bootError, #noscript {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 70; font-size: 12px; letter-spacing: 0.1em; color: var(--dim);
  text-align: center; max-width: 420px; line-height: 1.8;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 106, 0.25); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Small screens ────────────────────────────────────────────────────── */

/* Collapsed phone state: the bar is a single standing invitation. */
#donate.collapsed {
  background: transparent; border-color: transparent;
  box-shadow: none; backdrop-filter: none;
  padding: 6px; gap: 0;
}
#donate.collapsed #amounts, #donate.collapsed #customWrap,
#donate.collapsed #fields, #donate.collapsed #donateNote { display: none; }

@media (max-width: 640px) {
  h1 { letter-spacing: 0.1em; text-indent: 0.1em; }
  #top { padding-top: 12px; }
  #overline { font-size: 8px; }
  #tagline { margin-top: 0.35em; }
  #motto { margin-top: 5px; font-size: 8px; }
  #counter { margin-top: 10px; }
  #counterSub { font-size: 9px; margin-top: 7px; }
  #watching { display: none; }
  #donate { width: calc(100vw - 16px); border-radius: var(--r-m); padding: 13px 8px 8px; gap: 10px; }
  #donate.collapsed { width: auto; padding: 6px; }
  #amounts { gap: 2px; }
  .amt { font-size: 16px; padding: 5px 11px; }
  #fields { gap: 10px; }
  #fields input { width: min(250px, 78vw); }
  .gold { padding: 11px 38px; font-size: 15px; }
  #bottom { padding-bottom: max(54px, env(safe-area-inset-bottom)); }
  #cornerLeft { left: 12px; bottom: 14px; }
  #cornerRight { right: 12px; bottom: 14px; gap: 12px; }
  #cornerLeft button, #cornerRight button { font-size: 9px; letter-spacing: 0.22em; }
  #latest { left: 12px; bottom: 42px; }
  #stepCard { left: 12px; right: 12px; max-width: none; bottom: 170px; }
  #toasts { right: 12px; top: 56px; }
  #watching { right: 14px; }
  #historyBar { left: 12px; top: 12px; }
  #zoomCtrls { right: 10px; }
  #hint { padding: 0 22px; }
  .panel { padding: 26px 22px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  #counter .reel { transition: none; }
  .lbar { transition: none; }
}
