/* ============================================================
   Field Kit (/field/) and The Range (/range/).
   Loaded only on those pages, after styles.css, via Base's
   `styles` prop. Uses the palette variables from styles.css.
   ============================================================ */

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

/* ---------- Shared page frame ---------- */
.kit-hero { padding-bottom: 2.5rem; }
.kit-install { margin-top: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.kit-hint { font-size: .95rem !important; }
/* Sticky tabs sit right under the fixed site header, whose height changes
   at the same breakpoints as styles.css. */
.kit-tabs {
  position: sticky; top: var(--header-h, 78px); z-index: 50; display: flex; justify-content: center; gap: .3rem;
  padding: .6rem 1rem; background: rgba(9,9,11,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.kit-tabs::-webkit-scrollbar { display: none; }
.kit-tabs a {
  flex-shrink: 0; font-family: "Barlow Condensed", sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; font-size: .95rem; color: var(--muted); padding: .35rem .9rem; border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.kit-tabs a:hover { color: var(--text); }
.kit-tabs a[aria-current="page"] { color: #14120b; background: var(--accent); }
@media (max-width: 520px) { .kit-tabs { justify-content: flex-start; } }

.kit-page { max-width: 1000px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
@media (max-width: 520px) { .kit-page { padding: 1.8rem 1rem 4rem; } }
.kit-section { margin-top: 3.5rem; scroll-margin-top: 56px; } /* + the sticky tabs */
.kit-section:first-child { margin-top: 0; }
.kit-title { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: .5rem; }
.kit-title::before { content: ""; display: block; width: 40px; height: 3px; background: var(--accent); margin-bottom: .8rem; }
.kit-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.kit-lead { color: var(--muted); margin-bottom: 1.4rem; max-width: 680px; }
.kit-lead a, .kit-more a, .tool-note a, .cue-card a, .checklist a, .wizard a { color: var(--accent); text-decoration: underline; }
.kit-more { color: var(--muted); font-size: .92rem; margin-top: 1.2rem; }
.kit-label { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1.5px; font-size: .78rem; color: var(--accent); margin-bottom: .35rem; }
.kit-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.4rem; }
.kit-status { display: flex; flex-direction: column; gap: .8rem; }
.kit-status .kit-more { margin-top: 0; }
.btn-small { font-size: .9rem; padding: .45rem 1rem; }

/* ---------- Hub cards ---------- */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.6rem; }
.kit-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.kit-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.kit-card .pc-eyebrow { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-size: .8rem; }
.kit-card h2 { font-size: 1.7rem; margin: .3rem 0 .8rem; }
.kit-card ul { list-style: none; display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .92rem; }
.kit-card li::before { content: "›"; color: var(--accent); margin-right: .5rem; font-weight: 700; }

/* ---------- Tools: forms and readouts ---------- */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.tool-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .8rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 140px; min-width: 0; }
.field-sm { flex: 0 1 110px; }
.field span { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; color: var(--muted); }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem;
  transition: border-color .2s var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input.is-bad { border-color: var(--danger); }
.field-search { flex: 0 1 260px; }
.field-search input { font-size: .95rem; padding: .5rem .8rem; }
.readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-top: .6rem; }
.readout > div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; text-align: center; }
.readout span { display: block; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .75rem; color: var(--muted); }
.readout strong { display: block; font-family: "Oswald", sans-serif; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.readout div:first-child strong { color: var(--accent); }
.readout em { font-style: normal; color: var(--muted); font-size: .78rem; }
@media (max-width: 560px) { .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool-note { color: var(--muted); font-size: .88rem; margin-top: .9rem; }
.tool-note.is-warn { color: #fca5a5; }

.kit-details { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.2rem; }
.kit-details summary { cursor: pointer; padding: .9rem 0; font-family: "Barlow Condensed", sans-serif; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.kit-details[open] { padding-bottom: 1.2rem; }
.grid-explainer { display: flex; gap: 1.4rem; align-items: center; color: var(--muted); }
.grid-explainer strong { color: var(--text); }
@media (max-width: 560px) { .grid-explainer { flex-direction: column; align-items: flex-start; } }
.keypad { display: grid; grid-template-columns: repeat(3, 38px); gap: 4px; flex-shrink: 0; }
.keypad span {
  display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 6px;
  background: var(--bg-elev); border: 1px solid var(--line); font-family: "Oswald", sans-serif; color: var(--accent);
}
.mil-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; }
.mil-table div { display: flex; justify-content: space-between; padding: .35rem .6rem; border-radius: 6px; background: var(--bg-elev); font-size: .9rem; color: var(--muted); }
.mil-table strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- SQUAD: live panel + missions ---------- */
.live-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.live-panel-main { display: flex; align-items: center; gap: .9rem; }
.live-panel .status-dot { width: 12px; height: 12px; }
.live-panel-text { font-size: 1.05rem; }
.live-panel-text strong { color: var(--accent); }
.mission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.mission-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; scroll-margin-top: 56px; }
.mission-card.is-playing { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(240,162,59,.25); }
.mission-card.is-target { border-color: var(--info); }
.mission-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.mission-head h3 { font-size: 1.35rem; }
.mission-facts { color: var(--muted); font-size: .85rem; margin: .3rem 0 .8rem; }
.mission-summary { color: var(--text); font-size: .95rem; margin-bottom: .6rem; }
.mission-tips { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem 1.1rem; }
.mission-log { list-style: none; display: flex; flex-direction: column; gap: .6rem; font-size: .88rem; color: var(--muted); }
.mission-log time { display: block; font-family: "Barlow Condensed", sans-serif; letter-spacing: .5px; color: var(--text); font-size: .85rem; }
.mission-log ul { margin-left: 1rem; }
.mission-more { margin-top: .7rem; font-size: .88rem; color: var(--muted); }
.mission-more summary { cursor: pointer; color: var(--accent); margin-bottom: .6rem; }
.mission-empty { color: var(--muted); font-size: .88rem; }

/* ---------- Cue cards (comms, rules) ---------- */
.card-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.cue-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; color: var(--muted); font-size: .93rem; }
.cue-card h3 { font-size: 1.2rem; color: var(--text); margin-bottom: .6rem; }
.cue-card p + p { margin-top: .5rem; }
.cue-card ul { margin-left: 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.cue-card strong, .cue-card b { color: var(--text); }
.cue-card code, .fire-options code, .copy-line code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85em; padding: .1rem .35rem;
  border-radius: 4px; background: var(--bg-elev); border: 1px solid var(--line); color: var(--text);
}
.cue-card kbd, .key-row kbd, .wizard kbd {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; line-height: 1.4;
  padding: .05rem .45rem; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg-elev); color: var(--text);
}
.cue-format { color: var(--accent) !important; letter-spacing: .5px; }
.cue-format b { color: var(--accent); }
.cue-example { font-style: italic; color: var(--text) !important; border-left: 2px solid var(--accent); padding-left: .7rem; }

/* ---------- Sandstorm: fire support, checklist, wizard ---------- */
.fire-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-bottom: 1.4rem; }
.fire-clock { font-family: "Oswald", sans-serif; font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 5ch; }
.fire-timer[data-state="running"] .fire-clock { color: var(--accent); }
.fire-timer[data-state="urgent"] .fire-clock { color: #fbbf7a; animation: firePulse 1s ease-in-out infinite; }
.fire-timer[data-state="expired"] .fire-clock { color: var(--danger); }
@keyframes firePulse { 50% { opacity: .45; } }
.fire-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .fire-steps { grid-template-columns: 1fr; } }
.fire-options { display: flex; flex-direction: column; gap: .5rem; }
.fire-options button, .copy-line {
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--muted); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.fire-options button:hover, .copy-line:hover { border-color: var(--accent); }
.fire-options code { font-size: 1rem; min-width: 7.5rem; text-align: center; }
.fire-targets code { min-width: 2.2rem; }
.is-copied { border-color: var(--accent) !important; background: rgba(240,162,59,.12) !important; }
.is-copied::after { content: "Copied"; margin-left: auto; color: var(--accent); font-size: .8rem; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.copy-line { margin: .8rem 0; justify-content: space-between; overflow: hidden; }
.copy-line code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.copy-line span { flex-shrink: 0; color: var(--accent); font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; }
.copy-line.is-copied span { display: none; }

.checklist { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.checklist li { counter-increment: step; }
.checklist label {
  display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem;
}
.checklist input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--accent); flex-shrink: 0; }
.checklist input:checked + span { color: var(--text); opacity: .6; text-decoration: line-through; text-decoration-color: var(--accent); }
.checklist strong { color: var(--text); }

.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.wizard h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.wizard h3:focus { outline: none; }
.wizard p { color: var(--muted); }
.wizard strong { color: var(--text); }
.wizard-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.1rem; }

/* ---------- FiveM: job finder, stars, keys ---------- */
.job-finder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 720px) { .job-finder { grid-template-columns: 1fr; } }
.job-finder fieldset { border: 0; display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.job-finder legend { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem; color: var(--accent); margin-bottom: .4rem; }
.job-finder label { display: flex; align-items: center; gap: .6rem; cursor: pointer; color: var(--muted); padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); }
.job-finder label:has(input:checked) { color: var(--text); border-color: var(--accent); }
.job-finder input { accent-color: var(--accent); }
.job-finder .job-nojob { grid-column: 1 / -1; background: none; border: 0; padding: 0; }
.job-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.job-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.job-card.is-top { border-color: var(--accent); }
.job-card .op-when { align-self: flex-start; }
.job-card h3 { font-size: 1.3rem; }
.job-where { color: var(--muted); font-size: .85rem; }
.job-pay { color: var(--accent); font-weight: 600; font-size: .95rem; }
.job-note { color: var(--muted); font-size: .88rem; }
.job-link { margin-top: auto; padding-top: .4rem; color: var(--text); font-size: .88rem; text-decoration: underline; }

.wanted-tool { display: flex; flex-direction: column; gap: 1rem; }
.star-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 560px) { .star-states { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.star-states button {
  display: flex; flex-direction: column; align-items: center; gap: .2rem; cursor: pointer;
  font: inherit; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .85rem;
  color: var(--muted); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .4rem;
}
.star-states button[aria-selected="true"] { color: var(--text); border-color: var(--accent); }
.stars { font-size: 1.3rem; letter-spacing: 2px; color: #fafafa; min-height: 1.6rem; }
.s-flash { animation: starFlash 1s steps(2, jump-none) infinite; }
@keyframes starFlash { 50% { opacity: .15; } }
.s-hollow { color: #d4d4d8; }
.s-red { color: var(--danger); }
.star-meaning, .star-level-text { color: var(--muted); min-height: 3em; }
.star-meaning strong, .star-level-text strong { color: var(--text); }
.star-levels input[type="range"] { width: 100%; max-width: 360px; accent-color: var(--accent); }
.jail-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(3.4rem, 1fr)); gap: .3rem; margin: .6rem 0; }
.jail-ladder span { display: flex; flex-direction: column; align-items: center; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .2rem; font-size: .78rem; white-space: nowrap; }
.jail-ladder b { font-family: "Barlow Condensed", sans-serif; color: var(--accent); }
.key-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .5rem; }
.key-row { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.key-row[hidden] { display: none; }
.key-keys { flex-shrink: 0; min-width: 7.5rem; color: var(--muted); font-size: .8rem; }
.key-action { color: var(--muted); font-size: .9rem; }

/* ============================================================
   The Range — hub and game pages
   ============================================================ */
/* Hub layout: orders beside the wallet and service record, then an even grid of games. */
.hub-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; margin-bottom: 1.2rem; }
.hub-top .orders { margin-bottom: 0; }
.hub-top:has(.wallet-card[hidden]) { grid-template-columns: 1fr; }
@media (max-width: 900px) { .hub-top { grid-template-columns: 1fr; } }
.range-hub .service { margin-bottom: 2.4rem; }
.hub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: 1rem; }
.hub-head .kit-title { margin: 0; }
.hub-count { font: 600 .82rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.range-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 900px) { .range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .range-grid { grid-template-columns: 1fr; gap: 1rem; } }
.range-foot { margin-top: auto; padding-top: .9rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-top: 1px solid var(--line); }
.range-badge { position: absolute; top: .7rem; right: .7rem; z-index: 1; padding: .22rem .6rem; border-radius: 99px; background: var(--accent); color: #1a1206; font: 700 .72rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; box-shadow: 0 4px 14px -4px rgba(240,162,59,.7); }
.range-fresh { color: var(--muted); font-size: .82rem; opacity: .75; }
.range-medal { position: absolute; right: .7rem; bottom: .6rem; z-index: 1; }
.range-medal .medal { font-size: .74rem; padding: .15rem .55rem .15rem .22rem; background: rgba(10,10,8,.8); backdrop-filter: blur(4px); }
.range-medal .medal i { width: 15px; height: 15px; }
.wallet-card { display: flex; flex-direction: column; justify-content: center; }
/* Jade coins: a wallet once linked, a pitch for linking before. */
.wallet-card { padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid rgba(88,101,242,.45); background: linear-gradient(135deg, rgba(88,101,242,.16), transparent 60%), var(--surface); animation: ovCard .5s var(--ease); }
.wallet-h { font: 600 .75rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: #a5b4fc; margin-bottom: .55rem; }
.wallet-card h3 { font-size: 1.3rem; line-height: 1.1; margin-bottom: .55rem; }
.wallet-perks { list-style: none; display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .8rem; font-size: .88rem; color: var(--text); }
.wallet-perks b { display: inline-block; width: 1.6rem; }
.wallet-login { background: #5865f2; border-color: #5865f2; color: #fff; }
.wallet-login:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.wallet-earn { display: block; margin-top: .6rem; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.wallet-earn code { font-size: .92em; color: var(--text); background: rgba(255,255,255,.06); padding: .05rem .3rem; border-radius: 4px; }
.wallet-bal { display: flex; align-items: baseline; gap: .5rem; }
.wallet-bal strong { font: 500 2.1rem/1 "Oswald", sans-serif; color: #86efac; font-variant-numeric: tabular-nums; }
.wallet-bal span { color: var(--muted); font-size: .9rem; }
.wallet-who { margin-top: .4rem; font-size: .88rem; color: var(--muted); }
.wallet-who strong { color: var(--text); }
/* Bottom of the hub: the device note, and the result checker folded away. */
.hub-foot { margin-top: 2.6rem; display: flex; flex-direction: column; gap: 1rem; }
.hub-foot .kit-more { margin: 0; }
.verify { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.verify summary { cursor: pointer; padding: .9rem 1.2rem; font: 600 1rem/1.2 "Oswald", sans-serif; letter-spacing: .5px; text-transform: uppercase; list-style: none; display: flex; align-items: center; gap: .6rem; }
.verify summary::-webkit-details-marker { display: none; }
.verify summary::before { content: "▸"; color: var(--accent); transition: transform .2s var(--ease); }
.verify[open] summary::before { transform: rotate(90deg); }
.verify > :not(summary) { margin: 0 1.2rem 1.2rem; }
.range-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.range-card:hover, .range-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px -22px rgba(240,162,59,.45); }
.range-card:active { transform: translateY(-1px) scale(.99); }
.range-art { position: relative; aspect-ratio: 320 / 150; overflow: hidden; border-bottom: 1px solid var(--line); background: #0c0c09; }

.game-art { display: block; width: 100%; height: 100%; transition: transform .6s var(--ease); }
.range-card:hover .game-art { transform: scale(1.05); }
.range-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(26,25,20,.85)); pointer-events: none; }
.range-card .range-icon { position: absolute; left: 1.1rem; bottom: -.1rem; z-index: 1; font-size: 2.1rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); transition: transform .35s var(--ease); }
.range-card:hover .range-icon { transform: translateY(-3px) scale(1.1) rotate(-6deg); }
.range-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.3rem 1.2rem; flex: 1; }
.range-card h2 { font-size: 1.7rem; line-height: 1.05; }
.range-card p { color: var(--muted); font-size: .92rem; }
.range-card .range-tag { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1.5px; font-size: .75rem; color: var(--accent); }
.range-card .range-best { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .82rem; color: var(--muted); min-width: 0; }
.range-card .range-best strong { color: var(--text); }
.range-card .range-best .medal { font-size: .78rem; padding: .15rem .6rem .15rem .25rem; }
.range-card .range-best .medal i { width: 16px; height: 16px; }
.range-play { flex-shrink: 0; font-family: "Barlow Condensed", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; font-size: .85rem; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.range-play::after { content: "→"; transition: transform .25s var(--ease); }
.range-card:hover .range-play::after { transform: translateX(4px); }

/* Service record on the hub */
.service { margin-bottom: 1.6rem; padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid rgba(240,162,59,.35); background: linear-gradient(135deg, rgba(240,162,59,.1), transparent 55%), var(--surface); animation: ovCard .5s var(--ease); }
.service-h { font: 600 .75rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: .7rem; }
.service-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 2rem; }
.service-item { display: flex; flex-direction: column; gap: .1rem; }
.service-item strong { font-family: "Oswald", sans-serif; font-size: 1.6rem; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.service-item small { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; font-family: "Barlow Condensed", sans-serif; }
.service-medals { flex-direction: row; gap: .4rem; }
.service-medals .medal { font-size: .95rem; }
.service-bar { margin-top: .9rem; height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.service-bar i { display: block; height: 100%; width: calc(var(--k, 0) * 100%); background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: inherit; animation: barFill 1.2s var(--ease) .2s backwards; }

/* ---------- Game page frame ---------- */
.game-page {
  --chrome: 150px; --ar: 1.6;
  /* Fit the screen height, but never shrink a game below a playable width. */
  --stage-w: max(min(100%, 540px), min(100%, calc((100vh - var(--header-h) - var(--chrome) - var(--stage-extra, 0px)) * var(--ar))));
  max-width: 1000px; margin: 0 auto; padding: calc(var(--header-h) + 1.2rem) 1rem 4rem;
}
@supports (height: 100svh) {
  .game-page { --stage-w: max(min(100%, 540px), min(100%, calc((100svh - var(--header-h) - var(--chrome) - var(--stage-extra, 0px)) * var(--ar)))); }
}
/* Before the game script runs, hold the stage's space so nothing below jumps.
   Per-game shapes, matching what each script builds. */
.game-page[data-game="getaway"] { --ar: .6585; }
.game-page[data-game="pursuit"] { --ar: .7692; }
.game-page[data-game="killhouse"] { --ar: 1.6538; }
@media (max-width: 640px) { .game-page[data-game="killhouse"] { --ar: .9; } }
.game-page[data-game="dustoff"] { --ar: 1.7692; }
@media (max-width: 640px) { .game-page[data-game="dustoff"] { --ar: .9091; } }
.game-page[data-game="logi-run"] { --ar: 1.8; }
@media (max-width: 640px) { .game-page[data-game="logi-run"] { --ar: .9375; } }
.game-page[data-game="tripwire"] { --ar: 1.6; --stage-extra: 70px; }
.game-page[data-game="mortar-drill"] { --ar: 2.0455; --stage-extra: 203px; }
.game-page[data-game="defuse"] { --pre-h: 725px; }
.game-page[data-game="eod"] { --pre-h: 560px; }
.game-page[data-game="hold-the-line"] { --ar: 1.2903; --stage-extra: 118px; }
@media (max-width: 600px) { .game-page[data-game="hold-the-line"] { --stage-extra: 230px; } }
@media (max-width: 900px) { .game-page[data-game="mortar-drill"] { --stage-extra: 282px; } }
@media (max-width: 760px) { .game-page[data-game="defuse"] { --pre-h: 621px; } }
@media (max-width: 640px) { .game-page[data-game="tripwire"] { --ar: .92; --stage-extra: 89px; } }
@media (max-width: 600px) { .game-page[data-game="mortar-drill"] { --stage-extra: 379px; } .game-page[data-game="eod"] { --pre-h: 560px; } }
@media (max-width: 380px) { .game-page[data-game="defuse"] { --pre-h: 900px; } .game-page[data-game="eod"] { --pre-h: 520px; } }
.game-stage.is-pre.has-canvas::before { content: ""; display: block; aspect-ratio: var(--ar); }
.game-stage.is-pre.has-canvas:not(.is-portrait)::after { content: ""; display: block; height: var(--stage-extra, 0px); }
.game-stage.is-pre.is-dom { min-height: var(--pre-h, 480px); }
.game-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; margin-bottom: .7rem; }
.game-back { order: 2; display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .9rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.game-back:hover { color: var(--accent); transform: translateX(-3px); }
.game-title { font-size: clamp(1.6rem, 4.2vw, 2.4rem); line-height: 1.05; }
.game-page:has(.has-canvas) .game-head { width: var(--stage-w); margin-inline: auto; }
.game-bar { display: flex; align-items: center; gap: .5rem; margin: 0 auto .6rem; }
.game-stats { flex: 1; min-width: 0; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
.game-stats::-webkit-scrollbar { display: none; }
.game-stat {
  flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.15;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .28rem .7rem; min-height: 40px;
}
.game-stat small { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .66rem; color: var(--muted); }
.game-stat strong { color: var(--text); font-variant-numeric: tabular-nums; font-size: .98rem; white-space: nowrap; }
.game-buttons { display: flex; gap: .4rem; flex-shrink: 0; }
.game-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.game-btn:hover { color: var(--text); border-color: var(--accent); }
.game-btn:active { transform: scale(.94); }
.game-btn[hidden] { display: none; }
.game-mute .mute-off { display: none; }
.game-mute[aria-pressed="true"] .mute-on { display: none; }
.game-mute[aria-pressed="true"] .mute-off { display: inline; }

.game-stage {
  position: relative; margin: 0 auto; background: #050806; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.9);
}
.game-stage canvas { display: block; width: 100%; height: auto; }
/* Canvas games size to the screen: the stage and its HUD fit under the header. */
.game-page:has(.has-canvas) .game-stage, .game-page:has(.has-canvas) .game-bar { width: var(--stage-w); }
.game-page:has(.is-portrait) { --stage-w: max(min(300px, 100%), min(560px, 100%, calc((100vh - var(--header-h) - var(--chrome)) * var(--ar)))); }
@supports (height: 100svh) { .game-page:has(.is-portrait) { --stage-w: max(min(300px, 100%), min(560px, 100%, calc((100svh - var(--header-h) - var(--chrome)) * var(--ar)))); } }
@media (max-width: 600px) {
  .game-page { --chrome: 132px; padding-inline: .75rem; padding-top: calc(var(--header-h) + .8rem); }
  .game-stats { gap: .3rem; }
  .game-stat { padding: .2rem .5rem; min-height: 36px; border-radius: 9px; }
  .game-stat small { font-size: .58rem; letter-spacing: .6px; }
  .game-stat strong { font-size: .88rem; }
  .game-btn { width: 36px; height: 36px; border-radius: 9px; }
  .game-buttons { gap: .3rem; }
}
.game-help { color: var(--muted); font-size: .92rem; margin: 1.1rem auto 0; max-width: 72ch; }
.game-help strong { color: var(--text); }
.game-help a { color: var(--accent); text-decoration: underline; }

/* Short landscape screens: the site header gets out of the way mid-run. */
@media (max-height: 520px) and (orientation: landscape) {
  body.is-playing .site-header { transform: translateY(-100%); }
  body.is-playing { --header-h: 0px; }
  .game-page { --chrome: 64px; }
}
.site-header { transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease); }

/* ---------- Overlay: start, pause, game over ---------- */
.game-overlay {
  position: absolute; inset: 0; z-index: 6; display: flex; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(.8rem, 3vw, 1.6rem); text-align: center;
  background: rgba(5,8,6,.8); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: ovIn .22s var(--ease);
}
.game-overlay[hidden] { display: none; }
.game-overlay.is-leaving { opacity: 0; transition: opacity .16s ease; }
.game-overlay.is-pause { background: rgba(5,8,6,.96); }
.game-overlay.is-count { background: rgba(5,8,6,.28); -webkit-backdrop-filter: none; backdrop-filter: none; align-items: center; justify-content: center; }
@keyframes ovIn { from { opacity: 0; } }
.ov-card { margin: auto; display: flex; flex-direction: column; align-items: center; gap: .7rem; width: 100%; max-width: 560px; animation: ovCard .38s var(--ease); }
@keyframes ovCard { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.game-overlay h2 { font-size: clamp(1.7rem, 5vw, 2.8rem); line-height: 1; text-wrap: balance; }
.ov-kicker { margin: 0; }
.ov-text { color: var(--muted); font-size: clamp(.88rem, 2.1vw, 1rem); max-width: 520px; }
.ov-text strong { color: var(--text); }
.ov-meta { color: var(--muted); font-size: .9rem; }
.ov-meta strong { color: var(--text); }
.ov-medals { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.ov-medals .medal { font-size: .82rem; padding: .2rem .7rem .2rem .3rem; }
.ov-medals .medal i { width: 18px; height: 18px; }
.medal.is-dim { opacity: .5; }
.medal.is-dim i { box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.game-overlay .game-score { font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(2.6rem, 9vw, 4.4rem); color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.game-score.is-done { animation: scorePop .4s var(--ease); }
@keyframes scorePop { 40% { transform: scale(1.12); } }
.game-overlay.is-best .game-score { color: #fde047; text-shadow: 0 0 34px rgba(253,224,71,.45); }
.game-overlay.is-best .ov-kicker { color: #fde047; animation: bestGlow 1.1s ease-in-out infinite alternate; }
@keyframes bestGlow { to { text-shadow: 0 0 16px rgba(253,224,71,.8); } }
.ov-prev { color: var(--muted); font-size: .85rem; margin-top: -.3rem; }
.ov-prog { width: min(380px, 100%); display: flex; flex-direction: column; gap: .45rem; }
.ov-prog-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ov-prog-next { font-size: .85rem; color: var(--muted); }
.ov-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ov-bar i { display: block; height: 100%; width: calc(var(--k) * 100%); border-radius: inherit; background: var(--mc); box-shadow: 0 0 12px var(--mc); animation: barFill 1s var(--ease) .25s backwards; }
.ov-bar.bronze { --mc: #c47a3a; } .ov-bar.silver { --mc: #cbd5e1; } .ov-bar.gold { --mc: #f5c542; }
@keyframes barFill { from { width: 0; } }
.ov-ach { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.ov-ach-chip { font-size: .8rem; padding: .25rem .65rem; border-radius: 999px; background: rgba(240,162,59,.14); border: 1px solid rgba(240,162,59,.45); color: var(--cream); animation: ovCard .4s var(--ease) .3s backwards; }
.game-overlay .game-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .3rem; }
.game-actions kbd { margin-left: .5rem; font: 600 .68rem/1 "Barlow Condensed", sans-serif; letter-spacing: .5px; padding: .18rem .35rem; border: 1px solid currentColor; border-radius: 4px; opacity: .55; }
@media (hover: none) { .game-actions kbd { display: none; } }
.countdown { font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(4.5rem, 20vw, 9rem); color: var(--accent); line-height: 1; animation: cdPulse .6s var(--ease); text-shadow: 0 0 50px rgba(240,162,59,.5), 0 4px 0 rgba(0,0,0,.5); }
.countdown.is-go { color: var(--cream); }
@keyframes cdPulse { from { transform: scale(1.8); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); } }

/* ---------- Mission debrief (game over / failed) ---------- */
.game-overlay.is-over { background: radial-gradient(120% 80% at 50% 0%, rgba(120,20,20,.22), transparent 60%), rgba(5,7,5,.9); }
.game-overlay.is-over .ov-card { max-width: 600px; gap: .8rem; }
.game-overlay.is-over h2 {
  font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: 3px; color: #ef4444;
  text-shadow: 0 0 22px rgba(239,68,68,.55), 3px 3px 0 #3b0a0a;
  animation: dbSlam .5s cubic-bezier(.2,1.4,.4,1) backwards;
}
.game-overlay.is-over:not(.is-failed) h2 { color: var(--accent); text-shadow: 0 0 22px rgba(240,162,59,.45), 3px 3px 0 #3a2508; }
.game-overlay.is-best h2 { color: #fde047; }
@keyframes dbSlam { from { transform: scale(2.2); opacity: 0; filter: blur(4px); } }
.game-overlay.is-over .ov-kicker { color: var(--muted); }
.db-panel, .db-board { width: 100%; border-radius: 10px; overflow: hidden; text-align: center; animation: ovCard .4s var(--ease) .12s backwards; }
.db-panel { border: 1px solid rgba(74,222,128,.55); background: linear-gradient(180deg, rgba(74,222,128,.07), rgba(9,12,9,.85)); box-shadow: 0 0 0 1px rgba(74,222,128,.08), 0 0 26px rgba(74,222,128,.12) inset; }
.db-panel.is-failed { border-color: rgba(239,68,68,.55); background: linear-gradient(180deg, rgba(239,68,68,.08), rgba(12,8,8,.85)); box-shadow: 0 0 26px rgba(239,68,68,.12) inset; }
.db-head, .db-board-head {
  font: 700 .85rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2.5px; text-transform: uppercase; padding: .55rem .8rem;
}
.db-head { color: #86efac; background: rgba(74,222,128,.1); border-bottom: 1px solid rgba(74,222,128,.3); }
.db-panel.is-failed .db-head { color: #fca5a5; background: rgba(239,68,68,.1); border-bottom-color: rgba(239,68,68,.3); }
.db-body { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .8rem 1rem 1rem; }
.db-label { font: 600 .8rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.db-body .game-score { text-shadow: 0 0 28px rgba(240,162,59,.35); }
.game-overlay .game-score.is-zero { color: #57534e; text-shadow: none; }
.db-stats { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem .6rem; }
.db-stats > i { color: var(--line); font-style: normal; }
.db-stat { display: inline-flex; align-items: baseline; gap: .3rem; font: 600 .85rem/1.2 "Barlow Condensed", sans-serif; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.db-stat b { font-family: "Oswald", sans-serif; font-weight: 600; color: var(--text); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.db-board { border: 1px solid rgba(240,162,59,.6); background: rgba(12,11,8,.88); animation-delay: .22s; }
.db-board-head { color: var(--accent); background: rgba(240,162,59,.13); border-bottom: 1px solid rgba(240,162,59,.35); }
.db-board table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.db-board th { font: 600 .72rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding: .5rem .7rem .35rem; text-align: left; }
.db-board th:last-child, .db-board td:last-child { text-align: right; }
.db-board td { padding: .32rem .7rem; border-top: 1px solid rgba(255,255,255,.04); text-align: left; }
.db-board tbody tr:nth-child(odd) { background: rgba(255,255,255,.018); }
.db-rank { width: 4.2rem; font-family: "Oswald", sans-serif; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-rank span { margin-right: .2rem; font-size: .8rem; }
.r1 .db-rank { color: #f5c542; } .r2 .db-rank { color: #cbd5e1; } .r3 .db-rank { color: #c47a3a; }
.r1 .db-name span { color: #fde68a; }
.db-name { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.db-name img { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.db-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.db-score { font-family: "Oswald", sans-serif; color: #86efac; font-variant-numeric: tabular-nums; }
.db-board tr.is-me { background: rgba(74,222,128,.1); }
.db-board tr.is-me td:first-child { box-shadow: inset 3px 0 0 #4ade80; }
.db-board tr.is-you { background: rgba(74,222,128,.12); outline: 1px solid rgba(74,222,128,.7); outline-offset: -1px; animation: dbYou 1.4s ease-in-out infinite alternate; }
.db-board tr.is-you .db-name span { color: #86efac; font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
@keyframes dbYou { to { background: rgba(74,222,128,.2); } }
.db-empty { text-align: center !important; color: var(--muted); padding: .8rem !important; }
.db-verify { min-height: 1.2em; font: 600 .9rem/1.3 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.db-verify.is-ok { color: #4ade80; }
.db-verify strong { color: #86efac; font-size: 1.1em; }
.db-verify .btn { text-transform: none; letter-spacing: 0; }
.game-stage.is-kia::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: rgba(220,38,38,.35); animation: kia .7s ease-out forwards; }
@keyframes kia { to { opacity: 0; } }
@media (max-width: 480px) {
  .db-board td, .db-board th { padding-inline: .45rem; }
  .db-name span { max-width: 9rem; }
}

/* ---------- Loadout: boosters bought with Jade coins ---------- */
.loadout { width: 100%; max-width: 560px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,17,13,.85); padding: .7rem; text-align: left; }
.lo-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin-bottom: .55rem; }
.lo-title { font: 700 .8rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.lo-bal { font-size: .85rem; color: var(--muted); }
.lo-bal strong { color: #86efac; font-family: "Oswald", sans-serif; font-weight: 500; }
.lo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .45rem; }
.lo-card {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease);
}
.lo-card:hover { border-color: var(--accent-dim); }
.lo-card:active { transform: scale(.98); }
.lo-card.is-on { border-color: #4ade80; background: rgba(74,222,128,.09); box-shadow: inset 0 0 0 1px rgba(74,222,128,.5); }
.lo-icon { font-size: 1.35rem; line-height: 1; }
.lo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.lo-body strong { font-family: "Oswald", sans-serif; font-weight: 500; font-size: .95rem; letter-spacing: .3px; }
.lo-body small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.lo-cost { font: 600 .85rem/1 "Oswald", sans-serif; color: var(--accent); white-space: nowrap; }
.lo-card.is-on .lo-cost { color: #86efac; }
.lo-note, .lo-total, .loadout-login { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.lo-note strong, .lo-total strong { color: var(--text); }
.lo-total.is-short { color: #fca5a5; }
.loadout-login { margin: 0; text-align: center; }
/* Logged out: the loadout is on show but locked behind a Discord login. */
.loadout.is-locked { border-color: rgba(88,101,242,.45); background: linear-gradient(180deg, rgba(88,101,242,.08), rgba(17,17,13,.88) 60%); }
.lo-card.is-locked { cursor: default; opacity: .72; filter: saturate(.7); }
.lo-card.is-locked:hover { border-color: var(--line); }
.lo-card.is-locked:active { transform: none; }
.lo-card.is-locked .lo-cost::before { content: "🔒 "; }
.lo-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: .6rem; }
.lo-cta .btn { background: #5865f2; border-color: #5865f2; color: #fff; }
.lo-cta .btn:hover { background: #4752c4; border-color: #4752c4; }
.lo-cta span { flex: 1 1 220px; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.revive.is-locked { border-color: rgba(88,101,242,.55); background: rgba(14,15,30,.85); }
.revive.is-locked .revive-ring { background: conic-gradient(#5865f2 100%, transparent 0); }
.game-overlay.is-pitch .btn-primary { background: #5865f2; border-color: #5865f2; color: #fff; }

/* ---------- Down: the revive offer ---------- */
.game-overlay.is-down { background: radial-gradient(90% 70% at 50% 40%, rgba(127,29,29,.35), rgba(5,5,5,.94)); }
.game-overlay.is-down h2 { color: #ef4444; text-shadow: 0 0 24px rgba(239,68,68,.6); animation: dbSlam .45s cubic-bezier(.2,1.4,.4,1) backwards; }
.revive { display: flex; align-items: center; gap: 1rem; width: min(440px, 100%); padding: .8rem 1rem; border-radius: 12px; border: 1px solid rgba(74,222,128,.45); background: rgba(10,16,11,.85); text-align: left; }
.revive-ring {
  --k: 1; position: relative; flex-shrink: 0; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#4ade80 calc(var(--k) * 360deg), rgba(255,255,255,.08) 0); transition: background .9s linear;
}
.revive-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0b100c; }
.revive-ring b { position: relative; font: 700 1.5rem/1 "Oswald", sans-serif; color: var(--text); }
.revive-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.revive-body strong { font-family: "Oswald", sans-serif; font-weight: 500; letter-spacing: .5px; }
.revive-body small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.revive-bal { font-size: .8rem; color: var(--muted); }
.revive-bal b { color: #86efac; }
.revive-bal em { color: #fca5a5; font-style: normal; }
.revive-msg { min-height: 1.2em; font-size: .9rem; color: var(--cream); }
.game-overlay .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Pop-ups, flashes, shakes ---------- */
.fx-pop { position: absolute; z-index: 5; pointer-events: none; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--accent);
  text-shadow: 0 2px 6px rgba(0,0,0,.8); transform: translate(-50%, -50%); animation: fxPop .9s var(--ease) forwards; white-space: nowrap; }
.fx-pop.bad { color: #f87171; } .fx-pop.good { color: #86efac; } .fx-pop.big { font-size: 1.9rem; }
@keyframes fxPop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.fx-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; animation: fxFlash .45s ease-out forwards; }
@keyframes fxFlash { from { opacity: .55; } to { opacity: 0; } }
.fx-shake { animation: fxShake .35s linear; }
@keyframes fxShake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(3px, -2px); } 30%, 50%, 70% { transform: translate(-4px, 2px); } 40%, 60% { transform: translate(4px, -1px); } }
.confetti { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; animation: confetti 2s cubic-bezier(.25,.6,.4,1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--fall, 600px)) rotate(var(--r)); opacity: .2; } }

/* ---------- Medals ---------- */
.medal { display: inline-flex; align-items: center; gap: .45rem; font-family: "Barlow Condensed", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; font-size: .95rem; padding: .3rem .8rem .3rem .4rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); white-space: nowrap; }
.medal i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 12px var(--mc); background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--mc); }
.medal.bronze { --mc: #c47a3a; } .medal.silver { --mc: #cbd5e1; } .medal.gold { --mc: #f5c542; } .medal.none { --mc: #3f3f46; }
.medal-next { color: var(--muted); font-size: .9rem; }

/* ---------- Achievements ---------- */
.ach-toast {
  position: absolute; top: .8rem; left: 50%; z-index: 8; display: flex; align-items: center; gap: .65rem; max-width: calc(100% - 1.6rem);
  padding: .55rem 1rem .55rem .65rem; background: rgba(20,18,11,.94); border: 1px solid rgba(240,162,59,.65); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55), 0 0 26px rgba(240,162,59,.28); pointer-events: none; text-align: left;
  transform: translateX(-50%); animation: toastIn .45s var(--ease); transition: opacity .3s ease, transform .3s ease;
}
.ach-toast.is-out { opacity: 0; transform: translate(-50%, -14px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -24px) scale(.95); } }
.ach-toast small { display: block; font: 600 .66rem/1.2 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.ach-toast strong { display: block; color: var(--cream); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-toast-icon { font-size: 1.5rem; line-height: 1; animation: achSpin .6s var(--ease); }
@keyframes achSpin { from { transform: scale(0) rotate(-40deg); } }
.ach { margin: 2rem auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; }
.ach-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.ach-head h2 { font-size: 1.5rem; }
.ach-count { font-family: "Oswald", sans-serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.ach-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .5rem; }
.ach-item { display: flex; gap: .7rem; align-items: center; padding: .6rem .75rem; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); min-width: 0; transition: opacity .3s var(--ease), border-color .3s var(--ease); opacity: .6; }
.ach-item.is-on { opacity: 1; border-color: rgba(240,162,59,.45); background: linear-gradient(135deg, rgba(240,162,59,.08), transparent 60%), var(--bg-elev); }
.ach-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); font-size: 1.05rem; filter: grayscale(1); }
.ach-icon::before { content: "🔒"; }
.ach-item.is-on .ach-icon { background: rgba(240,162,59,.18); filter: none; }
.ach-item.is-on .ach-icon::before { content: "🏆"; }
.ach-item strong { display: block; font-size: .95rem; }
.ach-item small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.game-page:has(.is-portrait) .ach, .game-page:has(.is-portrait) .lb { max-width: 640px; }

/* ---------- Getaway: garage ---------- */
.garage { display: flex; flex-direction: column; align-items: center; gap: .45rem; margin-top: .1rem; }
.garage-label { font: 600 .72rem/1 "Barlow Condensed", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.garage-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.paint {
  position: relative; width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 35% 30%, var(--p2), var(--p) 62%); box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 4px 10px rgba(0,0,0,.4);
  transition: transform .18s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.paint:hover { transform: translateY(-2px) scale(1.08); }
.paint.is-on { border-color: var(--cream); box-shadow: 0 0 0 3px rgba(240,162,59,.65), 0 4px 14px rgba(0,0,0,.5); }
.paint.is-locked { filter: grayscale(.85) brightness(.45); }
.paint.is-locked::after { content: "🔒"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; filter: brightness(2.2); }
.garage-hint { font-size: .82rem; color: var(--muted); min-height: 1.2em; }

/* ---------- Defuse (IED) ---------- */
.defuse {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.2rem; padding: 1.2rem;
  background: radial-gradient(520px 280px at 25% 15%, rgba(250,204,21,.06), transparent 70%), #07090a;
}
.defuse-tabs { display: none; }
.ied { position: relative; background: linear-gradient(180deg, #211e16, #191710); border: 2px solid #3f3a2a; border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: .8rem;
  box-shadow: inset 0 0 0 4px #14120d, 0 18px 40px -20px rgba(0,0,0,.8); }
.ied::before, .ied::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8a8472, #3a3629); top: 8px; }
.ied::before { left: 8px; } .ied::after { right: 8px; }
.ied-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.ied-clock { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 2.1rem; color: #ef4444; background: #0a0505; border: 1px solid #3b0d0d;
  padding: .1rem .7rem; border-radius: 6px; letter-spacing: 3px; text-shadow: 0 0 12px rgba(239,68,68,.7); font-variant-numeric: tabular-nums; }
.ied-clock.is-low, .defuse-mini.is-low { animation: firePulse .5s linear infinite; }
.ied-serial { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; background: #e7e5e4; color: #1c1917; padding: .2rem .5rem; border-radius: 3px; letter-spacing: 1px; }
.ied-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ied-led { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; color: #a8a29e; font-family: "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.ied-led i { width: 12px; height: 12px; border-radius: 50%; background: #292524; border: 1px solid #57534e; }
.ied-led.on i { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.ied-strikes { display: inline-flex; align-items: center; gap: .7rem; font-family: "Barlow Condensed", sans-serif; letter-spacing: 1px; font-size: .8rem; color: #a8a29e; text-transform: uppercase; }
.strike-lamps { display: inline-flex; gap: .25rem; }
.strike-lamps i { width: 14px; height: 14px; border-radius: 3px; background: #292524; border: 1px solid #57534e; display: grid; place-items: center; }
.strike-lamps i.on { background: #b91c1c; border-color: #ef4444; box-shadow: 0 0 10px rgba(239,68,68,.7); }
.strike-lamps i.on::before { content: "✕"; color: #fee2e2; font-size: .6rem; font-style: normal; }
.ied-module { border: 1px solid #3f3a2a; border-radius: 10px; padding: .5rem .7rem .7rem; background: rgba(0,0,0,.2); }
.ied-label { font-family: "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; font-size: .72rem; color: #a8a29e; margin-bottom: .3rem; }
.ied-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .7rem; }
.ied-mods[hidden] { display: none; }
.ied-wires { display: flex; flex-direction: column; gap: .45rem; padding: .4rem .2rem; }
.wire { position: relative; display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; padding: .35rem 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wire b { font-family: "Barlow Condensed", sans-serif; color: #a8a29e; width: 1.2rem; font-size: .85rem; }
.wire i { position: relative; flex: 1; height: 12px; border-radius: 6px; background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0) 55%), var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.28); transition: transform .15s var(--ease); }
.wire:hover i { transform: scaleY(1.25); outline: 2px solid rgba(250,250,250,.45); outline-offset: 2px; }
.wire.cut i { background: linear-gradient(90deg, var(--c) 0 45%, transparent 45% 55%, var(--c) 55%); transform: none; outline: 0; }
.wire.cut i::after { content: "✂"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); color: #fafafa; font-size: .9rem; animation: snap .25s ease-out; }
.wire.was-right i { outline: 2px dashed #22c55e; outline-offset: 3px; }
@keyframes snap { from { transform: translate(-50%, -55%) scale(1.8); } to { transform: translate(-50%, -55%) scale(1); } }
.ied-keypad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.ied-keypad .key { position: relative; aspect-ratio: 1.25; font-size: clamp(1.25rem, 4vw, 1.7rem); color: #1c1917; background: linear-gradient(#e7e5e4, #a8a29e); border: 0; border-radius: 8px; box-shadow: 0 4px 0 #57534e; cursor: pointer; transition: transform .06s, box-shadow .06s; }
.ied-keypad .key:active { transform: translateY(3px); box-shadow: 0 1px 0 #57534e; }
.ied-keypad .key::before { content: ""; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #44403c; }
.ied-keypad .key.on::before { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.ied-button { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .3rem 0; }
.big-btn {
  width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle at 38% 30%, rgba(255,255,255,.45), transparent 42%), var(--b); color: #0c0a09;
  box-shadow: 0 7px 0 rgba(0,0,0,.55), inset 0 -6px 0 rgba(0,0,0,.25), 0 0 0 5px #2a261c; transition: transform .07s, box-shadow .07s;
  font: 700 .82rem/1 "Oswald", sans-serif; letter-spacing: 1px;
}
.big-btn.is-blue, .big-btn.is-red { color: #fafafa; }
.big-btn.is-down { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.55), inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 5px #2a261c; }
.big-btn.is-done { filter: saturate(.4) brightness(.7); }
.ied-strip { width: 12px; height: 88px; border-radius: 6px; background: #1c1917; border: 1px solid #3f3a2a; transition: background .2s, box-shadow .2s; }
.ied-strip.on { background: var(--s); box-shadow: 0 0 18px var(--s); animation: stripPulse .8s ease-in-out infinite alternate; }
@keyframes stripPulse { to { filter: brightness(1.35); } }
.ied.is-safe { border-color: #16a34a; }
.ied.is-boom { animation: boom .5s ease-out; border-color: #ef4444; }
@keyframes boom { 0% { transform: scale(1); filter: brightness(3); } 40% { transform: scale(1.03) rotate(-1deg); } 100% { transform: none; filter: none; } }
.ied-stamp { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: "Oswald", sans-serif; font-size: 4rem; font-weight: 700; color: #22c55e; letter-spacing: 6px; transform: rotate(-12deg); text-shadow: 0 0 20px rgba(34,197,94,.5); animation: stamp .35s var(--ease); pointer-events: none; }
.ied-stamp[hidden] { display: none; }
@keyframes stamp { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
.manual { background: #f5f0e1; color: #292524; border-radius: 6px; padding: 1rem 1.1rem; font-size: .9rem; box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); transform: rotate(.35deg); max-height: 640px; overflow-y: auto; overscroll-behavior: contain; }
.manual h3 { font-family: "Oswald", sans-serif; font-size: 1.05rem; color: #1c1917; letter-spacing: 1px; margin-bottom: .2rem; display: flex; justify-content: space-between; }
.manual h3 span { color: #b91c1c; font-size: .85rem; }
.manual h4 { font-family: "Oswald", sans-serif; font-size: .95rem; letter-spacing: 1px; text-transform: uppercase; color: #1c1917; border-bottom: 2px solid #1c1917; margin-bottom: .45rem; padding-bottom: .1rem; }
.manual-sec { margin-top: .9rem; }
.manual .manual-sub { font-size: .72rem; color: #78716c; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: 1px; }
.manual ol { margin-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.manual li::marker { font-weight: 700; }
.manual .otherwise { font-weight: 600; }
.manual-cols { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: .3rem; margin-top: .4rem; }
.manual-cols div { display: flex; flex-direction: column; align-items: center; gap: .1rem; border: 1px solid #d6cfbd; border-radius: 4px; padding: .25rem 0; font-size: 1.05rem; }
.manual-strips { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.manual-strips span { display: inline-flex; align-items: center; gap: .35rem; text-transform: capitalize; }
.manual-strips i { width: 10px; height: 18px; border-radius: 3px; background: var(--s); border: 1px solid rgba(0,0,0,.4); }
.manual-strips b { font-family: "Oswald", sans-serif; font-size: 1.1rem; }
.defuse-status { grid-column: 1 / -1; text-align: center; color: var(--muted); min-height: 1.4em; }
/* Phones: device and manual take turns, with the clock always in view. */
@media (max-width: 760px) {
  .defuse { grid-template-columns: 1fr; padding: .8rem; gap: .8rem; }
  .defuse-tabs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 3; }
  .defuse-tabs button { font: 600 .95rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; padding: .7rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
  .defuse-tabs button[aria-selected="true"] { background: var(--accent); color: #14120b; border-color: var(--accent); }
  .defuse-mini { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.2rem; color: #ef4444; background: #0a0505; border: 1px solid #3b0d0d; border-radius: 6px; padding: .3rem .5rem; font-variant-numeric: tabular-nums; }
  .defuse .manual { display: none; max-height: none; transform: none; }
  .defuse.show-manual .manual { display: block; }
  .defuse.show-manual .ied { display: none; }
  .ied { padding: .75rem; gap: .6rem; }
  .ied-clock { font-size: 1.6rem; }
  .ied-wires { gap: .15rem; padding: .2rem; }
  .wire { padding: .45rem 0; }
  .ied-keypad .key { aspect-ratio: 1; font-size: 1.35rem; }
  .ied-button { flex-direction: column; gap: .5rem; }
  .ied-strip { width: 70px; height: 10px; }
  .big-btn { width: 80px; height: 80px; font-size: .74rem; }
}

/* ---------- Tripwire ---------- */
.stage-bar { display: flex; justify-content: center; gap: .6rem; padding: .7rem; background: var(--bg-elev); border-top: 1px solid var(--line); }
.stage-bar .btn { min-width: min(100%, 300px); justify-content: center; }
.stage-bar .btn:disabled { opacity: .45; cursor: default; }
.stage-bar kbd, .drill-bar kbd { margin-left: .5rem; font: 600 .68rem/1 "Barlow Condensed", sans-serif; padding: .18rem .35rem; border: 1px solid currentColor; border-radius: 4px; opacity: .6; }
@media (hover: none) { .stage-bar kbd, .drill-bar kbd { display: none; } .stage-bar .btn { width: 100%; padding-block: .9rem; } }

/* ---------- Mortar Drill ---------- */
.drill-ui { background: var(--bg-elev); border-top: 1px solid var(--line); }
.drill-order { padding: .6rem 1rem 0; font-size: .95rem; color: var(--muted); min-height: 1.6em; }
.drill-order strong { color: var(--text); }
.drill-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .8rem; padding: .6rem 1rem .8rem; }
.dial { display: flex; align-items: flex-end; gap: .3rem; }
.dial .field { flex: 0 1 130px; }
.dial .field input { text-align: center; font-family: "Oswald", sans-serif; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.dial .btn-small { padding: .55rem .55rem; min-width: 2.7rem; justify-content: center; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.dial-slider { flex: 1 1 200px; min-width: 0; accent-color: var(--accent); height: 36px; touch-action: pan-y; }
.drill-fire { min-width: 8rem; justify-content: center; }
.drill-bar :disabled { opacity: .45; cursor: default; }
.drill-card { display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: baseline; padding: .55rem 1rem .7rem; font-size: .8rem; color: var(--muted); background: #0c0f0d; border-top: 1px solid var(--line); }
.drill-card .card-h { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); width: 100%; font-size: .72rem; }
.drill-card span { white-space: nowrap; }
.drill-card b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: .15rem; }
.drill-card small { margin-left: .25rem; opacity: .7; }
@media (max-width: 600px) {
  .dial { width: 100%; }
  .dial .field { flex: 1 1 auto; }
  .dial-slider { flex-basis: 100%; }
  .drill-fire { width: 100%; padding-block: .85rem; }
  .drill-order { font-size: .88rem; }
}

/* ---------- Hold the Line ---------- */
.td-ui { background: var(--bg-elev); border-top: 1px solid var(--line); }
.td-build { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; padding: .55rem .6rem .35rem; }
.td-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .4rem .2rem .35rem;
  font: inherit; color: var(--text); background: #0c0f0d; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: border-color .15s, background .15s, transform .1s;
}
.td-icon { width: 36px; height: 36px; margin-bottom: -.1rem; }
.td-card b { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: .92rem; letter-spacing: .3px; white-space: nowrap; }
.td-card small { font-variant-numeric: tabular-nums; color: var(--accent); font-size: .78rem; }
.td-card kbd { position: absolute; top: .2rem; right: .3rem; font: 600 .6rem/1 "Barlow Condensed", sans-serif; opacity: .45; }
.td-card:hover:not(:disabled) { border-color: rgba(240,162,59,.55); }
.td-card:active:not(:disabled) { transform: scale(.96); }
.td-card.is-armed { border-color: var(--accent); background: rgba(240,162,59,.14); box-shadow: 0 0 0 1px var(--accent) inset; }
.td-card:disabled { opacity: .4; cursor: default; }
.td-card:disabled small { color: var(--muted); }
.td-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; padding: .25rem .8rem .65rem; }
.td-info { flex: 1 1 240px; margin: 0; font-size: .88rem; color: var(--muted); min-height: 1.5em; }
.td-info strong { color: var(--text); }
.td-acts { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.td-acts .btn { touch-action: manipulation; }
.td-acts .btn[hidden] { display: none; }
.td-acts .btn b { font-variant-numeric: tabular-nums; color: var(--accent); margin-left: .2rem; }
.td-acts .btn:disabled { opacity: .45; cursor: default; }
.td-acts kbd { margin-left: .45rem; font: 600 .64rem/1 "Barlow Condensed", sans-serif; padding: .15rem .3rem; border: 1px solid currentColor; border-radius: 4px; opacity: .55; }
.td-speed { min-width: 3.2rem; justify-content: center; font-variant-numeric: tabular-nums; }
.td-cas.is-armed { border-color: #7dd3fc; color: #7dd3fc; }
.td-send { min-width: 11rem; justify-content: center; }
@media (hover: none) { .td-card kbd, .td-acts kbd { display: none; } }
@media (max-width: 600px) {
  .td-build { gap: .2rem; padding: .4rem .35rem .25rem; }
  .td-card { padding: .3rem .1rem .25rem; border-radius: 7px; }
  .td-icon { width: 26px; height: 26px; }
  .td-card b { font-size: .7rem; letter-spacing: 0; }
  .td-card small { font-size: .66rem; }
  .td-acts { width: 100%; }
  .td-acts .btn { flex: 1 1 auto; justify-content: center; padding-block: .7rem; }
  .td-send { flex-basis: 100%; }
  .td-info { font-size: .84rem; }
}

/* ---------- EOD (sweeper) ---------- */
.eod {
  padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: .7rem;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(120,140,70,.14), transparent 70%),
    radial-gradient(500px 260px at 50% 100%, rgba(80,60,30,.18), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px), #0a0c08;
}
.eod-tools { display: flex; flex-wrap: wrap; gap: .5rem .7rem; justify-content: center; align-items: center; width: 100%; }
.eod-levels { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-elev); }
.eod-level { font: 600 .82rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; border: 0; background: none; color: var(--muted); padding: .45rem .8rem; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.eod-level.is-on { background: var(--accent); color: #14120b; }
.eod-flag.is-on, .eod-scan.is-on { background: var(--accent); color: #14120b; border-color: var(--accent); }
.eod-scan b { font-family: "Oswald", sans-serif; margin-left: .2rem; }
.eod-scan[disabled] { opacity: .45; cursor: not-allowed; }
.eod-fuse { position: relative; display: inline-flex; align-items: center; min-width: 150px; height: 34px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); overflow: hidden; }
.eod-fuse i { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(240,162,59,.35), rgba(240,162,59,.15)); transform-origin: left; transition: transform .25s linear; }
.eod-fuse b { position: relative; margin-left: auto; font: 600 1rem/1 "Oswald", sans-serif; font-variant-numeric: tabular-nums; color: var(--text); }
.eod-fuse::before { content: "Fuse"; position: relative; font: 600 .7rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.eod-fuse.is-low i { background: linear-gradient(90deg, rgba(239,68,68,.55), rgba(239,68,68,.25)); }
.eod-fuse.is-low b { color: #fca5a5; animation: firePulse .5s linear infinite; }
.eod-plates { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); }
.eod-plates small { font: 600 .7rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.eod-plates i { width: 13px; height: 16px; border-radius: 3px 3px 6px 6px; background: #292524; border: 1px solid #44403c; }
.eod-plates i.on { background: linear-gradient(180deg, #8a9c52, #5f7036); border-color: #a3b565; box-shadow: 0 0 8px rgba(163,181,101,.35); }

/* The field: a strip of scrubland behind a warning sign. */
.eod-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; display: flex; justify-content: center; padding-bottom: .2rem; }
.eod-field { display: flex; flex-direction: column; align-items: center; gap: .45rem; width: min(100%, calc(var(--cols, 9) * 44px + 26px)); }
.eod-sign {
  display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .8rem; border-radius: 4px;
  background: repeating-linear-gradient(-45deg, #b91c1c 0 10px, #991b1b 10px 20px); color: #fef2f2;
  font: 700 .78rem/1 "Oswald", sans-serif; letter-spacing: 3px; box-shadow: 0 3px 0 #3b0a0a, 0 6px 16px -6px rgba(0,0,0,.8);
  transform: rotate(-1deg);
}
.eod-tri { display: inline-grid; place-items: center; width: 18px; height: 16px; background: #fde047; color: #1c1917; clip-path: polygon(50% 0, 100% 100%, 0 100%); font-size: .7rem; padding-top: 4px; }
.eod-board {
  --cell: minmax(0, 1fr);
  display: grid; grid-template-columns: repeat(var(--cols, 9), var(--cell)); gap: 2px; padding: 8px; border-radius: 6px;
  width: 100%; margin: 0 auto; touch-action: manipulation;
  /* Sandbag edge round a patch of dry ground. */
  background:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,.25) 0 1px, transparent 2px) 0 0 / 11px 11px,
    linear-gradient(180deg, #2b2616, #211d11);
  border: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, #8b7a52 0 26px, #6f613f 26px 30px) 6;
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.9), inset 0 0 30px rgba(0,0,0,.5);
}
.eod.is-big .eod-board { min-width: calc(var(--cols) * 27px); }
.eod-board button {
  --g: 0;
  position: relative; aspect-ratio: 1; border: 0; border-radius: 3px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(.72rem, 2.8vw, 1.15rem); color: var(--text);
  /* Scrub: tufts of dry grass on olive ground. */
  background:
    radial-gradient(circle at calc(30% + var(--g) * 8%) 35%, rgba(190,200,120,.35) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% calc(65% - var(--g) * 6%), rgba(40,50,20,.55) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 25%, rgba(160,175,95,.25) 0 1px, transparent 2px),
    linear-gradient(160deg, hsl(calc(78 + var(--g) * 3) 26% 36%), hsl(calc(80 + var(--g) * 2) 28% 26%));
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.1);
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: filter .12s, transform .08s;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.eod.is-big .eod-board button { font-size: clamp(.7rem, 2.2vw, .98rem); }
@media (hover: hover) { .eod-board button:not(.open):hover { filter: brightness(1.2); } }
.eod.is-scanning .eod-board button:not(.open):hover { filter: brightness(1.2) drop-shadow(0 0 4px #38bdf8); }
.eod.is-scanning .eod-board { cursor: crosshair; outline: 1px dashed rgba(56,189,248,.5); outline-offset: 3px; }
.eod-board button:not(.open):active { transform: scale(.92); }
/* Probed: turned-over dirt. */
.eod-board button.open {
  background:
    radial-gradient(circle at 25% 70%, rgba(0,0,0,.22) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 75% 30%, rgba(255,230,180,.08) 0 1px, transparent 2px),
    linear-gradient(160deg, #5a4a33, #4a3c29);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.45); cursor: default;
}
.eod-board button.reveal { animation: eodReveal .28s var(--ease) backwards; }
@keyframes eodReveal { from { transform: scale(.55); background: #7d8f55; } to { transform: none; } }
.eod-board button.peek { filter: brightness(1.4); }
/* Marker picket: a stake with a red pennant. */
.eod-board button.flag::before { content: ""; position: absolute; left: 44%; top: 18%; width: 2px; height: 64%; background: #e7e5e4; border-radius: 1px; box-shadow: 0 1px 1px rgba(0,0,0,.6); }
.eod-board button.flag::after { content: ""; position: absolute; left: calc(44% + 2px); top: 18%; width: 34%; height: 28%; background: linear-gradient(180deg, #ef4444, #b91c1c); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.eod-board button.flag.found::after { background: repeating-linear-gradient(-45deg, #fde047 0 3px, #1c1917 3px 6px); }
.eod-board button.flag.planted::before, .eod-board button.flag.planted::after { animation: plant .28s var(--ease); }
@keyframes plant { from { transform: translateY(-60%); opacity: 0; } }
.eod-board button.flag.is-right { filter: saturate(.7) brightness(.95); background: linear-gradient(160deg, #3f5a2c, #2f4521); }
/* A mine: TM-62 disc with its fuze. */
.eod-board button.mine { background: linear-gradient(160deg, #4a3c29, #3b2f20); }
.eod-board button.mine::after {
  content: ""; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #1c1917 0 18%, #57603a 19% 30%, #3f4a26 31% 60%, #2b3319 61% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 3px rgba(0,0,0,.6);
}
.eod-board button.mine.boom { background: radial-gradient(circle, #fde047, #ea580c 45%, #7f1d1d 75%); animation: eodBoom .5s ease-out; }
.eod-board button.mine.boom::after { opacity: 0; }
@keyframes eodBoom { 0% { transform: scale(1.7); filter: brightness(2); } 100% { transform: none; } }
/* A mine your plates took: a scorched crater. */
.eod-board button.mine.blown { background: radial-gradient(circle, #0c0a09 0 26%, #292115 42%, #4a3c29 70%); cursor: default; }
.eod-board button.mine.blown::after { width: 40%; background: radial-gradient(circle, rgba(251,146,60,.5), transparent 70%); box-shadow: none; }
.eod-board button.mine.blown.boom { animation: eodBoom .5s ease-out; }
.eod-board button.wrongflag { background: #57534e; }
.eod-board button.wrongflag::after { content: "✕"; color: #fca5a5; }
.eod-board button.win { animation: eodWin .5s var(--ease) backwards; }
@keyframes eodWin { 40% { filter: brightness(1.8); transform: scale(1.08); } }
.eod-board button.swept { animation: eodSweep .6s ease-out var(--sd, 0ms) backwards; }
@keyframes eodSweep { 0% { box-shadow: inset 0 0 0 2px #38bdf8, 0 0 14px #38bdf8; filter: brightness(1.6); } 100% { box-shadow: none; } }
.eod-board .n1 { color: #93c5fd; } .eod-board .n2 { color: #86efac; } .eod-board .n3 { color: #fca5a5; } .eod-board .n4 { color: #d8b4fe; }
.eod-board .n5 { color: #fdba74; } .eod-board .n6 { color: #5eead4; } .eod-board .n7 { color: #fafafa; } .eod-board .n8 { color: #d6d3d1; }
.eod-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; width: min(520px, 100%); }
.eod-pick-btn { display: flex; flex-direction: column; gap: .15rem; align-items: center; padding: .6rem .4rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease); }
.eod-pick-btn strong { font-family: "Oswald", sans-serif; font-size: 1.05rem; }
.eod-pick-btn small { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.eod-pick-btn:hover { border-color: var(--accent); }
.eod-pick-btn:active { transform: scale(.97); }
.eod-pick-btn.is-on { border-color: var(--accent); background: rgba(240,162,59,.12); box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 480px) { .eod-pick { grid-template-columns: 1fr; } .eod-pick-btn { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; text-align: right; padding: .6rem .9rem; } .eod-pick-btn strong { grid-row: span 2; text-align: left; } .eod { padding: .7rem .5rem; } }

/* ---------- Result checker ---------- */
.verify-tool { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.verify-tool .field { width: 100%; }
.verify-tool textarea { width: 100%; font: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; resize: vertical; }
.verify-tool textarea:focus { outline: none; border-color: var(--accent); }
.verify-out { color: var(--muted); min-height: 1.4em; }
.verify-out.is-ok { color: #86efac; }
.verify-out.is-bad { color: #fca5a5; }
.verify-out strong { color: var(--text); }

/* ---------- Leaderboard ---------- */
.lb { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.lb-head h2 { font-size: 1.5rem; }
.lb-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lb-tabs button { font-family: "Barlow Condensed", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: .8rem; border: 0; background: none; color: var(--muted); padding: .3rem .8rem; border-radius: 999px; cursor: pointer; }
.lb-tabs button[aria-selected="true"] { background: var(--accent); color: #14120b; }
.lb-list, .lb-mini ol { list-style: none; display: flex; flex-direction: column; }
.lb-list li, .lb-mini li { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; border-top: 1px solid var(--line); min-width: 0; }
.lb-list li:first-child, .lb-mini li:first-child { border-top: 0; }
.lb-list li.is-me { background: rgba(240,162,59,.08); border-radius: 6px; }
.lb-rank { width: 1.6rem; text-align: center; font-family: "Oswald", sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-list li:nth-child(1) .lb-rank, .lb-mini li:nth-child(1) .lb-rank { color: #f5c542; }
.lb-list li:nth-child(2) .lb-rank, .lb-mini li:nth-child(2) .lb-rank { color: #cbd5e1; }
.lb-list li:nth-child(3) .lb-rank, .lb-mini li:nth-child(3) .lb-rank { color: #c47a3a; }
.lb-list img, .lb-mini img, .lb-av { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: var(--surface-2); }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-family: "Oswald", sans-serif; font-variant-numeric: tabular-nums; color: var(--accent); }
.lb-empty { color: var(--muted); font-size: .9rem; justify-content: center; }
.lb-foot { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.lb-foot strong { color: var(--text); }
.lb-link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.lb-err { color: #fca5a5; }
.lb-line { display: block; margin-top: .9rem; color: var(--text); }
.lb-line strong { color: var(--accent); font-size: 1.15em; }
.lb-hub { margin-top: 2.8rem; }
.lb-hub .kit-lead { margin: -.4rem 0 1rem; }
.lb-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 900px) { .lb-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lb-hub-grid { grid-template-columns: 1fr; } }
.lb-hub-status { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 12px; border: 1px solid rgba(252,165,165,.35); background: rgba(127,29,29,.15); color: var(--muted); font-size: .9rem; }
.lb-mini h3 span { margin-right: .45rem; }
.lb-mini li.lb-skel { padding: 0; border: 0; }
.lb-skel { height: 1.9em; border-radius: 8px; margin: .25rem 0; background: linear-gradient(90deg, var(--bg-elev) 30%, #1a1914 50%, var(--bg-elev) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; list-style: none; }
.lb-mini { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; transition: border-color .2s var(--ease); }
.lb-mini:hover { border-color: var(--accent); }
.lb-mini h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.lb-mini li { font-size: .9rem; }
.live-range { display: inline-block; margin-left: .3rem; padding: .05rem .5rem; border-radius: 999px; background: rgba(253,230,138,.12); color: #fde68a; font-size: .85em; white-space: nowrap; }
.live-range strong { color: #fde68a; font-variant-numeric: tabular-nums; }
/* The live line grows from "Checking…" to a sentence; keep room for two lines where it wraps. */
@media (max-width: 900px) { .live-panel-text { min-height: 3.1em; } }
/* The status sentence wraps inside its column instead of pushing the Join button to a new row. */
.live-panel-main { flex: 1 1 260px; min-width: 0; }
.live-panel > .btn { flex-shrink: 0; }

/* ---------- Daily orders (hub) ---------- */
.orders { margin-bottom: 1.6rem; padding: 1rem 1.2rem 1.1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); animation: ovCard .5s var(--ease); }
.orders-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-bottom: .7rem; }
.orders-head h2 { font-size: 1.4rem; }
.orders-streak { font: 600 .9rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.orders-reset { margin-left: auto; color: var(--muted); font-size: .82rem; }
.orders-list { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.order { display: flex; align-items: center; gap: .8rem; padding: .55rem .7rem; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); transition: border-color .3s var(--ease); }
.order:hover { border-color: rgba(240,162,59,.45); }
.order-icon { font-size: 1.5rem; width: 2rem; text-align: center; flex-shrink: 0; }
.order-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 .6rem; align-items: baseline; }
.order-text strong { font-family: "Oswald", sans-serif; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .5px; }
.order-text span { color: var(--muted); font-size: .9rem; }
.order .medal { font-size: .78rem; padding: .15rem .6rem .15rem .25rem; }
.order .medal i { width: 16px; height: 16px; }
.order-go { flex-shrink: 0; padding: .45rem .9rem; font-size: .9rem; }
.order-check { flex-shrink: 0; font: 600 .9rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #86efac; padding: .45rem .3rem; }
.order.is-done { border-color: rgba(134,239,172,.35); background: linear-gradient(90deg, rgba(134,239,172,.07), transparent 60%), var(--bg-elev); }
.order.is-done .order-text strong { text-decoration: line-through; text-decoration-color: rgba(134,239,172,.6); }
@media (max-width: 520px) { .order .medal { display: none; } .orders-reset { margin-left: 0; width: 100%; } }
/* Game start screen: today's order for this game */
.ov-order { font-size: .92rem; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; }
.ov-order strong { color: var(--text); }
.ov-order .medal { font-size: .72rem; padding: .1rem .55rem .1rem .22rem; }
.ov-order .medal i { width: 14px; height: 14px; }
.ov-order.is-done b { color: #86efac; font: 600 .8rem/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.ov-ach-chip.is-order { background: rgba(134,239,172,.1); border-color: rgba(134,239,172,.45); color: #d1fae5; }
/* Placeholder order rows while the day's orders are worked out. */
.order.is-skel { min-height: 50px; background: linear-gradient(90deg, var(--bg-elev) 30%, #1a1914 50%, var(--bg-elev) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }
.orders-reset { min-height: 1.2em; }
/* Orders: name over target on every screen, so each row is the same height. */
.order { min-height: 68px; }
.order-text { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.order-text strong, .order-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order.is-skel { min-height: 68px; }
@media (max-width: 520px) {
  .orders { padding: .9rem .9rem 1rem; }
  .order { gap: .6rem; padding: .5rem .6rem; }
  .order-icon { font-size: 1.3rem; width: 1.6rem; }
  .service-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
  .service-medals { grid-column: 1 / -1; order: 3; }
  .service-medals .medal { font-size: .85rem; }
}

/* ---------- First-run hints ---------- */
.game-hint {
  position: absolute; left: 50%; top: 4.4rem; z-index: 7; max-width: min(92%, 440px); pointer-events: none;
  display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: 999px; text-align: left;
  font-size: .92rem; line-height: 1.3; color: var(--text); background: rgba(12,12,9,.9); border: 1px solid rgba(244,230,199,.35);
  box-shadow: 0 10px 26px rgba(0,0,0,.5); opacity: 0; transform: translate(-50%, -8px); transition: opacity .3s ease, transform .3s var(--ease);
}
.game-hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.game-hint strong { color: var(--accent); }
@media (max-width: 520px) { .game-hint { top: 3.6rem; font-size: .84rem; border-radius: 14px; } }

/* The start / game-over buttons stay in reach even when the card is taller
   than the stage (small phones): they stick to the bottom of the overlay. */
.game-overlay .game-actions {
  position: sticky; bottom: calc(-1 * clamp(.8rem, 3vw, 1.6rem)); z-index: 1;
  padding: .6rem .4rem clamp(.8rem, 3vw, 1.6rem); margin-bottom: calc(-1 * clamp(.8rem, 3vw, 1.6rem));
  background: linear-gradient(180deg, rgba(5,8,6,0), rgba(5,8,6,.92) 35%);
}
@media (max-width: 520px), (max-height: 700px) {
  .ov-card { gap: .5rem; }
  .game-overlay h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .ov-text { font-size: .86rem; line-height: 1.45; }
  .ov-medals .medal { font-size: .74rem; padding: .15rem .55rem .15rem .25rem; }
  .ov-medals .medal i { width: 15px; height: 15px; }
  .paint { width: 30px; height: 30px; }
  .garage { gap: .3rem; }
}
/* A portrait stage is phone-shaped even on a laptop: use the compact card there too. */
.game-stage.is-portrait .ov-card { gap: .45rem; }
.game-stage.is-portrait .game-overlay h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.game-stage.is-portrait .ov-text { font-size: .85rem; line-height: 1.45; }
.game-stage.is-portrait .ov-medals .medal { font-size: .72rem; padding: .12rem .5rem .12rem .22rem; }
.game-stage.is-portrait .ov-medals .medal i { width: 14px; height: 14px; }
.game-stage.is-portrait .ov-meta, .game-stage.is-portrait .ov-order { font-size: .82rem; }
.game-stage.is-portrait .paint { width: 28px; height: 28px; }
.game-stage.is-portrait .garage-label, .game-stage.is-portrait .garage-hint { font-size: .72rem; }
.game-stage.is-portrait .kit-label { font-size: .72rem; }
/* Unlinked players on the boards: there, but plainly not a Discord name. */
.lb-list li.is-guest .lb-name, .lb-mini li.is-guest .lb-name { color: var(--muted); font-style: italic; }
.lb-list li.is-guest img, .lb-mini li.is-guest img { filter: grayscale(1); opacity: .7; }
