:root {
  --bg: #0f1216;
  --bg2: #161a20;
  --bg3: #1d222a;
  --line: #2a313b;
  --text: #e6e9ee;
  --muted: #8b95a3;
  --ct: #5aa9ff;
  --ct-dim: #2c5a8c;
  --t: #f0b93a;
  --t-dim: #8a6a1f;
  --accent: #c160f2;
  --accent2: #22d3e6;
  --grad: linear-gradient(90deg, #22d3e6 0%, #8f6df2 55%, #d63cf0 100%);
  --good: #4ade80;
  --red: #ff5a5a;
  --radius: 8px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
body { display: flex; flex-direction: column; overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 48px; background: var(--bg2); border-bottom: 1px solid var(--line); flex: none; }
.brand { font-weight: 700; letter-spacing: .3px; cursor: pointer; white-space: nowrap; }
.logo { color: var(--accent); }
.matchtitle { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matchtitle b { color: var(--text); }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; padding: 8px 14px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.tabs button.active { background: var(--bg3); color: var(--text); }
.tabs button:hover { color: var(--text); }

.view { flex: 1; min-height: 0; overflow: auto; }

/* library */
#library { display: flex; overflow: hidden; }
.sidenav { width: 250px; flex: none; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 14px 10px; overflow-y: auto; }
.sidenav nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; white-space: nowrap; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 12px; color: var(--muted); cursor: pointer; font-size: 14px; position: relative; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: #221a30; color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--grad); }
.nav-item .ni { width: 20px; text-align: center; font-size: 15px; }
.nav-count { margin-left: auto; font-size: 11px; background: var(--bg3); color: var(--muted); border-radius: 10px; padding: 1px 7px; }
.nav-item.active .nav-count { background: #3a2a52; color: #e3a8ff; }
.libmain { flex: 1; min-width: 0; overflow-y: auto; }
.libinner { max-width: 1100px; margin: 0 auto; padding: 24px; }
.page + .page { margin-top: 26px; }
.page[hidden] + .page { margin-top: 0; }
.secthead { display: flex; justify-content: space-between; align-items: baseline; }
.pagetitle { font-size: 20px; margin: 0 0 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input { flex: 1; min-width: 220px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 11px; }
.filters select { padding: 6px 8px; font-size: 13px; }
table.dt { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: var(--radius); overflow: hidden; }
table.dt th, table.dt td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.dt th { background: var(--bg3); color: var(--muted); font-size: 12px; font-weight: 600; }
table.dt tr:last-child td { border-bottom: 0; }
table.dt tbody tr { cursor: pointer; }
table.dt tbody tr:hover td { background: #1b2027; }
table.dt td.teams { white-space: normal; min-width: 220px; }
table.dt .sc { font-weight: 700; font-variant-numeric: tabular-nums; margin: 0 6px; }
table.dt .who { display: inline-flex; align-items: center; gap: 6px; }
table.dt .ava { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
table.dt td.act { text-align: right; }
table.dt .fclink { color: #ffb38a; text-decoration: none; font-size: 13px; }
table.dt .fclink:hover { text-decoration: underline; }
.muted2 { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  #library { flex-direction: column; }
  .sidenav { width: auto; flex-direction: row; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidenav nav { flex-direction: row; }
  .nav-item { white-space: nowrap; padding: 7px 10px; }
  .nav-item.active::before { display: none; }
}
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 36px; text-align: center; background: var(--bg2); transition: .15s; }
.drop.over { border-color: var(--accent); background: #1c1428; }
.drop-icon { font-size: 34px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drop-title { font-size: 20px; font-weight: 600; margin: 6px 0; }
.drop-sub { color: var(--muted); margin-bottom: 16px; }
.btn { display: inline-block; background: var(--bg3); border: 1px solid var(--line); padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.btn:hover { border-color: #3b4552; }
.btn.primary { background: var(--grad) border-box; color: #fff; border-color: transparent; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.btn.primary:hover { filter: brightness(1.1); border-color: transparent; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.importrow { display: flex; gap: 8px; margin-top: 12px; }
.importrow input { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.jobs { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.job { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.job .row { display: flex; justify-content: space-between; gap: 12px; }
.job .bar { height: 6px; background: var(--bg3); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.job .bar div { height: 100%; background: var(--grad); transition: width .3s; }
.job.error { border-color: #5a2a2a; }
.job .err { color: var(--red); }
.sect { font-size: 15px; color: var(--muted); font-weight: 600; margin: 28px 0 10px; text-transform: uppercase; letter-spacing: .6px; }
.demolist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.demo { display: flex; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; transition: .1s; }
.demo:hover { border-color: #3b4552; background: var(--bg3); }
.demo img { width: 76px; height: 76px; border-radius: 6px; background: #000; object-fit: cover; flex: none; }
.demo .info { flex: 1; min-width: 0; }
.demo .map { font-weight: 600; }
.demo .teams { margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo .meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo .del { align-self: flex-start; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.demo .del:hover { color: var(--red); }
.empty { color: var(--muted); padding: 20px 0; }

/* replay */
#replay { overflow: hidden; }
.rp-grid { display: grid; grid-template-columns: 250px 1fr 250px; height: 100%; }
.team { background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
#teamB { border-right: 0; border-left: 1px solid var(--line); }
.team h3 { margin: 2px 2px 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.team h3 .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team h3 .side { font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 700; flex: none; }
.side.CT { background: var(--ct-dim); color: #d8ebff; }
.side.T { background: var(--t-dim); color: #fff3d6; }
.pcard { background: var(--bg3); border: 1px solid transparent; border-radius: 6px; padding: 7px 9px; cursor: pointer; position: relative; overflow: hidden; }
.pcard:hover { border-color: #3b4552; }
.pcard.focus { border-color: var(--accent); }
.pcard.dead { opacity: .42; }
.pcard .l1 { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.pcard .pn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .money { color: var(--good); font-size: 12px; flex: none; }
.pcard .hp { height: 5px; background: #0b0d10; border-radius: 3px; margin: 5px 0 4px; overflow: hidden; }
.pcard .hp div { height: 100%; transition: width .15s; }
.pcard.CT .hp div { background: var(--ct); }
.pcard.T .hp div { background: var(--t); }
.pcard .l2 { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.pcard .wep { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.pcard .badges { display: flex; gap: 4px; flex: none; }
.badge { font-size: 10px; padding: 0 4px; border-radius: 3px; background: #0b0d10; color: var(--muted); line-height: 16px; }
.badge.bomb { background: #5a1f1f; color: #ffb3b3; }
.badge.kit { background: #1f3d5a; color: #bfe0ff; }
.badge.flash { background: #eee; color: #111; }
.pcard .rk { font-size: 11px; color: var(--muted); }
.pcard .flashov { position: absolute; inset: 0; background: #fff; pointer-events: none; }
.evlist { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; }
.evlist h4 { margin: 0 0 6px; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.ev { display: flex; gap: 6px; padding: 3px 4px; border-radius: 4px; cursor: pointer; align-items: baseline; }
.ev:hover { background: var(--bg3); }
.ev .t { color: var(--muted); width: 34px; flex: none; font-variant-numeric: tabular-nums; }
.ev.past { opacity: .5; }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.chips { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.chip { background: var(--bg3); border: 1px solid var(--line); padding: 4px 10px; border-radius: 14px; cursor: pointer; font-size: 12px; color: var(--muted); }
.chip.on { color: var(--text); border-color: #4b5663; background: #26303b; }
select { background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.canvaswrap { flex: 1; position: relative; min-height: 0; background: #0a0c0f; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#map.drag { cursor: grabbing; }
.hud { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; background: rgba(10, 12, 15, .75); border-radius: 8px; padding: 4px 14px 6px; }
.hud-score { font-weight: 700; font-size: 15px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.hud-score .hA, .hud-score .hB { font-weight: 600; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-clock { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud-clock.bomb { color: var(--red); }
.hud-phase { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.killfeed { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; pointer-events: none; }
.kf { background: rgba(10, 12, 15, .82); padding: 3px 8px; border-radius: 4px; font-size: 12px; display: flex; gap: 6px; align-items: center; border: 1px solid transparent; }
.kf.mine { border-color: var(--accent); }
.kf .CT { color: var(--ct); font-weight: 600; }
.kf .T { color: var(--t); font-weight: 600; }
.kf .w { color: #cfd5dd; }
.kf { gap: 5px; padding: 3px 9px; font-size: 13px; }
.kf .wi, .kfi .wi { color: #eef1f5; display: inline-flex; align-items: center; margin: 0 2px; }
.mod { display: inline-flex; color: #eef1f5; }
.mod.hs { color: #ff6b6b; }
.mod.bl { color: #cfd5dd; }
.plus { color: var(--muted); }
.asst { font-weight: 500 !important; opacity: .85; }
.fa { margin-right: 2px; color: #fff; }
.wicon { display: block; overflow: visible; }
.kfi { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.kfi .CT { color: var(--ct); } .kfi .T { color: var(--t); }
.kfi .micon { width: 12px; height: 12px; }
.pcard .wep { display: flex; align-items: center; gap: 6px; }
.pcard .wep .wicon { color: #cfd5dd; flex: none; }
.pcard .wep span { overflow: hidden; text-overflow: ellipsis; }
.focusbar { position: absolute; left: 8px; bottom: 8px; background: rgba(10, 12, 15, .85); padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.focusbar button { background: none; border: 0; color: var(--muted); cursor: pointer; margin-left: 6px; }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 12, 15, .5); font-size: 16px; }

.timeline { background: var(--bg2); border-top: 1px solid var(--line); padding: 6px 10px 8px; flex: none; }
.roundstrip { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.rbtn { flex: 1 0 24px; min-width: 24px; height: 26px; border: 0; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: 600; position: relative; background: var(--bg3); color: var(--muted); }
.rbtn.CT { box-shadow: inset 0 -3px 0 var(--ct); }
.rbtn.T { box-shadow: inset 0 -3px 0 var(--t); }
.rbtn.cur { background: #34404d; color: var(--text); outline: 1px solid #6c7a8a; }
.rbtn:hover { color: var(--text); }
.rsep { width: 6px; flex: none; }
.scrub { padding: 6px 0; }
.scrubbar { position: relative; height: 18px; background: var(--bg3); border-radius: 4px; cursor: pointer; }
.scrubfill { position: absolute; left: 0; top: 0; bottom: 0; background: #2d3945; border-radius: 4px; }
.scrubhead { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--text); border-radius: 2px; margin-left: -1px; }
.markers { position: absolute; inset: 0; pointer-events: none; }
.mk { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; border-radius: 1px; }
.mk.CT { background: var(--ct); }
.mk.T { background: var(--t); }
.mk.plant { background: var(--red); width: 4px; top: 0; bottom: 0; }
.mk.freeze { background: #6c7a8a; width: 1px; top: 0; bottom: 0; }
.controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon { background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; width: 34px; height: 30px; cursor: pointer; }
.icon.big { width: 44px; background: var(--grad) border-box; color: #fff; border-color: transparent; font-weight: 700; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); margin: 0 8px; }
.chk { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; cursor: pointer; }
.hint { margin-left: auto; color: #5f6976; font-size: 11px; }

/* stats */
.statswrap { padding: 20px; max-width: 1300px; margin: 0 auto; }
.statswrap h2 { font-size: 16px; margin: 18px 0 8px; display: flex; gap: 10px; align-items: center; }
table.st { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
table.st th, table.st td { padding: 7px 9px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.st th { color: var(--muted); font-weight: 600; font-size: 12px; cursor: pointer; user-select: none; background: var(--bg3); }
table.st th:first-child, table.st td:first-child { text-align: left; }
table.st tr:last-child td { border-bottom: 0; }
table.st td.good { color: var(--good); }
table.st td.bad { color: var(--red); }
.legend { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.6; }
.rrow td:first-child { font-weight: 600; }
.rwin.CT { color: var(--ct); font-weight: 600; }
.rwin.T { color: var(--t); font-weight: 600; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #3a1e1e; border: 1px solid #6a2e2e; padding: 10px 16px; border-radius: 8px; z-index: 10; }

@media (max-width: 1000px) {
  .rp-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .team { flex-direction: row; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); }
  .team h3, .evlist { display: none; }
  .pcard { min-width: 150px; }
  .hint { display: none; }
}

.iconstatus { margin-top: 12px; font-size: 12px; color: var(--muted); }
.iconstatus .ok { color: var(--good); font-weight: 700; }
.iconstatus .warn { color: var(--t); font-weight: 700; }
.iconstatus .muted { color: #5f6976; }
img.gi { display: block; width: auto; }
img.micon { height: 15px; width: auto; }
.kfi img.micon { height: 12px; }
.pcard .wep img.gi { opacity: .85; }
.fa img { height: 14px; width: auto; display: inline-block; vertical-align: middle; }

/* settings */
.gear { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px; }
.gear:hover { color: var(--text); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; z-index: 20; padding: 60px 16px; }
.modal-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; width: 100%; max-width: 620px; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
.field .row { display: flex; gap: 8px; align-items: center; }
.field input:not([type=checkbox]) { flex: 1; background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-weight: 400; }
.field .iconstatus { margin: 0; font-weight: 400; }

/* faceit */
.faceit { margin-top: 26px; }
.fc-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fc-head .sect { margin: 0; }
.addprofile { display: flex; gap: 6px; margin-left: auto; }
.addprofile input { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; width: 220px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--line); border-radius: 16px; padding: 3px 4px 3px 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.pchip.on { color: var(--text); border-color: #ff5500; }
.pchip .x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 6px; }
.pchip .x:hover { color: var(--red); }
.fc-note { background: var(--bg2); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.fc-note b { color: var(--text); }
.profile { display: flex; gap: 16px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; flex-wrap: wrap; }
.profile img.av { width: 56px; height: 56px; border-radius: 50%; background: #000; object-fit: cover; }
.profile .nm { font-size: 18px; font-weight: 700; }
.profile .nm a { color: inherit; text-decoration: none; }
.lvl { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 12px; border: 2px solid; margin-left: 8px; vertical-align: middle; }
.pstats { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.pstat { text-align: center; }
.pstat .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pstat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.recent { display: flex; gap: 3px; margin-top: 4px; justify-content: center; }
.recent span { width: 14px; height: 14px; border-radius: 3px; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #0b0d10; }
.recent .w { background: var(--good); } .recent .l { background: var(--red); }
table.fm { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--bg2); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
table.fm th, table.fm td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.fm th { background: var(--bg3); color: var(--muted); font-size: 12px; font-weight: 600; }
table.fm th:nth-child(-n+3), table.fm td:nth-child(-n+3) { text-align: left; }
table.fm tr:last-child td { border-bottom: 0; }
.res { display: inline-block; width: 22px; text-align: center; border-radius: 4px; font-weight: 800; font-size: 12px; padding: 2px 0; color: #0b0d10; }
.res.w { background: var(--good); } .res.l { background: var(--red); } .res.u { background: var(--line); color: var(--muted); }
.mapcell { display: flex; align-items: center; gap: 8px; }
.mapcell img { width: 28px; height: 28px; border-radius: 4px; background: #000; object-fit: cover; }
.fm .good { color: var(--good); } .fm .bad { color: var(--red); }
.fm .act { text-align: right; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.orange { border-color: #ff5500; color: #ffb38a; }
.btn.orange:hover { background: #2a1a10; }
.fm .muted { color: var(--muted); font-size: 12px; }
.loadingrow { color: var(--muted); padding: 16px 0; }
.toast.ok { background: #221733; border-color: #6a3f9a; }
a.btn { text-decoration: none; color: inherit; }
a.btn.orange { color: #ffb38a; }
table.fm tr.series td { border-bottom-color: transparent; }
table.fm tr.submap td { background: #13171c; font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
table.fm tr.submap td:nth-child(2) { padding-left: 22px; }
table.fm tr.submap .res { width: 18px; font-size: 10px; }
table.fm tr.submap .mapcell img { width: 22px; height: 22px; }
table.fm tr.series { cursor: pointer; }
table.fm tr.series:hover td { background: #1b2027; }
table.fm tr.series.open td { border-bottom-color: transparent; }
table.fm tr.series:not(.open) td { border-bottom-color: var(--line); }
.caret { color: var(--muted); width: 12px; display: inline-block; font-size: 12px; }
.mapcell img.mapicon { width: 30px; height: 30px; border-radius: 4px; object-fit: contain; background: none; }
.mapcell .stack { display: inline-flex; }
.mapcell .stack img.mapicon { width: 24px; height: 24px; margin-right: -6px; border: 2px solid var(--bg2); border-radius: 50%; background: var(--bg3); object-fit: cover; }
.mapcell .stack + b { margin-left: 10px; }
.demo img { object-fit: contain; }
/* login */
body.loginpage { align-items: center; justify-content: center; overflow: auto; padding: 24px 16px; }
.authbox { width: 100%; max-width: 380px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.authbrand { font-size: 20px; font-weight: 700; text-align: center; }
.authsub { text-align: center; color: var(--muted); margin: 0; }
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm input { background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; font-weight: 400; }
#authForm input:focus, .field input:focus { outline: 2px solid #7b4fb0; border-color: transparent; }
.btn.wide { width: 100%; padding: 10px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: default; }
.autherr { background: #3a1e1e; border: 1px solid #6a2e2e; color: #ffb3b3; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.authfoot { text-align: center; color: var(--muted); font-size: 13px; margin: 0; }
.authfoot a { color: var(--accent); }
/* user menu */
.usermenu { position: relative; }
.userbtn { background: var(--bg3); border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; min-width: 170px; padding: 4px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 5px; cursor: pointer; }
.menu button:hover { background: var(--bg3); }
.badge-admin { font-size: 10px; background: #2d1b40; color: #e3a8ff; border-radius: 3px; padding: 0 4px; margin-left: 4px; }
/* admin */
.modal-box.wide { max-width: 860px; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13px; }
table.adm th, table.adm td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.adm th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.adm td.actions { text-align: right; }
table.adm .linkbtn { margin-left: 8px; }
.linkbtn.danger { color: var(--red); }
.admsec h4 { margin: 0 0 8px; font-size: 14px; }
.admrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.admrow input, .admrow select { background: var(--bg3); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; }
.invlink { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--bg3); border-radius: 4px; padding: 2px 6px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.notice { background: #2a2410; border: 1px solid #5a4a1a; color: #ffe2a0; border-radius: 6px; padding: 8px 10px; font-size: 13px; font-weight: 400; }
.brand img { display: block; height: 24px; width: auto; }
.authbrand img { display: block; margin: 0 auto 4px; height: 150px; width: auto; }
/* brand accents */
.scrubfill { background: linear-gradient(90deg, rgba(34,211,230,.35), rgba(214,60,240,.35)); }
.chip.on { border-color: #7b4fb0; background: #2a1f3a; }
.rbtn.cur { outline-color: var(--accent); }
.tabs button.active { box-shadow: inset 0 -2px 0 var(--accent); }
.pchip.on { border-color: var(--accent); }
.linkbtn:hover { text-decoration: underline; }
.elo { font-size: 11px; font-weight: 700; margin-left: 6px; font-variant-numeric: tabular-nums; }
.elo.up { color: var(--good); } .elo.down { color: var(--red); } .elo.zero { color: var(--muted); }
.eloval { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 1px; }
