:root {
  --page-w: 1600px;   /* breite Bildschirme (z. B. 4K mit 125 %) */
  --bg: #0d1013;
  --panel: #151a1f;
  --panel-2: #1c232a;
  --line: #2a333c;
  --text: #e3e8ec;
  --muted: #8a96a2;
  --t: #FBAA1E;
  --ct: #5aa0e6;
  --danger: #e5534b;
  --ok: #57ab5a;
  --accent: #FBAA1E;
  --radius: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; cursor: pointer;
}
button:hover { border-color: #3d4955; background: #222b33; }
button.primary { background: var(--accent); color: #1a1205; border-color: var(--accent); font-weight: 600; }
button.danger:hover { border-color: var(--danger); color: var(--danger); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.muted { color: var(--muted); }
.t { color: var(--t); } .ct { color: var(--ct); }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 48px;
  border-bottom: 1px solid var(--line); background: var(--panel); flex: none;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; letter-spacing: .2px; }
.logo { width: 36px; height: 36px; flex: none; border-radius: 5px; display: block; }
#topbar-extra { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
#app { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }  /* scrollt selbst, Topbar bleibt oben */

/* ---------- Liste / Upload ---------- */
.page { max-width: var(--page-w); width: 100%; margin: 0 auto; padding: 24px 16px 48px; }
.dropzone {
  display: block;
  border: 2px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center;
  background: var(--panel); transition: border-color .15s, background .15s; cursor: pointer;
}
.dropzone.over { border-color: var(--accent); background: #1d1a14; }
.dropzone h2 { margin: 0 0 4px; font-size: 18px; }
.uploads { margin-top: 12px; display: grid; gap: 8px; }
.upl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.upl .row { display: flex; justify-content: space-between; gap: 12px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.bar.err > i { background: var(--danger); }
h1.section { font-size: 16px; margin: 28px 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.demos { display: grid; gap: 8px; }
.demo {
  display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.demo.ready { cursor: pointer; }
.demo.ready:hover { border-color: #3d4955; }
.demo .thumb { width: 56px; height: 56px; object-fit: contain; display: block; }
.demo img.thumb:not(.radar) { padding: 7px; }   /* Map-Logos etwas kleiner als die Kachel */
.demo .thumb.radar, .demo div.thumb { border-radius: 6px; background: var(--panel-2); object-fit: cover; }
.demo .title { font-weight: 600; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.demo .score { font-variant-numeric: tabular-nums; }
.demo .sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo .actions { display: flex; gap: 6px; }
.badge { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.badge.error { color: var(--danger); border-color: #5a2a28; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 640px) {
  .demo { grid-template-columns: 44px 1fr; }
  .demo .thumb { width: 44px; height: 44px; }
  .demo .actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- Viewer ---------- */
.viewer { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr 320px; grid-template-rows: 1fr auto; }
.side { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.side.left { border-right: 1px solid var(--line); }
.side.right { border-left: 1px solid var(--line); }
.team h3 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .5px; }
.pl {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 6px 8px; border-radius: 6px;
  background: var(--panel); border: 1px solid transparent; cursor: pointer; margin-bottom: 4px; font-size: 13px;
}
.pl:hover { border-color: var(--line); }
.pl.sel { border-color: var(--text); }
.pl.dead { opacity: .4; }
.pl .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .hp { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.pl .wp { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .mn { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.pl .hpbar { grid-column: 1 / -1; height: 3px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.pl .hpbar > i { display: block; height: 100%; }
.pl .tag { font-size: 10.5px; font-weight: 700; padding: 0 4px; border-radius: 3px; margin-right: 3px; background: var(--panel-2); color: var(--text); }
.pl .tag.c4 { background: #ff9f1a; color: #1a1205; }
.pl .tag.kit { background: var(--ct); color: #06121f; }
.stage { position: relative; min-width: 0; min-height: 0; background: #080a0c; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.stage canvas.drag { cursor: grabbing; }
.hud { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; pointer-events: none; }
.hud .sc { background: rgba(13,16,19,.85); border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.hud .clock { background: rgba(13,16,19,.85); border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; font-variant-numeric: tabular-nums; min-width: 74px; text-align: center; font-weight: 700; }
.hud .clock.bomb { color: var(--danger); border-color: var(--danger); }
.feed { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; pointer-events: none; }
.feed .k { background: rgba(13,16,19,.85); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; font-size: 12.5px; white-space: nowrap; transition: opacity .3s; }
.banner { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 6px; font-weight: 700; background: rgba(13,16,19,.9); border: 1px solid currentColor; pointer-events: none; }
.stage-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; }
.stage-tools button { background: rgba(21,26,31,.9); padding: 4px 9px; font-size: 12.5px; }
.stage-tools button.on { border-color: var(--accent); color: var(--accent); }
.kills h3, .roundinfo h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.kl { font-size: 12.5px; padding: 4px 6px; border-radius: 4px; cursor: pointer; display: flex; gap: 6px; align-items: baseline; }
.kl:hover { background: var(--panel); }
.kl.future { opacity: .35; }
.kl .tm { color: var(--muted); font-variant-numeric: tabular-nums; width: 34px; flex: none; }
.kl .w { color: var(--muted); }

.controls { grid-column: 1 / -1; border-top: 1px solid var(--line); background: var(--panel); padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.rounds { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.rounds button { min-width: 30px; padding: 3px 0; font-size: 12px; font-variant-numeric: tabular-nums; border-bottom-width: 3px; flex: none; }
.rounds button.T { border-bottom-color: var(--t); }
.rounds button.CT { border-bottom-color: var(--ct); }
.rounds button.cur { background: var(--text); color: var(--bg); }
.rounds .half { width: 10px; flex: none; }
.transport { display: flex; align-items: center; gap: 10px; }
.transport .time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 92px; text-align: right; font-size: 13px; }
.timeline { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; background: var(--panel-2); border-radius: 2px; }
.timeline .fill { position: absolute; left: 0; top: 12px; height: 4px; background: var(--accent); border-radius: 2px; }
.timeline .knob { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(0,0,0,.4); }
.timeline .mk { position: absolute; top: 4px; width: 3px; height: 20px; margin-left: -1px; border-radius: 1px; opacity: .85; }
.timeline .mk.freeze { background: var(--muted); width: 1px; opacity: .6; }
.timeline .mk.end { background: var(--text); width: 2px; }
.timeline .mk.bomb { background: #ff9f1a; top: 0; height: 28px; }
.timeline .mk.dim { opacity: .2; }
.timeline .mk[data-tick] { cursor: pointer; }
.timeline .mk.selk, .timeline .mk.seld { top: -2px; height: 32px; width: 5px; margin-left: -2px; opacity: 1; z-index: 2; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.timeline .mk.selk { background: #57d36a; }
.timeline .mk.seld { background: #ff4d4d; }
.tl-legend { font-size: 12.5px; display: flex; align-items: center; gap: 6px; min-height: 18px; }
.tl-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.tl-legend .lg.k { background: #57d36a; } .tl-legend .lg.d { background: #ff4d4d; }
.rounds button { position: relative; }
.rounds button .pk { position: absolute; top: -5px; right: -3px; font-style: normal; font-size: 10px; font-weight: 700; line-height: 14px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: #57d36a; color: #06140a; }
.rounds button.died::after { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; }
.rounds { padding-top: 5px; }
.kl.mine-k { box-shadow: inset 3px 0 0 #57d36a; background: rgba(87,211,106,.08); }
.kl.mine-d { box-shadow: inset 3px 0 0 #ff4d4d; background: rgba(255,77,77,.08); }
.help { color: var(--muted); font-size: 12px; }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }

@media (max-width: 1000px) {
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(320px, 62vh) auto auto auto; overflow-y: auto; }
  .stage { grid-row: 1; }
  .controls { grid-row: 2; min-width: 0; }
  .side.left, .side.right { border: 0; border-top: 1px solid var(--line); overflow: visible; min-height: auto; }
  .side.left { grid-row: 3; } .side.right { grid-row: 4; }
  .help { display: none; }
  .hud { top: 8px; gap: 6px; }
  .hud .sc { max-width: 30vw; font-size: 13px; padding: 3px 8px; }
  .hud .clock { min-width: 60px; padding: 3px 8px; }
  .feed { top: 46px; right: 6px; }
  .feed .k { font-size: 11.5px; }
  .transport { flex-wrap: wrap; row-gap: 4px; }
  .transport .timeline { order: 5; flex-basis: 100%; }
  .transport .time { margin-left: auto; }
}
.hud .sc { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tabs / Duelle ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.duels h3 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.duels .link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; text-transform: none; letter-spacing: 0; text-decoration: underline; }
table.st { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.st th { color: var(--muted); font-weight: 600; text-align: right; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
table.st td { padding: 2px 4px; text-align: right; border-top: 1px solid var(--line); }
table.st td:first-child { text-align: left; color: var(--muted); white-space: nowrap; }
.fds { display: grid; gap: 3px; }
.fd { display: flex; gap: 8px; align-items: baseline; padding: 5px 7px; border-radius: 5px; background: var(--panel); cursor: pointer; font-size: 12.5px; border: 1px solid transparent; }
.fd:hover { border-color: var(--line); }
.fd.on { border-color: var(--text); }
.fd .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.fd.hi .dot { background: #ff4d4d; } .fd.mid .dot { background: #ff9f1a; } .fd.lo .dot { background: var(--muted); } .fd.good .dot { background: #57d36a; }
.dus { display: grid; gap: 4px; }
.du { padding: 5px 7px; border-radius: 5px; background: var(--panel); cursor: pointer; font-size: 12px; border-left: 3px solid var(--line); }
.du:hover { background: var(--panel-2); }
.du.win { border-left-color: #57d36a; } .du.loss { border-left-color: #ff4d4d; } .du.util { border-left-color: var(--muted); }
.du.cur { outline: 1px solid #3d4955; }
.du .l1 { display: flex; gap: 6px; align-items: baseline; }
.du .rn { font-weight: 700; } .du .tm { color: var(--muted); font-variant-numeric: tabular-nums; }
.du .res { font-weight: 700; } .du.win .res { color: #57d36a; } .du.loss .res { color: #ff4d4d; }
.du .vs { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du .pl2 { margin-left: auto; color: var(--muted); white-space: nowrap; }
.du .l2 { color: var(--muted); margin-top: 1px; }
.du .l3 { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.du .l3:empty { display: none; }
.bd { font-size: 10.5px; padding: 0 5px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }

/* ---------- KI-Coaching ---------- */
.coach { margin-top: 8px; padding: 8px; border: 1px solid #4b3f6b; border-radius: 6px; background: #17141f; }
.coach h3 { margin-top: 0; }
.coachbar { display: flex; gap: 6px; }
.coachbar select { flex: 1; min-width: 0; font-size: 12.5px; }
.coachbar button { white-space: nowrap; font-size: 12.5px; }
.coach button:disabled { opacity: .55; cursor: wait; }
#cout { margin-top: 8px; font-size: 12.5px; display: grid; gap: 6px; }
.csum { line-height: 1.5; }
.cstr { color: #b6e8bf; }
.cstr b { color: #57d36a; }
.ctips { display: grid; gap: 6px; }
.ctip { background: var(--panel); border-left: 3px solid #a371f7; border-radius: 4px; padding: 6px 8px; display: grid; gap: 3px; }
.ctip .ct { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; padding: 0 6px; border-radius: 9px; background: #2b2340; border-color: #4b3f6b; color: #d2c4ff; line-height: 18px; }
.chip:hover { border-color: #a371f7; }
.cuse { color: var(--muted); font-size: 11.5px; border-top: 1px solid var(--line); padding-top: 6px; }
.cuse b { color: var(--text); }
.cwarn { color: #ff9f1a; }
.cerr { color: var(--danger); }
.timeline .mk.tip { top: -9px; height: 14px; width: 14px; margin-left: -7px; border-radius: 3px; background: #a371f7; color: #fff; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; opacity: 1; z-index: 3; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }

.coachbar { flex-wrap: wrap; }
.coachbar #ct { flex: 0 1 auto; font-size: 12.5px; }
.ck { font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 3px; white-space: nowrap; cursor: help; }
.ck.ok { background: rgba(87,211,106,.15); color: #57d36a; }
.ck.warn { background: rgba(255,159,26,.15); color: #ff9f1a; }
.ck.fail { background: rgba(255,77,77,.18); color: #ff4d4d; }
.ckwhy { font-size: 11px; font-weight: 400; color: #ffb36b; margin-top: 2px; }
.ctip:has(.ck.fail) { border-left-color: #ff4d4d; }
.cstr.fail { color: #ffb0b0; }
.cks { font-size: 11.5px; display: flex; gap: 4px; flex-wrap: wrap; align-items: baseline; }
.ck.none { background: var(--panel-2); color: var(--muted); }

.demo .dname { font-weight: 700; }
.rename-input { background: var(--bg); border: 1px solid var(--accent); border-radius: 5px; padding: 3px 7px; font-weight: 600; min-width: 0; width: min(360px, 100%); }
.cscope { flex: 1; font-size: 12px; align-self: center; }

.coach h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #4b3f6b; border-radius: 6px; overflow: hidden; text-transform: none; letter-spacing: 0; margin-left: auto; }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 2px 9px; font-size: 11.5px; color: var(--muted); }
.seg button.on { background: #2b2340; color: #d2c4ff; }
.cinfo { font-size: 11.5px; margin: -2px 0 6px; }
.coachbar { flex-direction: column; align-items: stretch; } .coachbar .cscope { font-size: 12px; }

/* ---------- Demo-Navigation (Replay | Analyse) ---------- */
.dtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28vw; }
.dscore { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dnav { margin-left: auto; display: flex; gap: 2px; align-self: stretch; flex: none; }
.dnav a { display: flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.dnav a:hover { color: var(--text); }
.dnav a.on { color: var(--text); border-bottom-color: var(--accent); pointer-events: none; }

/* ---------- Analyse-Reiter ---------- */
.ana { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.ana .aside { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 16px; }
.ateam h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; display: flex; justify-content: space-between; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) 30px 30px 30px 40px; gap: 4px; align-items: center; width: 100%;
  text-align: right; padding: 7px 8px; border-radius: 6px; background: var(--panel); border: 1px solid transparent; margin-bottom: 4px;
  font-variant-numeric: tabular-nums; font-size: 13px; }
.arow .an { text-align: left; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow.head { background: none; color: var(--muted); font-size: 11.5px; padding-top: 0; padding-bottom: 2px; margin: 0; }
.arow.head span:first-child { text-align: left; }
button.arow:hover { border-color: var(--line); background: var(--panel-2); }
button.arow.on { border-color: var(--accent); background: #1d1a14; }
.ateam:nth-child(1) .an { color: var(--ct); }
.ateam:nth-child(2) .an { color: var(--t); }
.amain { overflow-y: auto; padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.amain > * { max-width: var(--page-w); width: 100%; }
.ahint { color: var(--muted); padding: 40px 0; text-align: center; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.phead h2 { margin: 0; font-size: 22px; }
.tiles { display: flex; gap: 8px; flex-wrap: wrap; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; min-width: 64px; text-align: center; display: flex; flex-direction: column; }
.tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.agrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card .hnote { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.card table.st td, .card table.st th { padding: 4px 6px; font-size: 13px; }
.card .fd { width: 100%; text-align: left; background: var(--panel-2); }
.card.coach { background: #17141f; border-color: #4b3f6b; }
.card .dus { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.card .du { width: 100%; text-align: left; background: var(--panel-2); border-top: 0; border-right: 0; border-bottom: 0; }
.card .du:hover { background: #222b33; }
.card .coachbar { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.card .coachbar .cscope { flex: 1; min-width: 200px; }
#cout { font-size: 13px; }
@media (max-width: 900px) {
  .ana { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .ana .aside { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .amain { overflow: visible; padding: 14px 12px 40px; }
  .agrid { grid-template-columns: 1fr; }
  .dtitle { max-width: 40vw; }
  .dscore { display: none; }
  .dnav a { padding: 0 10px; }
}
@media (max-width: 640px) {
  .brand { font-size: 0; gap: 0; }   /* nur Logo, damit der Demo-Name Platz hat */
  .topbar { gap: 10px; padding: 0 12px; }
}
@media (max-width: 900px) {
  .ana { grid-template-columns: minmax(0, 1fr); }
  .agrid { grid-template-columns: minmax(0, 1fr); }
  .card table.st td:first-child { white-space: normal; }
  .card table.st th { max-width: 64px; }
  .card .dus { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Home-Button + Upload-Anzeige in der Kopfzeile ---------- */
.home-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.home-btn:hover { border-color: #3d4955; background: var(--panel-2); }
.home-btn span { font-size: 15px; line-height: 1; }
#upl-ind { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; flex: none;
  background: #1d1a14; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; font-weight: 600;
  text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
#upl-ind[hidden] { display: none; }
.ui-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: uipulse 1s ease-in-out infinite; }
@keyframes uipulse { 50% { opacity: .3; } }
.upl.done .bar > i { background: var(--ok); }
@media (max-width: 640px) {
  .home-btn { padding: 4px 8px; font-size: 0; gap: 0; }   /* nur ⌂ */
  .home-btn span { font-size: 16px; }
}

.dnav a.home { border-right: 1px solid var(--line); margin-right: 4px; padding-right: 16px; }
@media (max-width: 640px) {
  .dnav a.home { padding-right: 10px; }
}

/* Kennzahlen: Team/Match jeweils Ø + Median */
table.st5 th.grp { text-align: center; border-bottom: 1px solid var(--line); color: var(--text); font-size: 11.5px; }
table.st5 th, table.st5 td { text-align: right; }
table.st5 td.med, table.st5 th.med { background: rgba(255,255,255,.03); }
table.st5 tbody td:nth-child(3), table.st5 tbody td:nth-child(5) { border-left: 1px solid var(--line); }
.tnote { font-size: 11.5px; margin-top: 8px; }
@media (max-width: 900px) {
  .card table.st5 td, .card table.st5 th { padding: 4px 3px; font-size: 12px; }
  .card table.st5 th { max-width: none; }
}

.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.st5 thead tr:first-child th:nth-child(2) { max-width: 160px; white-space: normal; overflow-wrap: normal; word-break: normal; color: var(--text); }
@media (max-width: 900px) {
  table.st5 { min-width: 430px; }
  table.st5 td:first-child { min-width: 110px; }
}
/* Kennzahlen-Karte breiter als Befunde; Bezeichnungen dürfen umbrechen */
.agrid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
table.st5 td:first-child { white-space: normal; min-width: 120px; }
@media (max-width: 900px) { .agrid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Aim-Karte ---------- */
.aimwrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.aimr { border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; background: var(--panel-2); }
.aimr b { font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.aimr span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.aimr small { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.aimr.hi b, .aimtile.hi b { color: #57d36a; } .aimr.mid b, .aimtile.mid b { color: #e3c14a; } .aimr.lo b, .aimtile.lo b { color: #ff6b5f; }
.aimtile { border-color: #4b3f6b; }
table.aimt td, table.aimt th { text-align: right; white-space: nowrap; }
table.aimt td:first-child { text-align: left; white-space: normal; min-width: 130px; }
table.aimt tbody tr { cursor: help; }
table.aimt td.med, table.aimt th.med { background: rgba(255,255,255,.03); }
table.aimt .nn { font-size: 11.5px; }
.sbar { min-width: 120px; }
.sb { display: inline-block; width: 84px; height: 6px; border-radius: 3px; background: var(--bg); vertical-align: middle; overflow: hidden; }
.sb > i { display: block; height: 100%; }
.sb.hi > i { background: #57d36a; } .sb.mid > i { background: #e3c14a; } .sb.lo > i { background: #ff6b5f; }
.sn { display: inline-block; width: 26px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .aimwrap { grid-template-columns: minmax(0, 1fr); }
  table.aimt { min-width: 520px; }
}

/* Übersicht: Ergebnis aus eigener Sicht */
.demo .dname.win { color: var(--ok); }
.demo .dname.loss { color: var(--danger); }
.demo .dname.draw { color: var(--muted); }
.demo .cname { font-weight: 400; font-size: 13px; }
.demo .sub b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rename-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rename-form .rename-input { min-width: 0; flex: 1 1 140px; }
.rename-form input[type="datetime-local"] { flex: 0 1 190px; }

/* Aim-Trend auf der Übersicht */
.trend { margin-top: 20px; }
.trend-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.trend-head h3 { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 4px 10px; font-size: 12.5px; }
.seg button.on { background: var(--panel-2); color: var(--accent); font-weight: 600; }
.trend-body { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; margin-top: 10px; }
.trend-hero .big { font-size: 44px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.trend-hero .up, .trend-tbl .up { color: var(--ok); }
.trend-hero .down, .trend-tbl .down { color: var(--danger); }
.trend-chart { position: relative; min-width: 0; }
.trend-chart svg { width: 100%; height: auto; display: block; }
.trend-chart .g { stroke: var(--line); stroke-width: 1; opacity: .45; }
.trend-chart .g50 { stroke: var(--line); stroke-width: 1; }  /* Bezugslinie (0 / 1,00 / 50): wie das Raster, nur etwas kräftiger */
.trend-chart .ax { fill: var(--muted); font-size: 10.5px; }
.trend-chart .mline { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.trend-chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.trend-chart .cross { stroke: var(--muted); stroke-width: 1; }
.trend-chart .hit { fill: transparent; cursor: default; }
.trend-chart .ttip { position: absolute; top: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 9px; font-size: 12.5px; white-space: nowrap; pointer-events: none; z-index: 2; }
.trend-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 2px; padding-left: 28px; }
.trend-legend i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.trend-legend .ld { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.trend-chart .lobby { stroke: var(--ct); stroke-width: 1.5; stroke-dasharray: 6 4; opacity: .85; }
.trend-legend .lo { width: 14px; height: 0; border-top: 2px dashed var(--ct); }
.trend-hero .lobv { color: var(--ct); }
.trend-tbl { margin-top: 10px; }
.trend-tbl summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.trend-tbl table { margin-top: 8px; }
@media (max-width: 640px) { .trend-body { grid-template-columns: 1fr; } }

/* Befunde mit Lobby-Vergleich */
.card .fd { display: flex; gap: 8px; align-items: flex-start; }
.card .fd .dot { margin-top: 5px; flex: none; }
.fd .ftx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd .ft { font-weight: 600; }
.fd .fdet { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.fd .fcmp { font-size: 12px; color: var(--muted); }
.fd .fcmp b { color: var(--text); }
.fd.noref { cursor: default; opacity: 1; }
.fd.noref:hover { filter: none; }
.fsub { margin: 10px 0 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
table.st tr.grp td { padding-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.hint { cursor: help; text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.du .imp { margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.du .imp.pos, .tile b.pos { color: var(--ok); }
.du .imp.neg, .tile b.neg { color: var(--danger); }

/* Mein Profil */
.prof-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.prof-head h2 { margin: 0 0 2px; }
.pnote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.prof .card { margin-bottom: 12px; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pgrid .card { margin-bottom: 0; }
.pgrid + .card { margin-top: 12px; }
.pat > button { width: 100%; display: grid; grid-template-columns: 10px 1fr 90px 44px; gap: 8px; align-items: center;
  background: var(--panel-2); border: 1px solid transparent; text-align: left; padding: 6px 8px; margin-bottom: 3px; }
.pat > button:hover { border-color: var(--line); }
.pat .pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pat .pbar { height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.pat .pbar i { display: block; height: 100%; background: var(--muted); border-radius: 3px; }
.pat .pn { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.pat .pn b { color: var(--text); }
.pat .pits { display: none; padding: 2px 0 8px 18px; }
.pat.open .pits { display: grid; gap: 2px; }
.pit { display: flex; gap: 8px; align-items: center; font-size: 12.5px; text-decoration: none; color: var(--text); padding: 3px 4px; border-radius: 4px; }
.pit:hover { background: var(--panel-2); }
.pit .muted { margin-left: auto; white-space: nowrap; }
.prof .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.prof .dot.hi { background: #ff4d4d; } .prof .dot.mid { background: #ff9f1a; } .prof .dot.good { background: #57d36a; }
.pst .up { color: var(--ok); } .pst .down { color: var(--danger); }
.dm-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.dm-ctl select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.dm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.dm-maps { position: relative; }
.dm-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.dm-fig { margin: 0; }
.dm-fig figcaption { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dm-fig svg { width: 100%; height: auto; display: block; background: var(--bg); border-radius: 8px; }
.dd { stroke: #0d1013; stroke-width: 3; opacity: .9; cursor: pointer; }
.dd.t { fill: var(--t); } .dd.ct { fill: var(--ct); }
.dd.op { stroke: #fff; stroke-width: 4; }
.dd:hover { opacity: 1; stroke: #fff; stroke-width: 5; }
.dm-legend { margin-top: 6px; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.dm-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dm-legend .lt { background: var(--t); } .dm-legend .lct { background: var(--ct); }
.dm-legend .lop { background: transparent; border: 2px solid #fff; width: 7px; height: 7px; }
.dm-maps .ttip { position: absolute; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
  font-size: 12.5px; pointer-events: none; z-index: 3; max-width: 260px; }
.dm-maps .ttip .up { color: var(--ok); } .dm-maps .ttip .down { color: var(--danger); }
@media (max-width: 900px) { .pgrid, .dm-wrap { grid-template-columns: 1fr; } }

/* Auto-Import */
.aimport { margin-top: 20px; }
.ai-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-head h3 { margin: 0; }
.ai-head #ai-run { margin-left: auto; }
.ai-gc { font-size: 12.5px; padding: 2px 8px; border-radius: 10px; background: var(--panel-2); }
.ai-gc.ok { color: var(--ok); } .ai-gc.mid { color: var(--accent); } .ai-gc.bad { color: var(--danger); }
.ai-sum { font-size: 12.5px; }
.ai-err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.ai-guard { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.ai-guard input { width: 90px; text-transform: uppercase; letter-spacing: 2px; background: var(--bg); border: 1px solid var(--accent);
  border-radius: 5px; padding: 4px 8px; color: var(--text); }
.ai-list { margin-top: 8px; }
.ai-list summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ai-it { display: grid; grid-template-columns: 150px 140px 1fr; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.ai-it.imported span:first-child { color: var(--ok); } .ai-it.error span:first-child { color: var(--danger); }
.ai-it .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .ai-it { grid-template-columns: 1fr 1fr; } .ai-it .muted { grid-column: 1 / -1; } }
.ai-retry { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.steamlink { color: var(--ct); text-decoration: none; white-space: nowrap; }
.steamlink:hover { text-decoration: underline; }
.arow .an { display: flex; align-items: center; gap: 7px; }
.arow .av { flex: none; width: 22px; height: 22px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.arow .av img { width: 100%; height: 100%; display: block; }

/* Match-Übersicht im Analyse-Reiter */
.ovhead { margin-bottom: 12px; }
.ovhead h2 { margin: 0 0 2px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ovres { font-variant-numeric: tabular-nums; }
.ovres.win, .ovlbl.win { color: var(--ok); } .ovres.loss, .ovlbl.loss { color: var(--danger); }
.ovlbl { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.amain > .card { margin-bottom: 12px; }
.ovteam h3 { display: flex; align-items: baseline; gap: 8px; }
.ovteam h3 > span:first-child { color: var(--text); font-size: 13px; }
.ovteam.mine { border-color: #3a4a3a; }
.ovsc { margin-left: auto; font-size: 18px; color: var(--text); }
.ovt th { white-space: nowrap; cursor: pointer; user-select: none; font-size: 11.5px; }
.ovt th.on { color: var(--accent); }
.ovt td, .ovt th { text-align: right; padding: 5px 6px; font-variant-numeric: tabular-nums; }
.ovt .pn { text-align: left; }
.ovt td.pn { font-weight: 600; }
.ovt .pnw { display: flex; align-items: center; gap: 7px; min-width: 150px; max-width: 200px; }
.ovt .pn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovt .av { flex: none; width: 22px; height: 22px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.ovt .av img { width: 100%; height: 100%; display: block; }
.ovt tbody tr { cursor: pointer; }
.ovt tbody tr:hover { background: var(--panel-2); }
.ovt tr.me td.pn .nm { color: var(--accent); }
.ovt td.best { font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.ovt td.pos { color: var(--ok); } .ovt td.neg { color: var(--danger); }
.rstrip-wrap { display: flex; gap: 8px; }
.rlabels { display: grid; grid-template-rows: 22px 14px 22px; gap: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rlabels span { display: flex; align-items: center; }
.rstrip { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.rcol { display: grid; grid-template-rows: 22px 14px 22px; gap: 2px; text-decoration: none; flex: none; }
.rcol:hover .rb:not(.none) { outline: 2px solid var(--text); }
.rcol .rn { font-size: 10px; color: var(--muted); text-align: center; line-height: 14px; }
.rb { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #0d1013; }
.rb svg { width: 14px; height: 14px; }
.rb.t { background: var(--t); } .rb.ct { background: var(--ct); }
.rb.none { background: var(--panel-2); opacity: .5; }
.rsep { width: 2px; background: var(--muted); margin: 0 4px; border-radius: 1px; opacity: .6; flex: none; }
.rlegend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.rlegend span { display: inline-flex; align-items: center; gap: 5px; }
.rlegend svg { width: 13px; height: 13px; }
.rlegend .t::before, .rlegend .ct::before { content: ""; width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.rlegend .t::before { background: var(--t); } .rlegend .ct::before { background: var(--ct); }
.backov { display: inline-block; font-size: 12.5px; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
.backov:hover { color: var(--text); }
.card table.ovt th { max-width: none; overflow: visible; }
.card table.ovt td, .card table.ovt th { padding: 4px 5px; font-size: 12.5px; }
.ovt .pnw { min-width: 130px; max-width: 170px; }

/* Recoil Control */
.rc-wrap { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 18px; align-items: start; }
.rc-fig { margin: 0; }
.rc-svg { width: 100%; height: auto; display: block; background: var(--bg); border-radius: 8px; }
.rc-body circle, .rc-body rect { fill: #232c35; }
.rc-line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rc-outline circle, .rc-outline rect { fill: none; stroke: #e3e8ec; stroke-width: 1.6; opacity: .85; }
.rc-g { stroke: #1d252d; stroke-width: 1; }
.rc-dots circle { opacity: .75; }
.rc-cent circle:first-of-type { stroke: var(--panel); stroke-width: 3; }
.rc-core { fill: #fff; }
.rc-ax { fill: var(--muted); font-size: 9px; }
.rc-leg { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.rc-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.rc-leg .rc-lc { width: 11px; height: 11px; background: var(--muted); box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 5px #fff; }
.rc-tips { margin-top: 10px; font-size: 13px; display: grid; gap: 4px; }
.rc-tips:not(.muted) div::before { content: "→ "; color: var(--accent); }
@media (max-width: 760px) { .rc-wrap { grid-template-columns: 1fr; } }

/* Recoil Control je Waffe (Profil) */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sp-tile { margin: 0; background: var(--panel-2); border: 1px solid transparent; border-radius: 8px; padding: 10px; }
.sp-tile.practice { border-color: var(--danger); }
.sp-tile figcaption { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.sp-tile figcaption .muted { margin-left: auto; font-size: 12px; }
.sp-badge { font-size: 11px; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: .5px; }
.sp-svg { width: 100%; height: auto; display: block; background: var(--bg); border-radius: 6px; }
.sp-l { fill: none; stroke-width: var(--sw); stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.sp-g { stroke: #1d252d; stroke-width: calc(var(--sw) * .5); }
.sp-n { fill: var(--muted); }
.sp-stats { display: grid; gap: 3px; font-size: 12.5px; margin-top: 6px; }
.sp-v { color: var(--text); }
.sp-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.sp-leg i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* zwei Trend-Karten (Performance + Aim) in einem Block */
.trend-cards { display: grid; gap: 18px; }
.trend-card + .trend-card { border-top: 1px solid var(--line); padding-top: 16px; }
.trend-metric { margin-top: 8px; }

/* Übersicht: nach Tagen gruppiert, Elo */
.dgroup + .dgroup { margin-top: 18px; }
.dday { display: flex; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.dday .muted { font-weight: 400; font-size: 12.5px; }
.dday .elo-ch { font-size: 12.5px; }
.dday-stats { font-size: 12.5px; color: var(--muted); margin: -4px 0 8px; }
.dday-stats b { color: var(--text); font-weight: 600; } .dday-stats b.pos { color: var(--ok); } .dday-stats b.neg { color: var(--danger); }
.dday-stats .sep { opacity: .5; margin: 0 2px; }
.elo { text-align: right; font-variant-numeric: tabular-nums; min-width: 100px; }
.elo-v { font-weight: 700; font-size: 15px; }
.elo-ch { font-weight: 600; margin-left: 6px; font-size: 13px; }
.elo-ch.pos { color: var(--ok); } .elo-ch.neg { color: var(--danger); }
.elo-avg { font-size: 12px; }
.elo-v.t1 { color: #b0b6bd; } .elo-v.t2 { color: #8ec5ff; } .elo-v.t3 { color: #5a8dff; } .elo-v.t4 { color: #b46cff; }
.elo-v.t5 { color: #e45ce4; } .elo-v.t6 { color: #ff5a5a; } .elo-v.t7 { color: #ffd34d; }
@media (max-width: 640px) {
  .demo .elo { grid-column: 2; text-align: left; min-width: 0; display: flex; gap: 10px; align-items: baseline; }
}


/* Elo-Verlauf: Start → (±) → neu */
.elo-flow { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.elo-arrow { display: inline-flex; flex-direction: column; align-items: center; min-width: 52px; line-height: 1; }
.elo-arrow .elo-ch { margin: 0 0 2px; font-size: 11.5px; }
.elo-arrow i { position: relative; display: block; width: 100%; height: 2px; background: var(--muted); border-radius: 1px; }
.elo-arrow i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--muted); border-right: 0; }
.elo-arrow.pos i, .elo-arrow.pos i::after { background: var(--ok); } .elo-arrow.pos i::after { background: none; border-left-color: var(--ok); }
.elo-arrow.neg i { background: var(--danger); } .elo-arrow.neg i::after { border-left-color: var(--danger); }
.dday-elo { margin-left: 4px; font-size: 13px; }
.dday-elo .elo-v { font-size: 13px; }
.elo { min-width: 190px; }
.elo .elo-flow { justify-content: flex-end; }
.trend-chart svg { max-width: 100%; }
.ai-bf .ai-code { width: min(360px, 100%); letter-spacing: 1px; text-transform: none; }
.ai-bf > span { flex-basis: 100%; color: var(--muted); }

/* Match-Art */
.mbadge { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; line-height: 16px; align-self: center; }
.mbadge.premier { background: #3b2350; color: #e7b6ff; }
.mbadge.faceit { background: #ff5500; color: #fff; }
.mbadge.competitive, .mbadge.wingman, .mbadge.other { background: var(--panel-2); color: var(--muted); }
.skipnote { font-size: 12.5px; margin-top: 12px; cursor: help; }
.elo.fc .elo-v { color: #ff7a33; }
.fclink { color: #ff7a33; text-decoration: none; }
.fclink:hover { text-decoration: underline; }

/* Kopfzeile: Upload-Knopf, Bot-Status, eigenes Profil */
.tb-right { display: flex; align-items: center; gap: 10px; flex: none; margin-left: 12px; }
.tb-btn { padding: 4px 10px; font-size: 13px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.tb-btn:hover { border-color: var(--accent); color: var(--accent); }
.tb-bot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12.5px; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 6px; }
.tb-bot:hover { border-color: var(--line); }
.tb-bot i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.tb-bot.ok i { background: var(--ok); } .tb-bot.warn i { background: var(--t); } .tb-bot.bad i { background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.bot-pop { position: fixed; top: 54px; right: 16px; width: min(560px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; z-index: 50; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.me-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 3px 8px 3px 3px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.me-chip:hover { border-color: var(--accent); }
.me-chip img { width: 26px; height: 26px; border-radius: 5px; display: block; }
.me-name { font-weight: 600; font-size: 13px; }
.me-pr { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.me-pr.t1 { color: #b0b6bd; } .me-pr.t2 { color: #8ec5ff; } .me-pr.t3 { color: #5a8dff; } .me-pr.t4 { color: #b46cff; }
.me-pr.t5 { color: #e45ce4; } .me-pr.t6 { color: #ff5a5a; } .me-pr.t7 { color: #ffd34d; }
.me-fc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.me-fc b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; color: #0d1013; border: 2px solid currentColor; }
.me-fc.l1 b { background: #eee; } .me-fc.l2 b { background: #1ce400; } .me-fc.l4 b { background: #ffc800; }
.me-fc.l8 b { background: #ff6309; } .me-fc.l10 b { background: #fe1f00; color: #fff; }
.drop-ov { position: fixed; inset: 0; z-index: 100; background: rgba(13,16,19,.8); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.drop-ov div { border: 3px dashed var(--accent); border-radius: 16px; padding: 48px 80px; font-size: 22px; font-weight: 700; color: var(--accent); }
.drop-ov[hidden] { display: none; }
.page > .uploads:empty { display: none; }
.page > .uploads { margin: 0 0 12px; }
@media (max-width: 760px) {
  .me-name, .me-fc, .tb-bot span { display: none; }
  .tb-right { gap: 6px; margin-left: 6px; }
}

/* Profilkopf auf der Startseite */
.hero { display: grid; grid-template-columns: minmax(260px, 1.3fr) auto auto minmax(320px, 1.4fr); gap: 28px; align-items: center; margin-bottom: 16px; padding: 18px 20px; }
.hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hero-av { width: 88px; height: 88px; border-radius: 12px; background: var(--panel-2); flex: none; object-fit: cover; box-shadow: 0 0 0 2px var(--line); }
.hero-id h2 { margin: 0 0 6px; font-size: 26px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.hero-links a { color: var(--muted); text-decoration: none; }
.hero-links a:hover { color: var(--text); }
.hr-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 4px; }
.hr-val { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hr-val.t1 { color: #b0b6bd; } .hr-val.t2 { color: #8ec5ff; } .hr-val.t3 { color: #5a8dff; } .hr-val.t4 { color: #b46cff; }
.hr-val.t5 { color: #e45ce4; } .hr-val.t6 { color: #ff5a5a; } .hr-val.t7 { color: #ffd34d; }
.hr-val.fcv { color: #ff7a33; }
.hr-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hr-sub .up { color: var(--ok); } .hr-sub .down { color: var(--danger); }
.hr-fc { display: flex; align-items: center; gap: 10px; }
.hero-rank { padding-left: 24px; border-left: 1px solid var(--line); }
.hero-stats { padding-left: 24px; border-left: 1px solid var(--line); }
.hs-row { display: flex; gap: 22px; flex-wrap: wrap; }
.hs b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.hs span { font-size: 11.5px; color: var(--muted); }
.fc-ico, .fc-ring { display: block; flex: none; }
.me-fc { gap: 6px; }
@media (max-width: 1250px) { .hero { grid-template-columns: 1fr 1fr; } .hero-stats { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .hero-rank { padding-left: 0; border-left: 0; }
  .hero-av { width: 64px; height: 64px; }
}

/* Match-Karte: Stats-Zeile, Uhrzeit, Elo zentriert */
.demo .sub .sep { color: var(--muted); margin: 0 3px; opacity: .7; }
.demo .sub b.pos { color: var(--ok); } .demo .sub b.neg { color: var(--danger); }
.demo .when { font-size: 11px; color: var(--muted); margin-top: 2px; opacity: .8; }
.elo { text-align: center; }
.elo .elo-flow { justify-content: center; }
.elo .elo-avg { text-align: center; }

/* Team-Platzierung in der Match-Karte */
.demo .rank { font-size: .85em; font-weight: 600; color: var(--muted, #8a93a6); margin-left: 2px; }
.demo .rank.top { color: #e8b84a; }


/* Seite „Server“ (Practice-Server steuern) */
.srv { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.srv-st { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.srv-st > div { flex-basis: 100%; }
.srv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; margin-right: 4px; }
.srv-dot.on { background: var(--ok); }
.srv-dot.wait { background: var(--accent); animation: srvblink 1s infinite alternate; }
@keyframes srvblink { to { opacity: .35; } }
.srv-form { display: flex; flex-direction: column; gap: 12px; }
.srv-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.srv-row > span { width: 64px; color: var(--muted); font-size: 13px; }
.srv-row select { min-width: 0; max-width: 100%; flex: 1; }
.srv-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.srv-modes button.on { border-color: var(--accent); color: var(--accent); }
.srv-modes button:disabled { opacity: .45; cursor: not-allowed; }
.srv-modes small { color: var(--muted); }
.srv-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.srv-hint { margin: 0; font-size: 12.5px; }
.srv-act button.small { padding: 3px 9px; font-size: 12.5px; }
.srv-synclamp { margin: 0; }
.srv [hidden] { display: none !important; }
.srv-connect { margin-left: auto; padding: 5px 12px; border-radius: var(--radius); background: var(--ok); color: #06140a; font-weight: 600; text-decoration: none; }
.srv-nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 7px; background: var(--muted); }
.srv-nav-dot.running { background: var(--ok); }
.srv-nav-dot.starting { background: var(--accent); }
.srv-nav-dot.exited { background: var(--danger); }
.srv-dot.off { background: var(--danger); }

/* Mobil: Kopfzeile darf nichts überdecken – Tabs scrollen, rechts nur Symbole */
@media (max-width: 640px) {
  #topbar-extra { overflow-x: auto; scrollbar-width: none; }
  #topbar-extra::-webkit-scrollbar { display: none; }
  #topbar-extra > * { flex: none; }
  /* Upload am Handy unüblich, Demo-Name steht auf der Seite selbst, Logo führt zur Übersicht */
  .tb-btn, .me-pr, .m-hide, #topbar-extra > .muted, .dnav .home { display: none; }
  .dtitle { font-size: 13px; white-space: nowrap; max-width: none; }
  #topbar-extra .dnav a { padding: 0 7px; } #topbar-extra { gap: 6px; }
  .dtitle .dmscore { display: inline; }
  .me-chip { padding: 3px; }
}

/* Server-Seite: Trainingsstatistik */
.srv-stats { display: flex; flex-direction: column; gap: 12px; }
.srv-stats .card { margin: 0; min-width: 0; }
.srv-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.srv-facts b { color: var(--text); font-variant-numeric: tabular-nums; }
.srv-weak { width: 100%; margin-top: 10px; }
.srv-weak th { text-align: left; font-weight: 400; color: var(--muted); }
.card table.srv-weak th { max-width: none; white-space: nowrap; }
.card table.srv-weak th:first-child { text-align: left; }
h1.section.with-ctl { display: flex; align-items: center; gap: 12px; }
/* Mobil: in der Team-Übersicht ist die Spielerliste doppelt (Zeilen sind klickbar) – Tabelle zuerst; Namen beim Scrollen fix */
/* Übersicht: Tabelle ersetzt die Spielerliste (die bleibt nur zum Wechseln in der Spieleransicht) */
.ana.ov { grid-template-columns: minmax(0, 1fr); }
.ana.ov .aside { display: none; }
@media (min-width: 901px) { .ana.ov .ovt { font-size: 14px; } .ana.ov .ovt td, .ana.ov .ovt th { padding: 7px 10px; } .ana.ov .ovt th { font-size: 12.5px; } .ana.ov .ovt .av { width: 26px; height: 26px; } }
.ovt td.pn, .ovt th.pn { position: sticky; left: 0; z-index: 1; background: var(--panel); }
@media (max-width: 640px) { .ovt .pnw { min-width: 0; max-width: 120px; } .ovt .av { display: none; } }
.dmscore { display: none; font-variant-numeric: tabular-nums; }  /* nur mobil – Desktop zeigt den Teamscore daneben */
.dmscore.win { color: var(--ok); } .dmscore.loss { color: var(--danger); }


/* Match-Übersicht: Umschalter Teams/Match, Teamkennung in der gemeinsamen Tabelle */
.ovview { display: flex; margin: 0 0 8px; }
.ovview .seg button { font-size: 12.5px; padding: 4px 12px; }
.ovt tr.tm-a td.pn { box-shadow: inset 3px 0 0 var(--ok); }
.ovt tr.tm-b td.pn { box-shadow: inset 3px 0 0 var(--danger); }
.ovkey i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.ovkey .k-a { background: var(--ok); } .ovkey .k-b { background: var(--danger); }

/* Profil: „Wird es besser?“ unter dem Befund */
.pat .ptr { grid-column: 2 / -1; font-size: 11.5px; color: var(--text); font-weight: 400; margin-top: -4px; }
.pat .ptr .up { color: var(--ok); } .pat .ptr .down { color: var(--danger); }

/* Profil: Position nach 20 s */
.setup { display: grid; gap: 3px; margin: 4px 0 12px; font-size: 12.5px; }
.setup > div { display: grid; grid-template-columns: minmax(0, 1fr) 70px 38px; gap: 8px; align-items: center; }
.setup > div > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup i { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.setup i b { display: block; height: 100%; background: var(--muted); }
.setup > div > span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.dm-places .fsub + .setup, .dm-places table + .fsub { margin-top: 12px; }

/* Profil: Wirtschaft */
.econ { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.econ > div + div { border-left: 1px solid var(--line); padding-left: 24px; }   /* Trennstrich zwischen den Blöcken */
.econ-big { font-size: 13.5px; }
.econ th:first-child { text-align: left; }
.econ-n { font-size: 11.5px; margin-top: 2px; }
.econ-big b { color: var(--text); font-weight: 700; }
@media (max-width: 640px) { .econ { grid-template-columns: minmax(0, 1fr); gap: 14px; } .econ > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }

/* Online-Modus: Login */
.login { display: grid; place-items: center; min-height: 70vh; }
.login-card { width: min(340px, 100%); display: grid; gap: 12px; padding: 24px; text-align: center; }
.login-card h2 { margin: 0 0 4px; }
.login-logo { width: 72px; height: 72px; border-radius: 12px; justify-self: center; }
.login-card label { display: grid; gap: 4px; text-align: left; font-size: 13px; color: var(--muted); }
.login-card input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); font: inherit; }
.login-msg { min-height: 1.2em; font-size: 13px; }
.tb-out { font-size: 12.5px; }

/* Online: Premier-Import pro Nutzer */
.uimp { margin-top: 16px; }
.uimp p { margin: 0 0 10px; font-size: 13px; }
.uimp-here { color: var(--text); font-weight: 700; }
.uimp-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.uimp .link { background: none; border: 0; padding: 0; margin-left: 4px; color: var(--accent); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.uimp-err { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.uimp-items { font-size: 12px; margin-top: 4px; }
.uimp-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.uimp-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.uimp-form input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; color: var(--text); font: inherit; width: 300px; max-width: 100%; }
.uimp-form label:first-child input { width: 170px; }
.uimp-msg { font-size: 12.5px; }

.setup-note { margin: 10px 2px; font-size: 13px; }

/* Admin-Übersicht */
table.adm-t td, table.adm-t th { text-align: left; padding: 8px 10px; vertical-align: middle; }
.adm-u { display: flex; align-items: center; gap: 10px; }
.adm-u .av { width: 32px; height: 32px; border-radius: 5px; overflow: hidden; background: var(--panel-2); flex: none; }
.adm-u .av img { width: 100%; height: 100%; display: block; }
.adm-tag { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; }
.adm-t .up { color: var(--ok); }
