:root {
  --bg: #0b1220;
  --panel: #121b2e;
  --line: #22304d;
  --text: #dbe4f3;
  --muted: #8494b2;
  --accent: #f5b301;
  --accent2: #4fc3f7;
  --good: #3ccf6e;
  --warn: #f2c230;
  --bad: #f2554a;
  --mono: "Consolas", "Cascadia Mono", "DejaVu Sans Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent2); }

/* Kopfzeile */
/* Kopfzeile: drei gleich breite Seiten, damit die Uhren immer genau in der Mitte stehen */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #0e1628; }
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; overflow: hidden; white-space: nowrap; }
.brand .call { font: 700 30px var(--mono); color: var(--accent); letter-spacing: 1px; }
.brand .loc { font: 18px var(--mono); color: var(--muted); }
.clocks { display: flex; gap: 32px; justify-content: center; }
.clock { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; }
.clock .lbl { grid-row: span 2; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.clock .time { font: 700 34px var(--mono); color: #fff; }
.clock.local .time { color: var(--accent2); }
.clock .date { grid-column: 2; font-size: 13px; color: var(--muted); }
.brand .name { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools { display: flex; gap: 6px; justify-content: flex-end; transition: opacity .6s; }
.btn { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 4px 9px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.btn:hover { border-color: var(--accent2); color: var(--text); }
.btn.icon { width: 30px; height: 30px; padding: 0; font: 600 16px "Segoe UI", system-ui, sans-serif; display: inline-flex; align-items: center; justify-content: center; }
#btnInfo { font: 700 15px Georgia, "Times New Roman", serif; font-style: italic; border-radius: 50%; }
body.idle .tools { opacity: 0; }

/* Kurzanleitung */
dialog.info { width: min(720px, 94vw); max-height: 86vh; padding: 0; display: none; flex-direction: column; }
dialog.info[open] { display: flex; }
.infohead { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 8px; border-bottom: 1px solid var(--line); }
.infohead h2 { margin: 0; }
.infohead .x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.infohead .x:hover { color: #fff; }
.infobody { overflow-y: auto; padding: 4px 20px 16px; font-size: 14px; line-height: 1.5; }
.infobody h3 { color: var(--accent2); font-size: 14px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .5px; }
.infobody h3 small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.infobody p { margin: 6px 0; }
.infobody dl { display: grid; grid-template-columns: 190px 1fr; gap: 6px 14px; margin: 6px 0; }
.infobody dt { color: var(--text); font-weight: 600; }
.infobody dd { margin: 0; color: #c3cde0; }
.infobody .sym { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
body.idle { cursor: none; }

/* Raster */
.grid { --lw: 270px; --rw: 360px; display: grid; grid-template-columns: var(--lw) minmax(0, 1fr) var(--rw); gap: 12px; padding: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.panel h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.panel h2 small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 6px; }
.muted { color: var(--muted); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.tile { background: #0d1526; border: 1px solid var(--line); border-radius: 6px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.t-lbl { font-size: 11px; color: var(--muted); white-space: nowrap; }
.t-val { font: 700 21px var(--mono); line-height: 1.2; }
.t-val.small { font-size: 13px; padding: 5px 0 4px; white-space: nowrap; }
.t-sub { font-size: 11px; color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.verdict { margin: 10px 0 0; padding: 8px; border-radius: 6px; background: #0d1526; border-left: 3px solid var(--accent2); font-size: 13px; }

/* Karte */
.mapwrap { padding: 6px; position: relative; }
#map { width: 100%; display: block; border-radius: 4px; cursor: crosshair; touch-action: none; }
.mapbox { position: relative; }
.mapctl { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.mapctl button { width: 30px; height: 30px; border-radius: 5px; border: 1px solid var(--line); background: rgba(13, 21, 38, .85); color: var(--text); font: 600 17px "Segoe UI", system-ui, sans-serif; cursor: pointer; padding: 0; line-height: 1; }
.mapctl button:hover { border-color: var(--accent2); color: #fff; }
.mapctl button:last-child { color: var(--accent); font-size: 13px; }
.legend { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px 0; font-size: 12px; color: var(--muted); }
.legend .lg-items { display: flex; flex-wrap: wrap; gap: 4px 12px; }
/* Hinweis-/Entfernungszeile: immer genau eine Zeile hoch, zu langer Text wird mit „…" gekürzt */
.legend .lg-info { color: var(--text); display: flex; justify-content: flex-end; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 22px; line-height: 22px; }
.legend .lg-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.legend .lg-info .clearsel { flex: none; margin-left: 0; }
@media (max-width: 999px) { .legend .lg-info { white-space: normal; height: auto; line-height: 1.4; flex-wrap: wrap; } }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--line); padding: 4px 6px; }
.tbl td { padding: 4px 6px; border-bottom: 1px solid #18233b; font-family: var(--mono); white-space: nowrap; }
.tbl.compact td { padding: 3px 5px; }
.tbl td.country { font-family: inherit; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.tbl tr.sel td { background: #1b2a48; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #172440; }
.tbl tr.now td { color: var(--good); }
.dx .call { color: #fff; font-weight: 700; }

.bands { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.bands button { background: #0d1526; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; font: 12px var(--mono); cursor: pointer; }
.bands button.on { color: #0b1220; font-weight: 700; }
.bands button.empty { opacity: .4; }
/* DX-Tabelle: feste Spaltenbreiten, nie breiter als ihr Fenster; zu lange Einträge mit „…" */
#dxTbl { table-layout: fixed; width: 100%; }
#dxTbl td { overflow: hidden; text-overflow: ellipsis; }
#dxTbl th:nth-child(1) { width: 40px; }
#dxTbl th:nth-child(2) { width: 68px; }
#dxTbl th:nth-child(3) { width: 24%; }
#dxTbl th:nth-child(5) { width: 17%; }
#dxTbl td.country { max-width: none; }
.dx .scroll { overflow-x: hidden; }
@media (min-width: 1600px) { .grid { --rw: 410px; } } /* großer Bildschirm: DX-Spalte breiter */
/* Satellitentabelle ebenso: nie breiter als ihr Fenster */
#passTbl { table-layout: fixed; width: 100%; }
#passTbl td { overflow: hidden; text-overflow: ellipsis; }
#passTbl tr.iss td:first-child { font-weight: 700; } /* ISS hervorheben */
#passTbl th { white-space: normal; line-height: 1.2; vertical-align: bottom; } /* bei wenig Platz zweizeilig statt abgeschnitten */
#passTbl th:nth-child(1) { width: 26%; }
#pnlSat .scroll { overflow-x: hidden; }

.foot { padding: 8px 16px 16px; color: var(--muted); font-size: 12px; text-align: center; }

/* Dialog */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; width: min(420px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { margin-top: 0; color: var(--accent); font-size: 18px; }
dialog label { display: block; margin: 8px 0; color: var(--muted); font-size: 13px; }
dialog input { display: block; width: 100%; margin-top: 3px; padding: 7px 9px; background: #0d1526; border: 1px solid var(--line); border-radius: 5px; color: #fff; font: 15px var(--mono); text-transform: uppercase; }
dialog input.plain { text-transform: none; font-family: inherit; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.actions button { padding: 7px 14px; border-radius: 5px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.actions .primary { background: var(--accent); color: #0b1220; border-color: var(--accent); font-weight: 700; }
.actions a.btn { padding: 7px 14px; border-radius: 5px; border: 1px solid var(--line); text-decoration: none; }
.actions a.btn.off { opacity: .45; pointer-events: none; }
dialog.info.small { width: min(460px, 94vw); }
dialog.info.small .infobody { padding: 12px 20px 16px; }
dialog.info.small .tip { border-left: 3px solid var(--accent); padding: 6px 10px; background: rgba(255,255,255,.04); border-radius: 4px; }
.foot .ver.donate { font-family: inherit; }

dialog .welcome { display: none; color: var(--text); }
dialog.first .welcome { display: block; }
dialog.first #btnCancel { display: none; }
dialog .link { background: none; border: 0; color: var(--accent2); cursor: pointer; padding: 4px 0; font-size: 14px; }
dialog details { margin: 6px 0; color: var(--muted); font-size: 13px; }
dialog summary { cursor: pointer; }
.err { color: var(--bad); min-height: 1em; margin: 6px 0 0; }
.small { font-size: 12px; }

/* ---------- Übersicht: alles passt auf einen Bildschirm, nur die Listen rollen ---------- */
/* (Klasse fit wird vom Script gesetzt, wenn wirklich alles auf einen Bildschirm passt) */
body.fit { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.fit .grid { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
body.fit .col { min-height: 0; }
body.fit .col.left { overflow-y: auto; }
/* Weltraumwetter füllt den Platz, Bandbedingungen sind genau so hoch wie die Satelliten-Überflüge daneben */
body.fit .col.left { overflow: hidden; }
body.fit #pnlWx { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
/* Einschätzung direkt unter den Kacheln; freie Fläche liegt unten im Kasten */
body.fit #pnlBands { flex: none; overflow: hidden; }
body.fit .mapwrap { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.fit .legend { align-self: stretch; }
body.fit .drawer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.fit .drawer .scroll { flex: 1; min-height: 0; overflow-y: auto; }
body.fit .foot { padding: 4px 16px 6px; }

.scroll thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
/* Bandbedingungen */
.bandtbl th, .bandtbl td { text-align: center; }
.bandtbl th:first-child, .bandtbl td:first-child { text-align: left; }
.bandtbl th.now { color: var(--accent); font-weight: 600; }
.bandtbl td.dim { opacity: .45; }
.cond { display: inline-block; min-width: 64px; padding: 1px 6px; border-radius: 4px; font: 600 12px "Segoe UI", system-ui, sans-serif; }
.cond.gut { background: rgba(60, 207, 110, .18); color: var(--good); }
.cond.mittel { background: rgba(242, 194, 48, .16); color: var(--warn); }
.cond.schlecht { background: rgba(242, 85, 74, .16); color: var(--bad); }
.bcnote { margin: 6px 0 0; }

/* niedrige Bildschirme (z. B. Laptop 1366×768): alles etwas enger, damit nichts rollt */
/* Grenze 920: deckt auch Full-HD-Bildschirme mit 125 % Windows-Skalierung im Vollbild (1536×864) ab */
@media (min-width: 1000px) and (max-height: 920px) {
  .top { padding: 4px 16px; }
  .clock .time { font-size: 27px; }
  .brand .call { font-size: 25px; }
  .grid { gap: 8px; padding: 8px; }
  .col { gap: 8px; }
  .panel { padding: 7px 10px; }
  .panel h2 { margin-bottom: 5px; font-size: 12px; }
  .kv { gap: 1px 10px; font-size: 13px; }
  .tiles { gap: 4px; }
  .t-val { font-size: 18px; }
  .verdict { margin-top: 6px; padding: 5px 7px; font-size: 12px; }
  .bandtbl td, .bandtbl th { padding: 1px 4px; }
  .bandtbl .cond { padding: 0 6px; line-height: 1.35; }
  .bcnote { display: none; }
  .foot { padding: 2px 16px 4px; }
}

/* schmale, dunkle Rollbalken passend zum Rest der Seite */
* { scrollbar-width: thin; scrollbar-color: #2a3a5c transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3a5c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b5080; }

@media (max-width: 1350px) {
  .grid { --lw: 240px; --rw: 320px; gap: 10px; padding: 10px; }
  .tbl.compact td.country { max-width: 80px; }
}
@media (max-width: 999px) {
  .grid { grid-template-columns: 250px minmax(0, 1fr); }
  .col.right { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  /* Handy-Kopfzeile: oben Rufzeichen + Knöpfe, darunter beide Uhren nebeneinander;
     Schriftgröße wächst/schrumpft mit der Bildschirmbreite, damit nichts hinausragt */
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; column-gap: 10px; padding: 8px 12px; }
  .brand { grid-column: 1; grid-row: 1; gap: 8px; }
  .brand .call { font-size: clamp(20px, 7vw, 28px); }
  .brand .loc { font-size: clamp(13px, 4vw, 16px); }
  .tools { grid-column: 2; grid-row: 1; }
  .clocks { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .clock { grid-template-columns: auto; justify-items: center; }
  .clock .lbl { grid-row: auto; font-size: 11px; }
  .clock .date { grid-column: auto; font-size: 12px; }
  .clock .time { font-size: clamp(18px, 7vw, 30px); }
}

/* Unterseiten wie „Quellen & Lizenzen" dürfen normal rollen */
.foot b { color: var(--accent); font-weight: 600; }
.foot .sep { margin: 0 8px; opacity: .5; }
body.page-doc { height: auto; overflow: auto; display: block; }

/* Unterseiten: Impressum, Datenschutz, Lizenzen */
.page { max-width: 860px; margin: 24px auto; padding: 16px 22px; }
.legal { line-height: 1.55; }
.legal h2 { font-size: 16px; }
.legal h3 { color: var(--accent2); font-size: 14px; margin: 18px 0 4px; }
.legal p { margin: 4px 0 8px; color: #c3cde0; }
.backlinks { margin-top: 20px !important; }

/* Handy & schmale Bildschirme: Tabellen behalten ihre volle Breite und lassen sich
   waagerecht wischen/rollen, statt abgeschnitten zu werden. Auf großen Bildschirmen unverändert. */
@media (max-width: 700px) {
  #passTbl, #dxTbl { table-layout: auto; width: max-content; min-width: 100%; }
  #passTbl td, #dxTbl td { overflow: visible; text-overflow: clip; }
  #passTbl th { white-space: nowrap; }
  #dxTbl td.country { max-width: none; }
  #pnlSat .scroll, .dx .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .scroll::-webkit-scrollbar { height: 6px; }
}

/* Knopf „ISS-Bahn zeigen" in der Überschrift der Satelliten-Überflüge */
.h2row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; }
.issbtn { margin-left: auto; align-self: center; background: #0d1526; color: var(--accent2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; font: 600 11px "Segoe UI", system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: pointer; white-space: nowrap; }
.issbtn:hover { border-color: var(--accent2); }
.issbtn.on { background: var(--accent2); color: #0b1220; border-color: var(--accent2); }
.foot .ver { background: none; border: 0; padding: 0 2px; margin-right: 4px; color: var(--muted); font: 12px var(--mono); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.foot .ver:hover { color: var(--accent2); text-decoration-style: solid; }
.infobody ul { margin: 4px 0 6px; padding-left: 20px; color: #c3cde0; }
.infobody li { margin: 2px 0; }
.clearsel { margin-left: 8px; background: #0d1526; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.clearsel:hover { color: #fff; border-color: var(--accent); }

/* Namensschild auf der Karte (Satelliten, DX-Stationen) */
.maptip { position: absolute; z-index: 3; pointer-events: none; max-width: 260px; padding: 6px 9px; border-radius: 6px; background: rgba(13, 21, 38, .95); border: 1px solid var(--accent2); box-shadow: 0 4px 14px rgba(0,0,0,.5); font-size: 12px; line-height: 1.45; color: var(--text); white-space: normal; }
.maptip[hidden] { display: none; }
.maptip b { color: #fff; font-size: 13px; }

/* Seitentausch gegen Einbrennen (Knopf ⇄): DX-Cluster links, Station/Wetter/Bänder rechts,
   Satelliten oben, Karte unten – alle Kästen bleiben bündig. Nur auf großen Bildschirmen. */
@media (min-width: 1000px) {
  body.swapped .grid { grid-template-columns: var(--rw) minmax(0, 1fr) var(--lw); }
  body.swapped .col.right { order: -1; }
  body.swapped .col.left { order: 1; }
  body.swapped .col.center, body.swapped .col.left { flex-direction: column-reverse; }
  /* Kopfzeile mit den Uhren nach unten, Fußzeile nach oben */
  body.swapped .top { order: 1; border-bottom: 0; border-top: 1px solid var(--line); }
  body.swapped .foot { order: -1; }
}
.btn.icon.on { background: var(--accent2); color: #0b1220; border-color: var(--accent2); }
#btnSwap { font-size: 17px; }
/* Fußzeile nach 15 Minuten ohne Bedienung ausblenden (Platz bleibt erhalten) */
/* Spenden-Knopf leuchtet ab und zu sanft auf (2× in 5 Sekunden) */
.foot .ver.donate.glow { animation: donateGlow 2.5s ease-in-out 2; }
@keyframes donateGlow {
  0%, 100% { color: var(--muted); text-shadow: none; }
  50% { color: var(--accent); text-shadow: 0 0 8px rgba(245, 179, 1, .7); }
}

/* Breiter, aber niedriger Platz (z. B. Browser-Zoom 125 % und mehr): rollbare Ansicht,
   die Listen bekommen eine feste Höhe und rollen in sich. */
@media (min-width: 1000px) {
  body:not(.fit) #pnlSat .scroll { max-height: 300px; overflow-y: auto; }
  body:not(.fit) .dx .scroll { max-height: 560px; overflow-y: auto; }
}

/* Sehr niedrige Fenster (z. B. Laptop 1366×768 mit Browserleisten ≈ 1366×650):
   noch etwas kompakter, damit die Ein-Bildschirm-Ansicht trotzdem passt */
@media (min-width: 1000px) and (max-height: 720px) {
  .top { padding: 3px 14px; }
  .clock .time { font-size: 24px; }
  .clock .date, .clock .lbl { font-size: 11px; }
  .brand .call { font-size: 22px; }
  .grid { gap: 6px; padding: 6px; }
  .col { gap: 6px; }
  .panel { padding: 5px 9px; }
  .panel h2 { margin-bottom: 3px; font-size: 11px; }
  .kv { gap: 0 10px; font-size: 12px; line-height: 1.3; }
  .tile { padding: 2px; }
  .t-lbl, .t-sub { font-size: 10px; }
  .t-val { font-size: 16px; }
  .t-val.small { font-size: 12px; padding: 3px 0 2px; }
  .verdict { margin-top: 4px; padding: 4px 6px; font-size: 11px; line-height: 1.3; }
  .bandtbl { font-size: 12px; }
  .bandtbl td, .bandtbl th { padding: 0 4px; }
  .bandtbl .cond { padding: 0 6px; line-height: 1.3; font-size: 11px; }
  .tbl th, .tbl td { padding: 2px 5px; }
  .legend { padding-top: 3px; gap: 2px; font-size: 11px; }
  .legend .lg-info { height: 18px; line-height: 18px; }
  .foot { padding: 2px 14px 3px; font-size: 11px; }
}

/* Kp-Verlauf der letzten 24 Stunden (im freien Platz unter den Wetter-Kacheln):
   Überschrift oben, darunter die Balken über die volle Breite, Uhrzeit darunter;
   Kp-Werte über den Balken, wenn genug Höhe da ist */
.kphist { margin-top: 6px; display: flex; flex-direction: column; height: 84px; }
.kphist[hidden] { display: none; }
.kphist .kp-lbl { font-size: 11px; line-height: 13px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kphist .kp-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.kphist .kp-bars { flex: 1; min-height: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.kphist.tall .kp-bars { padding-top: 12px; }
.kphist .kp-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.kphist .kp-bar { border-radius: 2px 2px 0 0; min-height: 2px; }
.kphist .kp-bar.good { background: var(--good); } .kphist .kp-bar.warn { background: var(--warn); } .kphist .kp-bar.bad { background: var(--bad); }
.kphist .kp-val { display: none; position: absolute; left: -4px; right: -4px; margin-bottom: 1px; text-align: center; font: 9px var(--mono); color: var(--text); white-space: nowrap; }
.kphist.tall .kp-val { display: block; }
.kphist .kp-times { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 1px; font: 9px var(--mono); color: var(--muted); text-align: center; line-height: 11px; }
body.fit .kphist { height: auto; flex: 1 1 auto; min-height: 38px; max-height: 92px; }
/* schmale Stufe: keine Uhrzeiten-Zeile (Uhrzeit dann per Maus) */
.kphist.notimes { margin-top: 4px; }
.kphist.notimes .kp-times { display: none; }
body.fit .kphist.notimes { min-height: 26px; }

/* Kp-Verlauf: rechter Balken „jetzt“ = vorläufiger Wert, heller und gestrichelt umrandet */
.kphist .kp-col.now .kp-bar { opacity: .55; outline: 1px dashed var(--text); outline-offset: -1px; }
.kphist .kp-times .now { color: var(--text); }
.kphist .kp-times { letter-spacing: -.3px; }
.kphist .kp-times span { white-space: nowrap; }
