/* GPT Advent. No inline style (CSP style-src 'self'): every state is a class
   the server or app.js sets. Where each door sits, and which piece of the
   picture it shows, is /web/board.css, generated by board.go. */

:root {
  color-scheme: light dark;
  --bg: #f4f1ea;
  --glow: #ffd9c9;
  --panel: #fffdf9;
  --line: #ddd4c4;
  --text: #1c1a16;
  --muted: #5c564b;
  --accent: #c2341b;
  --ship: #0e6c45;
  --reset: #8a4f00;
  --on-ship: #ffffff;
  --shadow: 0 1px 2px rgb(60 40 10 / 6%), 0 10px 28px rgb(60 40 10 / 7%);
  --radius: 18px;
  /* the calendar is a printed object: the same in both themes */
  --frame: #8a2118;
  --frame-dark: #5a120c;
  --gold: #e9bd62;
  --paper: #fbf3e2;
  --ink: #2a1f16;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100f0d;
    --glow: #34180f;
    --panel: #1b1916;
    --line: #322e27;
    --text: #f3efe7;
    --muted: #aaa396;
    --accent: #ff8063;
    --ship: #55d7a2;
    --reset: #ffb950;
    --on-ship: #0b1a13;
    --shadow: none;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg) radial-gradient(1100px 520px at 50% -140px, var(--glow), transparent 70%) no-repeat;
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 30; padding: 8px 12px; background: var(--panel); border-radius: 8px; }
.skip:focus { left: 16px; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ── top bar ────────────────────────────────────────────────────────── */

.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -0.01em; text-decoration: none; }
.brand img { display: block; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--muted);
}
.menu a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.menu a[aria-current="page"], .menu a.on { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }

/* ── home: hero ─────────────────────────────────────────────────────── */

.hero { padding-top: 30px; padding-bottom: 26px; }

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.3rem, 6.4vw, 4.2rem); line-height: 1.03;
  font-weight: 800; letter-spacing: -0.04em;
}
h1 em { display: block; font-style: normal; color: var(--accent); }

.lede { margin: 0 0 12px; max-width: 64ch; font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); }
.source { margin: 0 0 24px; font-size: .95rem; }
.source a { font-weight: 650; }

.stats {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 10px;
  max-width: 760px; margin: 0;
}
.stats div { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.stats dt { font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ── the calendar ───────────────────────────────────────────────────── */

.cal { padding-top: 10px; padding-bottom: 10px; scroll-margin-top: 12px; }

/* The printed card the doors are cut into, in a cranberry frame with a
   gold rule. */
.frame {
  position: relative; padding: 16px;
  background: linear-gradient(150deg, var(--frame), var(--frame-dark));
  border-radius: 22px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 18%) inset, 0 26px 60px -18px rgb(40 10 5 / 55%);
}
.frame::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1.5px solid color-mix(in srgb, var(--gold) 70%, transparent); border-radius: 16px;
}

.board {
  position: relative;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(7, minmax(0, 1fr));
  aspect-ratio: 8 / 7; margin: 0; padding: 0; list-style: none;
  background: #1a120d;
  border-radius: 6px;
}

.cell { position: relative; perspective: 1100px; }
.cell.open { z-index: 3; }

/* The compartment behind the door: a recess in the card. */
.inside {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 9px;
  background: var(--paper); color: var(--ink);
  box-shadow: inset 7px 7px 16px rgb(70 40 15 / 42%), inset -1px -1px 0 rgb(255 255 255 / 60%);
  container-type: size;
  opacity: 0; transition: opacity .35s .2s;
}
.cell.open .inside { opacity: 1; }
.s-locked .inside { display: none; }

.kind { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #0e6c45; }
.s-reset .kind { color: #8a4f00; }
.inside .t {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
  font-weight: 750; font-size: .95rem; line-height: 1.25; letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
.inside .t:hover { text-decoration: underline; color: var(--ink); }
.wait { margin: auto 0 0; font-size: .85rem; line-height: 1.35; color: #5c4a38; }
.wait b { display: block; color: var(--ink); }
.shut {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center;
  font: 700 1rem/1 system-ui, sans-serif; color: #6b5a48;
  background: rgb(255 255 255 / 70%); border: 1px solid rgb(90 60 30 / 22%); border-radius: 50%; cursor: pointer;
}
.shut:hover { color: var(--ink); background: #fff; }

@container (max-height: 150px) { .inside .t { -webkit-line-clamp: 2; line-clamp: 2; } }
@container (max-width: 112px) {
  .inside .kind, .inside .vote { display: none; }
  .inside .t { -webkit-line-clamp: 3; line-clamp: 3; font-size: .8rem; }
  .wait { font-size: .72rem; }
}

/* The door: a leaf that swings on its hinge, the picture on its front and
   plain card on its back. */
.door {
  position: absolute; inset: 0; z-index: 2; display: block;
  color: inherit; text-decoration: none; cursor: pointer;
}
.door:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: 4px; }
.s-locked .door { cursor: not-allowed; }
.cell.open .door { pointer-events: none; }

.leaf {
  position: absolute; inset: 0; display: block;
  transform-style: preserve-3d; transform-origin: left center;
  transition: transform .9s cubic-bezier(.3, 1.25, .45, 1);
}
.h-right .leaf { transform-origin: right center; }
.h-top .leaf { transform-origin: center top; }
.cell.open .leaf { transform: rotateY(-112deg); }
.cell.open.h-right .leaf { transform: rotateY(112deg); }
.cell.open.h-top .leaf { transform: rotateX(112deg); }
.cell.still .leaf, .cell.still .inside { transition: none; }

.front, .back { position: absolute; inset: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front {
  background-image: url(scene-wide.svg); background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 22%), inset 1px 1px 0 rgb(255 255 255 / 14%);
}
/* the perforation */
.front::before {
  content: ""; position: absolute; inset: 3px; pointer-events: none;
  border: 1.5px dashed rgb(255 246 222 / 70%); border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(40 25 15 / 16%), inset 0 0 0 1px rgb(40 25 15 / 10%);
}
.back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #efe2c7, #d9c49f);
  box-shadow: inset 0 0 0 1px rgb(90 60 30 / 25%);
}
.h-top .back { transform: rotateX(180deg); }
.cell.open .front { box-shadow: none; }

.door:hover .front::before { border-color: var(--gold); }
.door:hover .leaf { transform: rotateY(-7deg); }
.h-right .door:hover .leaf { transform: rotateY(7deg); }
.h-top .door:hover .leaf { transform: rotateX(7deg); }
.s-locked .door:hover .leaf { transform: none; }

/* the numbers: one printed tag on every door, gold on dark */
.n {
  position: absolute; display: grid; place-items: center;
  min-width: 1.75em; height: 1.75em; padding: 0 .28em; border-radius: .3em;
  font: 700 clamp(1.05rem, 2.3vw, 1.7rem)/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-variant-numeric: lining-nums;
  color: var(--gold); background: rgb(22 16 12 / 86%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 72%, transparent), 0 4px 12px rgb(0 0 0 / 35%);
}
.z-l .n { font-size: clamp(1.7rem, 4.2vw, 3rem); }
.at-tl { top: 9%; left: 10%; }
.at-tr { top: 9%; right: 10%; }
.at-bl { bottom: 9%; left: 10%; }
.at-br { bottom: 9%; right: 10%; }
.at-c { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* today's door glows until it is opened */
.s-today .front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 26px rgb(255 205 110 / 55%);
  animation: glow 2.2s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: inset 0 0 0 3px #fff3c8, inset 0 0 36px rgb(255 215 130 / 75%); } }

/* a locked door shakes and says when it opens */
.cell.shake .leaf { animation: shake .5s; }
@keyframes shake {
  20% { transform: rotate(-2.2deg); }
  40% { transform: rotate(2deg); }
  60% { transform: rotate(-1.4deg); }
  80% { transform: rotate(.8deg); }
}
/* The bubble sits on the door itself, printed like the number tags, and its
   cell rises above the neighbours so no door paints over it. */
.cell.hinting { z-index: 6; }
.n { transition: opacity .2s; }
.cell.hinting .n { opacity: 0; }
.cell.hinting::after {
  content: attr(data-hint); position: absolute; left: 50%; top: 50%; z-index: 6;
  transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  padding: .55em .95em; border-radius: 999px;
  font: 700 .82rem/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: .01em;
  color: var(--gold); background: rgb(22 16 12 / 92%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 72%, transparent), 0 8px 22px rgb(0 0 0 / 45%);
  animation: pop .28s cubic-bezier(.3, 1.4, .5, 1);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } }

/* a little burst of light as a door opens */
.cell.burst .inside::after {
  content: ""; position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, #ffe28a 0 2px, transparent 3px),
    radial-gradient(circle at 70% 25%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 60% 70%, #ffd36b 0 2px, transparent 3px),
    radial-gradient(circle at 25% 75%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle, rgb(255 230 160 / 55%), transparent 60%);
  animation: burst .9s ease-out forwards;
}
@keyframes burst { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  .leaf, .inside { transition: none; }
  .s-today .front::after, .cell.shake .leaf, .cell.burst .inside::after { animation: none; }
}

.cal-note { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.cal-hint { margin: 4px 0 0; min-height: 1.4em; font-size: .9rem; font-weight: 650; color: var(--accent); }

/* ── votes ──────────────────────────────────────────────────────────── */

.vote { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.vote button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 10px; white-space: nowrap;
  font: inherit; font-size: .9rem; font-weight: 650; color: var(--text);
  background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.vote button:hover { border-color: var(--text); }
.vote b { font-variant-numeric: tabular-nums; }
.vote .up[aria-pressed="true"] { color: var(--on-ship); background: var(--ship); border-color: var(--ship); }
.vote .down[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.vote.busy { opacity: .7; }
.vote b.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* inside a door, on paper */
.vote.mini { gap: 5px; padding-top: 4px; }
.vote.mini .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vote.mini button {
  min-height: 30px; padding: 4px 6px; border-radius: 8px; font-size: .82rem;
  color: var(--ink); border-color: rgb(90 60 30 / 30%); background: rgb(255 255 255 / 55%);
}
.vote.mini button:hover { border-color: var(--ink); }
.vote.mini .up[aria-pressed="true"] { color: #fff; background: #0e6c45; border-color: #0e6c45; }
.vote.mini .down[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* ── home: behind the doors ─────────────────────────────────────────── */

.log { padding-top: 40px; }
.log h2, .page h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 14px; }

.best {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  margin: 0 0 16px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.best-label { font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.best a { font-weight: 700; }
.best-count { color: var(--muted); font-size: .92rem; }

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
  margin: 0; padding: 0; list-style: none;
}
.card {
  position: relative; display: flex; flex-direction: column; padding: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 16px;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--ship); }
.card.s-reset::before { background: var(--reset); }
.card h3 { margin: 8px 0 6px; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0 0 10px; }
.card:target { outline: 3px solid var(--accent); outline-offset: 3px; }
.empty { color: var(--muted); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: .88rem; color: var(--muted); }
.badge {
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent);
}
.s-ship .badge { color: var(--ship); background: color-mix(in srgb, var(--ship) 13%, transparent); }
.s-reset .badge { color: var(--reset); background: color-mix(in srgb, var(--reset) 14%, transparent); }
.s-today .badge { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ── /hosted-by-mssgs: mss.gs's own card ───────────────────────────────
   Ported from mssgs-website fancy-home.css (.fstickers-card, .btn-f): the
   dark card with the green glow, its sticker wall fading in from the left,
   the brand row, pill buttons, and on a phone the wall as a tilted strip
   above the copy. Fonts as mss.gs: Bricolage Grotesque and Hanken Grotesk
   (the Latin subsets rebuildnative-website carries, OFL). */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/web/fonts/bricolage-grotesque.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/web/fonts/hanken-grotesk.woff2') format('woff2');
}

.mcard {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 390px; margin: 4px 0 10px; padding: 52px 56px;
  border-radius: 20px;
  background: radial-gradient(circle at 22% 50%, rgb(111 211 155 / 24%), transparent 58%), #202327;
  box-shadow: 0 18px 44px rgb(20 32 24 / 20%);
  font-family: 'Hanken Grotesk', -apple-system, 'Segoe UI', sans-serif;
}
.mcard-wall {
  position: absolute; z-index: -1; top: 50%; right: -60px; width: min(660px, 60%);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  transform: translateY(-50%) rotate(-6deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 8%, #000 38%);
}
.mcard-wall img { display: block; width: 100%; height: auto; }
.mcard-copy { max-width: 470px; }
.mcard-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 19px; font-weight: 600; color: #e9ecef; }
.mcard-brand img { display: block; }
.mcard-brand b { color: #6fd39b; font-weight: 600; }
.mcard h1 {
  margin: 0 0 18px; color: #fff;
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
  font-size: clamp(36px, 4.4vw, 54px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em;
}
.mcard-sub { margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: rgb(255 255 255 / 74%); }
.mcard-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px;
  margin: 0 0 30px; padding: 0; list-style: none;
}
.mcard-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1.35; color: rgb(255 255 255 / 90%); }
.mcard-list svg { flex: none; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: #6fd39b; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mcard-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 980px; border: 1px solid transparent;
  font: 600 15px/1 'Hanken Grotesk', -apple-system, 'Segoe UI', sans-serif; text-decoration: none; white-space: nowrap;
  transition: background .3s cubic-bezier(.25, .1, .25, 1), box-shadow .3s cubic-bezier(.25, .1, .25, 1);
}
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill-primary, .pill-primary:hover { color: #f7f3e8; }
.pill-primary { background: #2f6e48; }
.pill-primary:hover { background: #265f3e; box-shadow: 0 4px 20px rgb(38 95 62 / 22%); }
.pill-ghost, .pill-ghost:hover { color: #fff; }
.pill-ghost { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 20%); }
.pill-ghost:hover { background: rgb(255 255 255 / 16%); border-color: rgb(255 255 255 / 32%); }
.pill:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(111 211 155 / 60%); }
.mcard-credit { margin: 22px 0 0; font-size: 13px; color: rgb(255 255 255 / 62%); }
.mcard-credit a { color: rgb(255 255 255 / 85%); }
.mcard-credit a:hover { color: #fff; }

@media (max-width: 900px) {
  .mcard { flex-direction: column; align-items: stretch; min-height: 0; padding: 0 0 32px; }
  .mcard-wall {
    position: relative; top: auto; right: auto; width: max-content;
    grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: clamp(84px, 19vw, 120px);
    margin: calc(-8px - 4.4vw) 0 calc(14px + 4.4vw) -20px;
    transform: rotate(-5deg); transform-origin: 50vw 50%;
    -webkit-mask-image: none; mask-image: none;
  }
  .mcard-copy { max-width: none; padding: 0 28px; }
}
@media (max-width: 560px) {
  .mcard-copy { padding: 0 22px; }
  .mcard-list { grid-template-columns: minmax(0, 1fr); }
  .mcard-actions .pill { flex: 1 1 auto; }
}

/* ── sub-pages ──────────────────────────────────────────────────────── */

.page { padding-top: 18px; padding-bottom: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }

.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { font-size: 1.05rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }

.sheet {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
  padding: clamp(20px, 4vw, 36px); background: var(--panel);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.tile {
  position: relative; display: grid; place-items: center; width: clamp(96px, 16vw, 150px); aspect-ratio: 1;
  border-radius: 14px; overflow: hidden;
  background: url(scene-wide.svg) 84% 9% / 520% auto no-repeat;
  box-shadow: 0 0 0 6px var(--frame), 0 0 0 7.5px var(--gold), 0 18px 36px -12px rgb(40 10 5 / 50%);
}
.tile::before { content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgb(255 246 222 / 65%); border-radius: 6px; }
.tile span { font: 700 clamp(2.4rem, 5vw, 3.6rem)/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; color: var(--gold); text-shadow: 0 2px 0 rgb(60 20 5 / 70%), 0 0 18px rgb(0 0 0 / 60%); }
.sheet h1 { margin: 10px 0 12px; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.sheet .vote { max-width: 420px; margin-top: 6px; }
.ask { margin: 18px 0 0; font-weight: 650; }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 6px; padding: 0; list-style: none; }
.links a { font-weight: 650; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 8px; }
.pager a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.pager a:hover { border-color: var(--text); color: var(--text); }
.pager span { font-size: .85rem; color: var(--muted); }
.pager b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager .next { text-align: right; grid-column: 2; }
.return { margin: 18px 0 0; }

.lost { padding-top: 50px; padding-bottom: 80px; }

@media (max-width: 640px) {
  .sheet { grid-template-columns: 1fr; gap: 18px; }
}

/* ── footer ─────────────────────────────────────────────────────────── */

.foot { margin-top: 56px; padding: 30px 0 56px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.foot-in { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot nav a { font-weight: 600; }
.foot p { max-width: 72ch; margin: 0; }
.foot-mssgs { display: inline-flex; align-items: center; gap: 10px; width: fit-content; text-decoration: none; font-weight: 750; color: var(--text); }
.foot-mssgs small { display: block; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── phone ──────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(14, minmax(0, 1fr)); aspect-ratio: 4 / 14; }
  .front { background-image: url(scene-tall.svg); }
  .frame { padding: 10px; border-radius: 18px; }
  .frame::before { inset: 4px; border-radius: 14px; }
  .n { font-size: 1rem; }
  .z-l .n { font-size: 1.6rem; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats div:first-child { grid-column: 1 / -1; }
  .bar-in { padding-top: 16px; }
  .menu a { padding: 7px 10px; font-size: .88rem; }
}
