/* Tokens: Synteq Slate dark, copied from observability-hub/status-page/site/src/index.css. */
:root {
  --surface-lowest: #101212;
  --surface: #181a1a;
  --surface-1: #1e2020;
  --surface-2: #222424;
  --surface-3: #2a2c2c;
  --surface-4: #323434;
  --on-surface: #e8eaea;
  --on-surface-variant: #a8acac;
  --accent: #d65136;
  --on-accent: #fff;
  --border: #2a2c2c;
  --success: #b6e2b0;
  --error: #ffb4ab;
  --radius-sm: 0.1875rem;
  --radius-md: 0.4375rem;
  --font: "Aspekta", ui-sans-serif, system-ui, sans-serif;
}
@font-face {
  font-family: "Aspekta";
  src: url("/fonts/AspektaVF.woff2") format("woff2");
  font-weight: 50 1000;
  font-display: swap;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; }
code { font-size: 0.92em; background: var(--surface-3); padding: 1px 5px; border-radius: var(--radius-sm); }
.muted { color: var(--on-surface-variant); }
button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }

/* header: Q + upload on the right, the pill in the centre (fourmula), menu like good-fella */
.top { position: sticky; top: 0; z-index: 30; }
.top-inner { max-width: 72rem; margin: 0 auto; height: 80px; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.top-right { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 16px; } /* the pill is out of flow, so name the column */
.top-left { grid-column: 1; }
.top-left { display: flex; align-items: center; }
.brand { display: flex; align-items: center; color: var(--on-surface); }
/* the wordmark is a mask, so its colour is a background that can transition */
.brand .logo { display: block; height: 38px; aspect-ratio: 501.11 / 147.36; background: #fff; -webkit-mask: url("/logo.svg") center / contain no-repeat; mask: url("/logo.svg") center / contain no-repeat; transition: background-color 300ms; }
.brand:hover .logo { background: var(--accent); }

/* the pill: one shape — a capsule that becomes the full-width panel or a search field */
.top-inner { position: relative; }
.pill { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 196px; height: 44px; border-radius: 22px; background: var(--surface-2); overflow: hidden; transition: width 420ms cubic-bezier(0.76, 0, 0.24, 1), height 420ms cubic-bezier(0.76, 0, 0.24, 1), border-radius 420ms cubic-bezier(0.76, 0, 0.24, 1), background 200ms; }
.pill-bar { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; height: 44px; padding: 0 4px; gap: 0; white-space: nowrap; }
.pill-btn { height: 32px; border: 0; background: none; color: var(--on-surface); font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 0 8px; border-radius: 16px; white-space: nowrap; }
.pill-btn { opacity: 0.7; transition: opacity 150ms; }
.pill-btn:hover { opacity: 1; }
.pill-ico { width: 32px; padding: 0; justify-content: center; }
.pill-ico svg, #search-btn svg { width: 14px; height: 14px; }
.lines { width: 14px; height: 10px; display: inline-flex; flex-direction: column; justify-content: space-between; transform: scale(0.82); transition: transform 300ms cubic-bezier(0.76, 0, 0.24, 1); }
.menu-open .lines { transform: scale(0.86); } /* the × reads smaller than the two lines at the same size */
.lines i { display: block; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform 300ms cubic-bezier(0.76, 0, 0.24, 1); transform-origin: center; }
.menu-open .lines i:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .lines i:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.menu-label { display: inline-block; min-width: 40px; text-align: left; font-variant-numeric: tabular-nums; }
/* search: everything inside the pill resizes on the pill's own clock, so nothing snaps while it opens or closes */
.pill-bar > * { transition: max-width var(--pill-t), width var(--pill-t), padding var(--pill-t), margin var(--pill-t), opacity 220ms; }
.pill { --pill-t: 420ms cubic-bezier(0.76, 0, 0.24, 1); }
#menu-btn { max-width: 90px; overflow: hidden; }
.pill-label { display: inline-block; max-width: 60px; overflow: hidden; transition: max-width var(--pill-t), opacity 220ms; }
.pill-search { flex: none; width: 0; min-width: 0; padding: 0; opacity: 0; border: 0; background: none; color: var(--on-surface); font: inherit; font-size: 14px; outline: none; }
.pill-search::placeholder { color: var(--on-surface-variant); }
.pill-search::-webkit-search-cancel-button { display: none; }
#search-close { width: 0; padding: 0; margin: 0; opacity: 0; overflow: hidden; pointer-events: none; }
#search-close svg { width: 7px; height: 7px; flex: none; }
.pill.search-open { width: 420px; }
.pill.search-open #menu-btn { max-width: 0; padding: 0; opacity: 0; pointer-events: none; }
.pill.search-open .pill-label { max-width: 0; opacity: 0; }
.pill.search-open #search-btn { pointer-events: none; opacity: 1; padding-left: 12px; gap: 0; }
.pill.search-open .pill-search { width: 340px; padding: 0 10px 0 8px; opacity: 1; }
.pill.search-open #search-close { width: 32px; margin-right: 0; opacity: 0.7; pointer-events: auto; }
.pill.search-open #search-close:hover { opacity: 1; }

/* menu: the pill grows to the full header width and panel height, no second surface */
.pill.menu-open { width: calc(100% - 48px); height: 414px; /* 68 top + heading 34 + cards 280 + 32 bottom, matching the 32px side padding */ border-radius: var(--radius-md); z-index: 40; }
.pill-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: 68px 32px 32px; opacity: 0; transition: opacity 200ms; pointer-events: none; }
.pill.menu-open .pill-panel { opacity: 1; pointer-events: auto; transition-delay: 180ms; }
.big { display: grid; align-content: center; align-self: end; min-height: 280px; } /* 280px = the prize cards' height, so the links centre on the cards, not on the "Prizes" heading */
.big .clip { overflow: hidden; }
.big .reveal { position: relative; display: block; padding: 6px 0; font-size: 56px; font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; text-decoration: none; color: var(--on-surface); transform: translateY(110%); transition: transform 500ms cubic-bezier(0.76, 0, 0.24, 1); }
.pill.menu-open .big .clip:nth-child(1) .reveal { transform: none; transition-delay: 120ms; }
.pill.menu-open .big .clip:nth-child(2) .reveal { transform: none; transition-delay: 180ms; }
.pill.menu-open .big .clip:nth-child(3) .reveal { transform: none; transition-delay: 240ms; }
/* hover: the word slides up and its twin slides in from below (good-fella) */
.big .reveal { transition: transform 500ms cubic-bezier(0.76, 0, 0.24, 1); }
.big .reveal .ch { display: inline-block; transition: color 400ms; }
.big .reveal .ch.on { color: #ef5334; transition: color 0ms; }
.big .reveal[aria-current="page"] { color: var(--on-surface-variant); }
/* prizes: 3:5 cards in a row; each holds an isometric figure that opens on hover (prizes.js) */
.prizes { display: grid; align-content: start; gap: 8px; --anatomy-paper: #1c1e1e; --anatomy-face: #262828; --anatomy-top: #282a2a; --anatomy-shade-0: #161818; --anatomy-shade-1: #1a1c1c; --anatomy-shade-2: #1e2020; --anatomy-shade-3: #222424; }
.prizes h3 { margin: 0 0 6px; font-size: 13px; font-weight: 400; color: var(--on-surface-variant); }
.prize-row { display: flex; gap: 12px; }
.prize { position: relative; margin: 0; width: 210px; aspect-ratio: 3 / 4; background: #1c1e1e; border-radius: var(--radius-md); overflow: hidden; outline: none; cursor: crosshair; }
.prize:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.prize svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.prize[data-prize="cow"] svg { transform: translate(2%, 2%); }
.prize[data-prize="loot"] svg { transform: translate(calc(2% - 3% * var(--open, 0)), 1%); } /* slides 3% left as it opens */
.prize[data-prize="pistol"] svg { transform: translate(calc(2% - 2% * var(--open, 0)), 2%); } /* slides 2% left as it opens */
.prize header { position: absolute; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; z-index: 1; pointer-events: none; }
.prize header { top: 10px; }
.prize header img { height: 18px; width: auto; display: block; }
.prize header { align-items: center; }
.prize .credit { position: absolute; right: 12px; bottom: 10px; margin: 0; font-size: 12px; color: var(--on-surface-variant); z-index: 1; pointer-events: none; }
.prize header span:last-child { font-weight: 500; }
.prize header span.two { text-align: right; line-height: 1.25; }
.prize header:has(.two) { align-items: flex-start; }
.prize.blank { background: var(--surface-1); cursor: default; }
.prize.blank .tba { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 500; color: var(--surface-4); }
body.menu-open .top-right, body.menu-open .top-left { opacity: 0.4; transition: opacity 200ms; }

/* search filter: non-matching rows fade, then collapse; in matching rows only the hit stays full strength */
tbody tr.row, tbody tr.more { transition: opacity 250ms; }
tbody tr.dim { opacity: 0; }
tbody tr.gone { display: none; }
mark.hit { background: none; color: inherit; }
tr.row.q .rest, tr.row.q .who img, tr.row.q .app-link svg, tr.row.q td > :not(.who):not(.app-link), tr.more.q { opacity: 0.5; }

main { max-width: 72rem; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 24px; }

/* podium: three extruded cards under one camera above centre (reference pose:
   look down, no yaw; the side blocks' inner faces come from the perspective) */
.podium { display: grid; grid-template-columns: 280px 320px 280px; justify-content: center; gap: 28px; align-items: end; width: 100%; margin: 0 auto; padding: 64px 0 96px; perspective: 2400px; perspective-origin: 50% 30%; }
.stand { display: grid; justify-items: center; transform-style: preserve-3d; gap: 36px; --d: 280px; --h: 230px; --line: #3a3d3d; }
.stand.first { --h: 300px; --d: 320px; }
.stand.third { --h: 200px; }
.stand .who { min-height: 96px; }
.stand .avatar { width: 96px; height: 96px; border-radius: var(--radius-md); object-fit: cover; background: var(--surface-4); display: block; }
/* hover: text slides left, chevron slides in on the right; layout never shifts */
.face .handle { position: relative; font-size: 15px; font-weight: 500; text-decoration: none; }
.face .handle span { display: inline-block; transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.face .handle .chev { position: absolute; left: 100%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 2px; opacity: 0; transform: translateX(-6px); transition: opacity 200ms, transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.face .handle:hover span { transform: translateX(-5px); }
.face .handle:hover .chev { opacity: 1; transform: translateX(-3px); }
.block { position: relative; width: 100%; height: var(--h); transform-style: preserve-3d; will-change: transform; transform: rotateX(calc(-10deg + var(--rx, 0deg))) rotateY(var(--ry, 0deg)); }
.face { position: absolute; inset: 0; border: 1px solid var(--line); }
.face.front { background: linear-gradient(180deg, #242626 0%, #1b1d1d 100%); transform: translateZ(calc(var(--d) / 2)); display: grid; align-content: start; justify-items: center; gap: 8px; padding: 20px 16px; }
.face.top { height: var(--d); transform-origin: top; transform: translateZ(calc(var(--d) / 2)) rotateX(-90deg); background: linear-gradient(0deg, #2b2e2e, #262828); }
.face.left { width: var(--d); transform-origin: left; transform: translateZ(calc(var(--d) / 2)) rotateY(90deg); background: #1a1c1c; }
.face.right { width: var(--d); right: 0; left: auto; transform-origin: right; transform: translateZ(calc(var(--d) / 2)) rotateY(-90deg); background: #1a1c1c; }
.face .medal { height: 44px; width: auto; }
.stand.first .face .medal { height: 54px; }
.face .out { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--on-surface-variant); text-decoration: none; transition: color 150ms; }
.face .out:hover { color: var(--on-surface); }
.face .out svg { width: 10px; height: 10px; overflow: visible; fill: currentColor; }
.face .out .arrow { transition: transform 200ms; }
.face .out:hover .arrow { transform: translate(45px, -45px); }
.face .pts { font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stand.first .face .pts { font-size: 38px; }

/* "Your entry": the portal's configuration card — dashed frame, solid inner border, label / value rows, big total.
   It sits in a right-hand column beside the board and sticks under the header while the list scrolls. */
body.has-mine main, body.has-mine .top-inner { max-width: 90rem; }
body.has-mine .board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
body.has-mine .board .table-wrap, body.has-mine .board .empty { grid-column: 1; grid-row: 1; }
.mine { grid-column: 2; grid-row: 1; position: sticky; top: 96px; padding: 8px; border: 1px dashed var(--surface-4); border-radius: 12px; }
.mine-card { border: 2px solid var(--surface-3); border-radius: var(--radius-md); padding: 24px 22px 22px; }
.mine-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mine-card h2 { margin: 0; font-size: 18px; font-weight: 500; }
.mine-card dl { margin: 0; display: grid; gap: 12px; }
.mine-card dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.mine-card dt { color: var(--on-surface-variant); white-space: nowrap; }
.mine-card dd { margin: 0; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* "Posted by" stacks: the label, then the person on a full-width line of their own */
.mine-card dl > div:has(.who) { flex-direction: column; align-items: stretch; gap: 8px; }
.mine-card dd:has(.who) { overflow: visible; text-align: left; }
.mine-card .who .name { max-width: 190px; }
.mine-card .app-link .rest { color: var(--on-surface-variant); }
.mine-card dd:has(.app-link) { overflow: visible; } /* the arrow slides out of its box on hover; do not clip it */
.mine-refresh { display: grid; place-items: center; width: 13px; height: 24px; padding: 0; border: 0; background: none; color: var(--on-surface-variant); transition: color 150ms; }
.mine-refresh svg { width: 13px; height: 14px; }
.mine-refresh:hover:not(:disabled) { color: var(--on-surface); }
.mine-refresh:disabled { opacity: 0.5; pointer-events: none; }
.mine-refresh.spin { opacity: 1; }
.mine-card .tipwrap[data-tip] { cursor: default; }
.mine-card .tipwrap:has(:disabled:not(.spin)) { cursor: not-allowed; }
.mine-refresh.spin svg { animation: mine-spin 800ms linear infinite; }
@keyframes mine-spin { to { transform: rotate(360deg); } }
.mine-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.mine-total span { font-size: 14px; color: var(--on-surface-variant); }
.mine-total strong { font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { body.has-mine .board { grid-template-columns: 1fr; } .mine { grid-column: 1; grid-row: auto; position: static; max-width: 360px; } body.has-mine .board .table-wrap { grid-row: auto; } }

/* board: no outer card, each entry is its own surface-1 card */
.board { margin-top: 8px; }
.table-wrap { overflow: visible; } /* tooltips escape; phones scroll instead (below) */
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; table-layout: fixed; }
td { padding: 10px 12px; vertical-align: middle; }
tbody tr.row td { background: var(--surface-1); transition: background 200ms; }
tbody tr.row td { position: relative; z-index: 1; } /* sits over the strip tucked behind it */
tbody tr.row td:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
tbody tr.row td:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
/* the strip under each row: surface-lowest at 50%, pulled 16px up behind the row and padded back down */
tr.more td { padding: 0; }
.strip { margin: -16px 0 10px; padding-top: 16px; background: rgba(16, 18, 18, 0.5); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.more-btn { width: 100%; display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px; background: none; border: 0; font-size: 12px; color: var(--on-surface-variant); transition: color 150ms; }
.more-btn:hover { color: var(--on-surface); }
.more-btn svg { width: 12px; height: 12px; transition: transform 160ms; }
.more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* open/close: animate the grid row from 0fr to 1fr */
.detail-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms cubic-bezier(0.22, 1, 0.36, 1); }
.detail-wrap.open { grid-template-rows: 1fr; }
.detail-body { min-height: 0; overflow: hidden; }
.detail-body .detail-grid { padding: 16px 16px 4px; }
.crest { height: 18px; width: auto; margin-right: 2px; align-self: center; }
.btn .x { width: 12px; height: 12px; fill: currentColor; vertical-align: -1px; margin-left: 4px; }
.c-num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.c-rank { width: 6%; }
.c-who { width: 24%; }
.c-app { width: 22%; }
.c-num { width: 14%; }
.c-spark { width: 20%; }
.trend { display: inline-flex; align-items: center; gap: 14px; }
.c-act { width: 14%; }
.rank .pin { width: 16px; height: 16px; margin-left: 9px; color: color-mix(in srgb, var(--on-surface), var(--on-surface-variant)); } /* centred under the 33px-wide medal crests */
.rank { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; min-width: 32px; }
.delta .mv { width: 14px; height: 14px; }
.delta.up { color: var(--success); }
.delta.down { color: var(--error); }
.delta.new { color: var(--on-surface-variant); }
.score-cell { font-weight: 500; text-align: left !important; padding-left: 28px; padding-right: 24px; }
.score-ico { width: 11px; height: 14px; vertical-align: -2px; margin-right: 6px; color: var(--on-surface-variant); }
tbody tr.row { cursor: pointer; }
tbody tr.row:hover:not(:has(.who:hover, .app-link:hover)) td { background: var(--surface-2); }
.vote .x { margin: 0 2px 0 4px; }
.vote svg:last-child { width: 10.75px; height: 10.75px; overflow: visible; fill: currentColor; margin-left: 4px; }
.vote .arrow { transition: transform 200ms; }
tbody tr.row:hover .vote { color: var(--on-surface); }
tbody tr.row:hover .vote .arrow { transform: translate(45px, -45px); }
/* sparkline tooltip */
.spark-wrap { position: relative; display: inline-block; }
.spark .dot { fill: var(--surface-2); stroke: currentColor; stroke-width: 1.5; }
.stip { position: absolute; bottom: calc(100% + 10px); transform: translateX(-50%); display: grid; gap: 6px; padding: 10px 12px; background: var(--surface-4); border-radius: var(--radius-sm); font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 5; text-align: left; }
.stip > span { display: flex; align-items: center; gap: 5px; }
.stip > span:last-child { color: var(--on-surface-variant); }
.stip .score-ico { width: 11px; height: 14px; margin: 0; color: var(--on-surface); vertical-align: 0; }
.stip .cal { width: 14px; height: 14px; }
/* score breakdown tooltip: hover / focus, above the number */
.score { position: relative; display: inline-block; cursor: default; outline: none; }
.score .tip { position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 5; display: grid; gap: 6px; padding: 10px 12px; background: var(--surface-4); border-radius: var(--radius-sm); font-size: 12px; font-weight: 400; color: var(--on-surface); white-space: nowrap; text-align: left; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 150ms, transform 150ms; }
.score .tip > span { display: flex; align-items: center; gap: 5px; }
.score .tip i { font-style: normal; color: var(--on-surface-variant); }
.score .tip .mi { width: 14px; height: 14px; color: var(--on-surface); }
.score:hover .tip, .score:focus-visible .tip { opacity: 1; transform: translateY(0); }
.who { display: inline-flex; max-width: 100%; align-items: center; gap: 10px; min-width: 0; text-decoration: none; transition: opacity 150ms; vertical-align: middle; }
a.who:hover { opacity: 0.6; }
.who img { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--surface-4); flex: none; }
.who .name { white-space: nowrap; max-width: 160px; display: flex; align-items: center; }
.who .name span { overflow: hidden; text-overflow: ellipsis; }
.who .chev { width: 12px; height: 12px; flex: none; margin-left: 2px; opacity: 0; transform: translateX(-6px); transition: opacity 200ms, transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
a.who:hover .chev { opacity: 1; transform: translateX(0); }
.who .handle { color: var(--on-surface-variant); font-size: 12px; }
.app-link { text-decoration: none; display: inline-flex; align-items: center; }
.app-link svg { width: 10px; height: 10px; overflow: visible; fill: currentColor; color: var(--on-surface-variant); margin-left: 6px; }
.app-link .arrow { transition: transform 200ms; }
.app-link:hover .arrow { transform: translate(45px, -45px); }
.app-link span { color: var(--on-surface-variant); }
.spark { display: block; width: 120px; height: 30px; }
.spark { color: var(--on-surface-variant); }
.spark.rising { color: var(--success); }
.spark .line, .spark .before { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark .line { stroke: currentColor; } /* .before keeps its inline gradient stroke; a CSS stroke would override it */
.spark.hov .line { opacity: 0.5; }
.actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.actions .btn-ghost:hover { background: transparent; color: var(--on-surface); }

/* buttons: status page's Button */
.btn { border: 0; border-radius: var(--radius-sm); padding: 6px 12px; font-size: 14px; line-height: 20px; background: var(--surface-3); color: var(--on-surface); text-decoration: none; white-space: nowrap; transition: background 150ms; }
.btn:hover { background: var(--surface-4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #de5d42; }
/* slab: the header button, same surface and capsule as the Menu / Search pill */
.btn.slab { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 24px 0 22px; background: var(--surface-2); color: var(--on-surface); border: 0; border-radius: 22px; }
.btn.slab:hover { background: var(--surface-2); }
.btn.slab > * { opacity: 0.7; transition: opacity 150ms; }
.btn.slab:hover > * { opacity: 1; }
.btn.slab .plus { width: 9px; height: 9px; transform: rotate(45deg); flex: none; }
.btn.next { display: inline-flex; align-items: center; gap: 6px; color: var(--on-surface); padding: 0; }
.btn.back { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-right: auto; color: var(--on-surface-variant); } /* margin-right: auto sends it to the far left of the footer */
.btn.back:hover { background: transparent; color: var(--on-surface); }
.btn.back svg { width: 12px; height: 12px; transition: transform 160ms; }
.btn.back:hover svg { transform: translateX(-3px); }
.found-link { display: flex; justify-content: center; margin-top: 8px; padding: 32px 0 10px; font-size: 15px; }
.found-link .rest { color: var(--on-surface-variant); }
.btn.next:hover { background: transparent; }
.btn.next:disabled { opacity: 0.35; pointer-events: none; }
.tipwrap { position: relative; display: inline-flex; }
.tipwrap[data-tip] { cursor: not-allowed; }
.tipwrap[data-tip]::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 8px); padding: 6px 10px; background: var(--surface-4); border-radius: var(--radius-sm); font-size: 12px; color: var(--on-surface); white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity 150ms, transform 150ms; pointer-events: none; }
.tipwrap[data-tip]:hover::after { opacity: 1; transform: none; }
.btn.next:disabled svg { transform: none; }
.btn.next svg { width: 12px; height: 12px; transition: transform 160ms; }
.btn.next:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--on-surface-variant); }
.btn-ghost:hover { background: var(--surface-3); color: var(--on-surface); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.btn-icon svg { width: 14px; height: 14px; transition: transform 160ms; }
.btn-icon[aria-expanded="true"] svg { transform: rotate(180deg); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.post { display: grid; min-width: 0; } /* min-width: a wide media strip must scroll, not widen the card */
.mstrip-wrap { min-width: 0; }
/* thread row: avatar column (with the connector line) + content */
.tp { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.tp-left { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tp-left img { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--surface-4); flex: none; }
.tp-line { flex: 1; width: 2px; background: var(--surface-4); border-radius: 1px; margin-bottom: 6px; }
.tp.last .tp-line { display: none; }
.tp-body { display: grid; gap: 10px; min-width: 0; padding-bottom: 20px; }
.tp.last .tp-body { padding-bottom: 0; }
.tp-head { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.tp-head > div { min-width: 0; }
.tp-head .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-head .handle { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 16px; color: var(--on-surface-variant); white-space: nowrap; margin-top: 2px; }
.tp-head .when { display: inline-flex; align-items: center; gap: 3px; }
.tp-head .cal { width: 12px; height: 12px; display: block; }
.tp-head .post-open { margin-left: auto; padding: 6px; }
.tp-head .post-open:hover { background: transparent; color: var(--on-surface); }
.post-open .x { width: 14px; height: 14px; fill: currentColor; margin: 0; }
.post .text { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .text a { color: var(--on-surface); text-decoration: underline; text-decoration-color: var(--on-surface-variant); }
.post .media video { width: 100%; display: block; background: var(--surface-lowest); }
/* a single photo is never cropped: it keeps its shape, up to the column's width and 480px tall, and does not stretch to fill */
.post .media img { display: block; width: auto; height: auto; max-width: 100%; max-height: 480px; background: var(--surface-lowest); cursor: pointer; }
.post .media .ph { display: inline-block; max-width: 100%; vertical-align: top; }
.ph { display: block; overflow: hidden; border-radius: var(--radius-md); cursor: pointer; }
.ph img { display: block; transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1); }
.ph:hover img { transform: scale(1.05); }
.post .media { border-radius: var(--radius-md); }
.post .media .vp { width: 100%; }
.post footer { display: flex; gap: 18px; font-size: 12px; color: var(--on-surface-variant); padding-top: 2px; }
.post footer a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; transition: color 150ms; }
.post footer a:hover { color: var(--on-surface); }
.post footer .mi { width: 14px; height: 14px; }

/* media strip: thumbnails side by side, scroll sideways; fade + chevron where it overflows */
.mstrip-wrap { position: relative; }
.mstrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; border-radius: var(--radius-sm); }
.mstrip::-webkit-scrollbar { display: none; }
.mstrip > * { flex: none; scroll-snap-align: start; }
.mstrip img { height: 220px; width: auto; max-width: none; max-height: none; } /* strip thumbnails keep their shape too: fixed height, natural width */
.mstrip .vp { height: 220px; width: calc(220px * 16 / 9); aspect-ratio: auto; border-radius: var(--radius-md); }
.mstrip-edge { position: absolute; top: 0; bottom: 0; width: 72px; border: 0; padding: 0; color: var(--on-surface); display: grid; place-items: center; }
.mstrip-edge.right { right: 0; background: linear-gradient(to right, transparent, rgba(24, 26, 26, 0.9)); justify-items: end; padding-right: 8px; }
.mstrip-edge.left { left: 0; background: linear-gradient(to left, transparent, rgba(24, 26, 26, 0.9)); justify-items: start; padding-left: 8px; }
.mstrip-edge svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.mstrip-edge:hover svg { opacity: 0.8; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 2px; background: rgba(168, 172, 172, 0.4); transition: width 100ms, background 100ms; }
.dot:hover { background: rgba(168, 172, 172, 0.7); }
.dot.on { width: 18px; background: var(--on-surface); }

/* video player: marketing-site shape — click toggles, bottom gradient controls on hover */
.vp { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-md); cursor: pointer; color: #fff; }
.vp video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vp-big { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transition: opacity 150ms; }
.vp-big svg { width: 18px; height: 22px; margin-left: 3px; }
.vp.playing .vp-big { opacity: 0; pointer-events: none; }
.vp-ui { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3), transparent); opacity: 0; transition: opacity 200ms; }
.vp:hover .vp-ui, .vp:not(.playing) .vp-ui, .vp:focus-within .vp-ui { opacity: 1; }
.vp-ui button { width: 32px; height: 32px; flex: none; border: 0; background: none; color: #fff; display: grid; place-items: center; }
.vp-ui button:hover { opacity: 0.8; }
.vp-ui button svg { width: 16px; height: 16px; }
.vp-play svg:last-child, .vp.playing .vp-play svg:first-child { display: none; }
.vp.playing .vp-play svg:last-child { display: block; }
.vp-mute svg:last-child, .vp.muted .vp-mute svg:first-child { display: none; }
.vp.muted .vp-mute svg:last-child { display: block; }
.vp-bar { position: relative; flex: 1; height: 32px; display: flex; align-items: center; }
.vp-bar::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.vp-buf, .vp-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; width: 0; }
.vp-buf { background: rgba(255, 255, 255, 0.4); }
.vp-fill { background: var(--accent); }
.vp-thumb { position: absolute; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); }
.vp-time { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; flex: none; }
.vp-vol { position: relative; width: 64px; height: 32px; flex: none; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.vp-vol::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.vp-vol-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; width: 100%; background: var(--accent); }
.vp-vol-thumb { position: absolute; left: 100%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); }
.vp-mute { margin-right: -4px; }

/* lightbox: portal ImageLightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(12px); opacity: 0; transition: opacity 200ms; }
.lightbox.shown { opacity: 1; }
body.lb-open { overflow: hidden; }
.lb-row { display: flex; align-items: center; gap: 16px; }
.lb-item { position: relative; }
.lb-item img { display: block; max-width: 80vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-md); cursor: default; }
.lb-item .vp { width: min(80vw, calc(80vh * 16 / 9)); aspect-ratio: 16 / 9; border-radius: var(--radius-md); }
.lb-close { position: absolute; bottom: 100%; right: 0; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font-size: 12px; color: rgba(232, 234, 234, 0.7); transition: color 75ms; }
.lb-close:hover { color: var(--on-surface); }
.lb-close svg { width: 14px; height: 14px; }
.lb-item .dots { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 12px; }
.lb-nav { flex: none; width: 38px; height: 38px; border: 0; background: none; color: rgba(232, 234, 234, 0.7); display: grid; place-items: center; transition: color 75ms; }
.lb-nav:hover { color: var(--on-surface); }
.lb-nav svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .lightbox, .vp-ui, .dot, .ph img { transition: none; } }

.detail h3 { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.empty { text-align: center; color: var(--on-surface-variant); padding: 32px 0; }

/* rules page */
/* rules: one centred column on the page itself, no card */
.prose { max-width: 760px; margin: 24px auto 0; font-size: 17px; line-height: 1.6; }
.prose h1 { font-size: 44px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
.prose h1 + p { font-size: 19px; margin-bottom: 0; }
.prose h2 { font-size: 22px; font-weight: 500; margin: 44px 0 12px; }
.prose p, .prose li { color: var(--on-surface-variant); }
.prose p { margin: 0 0 12px; }
.prose ol, .prose ul { padding-left: 22px; margin: 0; }
.prose li { margin: 8px 0; }
.prose code { font-size: 0.9em; }
/* the three prize cards across the full column width */
.rules-prizes .prize-row { gap: 14px; }
.rules-prizes { margin-top: 20px; }
.rules-prizes .prize { flex: 1; width: auto; min-width: 0; }
.rules-prizes .prize header { font-size: 14px; }
.rules-prizes .prize .credit { font-size: 13px; }
/* the marketing site's animated link: a 1px rule under the text that sweeps out to the right and back in from the left on hover */
.animated-link { position: relative; color: var(--on-surface); text-decoration: none; white-space: nowrap; }
.animated-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor; transform: scaleX(1); transform-origin: right; }
.animated-link:hover::after { animation: animated-link-sweep 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes animated-link-sweep {
  0% { transform: scaleX(1); transform-origin: 100% 50%; }
  50% { transform: scaleX(0); transform-origin: 100% 50%; }
  50.01% { transform: scaleX(0); transform-origin: 0% 50%; }
  100% { transform: scaleX(1); transform-origin: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) { .animated-link:hover::after { animation: none; } }
.prose strong { color: var(--on-surface); font-weight: 500; }

/* modal: portal ModalCard on Overlay — blur scrim, card 95→100 scale */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 200ms; }
.overlay.shown { opacity: 1; }
.overlay .card { width: 100%; max-width: 32rem; max-height: 85vh; display: flex; flex-direction: column; background: var(--surface-1); border-radius: var(--radius-md); overflow: hidden; transform: scale(0.95); transition: transform 200ms; }
.overlay.shown .card { transform: scale(1); }
body.modal-open > :not(.overlay) { filter: blur(8px); transition: filter 200ms; }
body.modal-open { overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; }
.card-head h2 { font-size: 18px; font-weight: 500; margin: 0; }
.card-close { background: none; border: 0; padding: 4px; color: var(--on-surface-variant); opacity: 0.55; transition: opacity 150ms, color 150ms; }
.card-close:hover { opacity: 1; color: var(--on-surface); }
.card-close svg { width: 10px; height: 10px; display: block; }
.card-body { padding: 0 24px 0; overflow-y: auto; display: grid; gap: 14px; }
.card-foot { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.card label { display: block; font-size: 13px; color: var(--on-surface-variant); }
.field { display: flex; align-items: center; gap: 12px; margin-top: 4px; border-radius: var(--radius-sm); background: var(--surface-2); padding: 8px 12px; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--on-surface); font: inherit; }
#step-post .field { margin-top: 0; background: var(--surface-3); }
.field input::placeholder { color: var(--on-surface-variant); opacity: 0.7; }
/* browsers repaint autofilled inputs in their own colour; hold them on surface-2 */
.field input:-webkit-autofill, .field input:autofill { -webkit-text-fill-color: var(--on-surface); box-shadow: 0 0 0 1000px var(--surface-3) inset; caret-color: var(--on-surface); }
/* error: a surface-lowest/50 strip tucked under the field, with the portal's Axel "error" glyph (as in the new-app name check) */
.form-error { display: flex; align-items: center; gap: 8px; margin: -18px 0 0; padding: 14px 12px 10px; max-height: 64px; overflow: hidden; opacity: 1; transition: max-height 260ms cubic-bezier(0.22, 1, 0.36, 1), padding 260ms cubic-bezier(0.22, 1, 0.36, 1), margin 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms; background: rgba(16, 18, 18, 0.5); border-radius: 0 0 var(--radius-sm) var(--radius-sm); color: var(--error); font-size: 12px; }
.form-error::before { content: ""; flex: none; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%280.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%2822.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%2845.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%2867.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%2890.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28112.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28135.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%28157.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%28180.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%28202.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28225.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28247.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%28270.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28292.5 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.8%22 transform=%22rotate%28315.0 50 50%29%22/%3E%3Cpath d=%22M46.5 4 L53.5 4 L52.5 22 L47.5 22 Z%22 fill=%22%23ffb4ab%22 opacity=%220.25%22 transform=%22rotate%28337.5 50 50%29%22/%3E%3C/svg%3E") center / contain no-repeat; }
/* empty = collapsed to nothing (and pulled up by the grid gap), so the card grows smoothly when a message arrives */
.form-error:empty { max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -14px; opacity: 0; }
.field, .found { position: relative; z-index: 1; } /* above the strip that tucks in behind them */
.hint { font-size: 12px; color: var(--on-surface-variant); margin: 0; }

/* 1024–1120 px only: slightly smaller prize cards, so "Leaderboard" has room beside them in the menu */
@media (min-width: 1024px) and (max-width: 1120px) {
  .pill-panel .prize { width: 168px; }
  .pill-panel .big { min-height: 224px; }
  .pill.menu-open { height: 358px; } /* 68 top + heading 34 + cards 224 + 32 bottom */
}

/* ================= below 1024 px: tablet and phone. Nothing in here applies at 1024 and up. ================= */
@media (max-width: 1023px) {
  /* podium: the same three blocks, sized from the podium's own width so they shrink together */
  .podium { container-type: inline-size; grid-template-columns: 29.5% 33.5% 29.5%; gap: 2.5%; padding: 40px 0 64px; }
  .stand { gap: 3.6cqw; --d: 29.5cqw; --h: 24.5cqw; }
  .stand.first { --d: 33.5cqw; --h: 32cqw; }
  .stand.third { --h: 21.5cqw; }
  .stand .who { min-height: 0; }
  .stand .avatar { width: clamp(48px, 10cqw, 96px); height: clamp(48px, 10cqw, 96px); }
  .face.front { padding: 2cqw 1.4cqw; gap: clamp(3px, 0.8cqw, 8px); }
  .face .medal { height: clamp(22px, 4.7cqw, 44px); }
  .stand.first .face .medal { height: clamp(26px, 5.8cqw, 54px); }
  .face .handle { font-size: clamp(11px, 1.6cqw, 15px); }
  .face .out { font-size: clamp(10px, 1.4cqw, 13px); }
  .face .pts { font-size: clamp(18px, 3.2cqw, 30px); }
  .stand.first .face .pts { font-size: clamp(22px, 4cqw, 38px); }

  /* board: rows become grids, so nothing scrolls sideways; the 24h line gives its room to names and apps */
  .table-wrap { overflow: visible; }
  #table, #rows { display: block; min-width: 0; }
  #table colgroup { display: none; }
  #rows tr.row { display: grid; grid-template-columns: 52px minmax(0, 1.2fr) minmax(0, 1fr) auto auto; align-items: center; position: relative; z-index: 1; background: var(--surface-1); border-radius: var(--radius-md); transition: background 200ms; }
  #rows tr.row td, #rows tr.row:hover td { display: block; min-width: 0; background: transparent; border-radius: 0; }
  #rows tr.row:hover:not(:has(.who:hover, .app-link:hover)) { background: var(--surface-2); }
  #rows tr.row td:nth-child(5) { display: none; }
  #rows tr.more, #rows tr.more td { display: block; }
  #rows tr.gone { display: none; }
  #rows .score-cell { padding: 10px 12px; }
  #rows .who .name { max-width: none; }
  #rows .app-link { max-width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }

  /* menu: links above the prizes, the panel scrolls if the screen is short */
  .pill.menu-open { height: min(620px, calc(100dvh - 36px)); }
  .pill-panel { grid-template-columns: 1fr; grid-auto-rows: max-content; align-content: start; gap: 20px; max-height: 100%; overflow-y: auto; } /* rows keep their height: the links never slide under the prizes */
  .big { min-height: 0; align-self: start; }
  .big .reveal { font-size: 44px; }
  .prize-row { gap: 10px; }
  .prize { flex: 1; width: auto; min-width: 0; max-width: 210px; aspect-ratio: auto; }
  .prize::before { content: ""; display: block; padding-top: 133.33%; } /* iOS ignores aspect-ratio on a flex item sized by flex-grow: hold the 3:4 shape with padding */

  .admin-ban { flex-wrap: wrap; }
  .admin .table-wrap { overflow-x: auto; }
  .admin-table { min-width: 720px; }
}

@media (max-width: 640px) {
  main { padding: 16px 16px 48px; }
  /* header: logo, a compact pill, and the entry button as just its plus */
  .top-inner { padding: 0 16px; height: 64px; }
  .brand .logo { height: 28px; aspect-ratio: 55 / 54; -webkit-mask-image: url("/favicon.svg"); mask-image: url("/favicon.svg"); } /* just the Q on phones */
  .pill { top: 10px; width: 126px; z-index: 3; }
  .pill-label { display: none; }
  .btn.slab { width: 44px; padding: 0; justify-content: center; }
  .btn.slab span { display: none; }
  .pill.search-open { width: calc(100% - 32px); }
  .pill.search-open .pill-bar { width: 100%; }
  .pill.search-open .pill-search { flex: 1; width: auto; }
  .pill.menu-open { width: calc(100% - 24px); height: min(440px, calc(100dvh - 20px)); }
  .pill-panel { padding: 60px 16px 16px; gap: 16px; }
  .big .reveal { font-size: 34px; }
  /* menu prize cards: crest top-left, the prize's name along the bottom */
  .pill-panel .prize .credit { display: none; }
  .pill-panel .prize header span.two br { display: none; } /* one line in the small menu cards */
  .pill-panel .prize header { position: static; }
  .pill-panel .prize header img { position: absolute; top: 8px; left: 10px; height: 15px; z-index: 1; }
  .pill-panel .prize header span { position: absolute; left: 4px; right: 4px; bottom: 8px; z-index: 1; text-align: center; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prize-row { gap: 8px; }

  /* podium: the same 3D blocks as desktop, scaled to the phone (sizes come from the tablet rules above) */
  .podium { padding: 56px 0 40px; gap: 2%; }
  .stand .avatar { width: 44px; height: 44px; }
  .face.front { padding: 3cqw 1cqw; gap: 2px; overflow: hidden; }
  .face .medal { height: 20px; }
  .stand.first .face .medal { height: 24px; }
  .face .handle { font-size: 10px; line-height: 1.3; }
  .face .out { font-size: 9px; max-width: 100%; overflow: hidden; white-space: nowrap; }
  .face .out svg { display: none; }
  .face .pts { font-size: 16px; }
  .stand.first .face .pts { font-size: 19px; }

  /* board rows: who and score on the first line, app and vote on the second */
  #rows tr.row { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "rank who score" "rank app act"; padding: 6px 0; }
  #rows tr.row:has(.crest) { grid-template-columns: 52px minmax(0, 1fr) auto; } /* the crest is wider than "#4": give it air before the avatar */
  #rows tr.row td { padding: 4px 10px; }
  #rows tr.row td:nth-child(1) { grid-area: rank; padding-right: 0; }
  #rows tr.row td:nth-child(2) { grid-area: who; padding-left: 6px; }
  #rows tr.row td:nth-child(3) { grid-area: app; padding-top: 0; padding-left: 6px; }
  #rows tr.row td:nth-child(4) { grid-area: score; justify-self: end; padding-left: 0; }
  #rows tr.row td:nth-child(6) { grid-area: act; padding-top: 0; }
  #rows .score .tip { right: 0; }
  .detail-body .detail-grid { padding: 12px 12px 4px; }
  .tp { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .tp-left img { width: 32px; height: 32px; }
  .mstrip img { height: 160px; }
  .mstrip .vp { height: 160px; width: calc(160px * 16 / 9); }
  .post .media img { max-height: 360px; }

  /* rules */
  .prose { font-size: 16px; margin-top: 8px; }
  .prose h1 { font-size: 32px; }
  .prose h2 { font-size: 20px; margin-top: 32px; }
  .rules-prizes .prize-row { flex-direction: column; }
  .rules-prizes .prize { width: 100%; max-width: none; flex: none; }
  .rules-prizes .prize::before { padding-top: 62.5%; }
}
@media (prefers-reduced-motion: reduce) { .overlay, .overlay .card, body.modal-open > :not(.overlay), .btn-icon svg, .detail-wrap, .more-btn svg, .face .handle span, .face .handle .chev, .score .tip, .vote .arrow, .app-link .arrow, .who, .who .chev, tbody tr.row td, .pill, .pill-panel, .pill-bar > *, .pill-label, .big .reveal, .lines i, tbody tr.dim, .form-error { transition: none; } }

/* admin */
.admin { max-width: 64rem; display: block; }
.admin h1 { font-size: 24px; font-weight: 500; margin: 0 0 16px; }
.admin h2 { font-size: 16px; font-weight: 500; margin: 32px 0 10px; }
.admin #login { max-width: 320px; margin: 15vh auto 0; display: grid; gap: 12px; }
.admin #login .form-error, .admin #ban-error { margin: 0; padding: 0; background: none; max-height: none; }
.admin #login .form-error::before, .admin #ban-error::before { display: none; }
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.admin-ban { display: flex; gap: 8px; align-items: center; }
.admin-ban .field { flex: 1; margin: 0; }
.admin-ban select { height: 39px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--on-surface); font: inherit; }
.admin-bans { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.admin-bans li { display: flex; align-items: center; gap: 16px; padding: 8px 12px; background: var(--surface-1); border-radius: var(--radius-sm); }
.admin-bans li span:first-child { flex: 1; }
.admin-table { min-width: 0; table-layout: auto; border-spacing: 0 6px; }
.admin-table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--on-surface-variant); padding: 0 12px; }
.admin-table td { background: var(--surface-1); font-size: 13px; }
.admin-table tr.banned td { opacity: 0.45; }
.admin-acts { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.admin-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.admin-settings label { font-size: 12px; color: var(--on-surface-variant); }
.admin-settings .field { margin-top: 4px; }
.admin-settings input { color-scheme: dark; }
.admin #settings-error { margin: 8px 0 0; padding: 0; background: none; max-height: none; }
.admin #settings-error::before { display: none; }
.admin-demo { display: flex; align-items: center; gap: 8px; font-size: 13px !important; color: var(--on-surface) !important; }
.admin-demo input { accent-color: var(--accent); }
.admin-note { margin: 8px 0 0; font-size: 12px; }
.admin-demo small { color: var(--on-surface-variant); }
.admin-banner { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-3); font-size: 13px; }
