:root {
  color-scheme: dark;
  --bg: #0B0D12;
  --surface: #12151C;
  --surface-2: #181C25;
  --surface-3: #222734;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #F2F4F8;
  --text-2: #A2ABBA;
  --text-3: #687184;
  --brand: #5B8CFF;
  --brand-2: #7FA6FF;
  --green: #2FBF71;
  --red: #F2495C;
  --orange: #F5822A;
  --yellow: #E5B32A;
  --purple: #A78BFA;
  --r: 14px;
  --gutter: 16px;
  --tabbar: 60px;
  --side: 248px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 14.5px/1.45 Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
[data-icon] { display: inline-grid; place-items: center; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
kbd {
  font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px; color: var(--text-2);
  background: var(--surface-3); border: 1px solid var(--line-2); border-bottom-width: 2px;
}

/* ================= layout ================= */
.side { display: none; }
.main {
  max-width: 1180px; margin: 0 auto;
  padding: 0 var(--gutter) calc(var(--tabbar) + 28px + env(safe-area-inset-bottom));
  container-type: inline-size;
}
.d-only { display: none !important; }

@media (min-width: 900px) {
  .side {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 10;
    padding: 22px 14px 18px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .main { margin-left: var(--side); max-width: none; padding: 0 36px 48px; }
  .tabbar, .m-only { display: none !important; }
  .d-only { display: revert !important; }
}
@media (min-width: 1500px) { .main { padding: 0 calc((100vw - var(--side) - 1180px) / 2) 48px; } }

/* sidebar */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-weight: 750; font-size: 16.5px; letter-spacing: -.01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 560; text-align: left; transition: background .12s, color .12s;
}
.nav button:hover { background: var(--surface-2); color: var(--text); }
.nav button.on { background: rgba(91, 140, 255, .14); color: var(--brand-2); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.hint { margin: 8px 4px 0; color: var(--text-3); font-size: 12px; line-height: 1.7; }
.hint b { color: var(--text-2); font-weight: 600; }

.badge {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 750; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}

/* pipeline status (sidebar) */
.pipe { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 4px; font-size: 12.5px; color: var(--text-2); }
.pipe-row { display: flex; align-items: center; gap: 8px; }
.pipe-row + .pipe-row { margin-top: 6px; }
.pipe-row b { color: var(--text); font-weight: 600; margin-left: auto; font-variant-numeric: tabular-nums; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.led.ok { background: var(--green); }
.led.busy { background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.led.off { background: var(--text-3); }
@keyframes pulse { 50% { opacity: .3; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--line); cursor: pointer; transition: filter .12s, transform .12s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn-danger { background: rgba(242, 73, 92, .14); color: #FF8796; border-color: rgba(242, 73, 92, .25); }
.btn.busy { pointer-events: none; opacity: .6; }
.btn.busy [data-icon] svg, .icon-btn.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); transition: transform .15s;
}
.icon-btn:active { transform: scale(.92); }

/* ================= header ================= */
.top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 0 16px;
}
.top-r { display: flex; align-items: center; gap: 10px; }
h1 { margin: 0; font-size: 28px; font-weight: 760; letter-spacing: -.028em; line-height: 1.1; }
.sub { margin: 5px 0 0; color: var(--text-2); font-size: 13.5px; }
@media (min-width: 900px) { .top { padding-top: 30px; padding-bottom: 20px; } }

.live {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px;
  background: rgba(91, 140, 255, .12); color: var(--brand-2); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }

/* ================= toolbar ================= */
.controls { display: flex; gap: 8px; margin-bottom: 10px; }
.search {
  flex: 1; min-width: 0; max-width: 480px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px; color: var(--text-3);
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--brand); }
.search input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0;
  font-size: 16px; /* ≥16px stops iOS zoom on focus */ color: var(--text);
}
@media (min-width: 900px) { .search input { font-size: 14.5px; } }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.select {
  position: relative; display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  color: var(--text-2); font-size: 13.5px; font-weight: 550; white-space: nowrap; cursor: pointer;
}
.select select { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; cursor: pointer; }

.pills {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)) 14px; padding: 0 var(--gutter);
}
.pills::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .pills { margin: 0 0 16px; padding: 0; flex-wrap: wrap; } }
.pill {
  flex-shrink: 0; height: 32px; padding: 0 13px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 560; transition: background .12s, color .12s;
}
.pill:hover { color: var(--text); }
.pill .n { margin-left: 6px; opacity: .55; font-variant-numeric: tabular-nums; }
.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ================= rows (cards on phone, table on wide) ================= */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; align-items: center; gap: 0 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  transition: background .12s, transform .12s;
}
button.row:active { transform: scale(.99); }
@media (hover: hover) { button.row:hover { background: var(--surface-2); } }
.row .c-main { min-width: 0; }
.row .title { font-weight: 620; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { color: var(--text-2); font-size: 12.5px; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.row .tags:empty { display: none; }
.row .c-num, .row .c-wide { display: none; }
.thead { display: none; }

.prow, .mrow { grid-template-columns: 1fr auto; }
.c-score { display: grid; place-items: center end; }

@container (min-width: 820px) {
  .rows { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
  .row { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 16px; background: none; }
  .row:first-child { border-top: 0; }
  /* table rows stay flat; the screenshot only shows up faintly on hover */
  .rows > .mrow.has-bg { background: none; }
  .rows > button.mrow.has-bg:hover {
    background: linear-gradient(90deg, var(--surface-2) 45%, rgba(24, 28, 37, .9) 75%, rgba(24, 28, 37, .75)), var(--bg) center / cover;
  }
  .rows > .mrow.has-bg .score { text-shadow: none; }
  button.row:active { transform: none; }
  .row .c-narrow, .row .m-ban { display: none; }
  .row .c-num { display: block; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13.5px; }
  .row .c-wide { display: flex; justify-content: flex-end; }
  .c-num b { color: var(--text); font-weight: 620; }
  .thead {
    display: grid; align-items: center; gap: 0 12px; padding: 10px 16px; border-bottom: 1px solid var(--line);
    background: var(--surface-2); color: var(--text-3); font-size: 11.5px; font-weight: 650;
    text-transform: uppercase; letter-spacing: .06em;
  }
  .thead > * { text-align: right; white-space: nowrap; }
  .thead > :first-child { text-align: left; }
  .thead button { text-transform: inherit; letter-spacing: inherit; font-weight: inherit; color: inherit; display: inline-flex; gap: 4px; align-items: center; }
  .thead button:hover { color: var(--text); }
  .thead button.on { color: var(--brand-2); }
  .prow, .thead.p { grid-template-columns: minmax(200px, 2.4fr) 104px 64px 60px 60px 92px 48px; }
  .prow .c-status { justify-content: flex-end; }
  .mrow, .thead.m { grid-template-columns: minmax(200px, 2fr) 96px 90px 70px 60px 110px 24px; }
}

/* avatar: initials underneath, Steam picture on top (removed on error) */
.av { position: relative; width: var(--s, 44px); height: var(--s, 44px); flex-shrink: 0; }
.av .ini {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: calc(var(--s, 44px) * .38); color: rgba(255, 255, 255, .92);
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av .dot {
  position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--surface);
}
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* tags */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.t-red { background: rgba(242, 73, 92, .15); color: #FF8796; }
.t-orange { background: rgba(245, 130, 42, .15); color: #FFA466; }
.t-yellow { background: rgba(229, 179, 42, .15); color: #F0CB5C; }
.t-purple { background: rgba(167, 139, 250, .17); color: #C9B8FF; }
.t-green { background: rgba(47, 191, 113, .14); color: #5ED896; }
.t-gray { background: rgba(255, 255, 255, .07); color: var(--text-2); }
.t-blue { background: rgba(91, 140, 255, .16); color: #9DBBFF; }
.t-solid-red { background: var(--red); color: #fff; }

/* suspicion ring */
.ring {
  --p: 0; --c: var(--text-3); --s: 40px;
  width: var(--s); height: var(--s); border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0);
}
.ring span {
  width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-weight: 750; font-size: 13px; color: var(--c);
  font-variant-numeric: tabular-nums;
}
.ring.sm { --s: 32px; } .ring.sm span { font-size: 11.5px; width: calc(100% - 5px); height: calc(100% - 5px); }
.ring.lg { --s: 60px; } .ring.lg span { font-size: 19px; width: calc(100% - 9px); height: calc(100% - 9px); }
.on-2 .ring span { background: var(--surface-2); }
.zero { color: var(--text-3); font-size: 13px; text-align: right; }

/* map tile */
.map {
  --mc: #64748B; --s: 44px;
  width: var(--s); height: var(--s); border-radius: 11px; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 800; font-size: calc(var(--s) * .3); color: rgba(255, 255, 255, .96);
  background: var(--mc);
  background: linear-gradient(140deg, var(--mc), color-mix(in srgb, var(--mc) 40%, #05070a));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.map-logo { flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); }

/* phone cards: in-game screenshot fading in behind the score */
.mrow.has-bg {
  background:
    linear-gradient(90deg, var(--surface) 30%, rgba(18, 21, 28, .86) 62%, rgba(18, 21, 28, .55)),
    var(--bg) center / cover;
}
@media (hover: hover) {
  button.mrow.has-bg:hover {
    background:
      linear-gradient(90deg, var(--surface-2) 30%, rgba(24, 28, 37, .8) 62%, rgba(24, 28, 37, .45)),
      var(--bg) center / cover;
  }
}
.mrow.has-bg .score { text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }

/* sheet banner: screenshot bleeding to the panel edges */
.map-hero {
  position: relative; align-items: flex-end; min-height: 150px;
  margin: -25px calc(-1 * var(--gutter)) 16px; padding: 48px var(--gutter) 14px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(18, 21, 28, .15) 0%, rgba(18, 21, 28, .55) 50%, var(--surface) 100%), var(--bg, none) center 40% / cover;
}
.map-hero h2 { font-size: 26px; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.map-hero p, .map-hero .score { text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.map-hero p { color: var(--text); opacity: .85; }
.grab { position: relative; z-index: 2; }
@media (min-width: 900px) {
  .map-hero { margin: -26px -28px 18px; padding: 70px 28px 16px; border-radius: 0; min-height: 190px; }
}

.score { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.score b { display: block; font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.score span { font-size: 12px; font-weight: 650; }
.win { color: var(--green); } .loss { color: var(--red); } .draw { color: var(--text-2); }
.res-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.res-dot.win { background: var(--green); } .res-dot.loss { background: var(--red); } .res-dot.draw { background: var(--text-3); }
.chev { color: var(--text-3); display: grid; place-items: center; }

/* ================= overview ================= */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
@container (min-width: 620px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@container (min-width: 1000px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px 12px;
  text-align: left; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
button.kpi:hover { background: var(--surface-2); }
.kpi .k-l { color: var(--text-2); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .k-v { font-size: 26px; font-weight: 740; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .k-s { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.alert .k-v { color: var(--orange); }
.kpi.danger .k-v { color: var(--red); }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
/* phone: panels flow in one column ordered by importance (inline order:N);
   wide: two independent columns so tall panels don't leave holes */
.stack { display: contents; }
@container (min-width: 900px) {
  .grid { grid-template-columns: 1.55fr 1fr; align-items: start; }
  .stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-h h2 { margin: 0; font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.panel-h em { font-style: normal; color: var(--text-3); font-size: 12.5px; }
.panel-h .link { color: var(--brand-2); font-size: 13px; font-weight: 600; }
.panel-h .link:hover { text-decoration: underline; }
.kpi .k-v .res-dot { width: 12px; height: 12px; margin-right: 5px; vertical-align: 3px; }
.panel .mini-empty { color: var(--text-3); font-size: 13.5px; padding: 14px 0 6px; text-align: center; }

/* bar chart */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .ax { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar { transition: opacity .12s; }
.chart.hovering .bar:not(.hot) { opacity: .45; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 140px;
  background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px;
  font-size: 12.5px; color: var(--text-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .45); transform: translate(-50%, calc(-100% - 10px));
}
.tip b { color: var(--text); font-weight: 650; }
.tip .tl { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }

/* compact list inside panels */
.mlist { display: flex; flex-direction: column; }
.mitem {
  display: flex; align-items: center; gap: 12px; padding: 9px 6px; margin: 0 -6px; border-radius: 10px; text-align: left; width: calc(100% + 12px);
}
button.mitem:hover { background: var(--surface-2); }
.mitem .grow { flex: 1; min-width: 0; }
.mitem .l1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mitem .l2 { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mitem .rt { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.mitem .rt b { display: block; color: var(--text); font-size: 14px; }
.meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }

/* ================= misc ================= */
.section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; font-weight: 680; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em;
  margin: 22px 2px 9px;
}
.section-title em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); }
.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 12px;
  border-radius: 12px; background: rgba(229, 179, 42, .1); border: 1px solid rgba(229, 179, 42, .25);
  color: #F0CB5C; font-size: 13.5px;
}
.empty { text-align: center; color: var(--text-2); padding: 48px 24px; font-size: 14px; }
.empty .ic {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-3);
}
.empty h3 { margin: 0 0 5px; color: var(--text); font-size: 16.5px; font-weight: 650; }
.empty p { margin: 0; }
.skeleton { height: 62px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton + .skeleton { margin-top: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================= tab bar (phone) ================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 13, 18, .84);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; max-width: 160px; height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 10.5px; font-weight: 620; transition: color .15s;
}
.tabbar button.on { color: var(--brand-2); }
.tb-ic { position: relative; display: grid; place-items: center; }
.tb-ic .badge { position: absolute; top: -5px; left: 14px; border: 2px solid var(--bg); box-sizing: content-box; height: 16px; min-width: 16px; padding: 0 4px; font-size: 10.5px; }

/* ================= sheet: bottom on phone, right drawer on desktop ================= */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); animation: fade .2s ease; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px;
  max-height: calc(100% - 26px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 22px 22px 0 0; outline: 0;
  padding: 8px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 48px rgba(0, 0, 0, .45);
  animation: up .3s cubic-bezier(.2, .9, .25, 1);
}
@keyframes up { from { transform: translateY(100%); } }
@keyframes left { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 16px; }
.sheet-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; z-index: 2;
}
.sheet-x:hover { color: var(--text); }
@media (min-width: 900px) {
  .sheet-panel {
    left: auto; top: 0; right: 0; max-width: none; width: min(600px, 100vw - var(--side));
    max-height: none; border-radius: 0; border-left: 1px solid var(--line);
    padding: 26px 28px 40px; animation: left .28s cubic-bezier(.2, .9, .25, 1);
  }
  .grab { display: none; }
  .sheet-x { top: 22px; right: 22px; }
}

.hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-right: 38px; }
.hero h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.02em; line-height: 1.2; word-break: break-word; }
.hero p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.hero .score b { font-size: 26px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 15px; background: var(--surface-3); color: var(--text); font-size: 12.5px; font-weight: 580;
  text-decoration: none; transition: filter .12s;
}
.chip:hover { filter: brightness(1.2); }
.chip [data-icon], .chip svg { color: var(--text-2); }

.verdict {
  display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 10px;
  border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
}
.verdict h3 { margin: 0; font-size: 16px; font-weight: 700; }
.verdict p { margin: 3px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.4; }
.verdict.hot { background: linear-gradient(135deg, rgba(242, 73, 92, .16), rgba(242, 73, 92, .04)); border-color: rgba(242, 73, 92, .28); }
.verdict.warm { background: linear-gradient(135deg, rgba(245, 130, 42, .15), rgba(245, 130, 42, .03)); border-color: rgba(245, 130, 42, .26); }
.verdict.mild { background: linear-gradient(135deg, rgba(229, 179, 42, .12), rgba(229, 179, 42, .03)); border-color: rgba(229, 179, 42, .22); }
.verdict.clean { background: linear-gradient(135deg, rgba(47, 191, 113, .12), rgba(47, 191, 113, .03)); border-color: rgba(47, 191, 113, .22); }
.verdict-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.verdict.clean .verdict-ic { background: rgba(47, 191, 113, .16); color: var(--green); }
.verdict.hot .verdict-ic { background: rgba(242, 73, 92, .18); color: var(--red); }
.verdict .ring span { background: var(--surface-2); }

/* grouped list (settings style) */
.group { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.group .ring span { background: var(--surface-2); }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; }
button.item:hover, label.item:hover { background: var(--surface-3); }
label.item { cursor: pointer; }
.item .grow { flex: 1; min-width: 0; }
.item .label { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .desc { color: var(--text-3); font-size: 12.5px; margin-top: 2px; line-height: 1.38; }
.item .val { flex-shrink: 0; text-align: right; font-weight: 650; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.item .val.hit { color: var(--red); }
.item .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.stars { color: var(--text-3); font-size: 10.5px; letter-spacing: 1px; margin-left: 6px; font-weight: 500; }
.status { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.status.ok { background: rgba(47, 191, 113, .14); color: var(--green); }
.status.hit { background: rgba(242, 73, 92, .17); color: var(--red); }
.status.na { background: rgba(255, 255, 255, .06); color: var(--text-3); }
.act-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.item.busy { opacity: .55; pointer-events: none; }
.item.busy .act-ic svg { animation: spin 1s linear infinite; }
.me-tag { margin-left: 6px; vertical-align: 1px; }

/* note */
.note {
  display: block; width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 15px; line-height: 1.45; outline: 0;
}
.note:focus, .field:focus { border-color: var(--brand); }
.field { display: block; width: 100%; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; outline: 0; }
.field::placeholder { color: var(--text-3); font-weight: 500; }
.steps { margin: 6px 2px 10px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.steps a { color: var(--brand-2); }
.onboard h2 { margin: 2px 0 4px; }
.disclaimer { display: flex; gap: 8px; align-items: flex-start; margin: 10px 2px 12px; color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.disclaimer svg { flex: none; margin-top: 2px; }
.invite-link { display: flex; gap: 8px; }
.invite-link .field { flex: 1; min-width: 0; font-size: 13px; }
.inv-row { display: flex; gap: 8px; margin-top: 8px; }
.inv-row .field { flex: 1; min-width: 0; }
.field.text { font-family: inherit; font-weight: 500; font-size: 14.5px; letter-spacing: 0; }
.inv-av { width: 32px; height: 32px; border-radius: 50%; }
.login-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; text-align: left; }
.login-note.ok { background: rgba(94, 216, 150, .12); color: #8EE6B4; }
.login-note.bad { background: rgba(242, 73, 92, .12); color: #FF8796; }
.login-note.info { background: var(--surface-2); color: var(--text-2); }
.onboard > p { color: var(--text-2); margin: 0 0 12px; }
.note-state { color: var(--text-3); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }

/* scoreboard */
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th {
  font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em;
  text-align: right; padding: 9px 8px; background: var(--surface-3);
}
.board th:first-child { text-align: left; padding-left: 14px; }
.board td { white-space: nowrap; padding: 9px 8px; text-align: right; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; }
.board td:first-child { text-align: left; padding-left: 14px; max-width: 0; width: 100%; }
.board td:last-child, .board th:last-child { padding-right: 14px; }
.board tr[data-p] { cursor: pointer; }
.board tr[data-p]:hover td { background: var(--surface-3); }
.board tr.me td { background: rgba(91, 140, 255, .07); }
.board .who { gap: 10px; }
.board .nm { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .tags { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.board .pos { color: var(--green); } .board .neg { color: var(--red); }
.board .k { color: var(--text); font-weight: 650; }
@media (max-width: 520px) { .board .opt { display: none; } }
.scroll-x { overflow-x: auto; }

/* iOS-style switch */
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--surface-3); transition: background .2s; }
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); transition: transform .22s cubic-bezier(.3, .9, .3, 1);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.code { font-family: var(--mono); font-size: 12px; color: var(--text-3); word-break: break-all; }

/* ================= drop zone + toast ================= */
.drop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(11, 13, 18, .82); backdrop-filter: blur(6px); animation: fade .15s; }
.drop-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 64px; border-radius: 22px;
  border: 2px dashed var(--brand); color: var(--text-2); background: rgba(91, 140, 255, .06); pointer-events: none;
}
.drop-box [data-icon] { color: var(--brand-2); margin-bottom: 8px; }
.drop-box b { color: var(--text); font-size: 18px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 90;
  bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px;
  background: rgba(34, 39, 52, .98); border: 1px solid var(--line-2); color: var(--text);
  font-size: 13.5px; font-weight: 560; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  animation: pop .2s ease;
}
.toast .bar { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 8px; overflow: hidden; min-width: 200px; }
.toast .bar i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
@media (min-width: 900px) { .toast { bottom: 24px; left: calc(50% + var(--side) / 2); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 360px) {
  h1 { font-size: 25px; }
  .kpi .k-v { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================= v3: live, radar, stats ================= */
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; color: var(--text); word-break: break-all; }
.muted { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; }
.small { font-size: 12.5px; color: var(--text-3); }
.banner.info { background: rgba(91, 140, 255, .1); border-color: rgba(91, 140, 255, .28); color: var(--brand-2); }
h2.st { font-size: 12px; font-weight: 680; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; margin: 0; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.ref-key { width: 14px !important; height: 0 !important; border-top: 1.5px dashed var(--text-3); border-radius: 0 !important; vertical-align: 3px !important; }

/* stat cells */
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .statgrid { grid-template-columns: repeat(3, 1fr); } }
.sc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.sc span { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.sc b { display: block; font-size: 19px; font-weight: 720; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sc em { display: block; font-style: normal; color: var(--text-3); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .statgrid .sc, .live-stats .sc { background: var(--surface); }

/* radar */
.radar-box { margin-bottom: 4px; }
.radar-levels { display: grid; gap: 8px; }
.radar-levels.n2 { grid-template-columns: 1fr 1fr; }
.radar { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #0d1016; border: 1px solid var(--line); }
.radar img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .78; }
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar-cap { position: absolute; top: 8px; left: 10px; z-index: 2; font-size: 11px; font-weight: 650; color: var(--text-2); background: rgba(0, 0, 0, .55); padding: 2px 7px; border-radius: 6px; }
.rm { cursor: pointer; }
.rm .rl { stroke-width: 2.5; opacity: .45; }
.rm .rf { opacity: .55; }
.rm .rv { stroke: #0b0d12; stroke-width: 4; }
.rm .rhit { fill: transparent; }
.hovering .rm:not(.hot) { opacity: .25; }
.rm.hot .rl { opacity: 1; stroke-width: 4; }
.rm.hot .rv { r: 15; }

/* moments */
.chip.mo { height: 26px; padding: 0 9px; font-size: 12px; background: rgba(245, 130, 42, .14); color: #FFA466; cursor: pointer; }
.item .btn { height: 34px; padding: 0 10px; flex-shrink: 0; text-decoration: none; }
.item .btn + .btn { margin-left: -6px; }

/* live */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: auto; animation: pulse 1.2s infinite; box-shadow: 0 0 0 3px rgba(242, 73, 92, .2); }
.tb-ic .live-dot { position: absolute; top: -2px; right: -4px; margin: 0; }
.live-pill { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; margin-right: 8px; vertical-align: 1px; }
.live-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 14px; padding: 12px 16px;
  border-radius: var(--r); border: 1px solid rgba(242, 73, 92, .35);
  background: linear-gradient(90deg, var(--surface) 35%, rgba(18, 21, 28, .75)), var(--bg, none) center / cover;
}
.live-card .grow { flex: 1; min-width: 0; }
.live-card .l1 { font-weight: 650; }
.live-card .l2 { color: var(--text-2); font-size: 12.5px; }
.live-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 18px; border-radius: var(--r); margin-bottom: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(11, 13, 18, .92) 20%, rgba(11, 13, 18, .55)), var(--bg, none) center / cover;
}
.live-hero .grow { flex: 1; min-width: 160px; }
.live-meta { font-size: 19px; font-weight: 720; }
.live-sub { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.live-sub .bomb { color: var(--orange); }
.live-score { display: flex; align-items: center; gap: 14px; text-align: center; }
.live-score span { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.live-score b { display: block; font-size: 38px; font-weight: 780; line-height: 1.05; font-variant-numeric: tabular-nums; }
.live-score i { color: var(--text-3); font-style: normal; font-size: 24px; }
.rounds-strip { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.rw { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: rgba(255, 255, 255, .85); background: var(--surface-3); }
.rw.win { background: rgba(47, 191, 113, .75); } .rw.loss { background: rgba(242, 73, 92, .7); }
.rounds-strip .half { width: 2px; height: 20px; background: var(--line-2); margin: 0 4px; border-radius: 1px; }
.live-stats { margin-bottom: 12px; }
@media (min-width: 760px) { .live-stats { grid-template-columns: repeat(4, 1fr); } }
.hp { display: grid; grid-template-columns: 56px 1fr 90px; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.hp + .hp { margin-top: 8px; }
.hp .meter { margin: 0; height: 8px; }
.hp b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.wpns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.wpn { padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
.wpn.on { color: var(--text); border-color: var(--brand); background: rgba(91, 140, 255, .12); }
.wpn em { font-style: normal; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.live-idle { display: flex; gap: 16px; align-items: center; color: var(--brand-2); }
.live-idle h2 { margin: 0 0 4px; color: var(--text); font-size: 17px; }
.live-idle .muted { margin: 0; }
.steps { margin: 4px 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--text-2); font-size: 14px; }
.steps li::marker { color: var(--text-3); font-weight: 700; }
.live-setup { max-width: 760px; }

/* live v2 */
.live-grid { margin-top: 2px; }
@media (min-width: 760px) { .live-stats { grid-template-columns: repeat(4, 1fr); } }
.board.rounds td:first-child { width: auto; max-width: none; white-space: nowrap; }
.board.rounds .res-dot { margin-right: 6px; }
.board .small, .board .pos, .board .neg { font-size: 12px; }
.board tr[data-steam] { cursor: pointer; }
.board tr[data-steam]:hover td { background: var(--surface-3); }
.panel .board th { background: var(--surface-2); }
.panel .wpns { margin-top: 12px; }
.live-pill.end { background: var(--surface-3); color: var(--text-2); }
.chip.mo-wall { background: rgba(167, 139, 250, .15); color: #C9B8FF; }

/* ================= 2D replay (x-ray) ================= */
.rp { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--bg); }
.rp-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--line); }
.rp-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rp-title b { display: block; font-size: 15px; }
.rp-title span { display: block; color: var(--text-3); font-size: 12px; }
.rp-rounds { display: flex; align-items: center; gap: 6px; }
.rp-rounds [data-rp="prev"] svg { transform: rotate(180deg); }
.rp select, .rp-bar select { height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); padding: 0 8px; font-size: 13px; }
.icon-btn.sm { width: 34px; height: 34px; }
.rp-body { flex: 1; min-height: 0; display: flex; }
.rp-stage { position: relative; flex: 1; min-width: 0; display: grid; place-items: center; padding: 10px; }
.rp-stage canvas { display: block; border-radius: 12px; background: #0d1016; cursor: pointer; }
.rp-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); font-size: 14px; pointer-events: none; }
.rp-status[hidden] { display: none; }
.rp-alert { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); max-width: 90%; padding: 8px 14px; border-radius: 10px;
  background: rgba(242, 73, 92, .92); color: #fff; font-size: 13px; font-weight: 650; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); text-align: center; }
.rp-side { width: 330px; flex-shrink: 0; overflow-y: auto; padding: 12px 14px 20px; border-left: 1px solid var(--line); background: var(--surface); }
.rp-hint { color: var(--text-2); font-size: 12.5px; line-height: 1.45; margin: 0 0 10px; }
.rp-th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 12px 2px 6px; }
.rp-team { display: flex; flex-direction: column; gap: 2px; }
.rp-p { display: grid; grid-template-columns: 8px 1fr auto auto; grid-template-rows: auto 3px; gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: 8px; text-align: left; }
.rp-p:hover { background: var(--surface-2); }
.rp-p.on { background: rgba(91, 140, 255, .14); }
.rp-p.dead { opacity: .45; }
.rp-p > i { width: 8px; height: 8px; border-radius: 50%; }
.rp-p .n { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-p .w { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.rp-p .rp-hp { grid-column: 2 / -1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rp-p .rp-hp b { display: block; height: 100%; }
.rk { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.rk.sees { background: rgba(47, 191, 113, .18); color: #5ED896; }
.rk.radar { background: rgba(229, 179, 42, .16); color: #F0CB5C; }
.rk.hidden { background: rgba(255, 255, 255, .07); color: var(--text-3); }
.rp-feed { display: flex; flex-direction: column; gap: 2px; }
.rp-k { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; padding: 5px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; text-align: left; }
.rp-k:hover { background: var(--surface-2); }
.rp-k em { font-style: normal; color: var(--text-3); font-weight: 500; }
.rp-k em b { color: #FF8796; }
.rp-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.rp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; min-width: 74px; }
.rp-track { position: relative; flex: 1; min-width: 80px; }
.rp-track input { width: 100%; accent-color: var(--brand); }
.rp-marks { position: absolute; left: 8px; right: 8px; top: -6px; height: 6px; pointer-events: none; }
.rp-marks i { position: absolute; top: 0; width: 2px; height: 6px; border-radius: 1px; }
.rp-marks i.m { background: var(--purple); height: 10px; top: -2px; }
.rp-x { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.rp-bar .btn { height: 34px; }
@media (max-width: 899px) {
  .rp-title b { font-size: 14px; } .rp-title span { display: none; }
  .rp-body { flex-direction: column; overflow-y: auto; }
  .rp-stage { flex: none; height: min(100vw, 62vh); }
  .rp-side { width: auto; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .rp-bar { flex-wrap: wrap; }
  .rp-track { order: 5; flex-basis: 100%; }
}
.chip.mo-pre { background: rgba(229, 179, 42, .15); color: #F0CB5C; }
.cleanup-seg { margin-top: 10px; flex-wrap: wrap; }

/* ================= auth / Overwatch ================= */
body.logged-out > :not(#login):not(script):not(#toast) { display: none !important; }
#login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { max-width: 420px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; }
.login-card h1 { margin: 14px 0 8px; }
.login-card p { color: var(--text-2); line-height: 1.5; }
.steam-btn { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 12px 20px; border-radius: 12px;
  background: linear-gradient(135deg, #1b2838, #2a475e); border: 1px solid #66c0f4; color: #fff; font-weight: 700; text-decoration: none; }
.steam-btn:hover { filter: brightness(1.15); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; }
.user-chip span { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legal-link { display: block; margin-top: 8px; font-size: 12px; color: var(--text-3); text-align: center; text-decoration: none; }
.legal-link:hover { color: var(--text-2); text-decoration: underline; }
.login-card .legal-link { margin-top: 14px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 14px; font-size: 12px; }
.legal-links a { color: var(--text-3); text-decoration: none; }
.legal-links a:hover { color: var(--text-2); text-decoration: underline; }
.mod-msg { color: var(--text) !important; margin-top: 4px; }
.mod-item .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.banner .link { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; text-decoration: underline; cursor: pointer; }
/* privacy page */
.doc { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.6; }
.doc h1 { margin: 18px 0 8px; }
.doc h2 { margin-top: 28px; font-size: 17px; }
.doc p, .doc li { color: var(--text-2); }
.doc li { margin: 6px 0; }
.doc code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.doc-back { color: var(--text-3); text-decoration: none; font-size: 13px; }
.doc .btn { display: inline-flex; }
.doc .todo { color: #FF8796; font-weight: 700; }
.doc .muted { color: var(--text-3); }
.doc .steam-btn { margin: 6px 0; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.doc-nav a { color: var(--text-3); text-decoration: none; }
.doc-nav a:hover { color: var(--text-2); }
.user-chip em { display: block; font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.avatar-btn img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); display: block; }
.report-chip { background: rgba(242, 73, 92, .14) !important; color: #FF8796 !important; }
.vote .item { flex-wrap: wrap; }
.vote .seg button.on.bad { background: rgba(242, 73, 92, .25); color: #FF8796; }
.side-foot .side-actions { display: flex; flex-direction: column; gap: 8px; }
.rk { white-space: nowrap; }
/* 3D replay */
.rp-3d { position: absolute; inset: 10px; border-radius: 12px; overflow: hidden; background: #0d1016; }
.rp-3d canvas { display: block; touch-action: none; }
.rp-cross { display: none; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; pointer-events: none; z-index: 2;
  background: linear-gradient(#5ED896, #5ED896) center / 2px 16px no-repeat, linear-gradient(#5ED896, #5ED896) center / 16px 2px no-repeat; opacity: .9; }
.rp-3d.pov .rp-cross { display: block; }
.rp-hud { position: absolute; inset: 0; pointer-events: none; z-index: 3; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.rp-hud-name { position: absolute; left: 12px; top: 10px; font-size: 14px; }
.rp-hud-hp { position: absolute; left: 12px; bottom: 10px; font-size: 15px; color: #fff; }
.rp-hud-w { position: absolute; right: 12px; bottom: 10px; font-size: 15px; color: #fff; }
.rp-hud-snap { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); font-size: 12.5px; font-weight: 600; color: #e9ecf2;
  background: rgba(10, 12, 16, .55); padding: 3px 9px; border-radius: 8px; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.rp-hud-snap.bad { color: #FF8796; }
.rp-3d:not(.pov) .rp-hud-snap { top: auto; bottom: 38px; }
.rp-hitm { display: none; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.rp-hitm.on { display: block; }
.rp-hitm.head { filter: drop-shadow(0 0 2px #ff1e3c) hue-rotate(0deg); background: linear-gradient(45deg, transparent 46%, #FF4D6A 46%, #FF4D6A 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #FF4D6A 46%, #FF4D6A 54%, transparent 54%); }
.rp-mode { min-width: 48px; }

/* ================= public landing (logged out) ================= */
#login:has(.lp) { display: block; padding: 0; }
.lp { max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; }
.lp-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.lp-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.steam-btn.sm { margin: 0; padding: 8px 14px; font-size: 14px; }
.lp-hero { display: grid; grid-template-columns: 1fr 1.25fr; gap: 36px; align-items: center; padding: 36px 0 28px; }
.lp-hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 16px; }
.lp-lead { color: var(--text-2); font-size: 17px; line-height: 1.55; margin: 0 0 8px; }
.lp-hero .login-note { max-width: 520px; }
.lp-shot { margin: 0; }
.lp-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.lp-shot figcaption { color: var(--text-3); font-size: 12.5px; margin-top: 8px; }
.lp-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 20px 0; }
.lp-feat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.lp-feat .act-ic { background: var(--surface-3); }
.lp-feat h3 { margin: 12px 0 6px; font-size: 16px; }
.lp-feat p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.lp-steps, .lp-faqs { padding: 28px 0 8px; }
.lp h2 { font-size: 24px; margin: 0 0 16px; }
.lp-steps ol { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0; }
.lp-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.lp-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; }
.lp-steps li span { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.lp-faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.lp-faq summary { cursor: pointer; font-weight: 700; }
.lp-faq p { color: var(--text-2); margin: 10px 0 0; line-height: 1.55; }
.lp-end { text-align: center; padding: 32px 0 8px; }
.lp-end .login-note { max-width: 520px; margin: 0 auto 8px; }
.lp-foot { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; text-align: center; }
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 16px; }
  .lp-feats { grid-template-columns: 1fr 1fr; }
  .lp-steps ol { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .lp-feats { grid-template-columns: 1fr; } }
