/* New School 99: the design system and the shell every page shares (tokens, type, buttons, game windows, nav, footer,
   finder, rank tiers, podium stage, lanes, deeds, dialog, states). Page styles live in home.css, hiscores.css, player.css.
   Colour rule: wisp green means "live right now", gold means rank and achievement, ember means heat. Nothing else gets them.
   Type rule: every word on the site is Alegreya Sans (titles 800). Grenze Gotisch sets figures only: a rank, a podium
   place, a version number, a step, a count. Its capitals misread ("Hiscores", "Overall"), so it never sets a word. */

@font-face { font-family: "Grenze Gotisch"; src: url("/assets/fonts/grenzegotisch-100_900.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/assets/fonts/alegreyasans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/assets/fonts/alegreyasans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/assets/fonts/alegreyasans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/assets/fonts/alegreyasans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/assets/fonts/alegreyasans-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --night: #0a131a;        /* page: the game's window blue, a step darker */
  --deep: #0d171f;
  --panel: #112029;
  --panel-2: #18272f;
  --frame: #2a393c;
  --frame-hi: #55584c;
  --ink: #efe6cf;
  --ink-2: #b9b295;
  --ink-3: #8a958f;
  --gold: #e4b86a;
  --gold-hi: #fde8a4;
  --bronze: #8d6229;
  --wisp: #9af5d9;
  --wisp-deep: #1f8f78;
  --ember: #ff8a4a;
  --zamorak: #e0564b;
  --saradomin: #7fb4ff;
  --armadyl: #6fe0cf;
  --numeral: "Grenze Gotisch", "Alegreya Sans", Georgia, serif;      /* figures only, never words */
  --text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --wide: 1320px;
  --gut: clamp(16px, 4vw, 40px);
  --nav-h: 68px;
  --tier: var(--frame-hi);
  color-scheme: dark;
}
.tier--bronze { --tier: #c8803c; } .tier--iron { --tier: #8f979b; } .tier--steel { --tier: #c3ccd2; } .tier--mithril { --tier: #6f7fe6; }
.tier--adamant { --tier: #5fae5a; } .tier--rune { --tier: #49c3d8; } .tier--dragon { --tier: #e0483c; } .tier--champion { --tier: #f3c64f; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 18px/1.5 var(--text); font-variant-numeric: lining-nums; overflow-x: hidden; }
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold-hi); text-decoration-color: rgba(228,184,106,.45); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--wisp); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--text); font-weight: 800; line-height: 1.04; margin: 0; letter-spacing: -.014em; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 54px); }
h3 { font-size: 24px; letter-spacing: -.005em; }
p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--gold); color: #1a1206; padding: 10px 16px; border-radius: 4px; font-weight: 700; }
.skip:focus { top: 12px; }
.lede { color: var(--ink-2); font-size: 20px; max-width: 58ch; }
.quiet { color: var(--ink-3); }
.who { font-family: var(--text); font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: 0; }
a.who:hover { color: var(--gold-hi); text-decoration: underline; }
.noscript { margin: 0; padding: 14px var(--gut); background: #2b1d07; color: var(--gold-hi); text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer; border: 0; border-radius: 6px; font-weight: 800; line-height: 1.1; padding: 12px 20px; transition: transform .12s, filter .15s, box-shadow .15s; text-align: left; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-weight: 500; font-size: 14px; opacity: .8; margin-top: 2px; }
.btn--gold { background: linear-gradient(180deg, #f7d98f, #dba850 55%, #b47f33); color: #221604; box-shadow: 0 1px 0 #fff3c9 inset, 0 10px 30px -10px rgba(228,184,106,.7); }
.btn--gold:hover { filter: brightness(1.07); }
.btn--ghost { background: rgba(13,23,31,.72); color: var(--ink); box-shadow: inset 0 0 0 1px var(--frame-hi); backdrop-filter: blur(6px); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.btn--big { padding: 16px 26px; font-size: 21px; }
.btn--sm { padding: 9px 16px; font-size: 16px; white-space: nowrap; }
.btn.is-soon { filter: saturate(.4); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] { color: var(--wisp); }
.more { font-weight: 700; white-space: nowrap; }

/* ---------- the game window: every panel that shows live data ---------- */
.gwin { background: linear-gradient(180deg, rgba(17,32,41,.95), rgba(13,23,31,.95)); border: 1px solid var(--frame-hi); border-radius: 6px; box-shadow: 0 0 0 1px #05090c, 0 24px 60px -20px rgba(0,0,0,.8); }
.gwin-head { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--frame); font: 700 16px/1.2 var(--text); letter-spacing: 0; color: var(--ink-2); }
.gwin-head svg { width: 18px; height: 18px; flex: none; }
.gwin-head .hot { color: var(--ember); }
.gwin-note { margin-left: auto; font-weight: 500; color: var(--ink-3); font-size: 14px; }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wisp); box-shadow: 0 0 0 0 rgba(154,245,217,.6); animation: breathe 2.6s ease-out infinite; flex: none; display: inline-block; }
.dot.is-off { background: var(--ink-3); animation: none; }
@keyframes breathe { 0% { box-shadow: 0 0 0 0 rgba(154,245,217,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(154,245,217,0); } }

.sample-badge { position: fixed; right: 12px; bottom: 12px; z-index: 60; background: #2b1d07; color: var(--gold-hi); border: 1px solid var(--bronze); border-radius: 4px; font-size: 14px; font-weight: 700; padding: 5px 10px; max-width: calc(100vw - 24px); pointer-events: none; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.nav.is-solid, .nav.is-open, .nav--page { background: rgba(10,19,26,.93); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--frame); }
.nav-in { display: flex; align-items: center; gap: 22px; height: var(--nav-h); width: min(var(--wide), 100% - 2 * var(--gut)); margin-inline: auto; }
.nav-logo { flex: none; }
.nav-logo img { width: 104px; height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 8px 11px; border-radius: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.7); white-space: nowrap; }
.nav-links a:hover { background: rgba(255,255,255,.08); }
.nav-links a[aria-current] { color: var(--gold-hi); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 4px 4px 0 0; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-live { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--wisp); text-decoration: none; padding: 6px 8px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.nav-live.is-off { visibility: hidden; }
.nav--over:not(.is-solid) .nav-live { display: none; }      /* the home hero already says it, large */
.nav-me { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; background: rgba(13,23,31,.8); box-shadow: inset 0 0 0 1px var(--wisp-deep); color: var(--ink); font-weight: 800; text-decoration: none; max-width: 170px; }
.nav-me:hover { box-shadow: inset 0 0 0 1px var(--wisp); }
.nav-me img, .nav-me svg { width: 26px; height: 26px; flex: none; }
.nav-me svg { color: var(--wisp); padding: 3px; }
.nav-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-motion { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--frame-hi); background: rgba(13,23,31,.8); color: var(--ink-2); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.nav-motion:hover { border-color: var(--gold); color: var(--ink); }
.nav-motion svg { width: 16px; height: 16px; flex: none; }
.nav-motion.is-off { color: var(--ink-3); border-style: dashed; }
.nav-burger { display: none; }

/* ---------- finder ---------- */
.finder { position: relative; width: min(340px, 100%); }
.finder input { width: 100%; height: 46px; padding: 0 14px 0 44px; border-radius: 6px; border: 1px solid var(--frame-hi); background: var(--deep); color: var(--ink); font: 500 18px var(--text); }
.finder input::placeholder { color: var(--ink-3); opacity: 1; }
.finder input::-webkit-search-cancel-button { display: none; }
.finder > svg { position: absolute; left: 13px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--ink-3); pointer-events: none; }
.finder-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; max-height: 360px; overflow: auto; min-width: 250px; }
.finder-list.gwin { background: linear-gradient(180deg, #112029, #0d171f); }      /* solid: it opens over other controls */
.finder-list a { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.finder-list a:hover, .finder-list a.is-on { background: var(--panel-2); }
.finder-list .shield { width: 30px; height: 30px; }
.finder-list small { color: var(--ink-3); }
.finder-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--frame-hi); justify-self: center; }
.finder-none { padding: 12px; color: var(--ink-2); font-size: 16px; }
.nav-finder { width: 184px; }
.nav-finder input { height: 38px; font-size: 16px; padding-left: 38px; border-radius: 999px; background: rgba(13,23,31,.8); }
.nav-finder > svg { left: 12px; width: 18px; height: 18px; margin-top: -9px; }
.nav-finder .finder-list { left: auto; right: 0; width: 280px; }

/* ---------- deeds ---------- */
.ev-ico { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.ev-ico img { width: 34px; height: 34px; }
.ev-ico svg { width: 28px; height: 28px; }
.ev-ico--quest { color: #d9c79a; } .ev-ico--boss { color: var(--ember); } .ev-ico--join { color: var(--wisp); } .ev-ico--crown { color: var(--gold); } .ev-ico--other { color: var(--gold); }
.ev-ico--zamorak { color: var(--zamorak); } .ev-ico--saradomin { color: var(--saradomin); } .ev-ico--armadyl { color: var(--armadyl); }
.ev-text { line-height: 1.25; font-size: 17px; min-width: 0; }
.ev-text .who { color: var(--gold-hi); }
.ev-time { color: var(--ink-3); font-size: 14px; white-space: nowrap; }

/* ---------- rank tiers ---------- */
.shield { flex: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.55)); }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--ink); background: color-mix(in srgb, var(--tier) 18%, var(--deep)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 55%, transparent); }
.tier-chip .shield { width: 22px; height: 22px; filter: none; }
.flair { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; margin-left: 8px; }
.flair img { width: 18px; height: 18px; }
.flair .iron { width: 17px; height: 17px; color: #b9c2c7; }
.flair .coin { height: 18px; width: auto; image-rendering: pixelated; }

/* ---------- the podium stage: numbered blocks, a light beam per place, the painted shield above the name ---------- */
.stage { position: relative; display: grid; grid-template-columns: 1fr 1.16fr 1fr; align-items: end; padding-top: 12px; isolation: isolate; }
.stage::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -1px; height: 26px; background: radial-gradient(60% 100% at 50% 0, rgba(228,184,106,.22), transparent 70%); z-index: -1; }
.stage--ghost { min-height: 430px; }
.pod { position: relative; display: flex; flex-direction: column; min-width: 0; text-align: center; }
.pod--1 { order: 2; } .pod--2 { order: 1; } .pod--3 { order: 3; }
.pod-beam { position: absolute; left: 50%; top: -70px; bottom: 0; width: 170%; transform: translateX(-50%); z-index: -1; pointer-events: none; opacity: .55;
  background: conic-gradient(from 158deg at 50% 0, transparent 0deg, color-mix(in srgb, var(--tier) 70%, transparent) 22deg, transparent 44deg);
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.55) 50%, transparent 92%); mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.55) 50%, transparent 92%); }
.pod--1 .pod-beam { opacity: .8; top: -110px; }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 6px 14px; }
.pod .shield { width: 104px; height: 104px; margin-bottom: 6px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.pod--1 .shield { width: 132px; height: 132px; }
.pod:hover .shield { transform: translateY(-5px) scale(1.04); }
.pod-name { max-width: 100%; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.pod--1 .pod-name { font-size: 36px; }
.pod--1 .pod-name .who { color: var(--gold-hi); }
.pod-name.is-long { font-size: 21px; } .pod--1 .pod-name.is-long { font-size: 28px; }
.pod-stat { color: var(--ink-2); font-size: 16px; line-height: 1.3; }
.pod-stat b { color: var(--ink); font-size: 18px; }
.pod-stat > span { display: block; color: var(--ink-3); font-size: 15px; }
.pod .flair { margin: 4px 0 0; }
.pod-block { position: relative; display: grid; place-items: center; height: 96px; background: linear-gradient(180deg, #1c2e39, #0f1b23 80%); border: 1px solid var(--frame); border-top: 3px solid var(--place, var(--frame-hi)); box-shadow: 0 -18px 40px -22px var(--place, transparent) inset; }
.pod--1 .pod-block { height: 168px; --place: var(--gold); border-radius: 4px 4px 0 0; }
.pod--2 .pod-block { height: 124px; --place: #c9d3d8; border-right: 0; border-radius: 4px 0 0 0; }
.pod--3 .pod-block { --place: #c98a55; border-left: 0; border-radius: 0 4px 0 0; }
.pod-num { font: 700 84px/1 var(--numeral); color: var(--place); opacity: .92; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.pod--1 .pod-num { font-size: 120px; }
.pod--2 .pod-num, .pod--3 .pod-num { color: transparent; -webkit-text-stroke: 1.5px var(--place); }
.pod.is-me .pod-block { box-shadow: 0 0 0 2px var(--wisp) inset; }

/* ---------- lanes: one row per adventurer, the fill is their share of first place ---------- */
.lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lane { position: relative; display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; align-content: center; min-height: 58px; padding: 6px 14px 6px 4px; background: rgba(13,23,31,.75); border: 1px solid var(--frame); border-radius: 4px; overflow: hidden; isolation: isolate; transition: border-color .15s, transform .15s; }
.lane:hover { border-color: var(--tier); transform: translateX(3px); }
.lane-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--share, 1) * (100% - 104px)); z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--tier) 8%, transparent), color-mix(in srgb, var(--tier) 34%, transparent)); border-right: 2px solid var(--tier); min-width: 98px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.lane-rank { grid-row: 1 / span 2; text-align: center; font: 700 26px/1 var(--numeral); color: var(--ink-2); }
.lane-rank[data-len="3"] { font-size: 21px; } .lane-rank[data-len="4"] { font-size: 17px; } .lane-rank[data-len="5"] { font-size: 14px; }      /* deep ranks keep their column */
.lane .shield { grid-row: 1 / span 2; width: 40px; height: 40px; }
.lane-name { grid-column: 3; min-width: 0; font-size: 20px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-gap { grid-column: 3; grid-row: 2; color: var(--ink-3); font-size: 14px; line-height: 1.2; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.lane-gap:empty { display: none; }
.lane-gap.is-hot { color: var(--ember); font-weight: 700; }
.lane-gap svg { width: 14px; height: 14px; }
.lane-num { grid-column: 4; grid-row: 1 / span 2; text-align: right; line-height: 1.1; min-width: 68px; }
.lane-num b { display: block; font-size: 22px; }
.lane-num span { color: var(--ink-3); font-size: 14px; }
.lane.is-me { border-color: var(--wisp); box-shadow: 0 0 0 1px var(--wisp); }
.lane.is-moved { animation: moved 1.6s ease-out; }
@keyframes moved { 0% { background: rgba(154,245,217,.3); } 100% { background: rgba(13,23,31,.75); } }

/* ---------- sections ---------- */
.sec { padding: clamp(48px, 7vw, 88px) 0; position: relative; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 34px; }
.sec-head p { color: var(--ink-2); max-width: 52ch; margin-top: 10px; }
.sec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

/* ---------- inner pages ---------- */
.page { padding-top: var(--nav-h); min-height: 100svh; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--frame); padding: 40px 0 70px; color: var(--ink-3); font-size: 16px; background: linear-gradient(180deg, var(--deep), var(--night)); }
.footer-in { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.footer-logo img { width: 120px; height: auto; opacity: .9; }
.footer-legal p + p { margin-top: 8px; }
.footer-legal p { max-width: 60ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.footer a { color: var(--ink-2); }

/* ---------- dialog ---------- */
dialog.soon { background: var(--panel); color: var(--ink); border: 1px solid var(--frame-hi); border-radius: 8px; padding: 30px 28px 26px; max-width: min(440px, calc(100vw - 32px)); box-shadow: 0 0 0 1px #05090c, 0 40px 90px rgba(0,0,0,.8); }
dialog.soon::backdrop { background: rgba(3,7,10,.74); }
dialog.soon[open] { animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
dialog.soon form { position: relative; }
dialog.soon h2 { font-size: 34px; margin-bottom: 10px; padding-right: 40px; }
dialog.soon p { color: var(--ink-2); }
.soon-x { position: absolute; right: -12px; top: -14px; }
.soon-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- welcome back: the visitor's own adventurer (home, hiscores) ---------- */
.me-strip { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 12px 18px 12px 12px; border-color: var(--wisp-deep); font-size: 19px; }
.me-strip .shield { width: 44px; height: 44px; }
.me-strip svg.shield { color: var(--wisp); padding: 8px; filter: none; }
.me-strip b { font-weight: 800; }
.me-strip .hot { color: var(--ember); }
.me-strip button { margin-left: auto; background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 15px; text-decoration: underline; white-space: nowrap; }
.me-strip button:hover { color: var(--ink); }

/* ---------- who gained most today (pulse.json) ---------- */
.movers { margin: 14px 0 0; padding: 12px 6px 0; border-top: 1px solid var(--frame); }
.movers h4 { margin: 0 0 6px; font: 700 16px/1.2 var(--text); color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.movers h4 svg { width: 16px; height: 16px; color: var(--ember); }
.movers ol { list-style: none; margin: 0; padding: 0; }
.movers li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.movers small { color: var(--ink-3); margin-left: 6px; }
.movers .up { color: var(--wisp); } .movers .down { color: var(--ember); }

/* ---------- small shared pieces of inner pages ---------- */
.empty { color: var(--ink-2); padding: 18px 16px; }
.empty b { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--panel-2); color: var(--ink); border: 1px solid var(--gold); border-radius: 6px; padding: 10px 18px; font-weight: 700; box-shadow: 0 16px 40px rgba(0,0,0,.6); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
dialog.dlg { background: var(--panel); color: var(--ink); border: 1px solid var(--frame-hi); border-radius: 8px; padding: 22px; width: min(720px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; box-shadow: 0 0 0 1px #05090c, 0 40px 90px rgba(0,0,0,.8); }
dialog.dlg::backdrop { background: rgba(3,7,10,.78); }
dialog.dlg[open] { animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dlg-head h2 { font-size: 28px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- text pages (Vote, Help, Reset, the lost page): the title band, fields, drawers, keys ---------- */
.ptop { position: relative; padding: clamp(34px, 5vw, 60px) 0 clamp(22px, 3vw, 34px); isolation: isolate; }
.ptop::before { content: ""; position: absolute; inset: calc(-1 * var(--nav-h)) 0 -90px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,19,26,.5) 0, rgba(10,19,26,.84) 58%, var(--night) 100%), var(--ptop-img, url("/media/site/hero-dusk.webp")) var(--ptop-at, 50% 34%) / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); }
@media (min-width: 1100px) { :root { --ptop-img: url("/media/site/hero-dusk-1080.webp"); } }      /* wide screens: the 1920x1080 still */
.ptop h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1; color: var(--ink); text-shadow: 0 4px 30px rgba(0,0,0,.7); }
.ptop .lede { margin-top: 14px; color: var(--ink); text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.label { display: block; font-weight: 700; font-size: 16px; color: var(--ink-2); }
.input { display: block; width: 100%; height: 50px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--frame-hi); background: var(--deep); color: var(--ink); font: 500 18px var(--text); }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus-visible { outline: 2px solid var(--wisp); outline-offset: 1px; border-color: transparent; }
.input.is-bad { border-color: var(--ember); }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--gold-hi); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(228,184,106,.45); text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { text-decoration-color: currentColor; }
.drawers { border-top: 1px solid var(--frame); }
.drawers > details { border-bottom: 1px solid var(--frame); }
.drawers > details > summary { cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.drawers > details > summary::-webkit-details-marker { display: none; }
.drawers > details > summary::after { content: "+"; color: var(--gold); font-weight: 400; font-size: 24px; line-height: 1; }
.drawers > details[open] > summary::after { content: "\2212"; }
.drawers > details > summary:hover { color: var(--gold-hi); }
.drawers > details > p, .drawers > details > div { color: var(--ink-2); padding: 0 0 18px; max-width: 74ch; }
kbd { display: inline-block; padding: 0 7px 1px; font: 700 .84em/1.5 var(--text); color: var(--ink); white-space: nowrap; background: var(--panel-2); border: 1px solid var(--frame-hi); border-bottom-width: 2px; border-radius: 4px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace; }
.btn--discord { background: #5865f2; color: #fff; }
.btn--discord:hover { background: #6a75f5; }

/* ---------- narrow screens ---------- */
@media (max-width: 1240px) {
  .nav-finder { width: 40px; }
  .nav-finder input { padding: 0; color: transparent; cursor: pointer; border-color: transparent; background: transparent; }
  .nav-finder input::placeholder { color: transparent; }
  .nav-finder > svg { left: 10px; width: 20px; height: 20px; margin-top: -10px; color: var(--ink); }
  .nav-finder.is-open { position: absolute; left: var(--gut); right: var(--gut); top: 11px; width: auto; z-index: 3; }
  .nav-finder.is-open input { padding: 0 14px 0 42px; color: var(--ink); cursor: text; border-color: var(--frame-hi); background: var(--deep); height: 46px; font-size: 18px; }
  .nav-finder.is-open input::placeholder { color: var(--ink-3); }
  .nav-finder.is-open > svg { color: var(--ink-3); left: 13px; }
  .nav-finder.is-open .finder-list { width: auto; left: 0; }
  .nav-in { position: relative; }
  .nav-motion span { display: none; }      /* the button stays, as an icon with its words in the tooltip and for screen readers */
  .nav-motion { padding: 0 10px; }
}
@media (max-width: 1080px) {
  .nav-in { gap: 10px; }
  .nav-burger { display: grid; }
  .nav-links { position: absolute; left: calc(-1 * var(--gut)); right: calc(-1 * var(--gut)); top: var(--nav-h); flex-direction: column; gap: 0; padding: 8px var(--gut) 18px; background: rgba(10,19,26,.98); border-bottom: 1px solid var(--frame); display: none; }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { padding: 13px 4px; font-size: 20px; border-bottom: 1px solid var(--frame); border-radius: 0; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-discord { display: none; }
}
@media (max-width: 860px) {
  .footer-in { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
  .lane { grid-template-columns: 26px 34px minmax(0, 1fr) auto; column-gap: 9px; padding-right: 10px; }
  .lane .shield { width: 34px; height: 34px; }
  .lane-rank { font-size: 22px; } .lane-rank[data-len="3"] { font-size: 16px; } .lane-rank[data-len="4"] { font-size: 13px; } .lane-rank[data-len="5"] { font-size: 11px; }
  .lane-name { font-size: 18px; }
  .lane-num b { font-size: 20px; }
  .lane-fill { width: calc(var(--share, 1) * (100% - 92px)); min-width: 80px; }
  .sample-badge { font-size: 12px; padding: 3px 7px; right: 8px; bottom: 8px; opacity: .92; }
}
@media (max-width: 560px) {
  .nav-logo img { width: 84px; }
  .me-strip { flex-wrap: wrap; font-size: 17px; gap: 10px; }
  .me-strip span { flex: 1 1 200px; }
  .me-strip button { margin-left: 0; }
  .nav-me { max-width: 44px; padding: 0 5px; }
  .nav-me span { display: none; }
  .nav-motion span { display: none; }
  .nav-motion { padding: 0 10px; }
  .nav-play { padding: 9px 12px; white-space: nowrap; }
  .nav-live { padding: 6px 2px; gap: 6px; }
  .nav-live-word { display: none; }
  /* phones: one large first place over two half-width blocks */
  .stage { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .pod--1 { order: 0; grid-column: 1 / -1; }
  .pod--2 { order: 1; } .pod--3 { order: 2; }
  .pod--1 .pod-block { height: 104px; border-radius: 4px; }
  .pod--2 .pod-block, .pod--3 .pod-block { height: 72px; }
  .pod--2 .pod-block { border-right: 1px solid var(--frame); }
  .pod--3 .pod-block { border-left: 1px solid var(--frame); }
  .pod-num { font-size: 56px; } .pod--1 .pod-num { font-size: 80px; }
  .pod .shield { width: 84px; height: 84px; } .pod--1 .shield { width: 116px; height: 116px; }
  .pod-beam { display: none; }
  .pod--1 .pod-beam { display: block; width: 100%; }
  .stage--ghost { min-height: 520px; }
}

/* ---------- motion off: only when the visitor turned it off with the nav button (ns.js sets html.calm). Motion is on for
   everyone by default, whatever the system setting (owner 2026-11-24), so there is no prefers-reduced-motion rule here. ---------- */
html.calm { scroll-behavior: auto; }
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
