/* MARKAS — base, layout, components. Skin tokens live in theme-pubgm.css / theme-mlbb.css.
   Default tokens below = PUBGM so the page is correct even before a theme file loads. */

:root {
  --bg: #111310;
  --bg-2: #1a1d17;
  --panel: rgba(20, 23, 17, 0.9);
  --panel-solid: #151812;
  --panel-2: #1d2119;
  --panel-3: #262a20;
  --line: rgba(184, 167, 122, 0.2);
  --line-strong: rgba(184, 167, 122, 0.45);
  --ink: #ece9df;
  --ink-2: #cfcab8;
  --muted: #a09c88;
  --khaki: #b8a77a;
  --accent: #f2a900;
  --accent-2: #ffc63b;
  --accent-ink: #14120b;
  --accent-soft: rgba(242, 169, 0, 0.14);
  --danger: #c0392b;
  --danger-ink: #ff8b7b;
  --warn: #f0a42b;
  --warn-bg: rgba(240, 164, 43, 0.16);
  --ok: #8cc56f;
  --info: #7aa7ff;
  --chart-grid: rgba(236, 233, 223, 0.09);
  --chart-surface: #151812;
  --font-display: 'Teko', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-data: 'Share Tech Mono', ui-monospace, 'Consolas', monospace;
  --r: 2px;
  --gutter: clamp(16px, 3vw, 32px);
  --maxw: 1240px;
  --top-h: 96px;
  --focus: #ffffff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* NOTE: never set a global `img { display:block }` — html2canvas measures font baselines with an
   inline <img>; a block img shifts every glyph down in the PNG export. Block-ify images per component. */
svg, canvas { display: block; max-width: 100%; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
[hidden] { display: none !important; }
.ic { flex: none; }
.mono { font-family: var(--font-data); letter-spacing: 0.04em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1[tabindex='-1']:focus, main:focus { outline: none; }

/* ---------- background layers ---------- */
.bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.bg-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0, transparent 140px);
}
.app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- top HUD ---------- */
.hud-top { position: sticky; top: 0; z-index: 30; }
.compass-wrap {
  position: relative; height: 34px; display: flex; justify-content: center; align-items: flex-end;
  pointer-events: none;
}
.compass { position: relative; width: min(600px, 86vw); height: 32px; }
.compass canvas { width: 100%; height: 100%; }
.compass__read {
  position: absolute; left: 50%; top: 32px; transform: translateX(-50%);
  font-family: var(--font-data); font-size: 11px; color: var(--accent-ink); background: var(--accent);
  padding: 0 5px; line-height: 15px; letter-spacing: 0.08em;
}
.crest { display: none; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter);
  min-height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand .logo-mark { color: var(--ink); }
.brand__name { font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: 0.08em; font-weight: 600; padding-top: 4px; }
.brand__tag { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; display: block; }

.game-switch { display: inline-flex; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.35); padding: 3px; gap: 3px; }
.game-switch button {
  appearance: none; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.08em; line-height: 1; padding: 8px 14px 5px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
}
.game-switch button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }
.game-switch button:not([aria-pressed='true']):hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.game-switch button:focus-visible { outline-offset: -3px; outline-color: var(--focus); }

.user-menu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; min-height: 44px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); cursor: pointer; color: var(--ink);
}
.user-btn:hover { border-color: var(--line-strong); }
.avatar {
  width: 34px; height: 34px; background: var(--panel-3); display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-display); font-size: 20px; color: var(--accent); flex: none;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.user-btn__team { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.user-btn__team b { font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: 0.04em; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn__team small { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; z-index: 40;
  background: var(--panel-solid); border: 1px solid var(--line-strong); padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.menu__head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu__head b { display: block; font-size: 17px; }
.menu__head span { font-family: var(--font-data); font-size: 12px; color: var(--muted); word-break: break-all; }
.menu button {
  width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: none; border: 0;
  color: var(--ink); cursor: pointer; text-align: left; font-size: 17px; min-height: 44px;
}
.menu button:hover, .menu button:focus-visible { background: var(--accent-soft); color: var(--accent-2); outline-offset: -2px; }

/* ---------- stepper ---------- */
.stepper {
  display: flex; gap: 0; max-width: var(--maxw); margin: 6px auto 0; padding: 0 var(--gutter);
  width: 100%;
}
.stepper button {
  flex: 1; appearance: none; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-right-width: 0;
  color: var(--muted); padding: 10px 14px 8px; cursor: pointer; text-align: left;
  display: flex; align-items: baseline; gap: 10px; min-height: 48px; position: relative;
}
.stepper button:last-child { border-right-width: 1px; }
.stepper__n { font-family: var(--font-data); font-size: 13px; }
.stepper__t { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.06em; line-height: 1; }
.stepper__c { margin-left: auto; font-family: var(--font-data); font-size: 12px; }
.stepper button[aria-current='step'] { color: var(--ink); background: var(--panel); }
.stepper button[aria-current='step']::after {
  content: ''; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 3px; background: var(--accent);
}
.stepper button:disabled { cursor: not-allowed; opacity: 0.5; }
.stepper button:not(:disabled):not([aria-current='step']):hover { color: var(--ink); }
.stepper button:focus-visible { outline-offset: -3px; }

/* ---------- main + views ---------- */
main { flex: 1; width: 100%; }
.view { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 24px var(--gutter) 64px; animation: view-in 0.35s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-family: var(--font-data); font-size: 13px; letter-spacing: 0.14em; color: var(--accent);
  text-transform: uppercase; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; }
.view-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 6vw, 64px); line-height: 0.9; margin: 0; letter-spacing: 0.02em; text-transform: uppercase; }
.view-lede { color: var(--ink-2); max-width: 62ch; margin: 10px 0 0; font-size: 19px; }
.view-head { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }

/* ---------- panels + HUD corner brackets ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: clamp(16px, 2.4vw, 26px);
}
.bracket { position: absolute; width: 14px; height: 14px; pointer-events: none; border-color: var(--accent); border-style: solid; border-width: 0; transition: transform 0.2s ease; }
.bracket--tl { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.bracket--tr { right: -1px; top: -1px; border-right-width: 2px; border-top-width: 2px; }
.bracket--bl { left: -1px; bottom: -1px; border-left-width: 2px; border-bottom-width: 2px; }
.bracket--br { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.hover-lock:hover .bracket--tl { transform: translate(4px, 4px); }
.hover-lock:hover .bracket--tr { transform: translate(-4px, 4px); }
.hover-lock:hover .bracket--bl { transform: translate(4px, -4px); }
.hover-lock:hover .bracket--br { transform: translate(-4px, -4px); }

/* ---------- buttons ---------- */
.btn {
  --notch: 10px;
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1; padding: 12px 20px 9px; min-height: 46px;
  background: var(--panel-3); color: var(--ink);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: #33382b; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -5px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-2); }
.btn--primary:focus-visible { outline-color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn--danger { background: transparent; color: var(--danger-ink); box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.6); }
.btn--danger:hover { background: rgba(192, 57, 43, 0.18); }
.btn--xl { font-size: 28px; padding: 16px 26px 12px; min-height: 60px; --notch: 14px; }
.btn--sm { font-size: 18px; padding: 8px 12px 6px; min-height: 38px; --notch: 7px; }
.btn .ic { margin-top: -3px; }
.iconbtn {
  appearance: none; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--ink-2);
  width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.iconbtn:hover { color: var(--ink); border-color: var(--line-strong); }
.iconbtn--danger:hover { color: var(--danger-ink); border-color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-data); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line-strong); color: var(--ink-2);
  white-space: nowrap;
}
.chip--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.chip--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 60%, transparent); background: var(--warn-bg); }
.chip--err { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger) 70%, transparent); background: rgba(192, 57, 43, 0.14); }
.chip--dup { color: var(--info); border-color: color-mix(in srgb, var(--info) 55%, transparent); }
.chip--busy { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.chip--idle { color: var(--muted); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field__lbl { font-family: var(--font-data); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.field__hint { font-size: 15px; color: var(--muted); }
.field__err { font-size: 15px; color: var(--danger-ink); min-height: 1em; }
.input {
  width: 100%; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-strong); color: var(--ink);
  padding: 12px 14px; font-size: 20px; min-height: 48px; border-radius: 0;
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
/* no text-transform: the field shows exactly what is saved (the report title uppercases it) */
.input--big { font-family: var(--font-display); font-size: 34px; letter-spacing: 0.04em; padding: 12px 14px 6px; }
.input[aria-invalid='true'] { border-color: var(--danger); }
#onb-tag, #set-tag { text-transform: uppercase; font-family: var(--font-data); letter-spacing: 0.12em; }
.check {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; cursor: pointer;
  padding: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25);
}
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.check span { font-size: 17px; color: var(--ink-2); }
.check b { color: var(--ink); font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 17px; }
.switch input { appearance: none; width: 44px; height: 24px; background: var(--panel-3); border: 1px solid var(--line-strong); position: relative; cursor: pointer; margin: 0; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--muted); transition: transform 0.15s ease, background 0.15s ease; }
.switch input:checked { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.note {
  display: flex; gap: 12px; padding: 12px 14px; border-left: 3px solid var(--khaki); background: rgba(0, 0, 0, 0.3);
  color: var(--ink-2); font-size: 15.5px; line-height: 1.45;
}
.note .ic { color: var(--khaki); margin-top: 2px; }
.note--warn { border-left-color: var(--warn); }
.note--warn .ic { color: var(--warn); }

/* ---------- boot ---------- */
.boot { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.boot__ring { width: 84px; height: 84px; margin: 0 auto 14px; color: var(--accent); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot__txt { font-family: var(--font-data); letter-spacing: 0.14em; color: var(--muted); font-size: 13px; }

/* ================= LANDING ================= */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-top: clamp(8px, 3vw, 36px); }
.hero__copy { container-type: inline-size; min-width: 0; }
.hero__title {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; margin: 0;
  font-size: clamp(40px, 14.2cqi, 124px); line-height: 0.84; letter-spacing: 0.01em;
}
.hero__title span { display: block; white-space: nowrap; }
.hero__title .hl { color: var(--accent); }
.hero__lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 54ch; margin: 18px 0 0; }
/* body copy sits on the animated map: a soft shadow keeps it readable over zone lines */
.hero__lede, .view-lede { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.6); }
.hero__lede b { color: var(--ink); }
.pick-label { font-family: var(--font-data); font-size: 12px; color: var(--muted); letter-spacing: 0.14em; margin: 26px 0 8px; }
.game-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; }
.game-card {
  position: relative; appearance: none; text-align: left; cursor: crosshair; padding: 14px 16px 12px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); color: var(--ink-2); min-height: 92px;
  display: grid; gap: 2px; transition: border-color 0.15s ease, background 0.15s ease;
}
.game-card b { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: 0.05em; color: var(--ink); }
.game-card small { font-size: 15px; }
.game-card .gc-code { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.12em; }
.game-card .bracket { opacity: 0; }
.game-card:hover .bracket, .game-card[aria-pressed='true'] .bracket { opacity: 1; }
.game-card[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.game-card[aria-pressed='true'] .gc-code { color: var(--accent); }
.game-card:focus-visible { outline-offset: 3px; }
.cta { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.demo-note { font-family: var(--font-data); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; display: flex; gap: 8px; align-items: center; max-width: 520px; line-height: 1.5; margin: 0; }
.demo-note .ic { color: var(--warn); }
.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); counter-reset: s; }
.steps li { padding: 14px 12px 0 0; position: relative; }
.steps li::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.steps__n { font-family: var(--font-data); font-size: 12px; color: var(--accent); display: block; letter-spacing: 0.1em; }
.steps b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.05; letter-spacing: 0.03em; text-transform: uppercase; margin-top: 4px; }
.steps span:last-child { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }

.preview { position: relative; }
.preview__frame { position: relative; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.35); padding: 10px; transform: rotate(0.6deg); }
.preview__label {
  position: absolute; z-index: 3; top: -13px; left: 18px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.12em; padding: 3px 10px 0; line-height: 1.2;
}
.preview__cap { margin: 10px 2px 0; font-family: var(--font-data); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.feed { margin-top: 16px; display: grid; gap: 6px; }
.feed__row {
  display: flex; align-items: center; gap: 10px; font-size: 16px; padding: 6px 10px; background: rgba(0, 0, 0, 0.5);
  border-left: 2px solid var(--accent); width: fit-content; max-width: 100%; animation: feed-in 0.5s ease both;
}
.feed__row .ic { color: var(--accent); }
.feed__row b { font-weight: 700; }
.feed__row span { color: var(--ink-2); font-family: var(--font-data); font-size: 13px; }
@keyframes feed-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ================= ONBOARDING ================= */
.onb { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.onb__form { display: grid; gap: 4px; }
.onb__row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; }
.onb__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.tag-card { position: sticky; top: 120px; }
.tag-card__plate {
  padding: 22px; background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #2a2e24, #171a14);
  border: 1px solid var(--line-strong); position: relative; overflow: hidden;
}
.tag-card__k { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.tag-card__title { font-family: var(--font-display); font-size: 26px; color: var(--khaki); letter-spacing: 0.06em; line-height: 1; margin-top: 12px; }
.tag-card__team { font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 5vw, 64px); line-height: 0.9; text-transform: uppercase; word-break: break-word; }
.tag-card__tag { display: inline-block; margin-top: 10px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-size: 22px; padding: 3px 10px 0; letter-spacing: 0.1em; }
.tag-card__meta { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--font-data); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.tag-card__meta b { display: block; color: var(--ink); font-weight: 400; font-size: 14px; }
.privacy { margin-top: 16px; font-size: 15px; color: var(--muted); }
.privacy h3 { font-family: var(--font-data); font-weight: 400; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-2); margin: 0 0 6px; text-transform: uppercase; }
.privacy ul { margin: 0; padding-left: 18px; }

/* ================= HQ / UPLOAD ================= */
.hq-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.drop {
  position: relative; min-height: 300px; border: 1px dashed var(--line-strong); background: rgba(0, 0, 0, 0.42);
  display: grid; place-items: center; text-align: center; padding: 28px 20px; cursor: crosshair; overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: rgba(0, 0, 0, 0.55); }
.drop.is-over { background: var(--accent-soft); }
.drop:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop__reticle { width: 132px; height: 132px; color: var(--accent); margin: 0 auto 8px; transition: transform 0.6s ease; }
.drop:hover .drop__reticle, .drop.is-over .drop__reticle { transform: rotate(45deg) scale(1.06); }
.drop__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.drop__sub { color: var(--ink-2); margin: 8px 0 0; font-size: 18px; }
.drop__sub kbd { font-family: var(--font-data); font-size: 13px; border: 1px solid var(--line-strong); padding: 1px 5px; background: rgba(255, 255, 255, 0.05); }
.drop__meta { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; gap: 12px; }
.drop__meta span:last-child { text-align: right; }
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } }
.drop input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.side { display: grid; gap: 14px; align-content: start; }
.side h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 6px; line-height: 1; }
.side p { margin: 0; color: var(--ink-2); font-size: 16px; }
.tips { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tips li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 16px; color: var(--ink-2); }
.tips .ic { color: var(--accent); margin-top: 3px; }

.queue { margin-top: 22px; }
.queue__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.queue__head h2 { font-family: var(--font-display); font-weight: 500; font-size: 30px; letter-spacing: 0.04em; margin: 0; line-height: 1; text-transform: uppercase; }
.queue__counts { display: flex; gap: 6px; flex-wrap: wrap; }
.queue__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.qitem { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); }
.qitem.is-err { border-color: rgba(192, 57, 43, 0.6); }
.qitem.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.qitem__thumb { display: block; width: 96px; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: 1px solid var(--line); }
.qitem__body { min-width: 0; display: grid; gap: 6px; align-content: start; }
.qitem__name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.qitem__row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.qitem__lbl { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; background: rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width 0.25s ease; }
.qitem.is-busy .bar > i { background-image: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.qitem__x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; }

.history { margin-top: 30px; }
.history h2 { font-family: var(--font-display); font-weight: 500; font-size: 30px; letter-spacing: 0.04em; margin: 0 0 10px; line-height: 1; text-transform: uppercase; display: flex; gap: 10px; align-items: center; }
.hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); }
.hitem__game { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.08em; padding: 3px 8px 0; background: var(--panel-3); line-height: 1.2; }
.hitem__game.is-mlbb { color: #3bd6f5; }
.hitem__game.is-pubgm { color: var(--accent); }
.hitem__t { min-width: 0; }
.hitem__t b { display: block; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hitem__t span { font-family: var(--font-data); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.hitem__a { display: flex; gap: 6px; }
.empty { padding: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 16px; text-align: center; }

/* ================= REVIEW ================= */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line-strong); }
.legend i.low { background: var(--warn-bg); border-color: var(--warn); }
/* minmax(0,1fr) + min-width:0 keep the wide stat table inside its own scroller on phones */
.rlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.mcard { position: relative; min-width: 0; background: var(--panel); border: 1px solid var(--line); }
.mcard.is-dup { opacity: 0.62; border-style: dashed; }
.mcard__head { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 16px; padding: 14px; border-bottom: 1px solid var(--line); align-items: start; }
.mcard__thumb { width: 180px; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: 1px solid var(--line); cursor: zoom-in; padding: 0; }
.mcard__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mcard__thumb--none {
  display: grid; place-items: center; align-content: center; gap: 6px; cursor: default;
  color: var(--accent); font-family: var(--font-data); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 12px), rgba(0, 0, 0, 0.45);
  border-style: dashed; border-color: var(--line-strong);
}
.mcard__thumb--none span { color: var(--ink-2); }
.mcard__title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mcard__title h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: 0.04em; }
.mcard__file { font-family: var(--font-data); font-size: 12px; color: var(--muted); word-break: break-all; }
.mcard__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mcard__warn { margin: 8px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--warn); display: grid; gap: 2px; }
.mcard__warn li { display: flex; gap: 6px; align-items: flex-start; }
.mcard__warn li .ic { margin-top: 3px; }
.mcard__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.mfield { display: grid; gap: 3px; flex: 0 1 110px; min-width: 90px; }
.mfield--text { flex: 1 1 150px; }
.mfield--mode { flex: 2 1 260px; }
.mfield span { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.mcard__acts { display: flex; gap: 6px; }
.cell-in {
  width: 100%; min-width: 0; background: rgba(0, 0, 0, 0.35); border: 1px solid transparent; color: var(--ink);
  font-family: var(--font-data); font-size: 15px; padding: 7px 8px; min-height: 36px; border-radius: 0;
}
.cell-in:hover { border-color: var(--line); }
.cell-in:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: rgba(0, 0, 0, 0.6); }
.cell-in.is-low { background: var(--warn-bg); border-color: var(--warn); color: #ffe2b0; }
.cell-in.is-num { text-align: right; }
.cell-in--name { font-family: var(--font-body); font-size: 17px; font-weight: 600; }
select.cell-in { appearance: none; padding-right: 22px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.mtable { width: 100%; border-collapse: collapse; }
.mtable th { font-family: var(--font-data); font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-align: left; padding: 8px 4px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.mtable th.num { text-align: right; }
.mtable td { padding: 3px 2px; }
.mtable td:first-child, .mtable th:first-child { padding-left: 14px; }
.mtable td:last-child, .mtable th:last-child { padding-right: 14px; }
.mtable .w-name { min-width: 150px; }
.mtable .w-num { min-width: 72px; }
.mtable .w-txt { min-width: 190px; } /* fits "Demolitions Expert" without clipping */
.mcard__foot { display: flex; gap: 8px; padding: 10px 14px 14px; flex-wrap: wrap; }
.review-bar {
  position: sticky; bottom: 0; z-index: 10; margin-top: 18px; padding: 12px var(--gutter);
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.9)); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center;
}
.review-bar__info { margin-right: auto; font-family: var(--font-data); font-size: 12px; color: var(--ink-2); letter-spacing: 0.06em; }

.lightbox { border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--ink); padding: 0; max-width: min(1100px, 94vw); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox img { display: block; width: 100%; height: auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-family: var(--font-data); font-size: 12px; color: var(--muted); gap: 10px; }

/* ================= RESULTS page chrome ================= */
.results-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.results-bar__sp { margin-right: auto; }
.results-empty { text-align: center; padding: 60px 20px; }
.results-empty h2 { font-family: var(--font-display); font-weight: 500; font-size: 40px; margin: 0 0 6px; text-transform: uppercase; }

/* ================= REPORT (broadcast graphic) ================= */
.report {
  --rp-bg: #10120e;
  position: relative; background-color: var(--rp-bg); color: var(--ink);
  border: 1px solid var(--line-strong); padding: clamp(16px, 2.6vw, 34px);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M64 0H0v64' fill='none' stroke='%23ece9df' stroke-opacity='.045'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 85% 0%, rgba(242, 169, 0, 0.12), transparent 55%),
    linear-gradient(180deg, #171a14, #0f110d);
  overflow: hidden;
}
.report > * { position: relative; }
.rp-head { position: relative; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.rp-head > .bracket { display: none; }
.rp-hud { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.rp-hud__dots { flex: 1; min-width: 40px; height: 1px; background-image: linear-gradient(90deg, var(--line-strong) 50%, transparent 50%); background-size: 6px 1px; }
.rp-head__row { display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; }
.rp-head__title { min-width: 0; flex: 1 1 420px; }
.rp-title { margin: 0; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; line-height: 0.86; }
.rp-title__kicker { display: block; font-size: clamp(24px, 3vw, 36px); color: var(--khaki); letter-spacing: 0.12em; font-weight: 500; }
.rp-title__team { display: block; font-size: clamp(64px, 10vw, 136px); color: var(--ink); letter-spacing: 0.01em; word-break: break-word; }
.rp-sub { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rp-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-data); font-size: 13px; letter-spacing: 0.08em; padding: 4px 9px; border: 1px solid var(--line-strong); color: var(--ink-2); text-transform: uppercase; }
.rp-chip--date { color: var(--ink); border-color: var(--ink-2); text-transform: none; font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 10px; }
.rp-chip--game { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.rp-banner { text-align: right; flex: 0 1 auto; }
.rp-banner__place { font-family: var(--font-display); font-weight: 600; line-height: 0.75; display: flex; align-items: flex-end; justify-content: flex-end; }
.rp-banner__hash { font-size: clamp(56px, 7vw, 96px); color: var(--accent); }
.rp-banner__num { font-size: clamp(110px, 14vw, 190px); color: var(--accent); letter-spacing: -0.02em; }
.rp-banner__of { font-size: clamp(40px, 5vw, 64px); color: var(--ink); margin-left: 6px; padding-bottom: 0.1em; }
.rp-banner__lbl { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.18em; color: var(--muted); margin-top: 12px; }
.rp-banner__msg { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); color: var(--accent-2); line-height: 1; margin-top: 4px; }

.rp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 22px; }
.rp-tile { position: relative; background: var(--rp-bg); padding: 14px 16px 12px; min-width: 0; }
.rp-tile > .bracket { display: none; }
.rp-tile--wide { grid-column: span 2; }
.rp-tile::before { content: ''; position: absolute; left: 0; top: 14px; width: 3px; height: 22px; background: var(--accent); }
.rp-tile__lbl { display: flex; align-items: center; gap: 6px; font-family: var(--font-data); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.rp-tile__val { font-family: var(--font-display); font-weight: 500; font-size: clamp(38px, 4vw, 52px); line-height: 1; margin-top: 8px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-tile__sub { font-size: 15px; color: var(--ink-2); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }

.rp-section { margin-top: 30px; }
.rp-shead { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.rp-shead__t { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 30px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.rp-shead__line { flex: 1; height: 1px; background: var(--line); }
.rp-shead__code { font-size: 12px; color: var(--accent); letter-spacing: 0.12em; white-space: nowrap; }

.rp-awards { container-type: inline-size; }
.rp-awards__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; }
/* Even rows (no orphan card): 6 -> 6 / 3 / 2 columns, 5 -> 5 / 3 / 2, 4 -> 4 / 2. */
.rp-awards__row--n4, .rp-awards__row--n5, .rp-awards__row--n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 560px) {
  .rp-awards__row--n5, .rp-awards__row--n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 760px) {
  .rp-awards__row--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (min-width: 960px) {
  .rp-awards__row--n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@container (min-width: 1120px) {
  .rp-awards__row--n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.award { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-content: start; gap: 12px; padding: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); container-type: inline-size; }
@container (max-width: 200px) {
  .award__body { grid-column: 1 / -1; }
}
.award .bracket { border-color: var(--pc); opacity: 0.9; }
.award__ic { width: 48px; height: 48px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong); color: var(--accent); }
.award--top .award__ic { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.award__title { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
/* long IGNs ("TCSWannYT_official") wrap to 2 lines and shrink with the card instead of "TCSWannY…" */
.award__player {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 14cqi, 28px); line-height: 1.02; margin-top: 3px;
  white-space: normal; overflow-wrap: anywhere; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.award__val { font-size: 15px; color: var(--ink-2); margin-top: 3px; }
.award__val b { color: var(--ink); font-family: var(--font-data); font-weight: 400; }

.rp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rp-cards--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-cards--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-cards--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rp-cards--n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* 5 players on a tablet: 3 + 2 (the last two share the row) instead of 2 + 2 + 1 orphan */
@media (min-width: 641px) and (max-width: 1100px) {
  .rp-cards--n5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rp-cards--n5 > * { grid-column: span 2; }
  .rp-cards--n5 > :nth-child(n + 4) { grid-column: span 3; }
}
@media (min-width: 641px) and (max-width: 860px) {
  .rp-cards--n3, .rp-cards--n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report:not(.report--mini) .rp-cards--n3 > :last-child { grid-column: 1 / -1; }
}
.pc { position: relative; padding: 14px 16px 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-top: 3px solid var(--pc); display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
@container (max-width: 250px) {
  .pc__name { font-size: 28px; }
  .pc__hero { flex-wrap: wrap; row-gap: 4px; }
  .pc__hero-val { font-size: 52px; }
  .pc__stats div { padding: 5px 5px; }
  .pc__stats dd { font-size: 20px; }
  body[data-game='mlbb'] .pc__stats dd { font-size: 17px; }
  .pc .pc__spark .spark { width: 100%; flex: 1 1 auto; }
  .pc__spark-lbl { display: none; }
}
.pc > .bracket { display: none; }
.pc--mvp { background: linear-gradient(180deg, rgba(242, 169, 0, 0.1), rgba(255, 255, 255, 0.02) 60%); border-color: rgba(242, 169, 0, 0.45); border-top-color: var(--pc); }
.pc__top { display: flex; align-items: center; gap: 8px; }
.pc__rank { font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1px var(--ink-2); padding-top: 4px; }
.pc--mvp .pc__rank { -webkit-text-stroke: 1px var(--accent); }
.pc__crown { display: inline-flex; gap: 4px; align-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-size: 17px; letter-spacing: 0.1em; padding: 2px 7px 0; line-height: 1.2; }
.pc__swatch { width: 10px; height: 10px; background: var(--pc); margin-left: auto; }
.pc__name { font-family: var(--font-display); font-weight: 500; font-size: 34px; line-height: 1; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__title { align-self: flex-start; margin-top: 6px; font-size: 14px; font-weight: 600; color: #1d1d1d; padding: 1px 10px; background: linear-gradient(90deg, #8a8a8a, #e6e6e6 22%, #d4d4d4 80%, #a9a9a9); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__medals { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pc__hero { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 12px; }
.pc__hero-val { font-family: var(--font-display); font-weight: 600; font-size: 64px; line-height: 0.8; color: var(--ink); }
.pc--mvp .pc__hero-val { color: var(--accent); }
.pc__hero-lbl { font-family: var(--font-data); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
/* Kill is 1-2 digits; damage ("1,737") and time ("18.5m") need the room */
.pc__stats { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.1fr) minmax(0, 1.1fr); gap: 1px; margin: 12px 0 0; background: var(--line); border: 1px solid var(--line); }
.pc__stats div { background: var(--rp-bg); padding: 6px 8px; min-width: 0; }
.pc__stats dt { font-family: var(--font-data); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.pc__stats dd { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1; padding-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__stats dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__spark { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; }
.pc__spark-lbl { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.spark { width: 120px; height: 30px; overflow: visible; }
.pc__spark .spark { flex: 0 1 120px; min-width: 0; }
.spark__base { stroke: var(--line-strong); stroke-width: 1; }
.pc__foot { font-size: 10.5px; color: var(--muted); margin-top: 6px; letter-spacing: 0.12em; }

.rp-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rp-tools__hint { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); padding: 2px; gap: 2px; background: rgba(0, 0, 0, 0.3); }
.seg__btn { appearance: none; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-family: var(--font-display); font-size: 20px; letter-spacing: 0.06em; padding: 6px 14px 3px; line-height: 1; min-height: 34px; }
.seg__btn[aria-pressed='true'] { background: var(--ink); color: var(--rp-bg); }
.seg__btn:focus-visible { outline-offset: -3px; }

/* position: relative so absolutely positioned bits inside (e.g. .sr-only header text) are clipped
   by the scroller instead of stretching the phone viewport sideways */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 16px; }
.dtable thead th { background: rgba(0, 0, 0, 0.5); border-bottom: 1px solid var(--line-strong); font-weight: 400; padding: 0; white-space: nowrap; vertical-align: bottom; }
.dtable .th--rank { font-family: var(--font-data); font-size: 11px; color: var(--muted); padding: 10px 10px; text-align: left; width: 44px; }
.dtable .th--txt { text-align: left; }
.dtable thead .th--txt:not(:has(button)) { font-family: var(--font-data); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; padding: 10px 10px; }
.dtable .th--num { text-align: right; }
.dtable thead .th--num:not(:has(button)) { font-family: var(--font-data); font-size: 11px; color: var(--muted); padding: 10px; letter-spacing: 0.08em; }
.th-sort { appearance: none; width: 100%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; padding: 9px 10px 7px; display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; font-family: var(--font-data); font-size: 12px; letter-spacing: 0.08em; min-height: 40px; }
.th--txt .th-sort { justify-content: flex-start; }
.th-sort__sub { font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); padding: 0 3px; }
.th-sort__ar { opacity: 0.35; }
.th-sort:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.th-sort:hover .th-sort__ar { opacity: 0.8; }
.th-sort:focus-visible { outline-offset: -3px; }
.is-sorted .th-sort { color: var(--accent); }
.is-sorted .th-sort__ar { opacity: 1; color: var(--accent); }
.dtable td, .dtable tbody th { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); white-space: nowrap; }
.dtable tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.dtable .td--rank { font-family: var(--font-data); font-size: 13px; color: var(--muted); }
.dtable .td--name { text-align: left; font-weight: 700; font-size: 18px; }
.dtable .td--num { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; font-size: 15px; }
.dtable .td--txt { text-align: left; color: var(--ink-2); font-size: 15px; }
.dtable td.is-col { background: rgba(255, 255, 255, 0.035); }
.dtable td.is-best { color: var(--accent-2); font-weight: 700; position: relative; }
.dtable td.is-best::before { content: ''; display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--accent); margin-right: 6px; vertical-align: 1px; }
/* keep rank + player name visible while the table scrolls sideways */
.dtable:not(.dtable--matches) .td--rank, .dtable:not(.dtable--matches) .th--rank { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; background: var(--rp-bg); }
.dtable:not(.dtable--matches) .td--name, .dtable:not(.dtable--matches) thead th:nth-child(2) { position: sticky; left: 44px; z-index: 2; background: var(--rp-bg); box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.8); }
.dtable:not(.dtable--matches) thead .th--rank, .dtable:not(.dtable--matches) thead th:nth-child(2) { background: #0b0c09; }
body[data-game='mlbb'] .dtable:not(.dtable--matches) thead .th--rank, body[data-game='mlbb'] .dtable:not(.dtable--matches) thead th:nth-child(2) { background: #080c2a; }
.dot { display: inline-block; width: 9px; height: 9px; background: var(--pc); margin-right: 8px; vertical-align: 1px; }

.dtable--matches .th--player { font-family: var(--font-body); font-weight: 700; font-size: 16px; color: var(--ink); text-align: left; padding: 10px 12px; border-left: 1px solid var(--line); }
.dtable--matches td { vertical-align: top; }
.dtable--matches .td--pos { font-family: var(--font-display); font-size: 28px; line-height: 1; }
.dtable--matches .td--pos small { font-size: 18px; color: var(--muted); }
.dtable--matches .td--pos.is-top10 { color: var(--accent); }
.td--cell { border-left: 1px solid var(--line); min-width: 170px; }
.td--cell.is-top { background: linear-gradient(90deg, rgba(242, 169, 0, 0.14), transparent); box-shadow: inset 3px 0 0 var(--pc); }
.td--cell.is-absent { color: var(--muted); font-size: 11px; }
.cell__main { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.cell__badge { font-size: 14px; background: var(--accent); color: var(--accent-ink); padding: 1px 5px 0; letter-spacing: 0.1em; line-height: 1.2; }
.cell__sub { display: block; font-family: var(--font-data); font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.wl { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.08em; padding: 2px 8px 0; }
.wl--w { color: #3bd6f5; border: 1px solid rgba(59, 214, 245, 0.5); }
.wl--l { color: #ff8a8e; border: 1px solid rgba(224, 71, 76, 0.5); }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart-card { position: relative; margin: 0; padding: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); min-width: 0; }
.chart-card > .bracket { width: 10px; height: 10px; }
.chart-card--wide { grid-column: 1 / -1; }
.chart-card figcaption { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.chart-card figcaption b { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.chart-card figcaption span { font-size: 11px; color: var(--muted); }
.chart-box { position: relative; height: 240px; }
.chart-box--line { height: 300px; }
.rp-note { color: var(--muted); font-size: 15px; }

.rp-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.rp-foot__brand { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.16em; color: var(--ink); line-height: 1; padding-top: 3px; }
.rp-foot__sig { margin-left: auto; color: var(--accent); }

/* mini report (landing preview) */
.report--mini { padding: 16px; }
.report--mini .rp-head__title { flex: 1 1 220px; }
.report--mini .rp-head__row { gap: 12px; }
.report--mini .rp-title__kicker { font-size: 20px; }
.report--mini .rp-title__team { font-size: clamp(52px, 6vw, 76px); }
.report--mini .rp-banner__hash { font-size: 44px; }
.report--mini .rp-banner__num { font-size: 96px; }
.report--mini .rp-banner__of { font-size: 34px; }
.report--mini .rp-banner__msg { font-size: 20px; }
.report--mini .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.report--mini .rp-tile__val { font-size: 36px; }
.report--mini .rp-section { margin-top: 14px; }
.report--mini .rp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.report--mini .pc { padding: 10px; }
.report--mini .pc__name { font-size: 24px; }
.report--mini .pc__hero-val { font-size: 44px; }
.report--mini .pc__rank { font-size: 32px; }
.report--mini .pc__stats, .report--mini .pc__foot, .report--mini .pc__medals { display: none; }
.report--mini .spark { width: 100%; }
.report--mini .pc__spark-lbl { display: none; }
.report--mini .rp-foot { margin-top: 14px; }
.report--mini .rp-foot__sig, .report--mini .rp-sub .rp-chip:last-child { display: none; }
.report--mini .rp-hud { font-size: 10.5px; }

/* export mode (export.js adds .is-exporting while html2canvas captures): flatten effects
   html2canvas cannot paint (text-stroke, background-clip:text). */
.report.is-exporting .pc__rank { color: var(--ink-2); -webkit-text-stroke: 0; }
.report.is-exporting .pc--mvp .pc__rank { color: var(--accent); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 20px auto minmax(0, 1fr) 24px; gap: 10px; align-items: start;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-left: 3px solid var(--khaki);
  padding: 10px 10px 10px 12px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); font-size: 16px;
  opacity: 0; transform: translateX(16px); transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateX(16px); }
.toast__ic { color: var(--khaki); margin-top: 2px; }
.toast__tag { font-family: var(--font-data); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); padding-top: 4px; }
.toast__msg { color: var(--ink); line-height: 1.35; }
.toast__x { appearance: none; background: none; border: 0; color: var(--muted); cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; }
.toast__x:hover { color: var(--ink); }
.toast--ok { border-left-color: var(--ok); } .toast--ok .toast__ic { color: var(--ok); }
.toast--warn { border-left-color: var(--warn); } .toast--warn .toast__ic { color: var(--warn); }
.toast--err { border-left-color: var(--danger); } .toast--err .toast__ic { color: var(--danger-ink); }

/* ---------- dialog ---------- */
.dlg { border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.dlg::backdrop { background: rgba(0, 0, 0, 0.72); }
.dlg__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dlg__head h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 30px; letter-spacing: 0.04em; line-height: 1; text-transform: uppercase; }
.dlg__body { padding: 18px; }
.dlg__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }

/* ---------- HUD read-out (top-left, beside the compass) ---------- */
.hud-foot {
  position: absolute; left: var(--gutter); top: 11px; pointer-events: none;
  font-family: var(--font-data); font-size: 11px; letter-spacing: 0.12em; color: var(--muted);
  display: flex; gap: 14px; align-items: center; white-space: nowrap;
}
.hud-foot b { color: var(--ink); font-weight: 400; }
.hud-foot .zone-dot { display: inline-block; width: 8px; height: 8px; border: 1.5px solid #fff; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
@media (max-width: 1239px) { .hud-foot { display: none; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .hq-grid { grid-template-columns: 1fr; }
  .onb { grid-template-columns: 1fr; }
  .tag-card { position: static; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .preview { max-width: 720px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 18px; }
}
@media (max-width: 860px) {
  .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .rp-banner { text-align: left; }
  .rp-banner__place { justify-content: flex-start; }
  .mcard__head { grid-template-columns: 120px minmax(0, 1fr); }
  .mcard__thumb { width: 120px; }
  .mcard__acts { grid-column: 1 / -1; }
  .hud-foot { display: none; }
  .topbar { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  :root { --gutter: 16px; }
  .brand__tag { display: none; }
  .brand__name { font-size: 24px; }
  .brand { gap: 8px; }
  .brand .logo-mark { width: 24px; height: 24px; }
  .topbar { flex-wrap: nowrap; gap: 8px; min-height: 52px; padding-top: 4px; padding-bottom: 6px; }
  .game-switch button { font-size: 17px; padding: 6px 9px 3px; min-height: 34px; }
  .user-btn { padding: 3px; min-height: 40px; }
  .user-btn__team { display: none; }
  .compass-wrap { height: 28px; }
  .compass { height: 26px; }
  .compass__read { top: 26px; }
  /* the heading read-out hangs below the compass: keep the game switch clear of it */
  body[data-game='pubgm'] .topbar { padding-top: 16px; }
  .results-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .results-bar__sp { display: none; }
  .queue__actions { margin-left: 0; width: 100%; }
  .queue__actions .btn { flex: 1 1 auto; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .game-cards { grid-template-columns: 1fr 1fr; }
  .game-card b { font-size: 26px; }
  .onb__row { grid-template-columns: 1fr; }
  .report--mini .rp-cards { grid-template-columns: 1fr 1fr 1fr; }
  .report--mini .pc__name { font-size: 18px; }
  .report--mini .pc__hero-val { font-size: 32px; }
  .report--mini .pc__title { display: none; }
  .rp-cards { grid-template-columns: 1fr; }
  .rp-shead__code { display: none; }
  .stepper__t { font-size: 18px; }
  .stepper__c { display: none; }
  .stepper button { padding: 8px 10px 6px; gap: 6px; }
  .drop { min-height: 240px; padding-bottom: 40px; }
  .drop__reticle { width: 96px; height: 96px; }
  .qlist { grid-template-columns: 1fr; }
  .results-bar .btn { flex: 1 1 auto; }
  .review-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; padding-bottom: 10px; }
  .review-bar__info { grid-column: 1 / -1; font-size: 11px; }
  .hide-sm { display: none; }
  .review-bar .btn { min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 16px; white-space: nowrap; }
  .mcard__head { grid-template-columns: 1fr; }
  .mcard__thumb { width: 100%; }
  .hitem { grid-template-columns: minmax(0, 1fr) auto; }
  .hitem__game { display: none; }
  .rp-foot__sig { margin-left: 0; }
  /* top on phones so toasts never cover the sticky "Jana statistik" bar */
  .toasts { right: 16px; left: 16px; width: auto; top: 88px; bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (forced-colors: active) {
  .btn, .game-switch button, .seg__btn { border: 1px solid ButtonText; }
  .bracket { border-color: CanvasText; }
}

/* ======================================================================
   Readability over the animated map
   ====================================================================== */
/* soft scrim behind headline copy so zone circles / river / map labels never run through text */
.hero__copy, .view-head > div:first-child { position: relative; isolation: isolate; }
.hero__copy::before, .view-head > div:first-child::before {
  content: ''; position: absolute; inset: -28px -36px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 30% 45%, rgba(10, 11, 9, 0.8), rgba(10, 11, 9, 0.45) 55%, transparent 75%);
}
body[data-game='mlbb'] .hero__copy::before, body[data-game='mlbb'] .view-head > div:first-child::before {
  background: radial-gradient(ellipse at 30% 45%, rgba(6, 9, 30, 0.82), rgba(6, 9, 30, 0.45) 55%, transparent 75%);
}
/* working screens (register, upload, review, report): the map steps back */
.bg-canvas { transition: opacity 0.4s ease; }
body:not([data-view='landing']):not([data-view='boot']) .bg-canvas { opacity: 0.55; }

/* sticky header opacity lives in the theme files; ghost buttons get a solid ground so map
   markers don't show through them */
.results-bar .btn--ghost { background-color: rgba(10, 11, 9, 0.88); }
body[data-game='mlbb'] .results-bar .btn--ghost { background: rgba(10, 16, 50, 0.92); }
.btn.is-saved { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }

/* landing preview: the "SAH · MARKAS" stamp sits bottom-right, keep the footer text out of it */
.preview__frame .rp-foot { padding-right: 170px; }

/* ======================================================================
   Report: map HUD layer (inside the report, so the PNG keeps it)
   ====================================================================== */
.report > .rp-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rp-ruler {
  position: absolute; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-data); font-size: 10px; letter-spacing: 0.08em; color: var(--khaki); opacity: 0.55;
}
.rp-ruler span { display: block; min-width: 10px; text-align: center; }
.rp-ruler--x { top: 11px; left: 60px; right: 44px; height: 14px; }
.rp-ruler--x::after, .rp-ruler--y::after { content: ''; position: absolute; background: var(--line); }
.rp-ruler--x::after { left: 0; right: 0; bottom: -3px; height: 1px; }
.rp-ruler--y { top: 60px; bottom: 60px; left: 9px; width: 16px; flex-direction: column; }
.rp-ruler--y::after { top: 0; bottom: 0; right: -4px; width: 1px; }
.rp-deco__zone {
  position: absolute; top: -70px; right: -90px; width: 560px; height: 560px; opacity: 0.9;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 560'%3E%3Ccircle cx='280' cy='280' r='262' fill='none' stroke='%23ffffff' stroke-opacity='.24' stroke-width='3'/%3E%3Ccircle cx='318' cy='300' r='150' fill='none' stroke='%235a8be0' stroke-opacity='.45' stroke-width='3' stroke-dasharray='12 9'/%3E%3Cpath d='M280 8v26M280 526v26M8 280h26M526 280h26' stroke='%23ffffff' stroke-opacity='.24' stroke-width='3'/%3E%3Cpath d='M0 520 560 60' stroke='%23b8a77a' stroke-opacity='.45' stroke-width='3' stroke-dasharray='2 10' stroke-linecap='round'/%3E%3Cpath d='M452 146l-18 3 2 5-10 6-4-1-3 3 6 2 2 6 3-3-1-4 6-10 5 2 3-18z' fill='%23f2a900' fill-opacity='.55'/%3E%3C/svg%3E");
}
.rp-deco__lanes {
  position: absolute; top: -40px; right: -60px; width: 540px; height: 540px; opacity: 0.95;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 540 540'%3E%3Cpath d='M270 20 520 270 270 520 20 270z' fill='none' stroke='%23e8c170' stroke-opacity='.2' stroke-width='2'/%3E%3Cpath d='M50 270 270 50 490 270M50 270 270 490 490 270M50 270h440' fill='none' stroke='%23f5d78e' stroke-opacity='.16' stroke-width='10' stroke-linejoin='round'/%3E%3Cpath d='M50 270 270 50 490 270M50 270 270 490 490 270M50 270h440' fill='none' stroke='%23f5d78e' stroke-opacity='.3' stroke-width='1.5' stroke-dasharray='6 6'/%3E%3Cpath d='M270 40c30 50-30 90 0 140s-30 90 0 140 -30 90 0 160' fill='none' stroke='%233bd6f5' stroke-opacity='.28' stroke-width='14' stroke-linecap='round'/%3E%3Ccircle cx='50' cy='270' r='16' fill='%233bd6f5' fill-opacity='.35'/%3E%3Ccircle cx='490' cy='270' r='16' fill='%23e0474c' fill-opacity='.35'/%3E%3Cellipse cx='200' cy='200' rx='22' ry='12' fill='none' stroke='%23aa78ff' stroke-opacity='.45'/%3E%3Cellipse cx='340' cy='340' rx='22' ry='12' fill='none' stroke='%233bd6f5' stroke-opacity='.45'/%3E%3C/svg%3E");
}
.report--mini .rp-deco { display: none; }

/* summary tiles: captions wrap instead of "setiap perlawa…" */
.rp-chip--sample { color: #f0a42b; border-color: rgba(240, 164, 43, 0.65); background: rgba(240, 164, 43, 0.12); }
.rp-banner__word--none { font-size: clamp(26px, 3vw, 40px) !important; color: var(--ink-2) !important; text-shadow: none !important; }

/* awards: 7 awards (PUBGM) -> MVP takes a double slot so the grid stays even */
.rp-awards__row--n7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-awards__row--n7 > .award--top { grid-column: 1 / -1; }
@container (min-width: 760px) {
  .rp-awards__row--n7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rp-awards__row--n7 > .award--top { grid-column: span 2; }
}
.rp-awards__row--n7 > .award--top .award__player { font-size: clamp(24px, 8cqi, 40px); }

/* ======================================================================
   Report tables: scroll hint, legend, phone layout
   ====================================================================== */
.table-wrap { position: relative; }
.table-frame { position: relative; }
.table-frame::after {
  content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 40px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75)); opacity: 0; transition: opacity 0.2s ease;
}
.table-wrap.has-more .table-frame::after { opacity: 1; }
.report.is-exporting .table-frame::after { display: none; }
.table-hint { display: none; margin: 6px 0 0; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.table-wrap.has-more .table-hint { display: flex; }
.rp-legend { margin: 8px 0 0; font-size: 11px; color: var(--muted); letter-spacing: 0.05em; line-height: 1.6; }

.mlist { display: none; gap: 10px; }
.mrow { border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
.mrow__head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  font-family: var(--font-data); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.mrow__no { color: var(--accent); }
.mrow__pos { margin-left: auto; font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--ink); letter-spacing: 0; }
.mrow__pos.is-top10 { color: var(--accent); }
.mrow__pos small { font-size: 17px; color: var(--muted); }
.mrow__list { list-style: none; margin: 0; padding: 2px 0; }
.mrow__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 7px 12px 8px; border-left: 3px solid transparent; }
.mrow__list li + li { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.mrow__list li.is-top { border-left-color: var(--pc); background: linear-gradient(90deg, rgba(242, 169, 0, 0.12), transparent); }
.mrow__name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__rtg { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.mrow__rtg small { font-family: var(--font-data); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.mrow__sub { grid-column: 1 / -1; font-family: var(--font-data); font-size: 12px; color: var(--ink-2); margin-top: 3px; }
body[data-game='mlbb'] .mrow__rtg { font-family: var(--font-data); font-weight: 700; font-size: 21px; }
body[data-game='mlbb'] .mrow__list li.is-top { background: linear-gradient(90deg, rgba(232, 193, 112, 0.14), transparent); }

/* ======================================================================
   Share card: fixed 1080×1350 image for WhatsApp (built off-screen, captured, removed)
   ====================================================================== */
.share-stage { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.share-cover { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--bg); color: var(--accent); letter-spacing: 0.14em; font-size: 14px; }
.share-card {
  position: relative; width: 1080px; height: 1350px; overflow: hidden; box-sizing: border-box;
  padding: 64px 64px 48px; display: flex; flex-direction: column; color: var(--ink); font-family: var(--font-body);
  background-color: #10120e;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='67.5' height='67.5'%3E%3Cpath d='M67.5 0H0v67.5' fill='none' stroke='%23ece9df' stroke-opacity='.06'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 85% 0%, rgba(242, 169, 0, 0.16), transparent 55%),
    linear-gradient(180deg, #181b14, #0d0f0b);
  border: 2px solid var(--line-strong);
}
.share-card > * { position: relative; }
.share-card > .sc-deco { position: absolute; inset: 0; pointer-events: none; }
.sc-deco--pubgm::before {
  content: ''; position: absolute; top: -60px; right: -120px; width: 640px; height: 640px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 560'%3E%3Ccircle cx='280' cy='280' r='262' fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='3'/%3E%3Ccircle cx='318' cy='300' r='150' fill='none' stroke='%235a8be0' stroke-opacity='.45' stroke-width='3' stroke-dasharray='12 9'/%3E%3Cpath d='M0 520 560 60' stroke='%23b8a77a' stroke-opacity='.45' stroke-width='3' stroke-dasharray='2 10' stroke-linecap='round'/%3E%3C/svg%3E");
}
.sc-deco--pubgm::after {
  content: 'A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P'; position: absolute; top: 22px; left: 64px; right: 64px;
  font-family: var(--font-data); font-size: 14px; letter-spacing: 0.9em; color: var(--khaki); opacity: 0.5; white-space: nowrap; overflow: hidden;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.share-card--pubgm { border-top: 10px solid var(--accent); }
.sc-deco--mlbb::before {
  content: ''; position: absolute; top: -40px; right: -80px; width: 620px; height: 620px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 540 540'%3E%3Cpath d='M270 20 520 270 270 520 20 270z' fill='none' stroke='%23e8c170' stroke-opacity='.25' stroke-width='2'/%3E%3Cpath d='M50 270 270 50 490 270M50 270 270 490 490 270M50 270h440' fill='none' stroke='%23f5d78e' stroke-opacity='.18' stroke-width='10' stroke-linejoin='round'/%3E%3Cpath d='M270 40c30 50-30 90 0 140s-30 90 0 140 -30 90 0 160' fill='none' stroke='%233bd6f5' stroke-opacity='.3' stroke-width='14' stroke-linecap='round'/%3E%3C/svg%3E");
}
.sc-hud { display: flex; justify-content: space-between; gap: 20px; font-family: var(--font-data); font-size: 16px; letter-spacing: 0.12em; color: var(--muted); margin-top: 18px; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 26px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.sc-title { min-width: 0; flex: 1; }
.sc-kicker { font-family: var(--font-display); font-size: 44px; letter-spacing: 0.12em; color: var(--khaki); line-height: 1; }
/* words never split mid-way ("WARRIO / RS"); only a single over-long word may wrap */
.sc-team { font-family: var(--font-display); font-weight: 600; font-size: 150px; line-height: 0.86; margin-top: 8px; word-break: normal; overflow-wrap: break-word; }
.sc-team--long { font-size: 112px; }
.sc-team--xl { font-size: 88px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sc-chip { font-family: var(--font-data); font-size: 18px; letter-spacing: 0.08em; padding: 6px 12px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.sc-chip--date { font-family: var(--font-body); font-weight: 600; font-size: 24px; color: var(--ink); border-color: var(--ink-2); padding: 3px 14px; }
.sc-chip--game { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.sc-chip--sample { color: #f0a42b; border-color: rgba(240, 164, 43, 0.65); }
.sc-banner { text-align: right; flex: none; }
.sc-banner__place { font-family: var(--font-display); font-weight: 600; color: var(--accent); line-height: 0.75; display: flex; align-items: flex-end; justify-content: flex-end; font-size: 220px; }
.sc-banner__hash { font-size: 110px; }
.sc-banner__place small { font-size: 72px; color: var(--ink); margin-left: 8px; padding-bottom: 0.12em; }
.sc-banner__lbl { font-family: var(--font-data); font-size: 18px; letter-spacing: 0.2em; color: var(--muted); margin-top: 16px; }
.sc-banner__sub { font-family: var(--font-display); font-size: 36px; color: var(--accent-2); margin-top: 4px; line-height: 1; }
.sc-banner__word { font-family: var(--font-deco, var(--font-display)); font-weight: 900; font-size: 96px; line-height: 1; color: var(--accent-2); }
.sc-banner--mlbb.is-loss .sc-banner__word { color: #ff9a9d; }
.sc-banner__wl { font-family: var(--font-data); font-weight: 700; font-size: 60px; color: var(--cyan, var(--accent)); margin-top: 6px; }
.sc-shead { display: flex; align-items: center; gap: 16px; margin-top: 34px; margin-bottom: 16px; font-family: var(--font-display); font-size: 34px; letter-spacing: 0.08em; }
.sc-shead i { flex: 1; height: 1px; background: var(--line); }
.sc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sc-pc { padding: 20px 22px 18px; border: 1px solid var(--line); border-top: 5px solid var(--pc); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.sc-pc.is-mvp { background: linear-gradient(180deg, rgba(242, 169, 0, 0.14), rgba(255, 255, 255, 0.02) 60%); border-color: rgba(242, 169, 0, 0.5); border-top-color: var(--pc); }
.sc-pc__top { display: flex; align-items: center; justify-content: space-between; }
.sc-pc__rank { font-family: var(--font-display); font-size: 46px; line-height: 0.8; color: var(--ink-2); }
.sc-pc__crown { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-size: 22px; padding: 4px 10px 1px; letter-spacing: 0.1em; }
.sc-pc__name { font-family: var(--font-display); font-weight: 500; font-size: 42px; line-height: 1; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-pc__hero { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: 84px; line-height: 0.8; }
.sc-pc.is-mvp .sc-pc__hero { color: var(--accent); }
.sc-pc__hero { flex-wrap: wrap; row-gap: 8px; }
.sc-pc__hero small { font-family: var(--font-data); font-weight: 400; font-size: 14px; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; }
.sc-pc__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 16px; background: var(--line); border: 1px solid var(--line); }
.sc-pc__stats div { background: #10120e; padding: 8px 8px 6px; min-width: 0; }
.sc-pc__stats b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1; white-space: nowrap; overflow: hidden; }
.sc-pc__stats span { font-family: var(--font-data); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.sc-awards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sc-awards--n7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sc-awards--n7 > .is-top { grid-column: span 2; }
.sc-awards--n7 .sc-award { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 14px; }
.sc-awards--n7 .sc-award__ic { width: 48px; height: 48px; }
.sc-awards--n7 .sc-award__p { font-size: 30px; }
.sc-awards--n7 .sc-award__c { font-size: 16px; }
.sc-awards--n4 > .is-top, .sc-awards--n1 > .is-top { grid-column: 1 / -1; }
.sc-award { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--pc); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.sc-award__ic { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--accent); background: rgba(0, 0, 0, 0.4); }
.sc-award.is-top .sc-award__ic { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sc-award__t { font-family: var(--font-data); font-size: 14px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.sc-award__p { font-family: var(--font-display); font-weight: 500; font-size: 34px; line-height: 1.02; margin-top: 4px; overflow-wrap: anywhere; }
.sc-award__c { font-size: 17px; color: var(--ink-2); margin-top: 4px; line-height: 1.25; }
.sc-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-data); font-size: 16px; letter-spacing: 0.14em; color: var(--accent); }
.sc-foot__brand { font-family: var(--font-display); font-size: 40px; letter-spacing: 0.18em; color: var(--ink); line-height: 1; }
/* Land of Dawn look */
.share-card--mlbb {
  background-color: #0c1238;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48'%3E%3Cpath d='M14 1h28l14 23-14 23H14L0 24z' fill='none' stroke='%23e8c170' stroke-opacity='.07'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 90% 0%, rgba(59, 214, 245, 0.18), transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(232, 193, 112, 0.14), transparent 50%),
    linear-gradient(180deg, #131b52, #0a0f30);
  box-shadow: inset 0 0 0 8px #0a0f30, inset 0 0 0 10px rgba(232, 193, 112, 0.45);
}
.share-card--mlbb .sc-kicker { font-family: var(--font-deco, var(--font-display)); font-weight: 700; font-size: 36px; color: var(--accent-2); }
.share-card--mlbb .sc-team { font-weight: 900; font-size: 96px; line-height: 1; }
.share-card--mlbb .sc-team--long { font-size: 70px; }
.share-card--mlbb .sc-team--xl { font-size: 54px; }
.share-card--mlbb .sc-banner__word { font-size: 76px; }
.share-card--mlbb .sc-banner__wl { font-size: 52px; }
.share-card--mlbb .sc-shead { margin-top: 28px; }
.share-card--mlbb .sc-shead, .share-card--mlbb .sc-pc__name, .share-card--mlbb .sc-award__p { font-weight: 700; }
.share-card--mlbb .sc-shead { font-size: 28px; letter-spacing: 0.14em; }
.share-card--mlbb .sc-pc__name { font-size: 32px; }
.share-card--mlbb .sc-pc__hero, .share-card--mlbb .sc-pc__stats b { font-family: var(--font-data); font-weight: 700; }
.share-card--mlbb .sc-pc__hero { font-size: 70px; }
.share-card--mlbb .sc-pc__stats b { font-size: 26px; }
.share-card--mlbb .sc-pc__stats div { background: #0c1238; }
.share-card--mlbb .sc-award__p { font-size: 26px; }
.share-card--mlbb .sc-award__ic { border-radius: 50%; border-color: var(--accent); }
.share-card--mlbb .sc-award__t { color: var(--cyan, var(--accent)); }
.share-card--mlbb .sc-foot__brand { font-weight: 900; font-size: 30px; color: var(--accent); }
.share-card--mlbb .sc-banner { text-align: center; }
/* content taller than the card (very long names / captions): tighten step by step */
.share-card.sc-tight .sc-shead { margin-top: 20px; margin-bottom: 12px; }
.share-card.sc-tight .sc-pc__hero { font-size: 64px; }
.share-card.sc-tight .sc-award__c { font-size: 14px; }
.share-card.sc-tight .sc-head { padding-bottom: 20px; }
.share-card.sc-tighter .sc-award__c { display: none; }
.share-card.sc-tighter .sc-team { font-size: 0.75em; }
.share-card.sc-tighter .sc-title { font-size: 88px; }

/* long team names: smaller title so the header stays 1-2 lines */
.rp-title__team--long { font-size: clamp(52px, 8vw, 112px); }
.rp-title__team--xl { font-size: clamp(44px, 6.2vw, 90px); }

@media (max-width: 860px) {
  /* labels that wrap ("PURATA MASA HIDUP") must not push their value below the neighbour's */
  .rp-tile__lbl { min-height: 2.6em; align-items: flex-start; }
  .rp-tile__lbl .ic { margin-top: 1px; }
}
@media (max-width: 640px) {
  .dtable .col-rank, .dtable .col-gm { display: none; }
  .dtable:not(.dtable--matches) .td--name, .dtable:not(.dtable--matches) thead th:nth-child(2) { left: 0; }
  /* tighter cells so Pemain + RTG + KILL + DMG fit a 375px phone before any scrolling */
  .dtable td, .dtable tbody th { padding: 8px 7px; }
  .dtable .td--name { font-size: 16px; }
  .th-sort { padding: 8px 7px 6px; gap: 3px; }
  .th-sort__sub { display: none; }
  .dtable th:not(.is-sorted) .th-sort__ar { display: none; }
  .dtable td.is-best::before { margin-right: 3px; }
  .table-wrap--matches { display: none; }
  .mlist { display: grid; }
  .rp-deco .rp-ruler { display: none; }
  .rp-deco__zone, .rp-deco__lanes { width: 360px; height: 360px; top: -40px; right: -120px; opacity: 0.6; }
  .preview__frame .rp-foot { padding-right: 0; padding-bottom: 34px; }
  .hero__copy::before, .view-head > div:first-child::before { inset: -20px -16px; }
  .results-bar .btn { white-space: nowrap; min-width: 0; }
  .results-bar .btn--primary { grid-column: 1 / -1; }
}
