:root {
  --bg: #0e1116; --panel: #161b22; --panel2: #1c232c; --line: #2a323d; --text: #e6edf3; --muted: #8b97a6;
  --accent: #ff5a1f; --accent2: #ffb000; --ok: #3fb950; --warn: #f0883e; --danger: #f85149; --me: rgba(255, 90, 31, .12);
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #6cb6ff; text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.8rem; margin: .6em 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.4em 0 .6em; color: #cfd8e3; }
code { background: var(--panel2); padding: .1em .35em; border-radius: 5px; font-size: .9em; word-break: break-all; }
code.big { font-size: 1.05em; padding: .4em .6em; display: inline-block; }
.bar, main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 40px; } main.wide { max-width: 1400px; }
header.top { background: linear-gradient(90deg, #12161d, #1a1410); border-bottom: 2px solid var(--accent); position: sticky; top: 0; z-index: 5; }
header .bar { display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: .02em; }
.brand:hover { text-decoration: none; } .flag { filter: saturate(1.2); }
nav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; } nav a { color: #cfd8e3; font-weight: 500; }
.who { display: flex; gap: 10px; align-items: center; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 18px 0; }
.hero { padding: 18px 0 4px; } .hero h1 { font-size: 2.2rem; } .hero p { color: var(--muted); max-width: 720px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 1.35rem; font-weight: 700; } .stat .l { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 0 28px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 16px; margin: 16px 0; }
.card.narrow { max-width: 440px; margin: 30px auto; }
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:hover td { background: var(--panel); }
table.list.narrow { width: auto; min-width: 260px; }
tr.me td { background: var(--me) !important; }
.board .pos { font-weight: 700; width: 3em; }
.r { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .sub { color: var(--muted); font-size: .85rem; }
.game { display: inline-block; font-size: .7rem; font-weight: 700; color: #0e1116; background: #8b97a6; border-radius: 4px; padding: 0 5px; vertical-align: 1px; }
.cls { display: inline-block; min-width: 1.7em; text-align: center; font-size: .72rem; font-weight: 800; border-radius: 4px; padding: 0 4px; color: #fff; background: #555; vertical-align: 1px; }
.cls-D { background: #3fa7d6; } .cls-C { background: #e5c100; color: #111; } .cls-B { background: #ff8c00; } .cls-A { background: #e8345a; }
.cls-S1 { background: #9b59ff; } .cls-S2 { background: #2f6fff; } .cls-X { background: #2fbf71; } .cls-R { background: #c0392b; }
.tag { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; vertical-align: 2px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs a { padding: 5px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.tabs a.on { border-color: var(--accent); background: var(--me); } .tabs a:hover { text-decoration: none; border-color: #444d58; }
.crumbs { color: var(--muted); margin: 18px 0 0; font-size: .9rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.1); text-decoration: none; } .btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); } .btn.danger { background: var(--danger); }
button.link { background: none; border: 0; color: #6cb6ff; cursor: pointer; font: inherit; padding: 0 4px; } button.link.danger { color: var(--danger); }
form.inline { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.form { display: grid; gap: 12px; margin: 12px 0; } .form.row { grid-template-columns: auto 1fr 1fr auto; align-items: center; }
.form label { display: grid; gap: 4px; font-weight: 500; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.carpick select { width: auto; max-width: 100%; } .carpick label { display: inline-flex; gap: 8px; align-items: center; }
.search { display: flex; gap: 8px; max-width: 420px; margin: 10px 0 16px; }
.search button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 0 14px; cursor: pointer; }
.pager { display: flex; justify-content: space-between; margin: 14px 0; }
.warn { color: var(--warn); } .ok { color: var(--ok); }
.desc { background: var(--panel); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin: 14px 0; }
.video { position: relative; padding-top: 56.25%; margin: 16px 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
details.owner { margin: 24px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; }
details.owner summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; } .hero h1 { font-size: 1.7rem; }
  .form.row { grid-template-columns: 1fr; }
  table.list td, table.list th { padding: 6px 5px; }
  header .bar { gap: 8px 14px; padding: 8px 16px; }
}

/* ---------------------------------------------------------------- a session's analysis (session.js): as SimEffects
   Analysis' Session card, dark, its colours; blue its accent as the app's */
main.full { max-width: 1680px; }
.session-head { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.session-head h1 { margin-bottom: .1em; } .session-head p { margin: .3em 0; } .session-head .actions { margin: 6px 0 10px; }
.analysis { --a-accent: #4DA3FF; --a-room: #11161d; --a-card: #161b22; --a-line: #2a323d; --a-popup: #1f2730;
  background: var(--a-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 14px; margin: 10px 0 20px; }
.analysis .warn { margin: 6px 0; } .analysis [hidden] { display: none !important; }
.an-titlebar { display: flex; align-items: center; gap: 12px; }
.an-title { margin: 4px 0 10px; font-size: 1.05rem; color: var(--text); }
.an-head { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; margin-bottom: 6px; }
.an-picks { display: grid; gap: 6px; min-width: 0; }
.pick { display: flex; gap: 6px; align-items: center; min-width: 0; }
.chip-run { flex: none; width: 34px; height: 30px; border-radius: 15px; border: 1px solid var(--a-accent); background: transparent; color: var(--a-accent); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.chip-run.on { background: var(--a-accent); color: #0e1116; } .chip-run.muted { opacity: .45; }
.an-status { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .an-status.warn { color: var(--warn); }
.an-opts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

.dd { position: relative; min-width: 0; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; background: var(--a-room); color: var(--text); border: 1px solid var(--a-line); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; overflow: hidden; }
.dd-btn:hover { border-color: #4a5664; } .dd-btn.static { cursor: default; flex: 1 1 auto; min-width: 0; }
.dd-btn .caret { display: inline-flex; color: var(--muted); margin-left: auto; }
.pick .dd:not(.part) { flex: 1 1 auto; } .pick .dd-btn.part { min-width: 150px; } .pick .dd .dd-btn.sess2 { width: 100%; }
.dd-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.dd-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 360px; overflow: auto; background: var(--a-popup); border: 1px solid #38424e; border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.dd-menu.ctx { position: fixed; top: auto; left: auto; min-width: 140px; }
.an-opts .dd-menu, .markbar .dd-menu { left: auto; right: 0; }
.dd-item { padding: 5px 9px; border-radius: 5px; cursor: pointer; white-space: nowrap; font-size: .88rem; }
.dd-item:hover { background: rgba(77,163,255,.15); } .dd-item.on { background: rgba(77,163,255,.22); } .dd-item.disabled { color: var(--muted); cursor: default; background: none; }
.sess .muted, .dd-item .muted { color: var(--muted); } .sess .cam { color: #ff4d4d; font-size: .8em; }
.best { font-weight: 700; } .star { color: #3CD070; } .time { font-variant-numeric: tabular-nums; }
.chans { display: grid; gap: 2px; padding: 4px; min-width: 210px; }
.chan-row { display: grid; grid-template-columns: 22px 22px 1fr; align-items: center; gap: 2px; font-size: .88rem; }
.chan-row.head { color: var(--muted); font-size: .72rem; font-weight: 700; }
.chan-row input, .chan-opt input { width: auto; margin: 0; accent-color: var(--a-accent); }
.chan-row input.dotted { outline: 1px dotted #8b97a6; outline-offset: 1px; }
.chan-name { display: flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--text); font: inherit; padding: 3px 4px; border-radius: 4px; cursor: pointer; text-align: left; }
.chan-name:hover { background: rgba(255,255,255,.06); } .chan-name.on { font-weight: 700; background: rgba(77,163,255,.18); } .chan-name:disabled { color: var(--muted); cursor: default; }
.chan-row.off { opacity: .5; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.chan-opt { display: flex; align-items: center; gap: 6px; font-size: .85rem; padding: 4px 4px; border-top: 1px solid var(--a-line); margin-top: 4px; cursor: pointer; }
.chans .chan-opt:first-child { border-top: 0; margin-top: 0; } .chans > .chan-opt + .chan-opt { border-top: 0; margin-top: 0; }
.tri { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid; }
.dots { display: inline-flex; gap: 2px; } .dots i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.chip { background: var(--a-room); color: var(--text); border: 1px solid var(--a-line); border-radius: 999px; padding: 4px 13px; font: inherit; font-size: .88rem; cursor: pointer; }
.chip:hover { border-color: #4a5664; } .chip.on { background: #2e9b57; border-color: #2e9b57; color: #fff; } .chip.small { padding: 2px 9px; font-size: .8rem; }
.mini { display: inline-flex; align-items: center; gap: 1px; background: var(--a-room); color: var(--text); border: 1px solid var(--a-line); border-radius: 5px; padding: 3px 5px; cursor: pointer; line-height: 0; }
.mini:hover { border-color: #4a5664; }

.an-scores { display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.an-scores .group { flex: 1 1 0; min-width: 0; display: flex; gap: 6px; align-items: center; }
.an-scores .group-body { flex: 1 1 auto; min-width: 0; }
.an-scores .slot { color: var(--a-accent); font-weight: 700; font-size: .75rem; }
.tile { display: flex; background: var(--a-room); border: 1px solid var(--a-line); border-radius: 6px; padding: 3px 4px; }
.score { flex: 1 1 0; min-width: 0; text-align: center; padding: 0 4px; border-left: 1px solid var(--a-line); }
.score:first-child { border-left: 0; }
.score .v { font-size: 1.45rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile.small .score .v { font-size: 1.1rem; }
.score .slash { color: var(--muted); font-weight: 400; } .score .l { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split { display: flex; height: 18px; margin-top: 4px; border-radius: 3px; overflow: hidden; }
.split > div { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.split span { font-size: .7rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.laptimes { flex: none; background: var(--a-room); border: 1px solid var(--a-line); border-radius: 6px; padding: 3px 10px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; justify-content: center; }
.laptimes .diff { text-align: center; }

.chart-wrap { position: relative; }
.markbar { display: flex; justify-content: flex-end; gap: 3px; padding-right: 8px; margin-bottom: 2px; }
.markbar .mini { padding: 1px 4px; }
.tl { position: relative; width: 100%; height: 330px; }
.tl canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl .tl-top { touch-action: none; }
.ov-wrap { padding: 4px 8px 0 52px; } .tl.ov { height: 40px; border-radius: 4px; overflow: hidden; }
.pb-bar { display: flex; align-items: center; gap: 8px; margin: 8px 8px 10px 52px; }
.pb-row { flex: 1; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.pb-bar.disabled { opacity: .5; pointer-events: none; }
.pb { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 44px; height: 30px; background: var(--a-room); color: var(--text); border: 1px solid var(--a-line); border-radius: 5px; cursor: pointer; font: inherit; }
.pb small { font-size: .7rem; } .pb:hover { border-color: #4a5664; } .pb.on { color: var(--a-accent); border-color: var(--a-accent); } .pb:disabled { opacity: .4; cursor: default; }
.pb span { display: inline-flex; }
.pb-clock { min-width: 140px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; }

.under { display: grid; height: 450px; margin-top: 4px; }
.under-pane { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--a-card); }
.splitter { cursor: col-resize; position: relative; } .splitter::after { content: ''; position: absolute; left: 3px; top: 45%; height: 34px; width: 2px; border-radius: 1px; background: #4a5664; }
.pane-head { display: flex; align-items: center; gap: 6px; padding: 0 0 6px; min-height: 30px; }
.pane-head.center { justify-content: center; } .pane-head .grow { flex: 1; }
.pane-title { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-right: auto; }
.pane-head .grow + .chip { margin-left: 0; }
.video-pane .pane-title { margin-right: 0; }
.under-pane > .tl { flex: 1; height: auto; min-height: 120px; border-radius: 4px; overflow: hidden; }
.videos { flex: 1; display: grid; gap: 8px; min-height: 0; } .videos.pair { grid-template-columns: 1fr 1fr; }
.vbox { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.vlabel { font-size: .75rem; font-weight: 700; color: var(--a-accent); }
.vframe { flex: 1; position: relative; background: #000; border-radius: 4px; overflow: hidden; min-height: 0; }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vnote { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--muted); background: var(--a-room); border-radius: 4px; }
.vctl { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 5px; }
.vol { width: 110px; padding: 0; accent-color: var(--a-accent); background: none; border: 0; }
.sync { position: absolute; z-index: 5; left: 0; right: 0; bottom: 40px; margin: 0 10px; background: var(--a-popup); border: 1px solid #38424e; border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.sync-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .85rem; } .sync-row .chip { margin: 0; }
.under-pane.popped { position: fixed; z-index: 50; inset: 4vh 4vw; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 0 0 100vmax rgba(0,0,0,.65); }
body.has-popped { overflow: hidden; }

.cards { display: grid; grid-template-columns: 1fr 1fr 1.5fr; grid-template-areas: "c1 c2 c5" "c3 c4 c5"; gap: 12px; margin-top: 14px; }
.an-card { background: var(--a-room); border: 1px solid var(--a-line); border-radius: 8px; padding: 8px 12px 10px; min-width: 0; }
.an-card h3 { font-size: .95rem; margin: 2px 0 6px; }
.c1 { grid-area: c1; } .c2 { grid-area: c2; } .c3 { grid-area: c3; } .c4 { grid-area: c4; } .c5 { grid-area: c5; }
.tl.ovl { height: 190px; }
.an-card .tl canvas { background: transparent; }
.tips { display: grid; gap: 8px; align-content: start; }
.tipbox { border: 1px solid rgba(128,128,128,.38); border-radius: 6px; padding: 2px 10px 8px; }
.tipbox.bad { border-color: rgba(255,77,77,.44); background: rgba(255,77,77,.08); } .tipbox.warn { border-color: rgba(255,177,59,.44); background: rgba(255,177,59,.08); }
.tipbox.good { border-color: rgba(60,208,112,.44); background: rgba(60,208,112,.08); }
.tip { display: flex; gap: 8px; margin-top: 6px; font-size: .9rem; line-height: 1.4; } .tip-text { flex: 1; }
.tipbox.bad .tip { color: #FF4D4D; font-weight: 600; } .tipbox.warn .tip { color: #FFB13B; } .tipbox.good .tip { color: #3CD070; }
.badge { flex: none; align-self: flex-start; font-size: .75rem; font-weight: 600; color: #FFB13B; background: rgba(255,177,59,.19); border-radius: 9px; padding: 1px 8px 2px; white-space: nowrap; }
.badge.bad { color: #FF4D4D; background: rgba(255,77,77,.19); }

@media (max-width: 1200px) {
  .an-head { grid-template-columns: 1fr auto; } .an-scores { grid-column: 1 / -1; grid-row: 2; }
  .cards { grid-template-columns: 1fr 1fr; grid-template-areas: "c1 c2" "c3 c4" "c5 c5"; }
}
@media (max-width: 860px) {
  .an-head { grid-template-columns: 1fr; } .pick { flex-wrap: wrap; } .pick .dd-btn.static { flex: 1 1 calc(100% - 44px); } .pick > .dd { flex: 1 1 calc(100% - 44px); } .pick > .dd-btn.static + .dd, .pick > .dd + .dd { flex-basis: 100%; margin-left: 40px; } .pick .dd-btn.part { width: 100%; }
  .an-opts { flex-direction: row; align-items: center; justify-content: flex-end; }
  .an-scores { flex-wrap: wrap; } .an-scores .group { flex-basis: 100%; }
  .score .v { font-size: 1.15rem; } .score .l { font-size: .65rem; }
  .under { display: flex; flex-direction: column; height: auto; } .splitter { display: none; }
  .video-pane .videos { aspect-ratio: 16 / 9; flex: none; } .videos.pair { grid-template-columns: 1fr; aspect-ratio: auto; } .videos.pair .vbox { aspect-ratio: 16 / 9; }
  .map-pane > .tl { height: 320px; flex: none; } .fc-pane > .tl { height: 340px; flex: none; } .under-pane { margin-top: 10px; }
  .cards { grid-template-columns: 1fr; grid-template-areas: "c1" "c2" "c3" "c4" "c5"; }
  .tl { height: 300px; } .pb-bar { margin-left: 0; flex-direction: column; } .pb-clock { text-align: center; } .ov-wrap { padding-left: 52px; }
  .analysis { padding: 8px 8px 12px; }
  .pb { min-width: 38px; }
}
