:root {
  color-scheme: light;
  --bg: #f4f3f0; --surface: #fcfcfb; --border: #e3e1dc;
  --ink: #0b0b0b; --ink2: #52514e; --ink3: #75736d;
  --grid: rgba(11,11,11,.08); --accent: #2a78d6;
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#6250d6; --s8:#e34948;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #121211; --surface: #1a1a19; --border: #2d2c2a;
    --ink: #f0efec; --ink2: #c3c2b7; --ink3: #97958c;
    --grid: rgba(240,239,236,.10); --accent: #3987e5;
    --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#0ca30c; --s7:#9085e9; --s8:#e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface: #1a1a19; --border: #2d2c2a;
  --ink: #f0efec; --ink2: #c3c2b7; --ink3: #97958c;
  --grid: rgba(240,239,236,.10); --accent: #3987e5;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#0ca30c; --s7:#9085e9; --s8:#e66767;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
button:hover { border-color: var(--ink3); }
select { background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font: inherit; }
label { display: flex; align-items: center; gap: 8px; color: var(--ink2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }

/* ---------- Grundgerüst: volle Bildschirmhöhe, kein Seiten-Scroll ---------- */
.app { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; min-height: 100vh; }
@media (min-width: 1100px) and (min-height: 680px) {
  .app { height: 100vh; overflow: hidden; }
  .main { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
}
@media not ((min-width: 1100px) and (min-height: 680px)) {
  .main { display: flex; flex-direction: column; gap: 10px; }
  .charts { height: auto; }
  .chart { height: 300px; }
  .tablecard { height: 480px; }
  .notescard { height: 520px; }
  .dhead { grid-template-columns: 1fr; }
  .tiles { justify-content: flex-start; flex-wrap: wrap; }
  .pickers { justify-self: start; }
  .notecols { grid-auto-columns: minmax(300px, 1fr); }
}

/* ---------- Kopfzeile ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px; }
.tb-left { justify-self: start; }
.tb-right { justify-self: end; }
.brand { text-align: center; }
.brand h1 { font-size: 30px; line-height: 1.1; letter-spacing: .01em; }
.sub { color: var(--ink3); font-size: 12px; margin-top: 3px; }
.controls { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.seasons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lbl { color: var(--ink2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.chip .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--ink3); opacity: .35; }
.chip[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.chip[aria-pressed="true"] .sw { opacity: 1; }
.chip.nodata { color: var(--ink3); }
.chip .cnt { color: var(--ink3); font-weight: 400; font-size: 12px; }

/* ---------- Heldenleiste ---------- */
.picker { --icon: clamp(26px, calc((100vw - 260px) / 30), 56px); --gap: clamp(3px, .3vw, 6px);
  display: grid; grid-template-columns: 1fr auto 1fr; column-gap: clamp(16px, 2.6vw, 56px); align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; }
.rolegroup { display: flex; flex-direction: column; gap: 5px; }
.rolegroup.tank { justify-self: end; align-items: flex-end; }
.rolegroup.damage { justify-self: center; align-items: center; }
.rolegroup.support { justify-self: start; align-items: flex-start; }
.rolegroup.other { grid-column: 1 / -1; justify-self: center; align-items: center; }
.rolegroup .rl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); font-weight: 600; }
.heroes { display: flex; flex-wrap: wrap; gap: var(--gap); list-style: none; margin: 0; padding: 0;
  width: calc(var(--cols, 8) * var(--icon) + (var(--cols, 8) - 1) * var(--gap)); }
.tank .heroes { justify-content: flex-end; }
.damage .heroes { justify-content: center; }
.support .heroes { justify-content: flex-start; }
.hero-btn { position: relative; width: var(--icon); height: var(--icon); padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--bg); overflow: visible; transition: transform .1s; }
.hero-btn:hover { transform: scale(1.12); border-color: var(--ink3); z-index: 2; }
.hero-btn img, .hero-btn .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hero-btn .ph { display: grid; place-items: center; font-weight: 700; color: var(--ink2); font-size: 15px; }
.hero-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--bg); }
.hero-btn.nodata { opacity: .4; }
.hero-btn .tip { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--surface);
  font-size: 12px; padding: 3px 8px; border-radius: 6px; pointer-events: none; opacity: 0; transition: opacity .1s; z-index: 5; }
.hero-btn:hover .tip, .hero-btn:focus-visible .tip { opacity: 1; }

/* ---------- Detailkopf ---------- */
.dhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; min-height: 64px; }
.dhero { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dhead img { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.dtitle { min-width: 200px; }
.dtitle h2 { font-size: 22px; line-height: 1.1; }
.dtitle p { color: var(--ink2); font-size: 13px; margin-top: 3px; }
.tiles { display: flex; gap: 10px; justify-content: center; }
.tile { flex: 0 0 auto; min-width: clamp(170px, 13.5vw, 270px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 7px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
.tile .k { grid-column: 1 / -1; color: var(--ink2); font-size: 12px; }
.tile .v { font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .x { color: var(--ink3); font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums; }
/* Season-Dropdown */
.pickers { display: flex; gap: 10px; justify-self: end; align-items: center; }
.seasonpick, .rankpick { position: relative; }
.ddbtn { display: flex; align-items: center; gap: 7px; padding: 6px 14px; min-height: 40px; border-radius: 10px; }
.ddbtn .lbl { color: var(--ink2); }
.rimgs { display: inline-flex; align-items: center; gap: 2px; }
.rimgs img { width: 26px; height: 26px; }
.rimgs.many img { width: 22px; height: 22px; }
#rank-sum { font-weight: 600; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.rank-menu { width: 270px; }
.rank-menu .rk { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.rank-menu .rk:hover { background: var(--bg); }
.rank-menu .rk input { margin: 0 2px 0 8px; flex: none; cursor: pointer; }
.rank-menu .rk button { flex: 1; width: auto; }
.rank-menu .hint { padding: 6px 8px 2px; color: var(--ink3); font-size: 12px; }
.rank-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; padding: 6px 8px; text-align: left; background: transparent; }
.rank-menu button:hover, .rank-menu button:focus-visible { background: var(--bg); }
.rank-menu button[aria-selected="true"] { font-weight: 700; background: var(--bg); }
.rank-menu img { width: 32px; height: 32px; }
.langpick { position: relative; }
.lang-menu { width: 190px; }
img.flag, .lang-menu img.flag { width: 24px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); }
#season-sum { font-weight: 600; }
.season-menu { width: 300px; }
.season-menu label { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 10px; padding: 7px 8px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.season-menu label:hover { background: var(--bg); }
.season-menu .sw { width: 12px; height: 12px; border-radius: 3px; }
.season-menu .nm { font-weight: 600; }
.season-menu .meta { grid-column: 3; color: var(--ink3); font-size: 12px; }
.season-menu .hint { padding: 4px 8px 2px; color: var(--ink3); font-size: 12px; }
/* Werkzeugzeile über den Graphen */
.charttools { display: flex; align-items: center; gap: 8px 18px; }
.charttools .legend { flex: 1; }
.linkbtn { border: 0; background: none; padding: 2px 4px; color: var(--ink2); font-size: 12px; text-decoration: underline dotted; text-underline-offset: 3px; }
.linkbtn[aria-pressed="true"] { color: var(--ink); font-weight: 600; }

/* ---------- Graphen ---------- */
.chartzone { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0 2px; font-size: 13px; color: var(--ink2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 3px; border-radius: 2px; }
.legend .nd { color: var(--ink3); }
.charts { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chart { margin: 0; padding: 10px 12px 8px; display: flex; flex-direction: column; min-height: 0; }
figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
h3 { font-size: 15px; }
.cap { color: var(--ink3); font-size: 12px; }
.canvas { position: relative; flex: 1; min-height: 0; }
.canvas canvas { position: absolute; inset: 0; }
.rawview, .empty { flex: 1; min-height: 0; }
.empty { display: grid; place-items: center; color: var(--ink3); font-size: 15px; }
.note { color: var(--ink3); font-size: 12px; }
@media (max-width: 1099px) { .charts { grid-template-columns: 1fr; } }

/* ---------- Tabellen ---------- */
.tablecard { display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.tablehead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.tablehead h2 { font-size: 15px; }
.tablehead span { color: var(--ink3); font-size: 12px; }
.scroll { flex: 1; min-height: 0; overflow: auto; height: 100%; scrollbar-color: var(--border) transparent; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 5px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface); color: var(--ink2); font-weight: 600; cursor: pointer; user-select: none; z-index: 1; }
th.n, td.n { text-align: right; }
td.d { color: var(--ink2); }
#rank tbody tr { cursor: pointer; }
#rank tbody tr:hover { background: var(--bg); }
#rank tbody tr.sel td:first-child { box-shadow: inset 4px 0 0 var(--accent); font-weight: 600; }
.rawview { padding: 8px 12px; display: flex; flex-direction: column; }

[hidden] { display: none !important; }

/* ---------- Patch Notes ---------- */
.notescard { display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.notescard .tablehead { justify-content: flex-start; }
.notescard .tablehead span { flex: 1; }
.check.small { font-size: 12px; color: var(--ink2); gap: 6px; }
.notecols { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; overflow-x: auto; scrollbar-color: var(--border) transparent; }
.ncol { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.nhead { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.nhead .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.nhead .cnt { margin-left: auto; color: var(--ink3); font-weight: 400; font-size: 12px; }
.nlist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-color: var(--border) transparent; }
.patch { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.patch header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.patch time { font-weight: 600; }
.patch a { color: var(--ink2); font-size: 12px; text-decoration: none; border-bottom: 1px dotted var(--ink3); }
.patch a:hover { color: var(--ink); }
.badge { font-size: 11px; color: var(--ink2); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-left: auto; }
.patch ul { margin: 2px 0 4px; padding-left: 18px; color: var(--ink2); }
.patch li { margin: 1px 0; }
.ab b { font-weight: 600; color: var(--ink); }
.dev { color: var(--ink3); font-style: italic; margin-top: 4px; font-size: 12px; }
.nempty { color: var(--ink3); font-size: 13px; padding: 4px 2px; }
.notesempty { flex: 1; display: grid; place-items: center; color: var(--ink3); }
.ddbtn, #season-sum, .tile .x { white-space: nowrap; }
@media (max-width: 1500px) {
  .tile { grid-template-columns: 1fr; min-width: clamp(150px, 13vw, 200px); padding: 6px 12px; }
  .tile .v { font-size: 22px; }
}
.rimgs img, .rank-menu img { object-fit: contain; }

.tile .k { white-space: nowrap; }
figcaption { flex-wrap: wrap; row-gap: 0; }
figcaption h3 { white-space: nowrap; }
.cap { margin-left: auto; }

/* ---------- Ansicht-Umschalter, Map-Auswahl ---------- */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; padding: 4px 12px; background: transparent; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.mappick { position: relative; }
.ddbtn.compact { min-height: 0; padding: 4px 12px; }
.map-menu { left: 0; right: auto; width: 340px; max-height: 440px; overflow: auto; }
.map-menu .quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 6px 8px; }
.map-menu .quick button { padding: 3px 10px; font-size: 12px; }
.map-menu .grp { margin-bottom: 6px; }
.map-menu .grp-h { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 6px 8px 2px; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); font-weight: 600; }
.map-menu .grp-h:hover { color: var(--ink); }
.map-menu label { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.map-menu label:hover { background: var(--bg); }
.map-menu label.gone { color: var(--ink3); }
.map-menu .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.map-menu .hint { padding: 6px 8px 2px; color: var(--ink3); font-size: 12px; }

/* ---------- Info-Link, Fußzeile, Info-Seite ---------- */
.tb-right { display: flex; align-items: center; gap: 10px; }
.foot { flex: none; display: flex; justify-content: center; gap: 8px; font-size: 12px; color: var(--ink3); }
.foot a { color: var(--ink3); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.infopage .page { max-width: 860px; margin: 0 auto; padding: 18px 16px 56px; }
.ihead { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.back, .ijump a, .itext a { color: var(--accent); }
.ijump { display: flex; gap: 16px; }
.itext h1 { font-size: 28px; margin-bottom: 14px; }
.isec { padding: 18px 22px 20px; margin-bottom: 14px; scroll-margin-top: 12px; }
.isec h2 { font-size: 20px; margin-bottom: 10px; }
.isec h3 { font-size: 15px; margin: 16px 0 4px; }
.isec p, .isec li, .isec address { line-height: 1.55; }
.isec p + p { margin-top: 8px; }
.isec address { font-style: normal; }
.isec ul { margin: 6px 0 8px; padding-left: 20px; }
.inote { color: var(--ink3); font-size: 12.5px; }

/* ---------- US-Server (zweite Graphenzeile) ---------- */
.charttools { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 18px; }
.ct-left { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; min-width: 0; }
.ct-left .legend { flex: 1; }
.ct-mid { justify-self: center; }
.ct-right { display: flex; align-items: center; gap: 8px 18px; justify-self: end; }
.ustoggle { padding: 4px 16px; border-radius: 999px; font-weight: 600; }
.regionhead { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); font-weight: 600; margin: 2px 2px -2px; }
/* Mit US-Zeile würden die Graphen zu klein: dann scrollt die Seite, jede Zeile bleibt lesbar */
@media (min-width: 1100px) and (min-height: 680px) {
  .app.usOn { height: auto; min-height: 100vh; overflow: visible; }
  .app.usOn .main { display: flex; flex-direction: column; gap: 10px; }
  .app.usOn .charts { flex: none; height: 330px; }
  .app.usOn .notescard { height: 420px; }
}
@media (max-width: 1099px) { .charttools { grid-template-columns: 1fr; } .ct-mid, .ct-right { justify-self: start; } }
.ustoggle[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* ---------- Heldenvergleich, kleine Kacheln ---------- */
.cmpbar { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cmprow { display: flex; align-items: center; gap: 10px; }
.cmpslots { display: flex; gap: 8px; }
.slot { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 2px dashed var(--ink3); background: var(--surface); color: var(--ink3); font-size: 20px; line-height: 1; display: grid; place-items: center; position: relative; transition: transform .1s; }
.slot:not(.empty) { border: 2px solid var(--ring, var(--border)); background: var(--bg); }
.slot.first.empty { border-style: solid; border-color: var(--border); opacity: .55; cursor: default; }
.dhead .slot img { width: 100%; height: 100%; border: 0; border-radius: 50%; object-fit: cover; background: transparent; }
.slot .ph { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; font-size: 15px; color: var(--ink2); }
.slot.pending { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); }
.linkbtn:disabled { opacity: .4; cursor: default; text-decoration: none; }
.cmphint { font-size: 11.5px; color: var(--ink3); line-height: 1.2; text-align: center; }
.hero-btn[data-cmp="2"] { border-color: var(--s2); box-shadow: 0 0 0 2px var(--s2); }
.hero-btn[data-cmp="3"] { border-color: var(--s3); box-shadow: 0 0 0 2px var(--s3); }
.tiles.mini { gap: 6px; justify-content: flex-end; }
.tiles.mini .tile { display: flex; flex-direction: column; min-width: 0; padding: 3px 10px; border-radius: 9px; gap: 0; }
.tile .tl { display: flex; align-items: baseline; gap: 8px; }
.tiles.mini .tile .k { font-size: 11px; white-space: nowrap; }
.tiles.mini .tile .v { font-size: 15px; font-weight: 700; line-height: 1.2; }
.tiles.mini .tile .x { font-size: 10.5px; line-height: 1.2; }
.regionrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.regionrow .regionhead { margin-bottom: 0; }

.ct-mid { display: flex; gap: 8px; }

/* ---------- Aufräumen: Last 7 days unter den Tabs, größere Trefferfläche der Heldenkreise ---------- */
.ct-left { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 5px; }
.ct-row { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; min-width: 0; width: 100%; }
.ct-row .legend { flex: 1; }
/* unsichtbare Trefferfläche: füllt die Lücken zwischen den Kreisen und ragt noch ein Stück darüber hinaus */
.hero-btn::before { content: ''; position: absolute; inset: calc(var(--gap) / -2 - 4px); border-radius: 5px; }

/* Last 7 days: zentriert unter den EU/US-Schaltern */
.ct-mid { flex-direction: column; align-items: center; gap: 5px; }
.ct-btns { display: flex; gap: 8px; }
.ct-mid .check { justify-content: center; }

/* Export-Hinweis */
.exphint { position: fixed; right: 16px; top: 16px; z-index: 50; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

.capr { display: inline-flex; align-items: center; gap: 8px; }
.chartexp { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; font: inherit; font-size: 11px; line-height: 1.4; color: var(--ink2); background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.chartexp:hover, .chartexp:focus-visible { color: var(--ink); background: var(--bg); }

/* Skalenrad (Winrate): Streifen neben der Achse, Mausrad zoomt die Skala. Nur Bildschirm, nicht im Export. */
.scalewheel { position: absolute; z-index: 2; border-radius: 8px; border: 1px solid var(--border); cursor: ns-resize; outline: none;
  background: repeating-linear-gradient(to bottom, transparent 0 4px, var(--border) 4px 5px), var(--surface); opacity: .75; transition: opacity .12s, border-color .12s; }
.scalewheel.v { left: 0; width: 12px; }
.scalewheel.h { bottom: 0; height: 12px; cursor: ew-resize; background: repeating-linear-gradient(to right, transparent 0 4px, var(--border) 4px 5px), var(--surface); }
.scalewheel:hover, .scalewheel:focus-visible { opacity: 1; border-color: var(--accent, var(--ink3)); }

/* Höhenanzeige im Graphen (nur Anzeige, nicht bedienbar, nicht im Export) */
.scalepos { position: absolute; z-index: 1; pointer-events: none; border-radius: 3px; background: color-mix(in srgb, var(--border) 70%, transparent); }
.scalepos[hidden] { display: none; }
.scalepos.v { right: 1px; width: 4px; }
.scalepos.h { top: 0; height: 4px; }
.scalepos > div { position: absolute; border-radius: 3px; background: var(--ink3); opacity: .75; }
.scalepos.v > div { left: 0; right: 0; }
.scalepos.h > div { top: 0; bottom: 0; }

/* Zeitrad unter Linien-Graphen: Lageanzeige liegt im Streifen */
.scalepos.tp { top: auto; bottom: 4px; height: 4px; z-index: 3; }
