:root {
    --bg: #f4f1ea;
    --fg: #1c1b18;
    --muted: #5c584f;
    --card: #fffdf8;
    --line: #d8d2c4;
    --accent: #005EB8;
    --ok: #1b6b3a;
    --err: #8b1e1e;
    --font: "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--accent);
    color: #fff;
    position: relative;
}
.app-name { font-weight: 700; }
.app-ver {
    display: inline;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
    vertical-align: baseline;
}
.app-ver-maj {
    font-size: inherit;
    font-weight: inherit;
    opacity: 1;
}
.app-ver-beta {
    margin-left: 0.7em;
    font-size: 0.68em;
    font-style: italic;
    font-weight: 600;
    color: #ff3b30;
    opacity: 1;
}
html.wl-stage-prod .app-ver-beta {
    color: #2ecc71;
}
.topbar-file {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    letter-spacing: 0.01em;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}
.nav { display: flex; align-items: center; gap: 0.5rem; flex: 1; }
.nav[hidden] { display: none; }
.spacer { flex: 1; }
.topbar button {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    padding: 0.3rem 0.7rem;
    cursor: pointer;
}

main { padding: 1.2rem; max-width: 1100px; margin: 0 auto; }
.view[hidden] { display: none; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1rem 1.1rem 1.2rem;
    margin-bottom: 1rem;
}
.login { max-width: 22rem; margin: 3rem auto; }
h1, h2 { margin: 0 0 0.8rem; font-weight: 600; }
label { display: block; margin: 0.6rem 0; }
input, textarea, button, select {
    font: inherit;
    color: inherit;
}
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    padding: 0.4rem 0.5rem;
    background: #fff;
}
button {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.row label { margin: 0; min-width: 7rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }

.roh {
    min-height: 9rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
    margin: 0.6rem 0;
    white-space: pre;
}
.status, .hint { color: var(--muted); font-size: 0.9rem; }

.winlog-hint {
    position: fixed;
    top: 7.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 240;
    max-width: min(36rem, calc(100vw - 1.5rem));
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.86rem;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 6px 20px rgba(28, 27, 24, 0.18);
    cursor: pointer;
}
.winlog-hint.is-info {
    background: #e7eef4;
    color: #005EB8;
    border: 1px solid #b7c8d8;
}
.winlog-hint.is-warn {
    background: #f4ead4;
    color: #5c4a18;
    border: 1px solid #d4c094;
}
.winlog-hint.is-err {
    background: #f3e2e0;
    color: #6b1c1c;
    border: 1px solid #c98986;
}
.fehler { color: var(--err); }
.ok { color: var(--ok); }

.werte { display: grid; grid-template-columns: 10rem 1fr; gap: 0.2rem 0.8rem; }
.werte dt { color: var(--muted); }
.werte dd { margin: 0; }

table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; }
th, td { text-align: left; padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--line); }

.print-only { display: none; }

@media print {
    html, body { background: #fff !important; margin: 0 !important; }
    body > *:not(#print-root) { display: none !important; }
    #print-root,
    #print-root[hidden] {
        display: block !important;
        position: static !important;
        visibility: visible !important;
    }
    #chart-map-preview,
    .chart-ctx-menu,
    #winlog-busy,
    #dlg-save,
    #dlg-port { display: none !important; }
    @page { size: A4 landscape; margin: 8mm; }
}
#print-root { background: #fff; overflow: visible; }
.wl-sheet {
    position: relative;
    width: 277mm;
    min-height: 190mm;
    margin: 0 auto;
    padding-bottom: 5mm;
    background: #fff;
    color: #111;
    font: 11px "Segoe UI", Arial, sans-serif;
    overflow: visible;
}
.wl-sheet.wl-demo::after {
    content: 'DEMO';
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%) rotate(-22deg);
    font: 800 42mm "Segoe UI", Arial, sans-serif;
    color: rgba(0, 0, 0, 0.10);
    letter-spacing: 0.08em;
    pointer-events: none;
    z-index: 8;
    white-space: nowrap;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.wl-sheet-head {
    font-size: 9px;
    color: #333;
    padding: 0 2px 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wl-frame {
    border: 1.2px solid #222;
}
.wl-sheet canvas {
    display: block;
    width: 100%;
    height: auto;
}
.wl-sheet-foot {
    position: relative;
    display: grid;
    grid-template-columns: max-content 5mm max-content minmax(40mm, 1fr) 52mm;
    border: 1.2px solid #222;
    border-top: 0;
    min-height: 16mm;
    align-items: stretch;
    overflow: visible;
    color: #111;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.wl-foot-cap {
    position: absolute;
    bottom: 100%;
    margin-bottom: 5px;
    font-size: 9px;
    line-height: 1;
    color: #111;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}
.wl-foot-dev { left: 2.5mm; }
.wl-foot-rate { right: 2.5mm; }
.wl-sheet-foot.no-stat {
    grid-template-columns: max-content 4mm minmax(40mm, 1fr) 52mm;
}
.wl-sheet-foot.has-map {
    grid-template-columns: max-content 5mm max-content minmax(24mm, 1fr) 32mm 52mm;
}
.wl-sheet-foot.no-stat.has-map {
    grid-template-columns: max-content 4mm minmax(24mm, 1fr) 32mm 52mm;
}
.wl-map {
    border-left: 1.2px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2mm 1.5mm;
    min-width: 0;
}
.wl-map img,
.wl-map canvas {
    width: 28mm;
    height: 20mm;
    object-fit: cover;
    border: 0.4px solid #8a8680;
    background: #eee;
}
.wl-map span,
.wl-map-lbl {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2mm;
    width: 100%;
    font-size: 7px;
    margin-top: 0.7mm;
    color: #333;
    line-height: 1.25;
    box-sizing: border-box;
}
.wl-map-coord { text-align: left; }
.wl-map-zeit { text-align: right; white-space: nowrap; }
.wl-leg {
    position: relative;
    padding: 1mm 2.5mm 2.5mm 2.5mm;
    font-size: 9px;
    color: #111;
    overflow: visible;
}
.wl-dev-badge {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    background: #fff;
    padding: 0 4mm;
    font-size: 8px;
    font-weight: 400;
    font-family: "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.04em;
    color: #111;
    line-height: 1.25;
    white-space: nowrap;
    z-index: 6;
}
.wl-brand {
    border-left: 1.2px solid #222;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 3mm 5mm;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.wl-brand strong { font-size: 16px; color: #1a4f8a; line-height: 1.05; }
.wl-brand em { font-style: normal; font-size: 16px; color: #1a4f8a; }
.wl-brand b {
    display: block;
    width: 36mm;
    height: 3px;
    margin-top: 4px;
    background: linear-gradient(90deg, #1a4f8a 0 70%, #f0c000 70% 100%);
}
.wl-rate {
    position: relative;
    text-align: right;
    font-size: 9px;
    padding: 2px 4px 0 0;
}


.kenn-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0.6rem;
}
.kenn-tabelle th,
.kenn-tabelle td {
    text-align: left;
    padding: 0.2rem 0.4rem;
    border-bottom: 1px solid var(--line);
}
.kenn-tabelle th {
    color: var(--muted);
    font-weight: 600;
    width: 11rem;
}

/* Messgrafik + KKS-Tabelle */
.mess-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}
.chart-wrap {
    position: relative;
    width: 100%;
    height: 380px;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 4px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    overflow: hidden;
}
.chart-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}
.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.chart-toolbar label {
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.chart-toolbar button.active {
    background: var(--accent);
    color: #fff;
}
.kks-table-wrap {
    max-height: none;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
}
table.kks {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
table.kks thead th {
    position: sticky;
    top: 0;
    background: #e8eef5;
    z-index: 1;
    padding: 0.35rem 0.45rem;
    border-bottom: 2px solid var(--line);
    text-align: right;
}
table.kks thead th:first-child,
table.kks td:first-child {
    text-align: left;
}
table.kks tbody tr:nth-child(even) {
    background: #e8f0e4; /* KKS-typisch: grünlicher Wechsel */
}
table.kks tbody tr:nth-child(odd) {
    background: #fff;
}
table.kks tbody tr.cursor-row {
    outline: none;
    box-shadow: none;
    background: #d6e4f5 !important;
}
table.kks td {
    padding: 0.25rem 0.45rem;
    text-align: right;
    border-bottom: 1px solid #e5e0d6;
    white-space: nowrap;
}
.ch-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 3px;
}

.menubar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.22rem 0.55rem;
    background: #e8eef5;
    border-bottom: 1px solid var(--line);
}
.menubar button { cursor: pointer; }
.menubar button.mb-ico { padding: 0; }
.menubar-sep {
    width: 1px;
    height: 1.4rem;
    background: var(--line);
    margin: 0 0.25rem;
}
.menubar .mb-text {
    border: 1px solid transparent;
    background: transparent;
    color: var(--fg);
    font: 600 0.82rem var(--font);
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}
.menubar .mb-text:hover:not(:disabled) {
    background: #fff;
    border-color: #c5d0dc;
}
.menubar .mb-text.on,
.menubar .mb-text[aria-pressed="true"] {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
.menubar .mb-text:disabled {
    opacity: 0.4;
    cursor: default;
}
#tab-kenn { display: none !important; }
.menubar-file {
    cursor: pointer;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 0.9rem;
}
.hint-inline { font-size: 0.85rem; color: var(--muted); }
.kenn-band {
    padding: 0.35rem 0.7rem;
    border-bottom: 1px solid var(--line);
    background: #fffdf8;
    max-height: 7rem;
    overflow: auto;
}
.kenn-band-table { margin: 0; font-size: 0.8rem; }
.kenn-band-table th { width: auto; padding-right: 0.6rem; }
.mess-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem 2px;
    min-height: 420px;
}
@media (max-width: 900px) {
    .mess-split { grid-template-columns: 1fr; }
}
.mess-chart-pane, .mess-table-pane {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.mess-table-pane .kks-table-wrap {
    flex: 1;
    max-height: none;
    min-height: 320px;
}


main { max-width: none; width: 100%; padding: 0; }
#view-messung { width: 100%; }
.progress-bar {
    position: relative;
    height: 1.4rem;
    background: #e5e0d6;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.2s ease;
}
.progress-bar-text {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: #fff; text-shadow: 0 0 2px #000;
    pointer-events: none;
}


.kenn-band {
    max-height: 8.5rem;
    overflow: auto;
    padding: 0.35rem 0.6rem 0.45rem;
}
.kenn-band-table { display: block; margin: 0; }
.kenn-grid {
    display: grid;
    grid-template-columns: repeat(var(--kenn-cols, 4), minmax(0, 1fr));
    gap: 0.15rem 1.2rem;
    font-size: 0.82rem;
    line-height: 1.25;
}
/* kenn-item: display contents via .kenn-gruppe grid */
.kenn-label {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.kenn-wert {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
@media (max-width: 1100px) {
    .kenn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .kenn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kenn-band {
    max-height: 8.5rem;
    overflow: auto;
    padding: 0.35rem 0.75rem 0.4rem;
    background: #f7f5f0;
    border-bottom: 1px solid var(--line);
}
.kenn-band-table { display: block; margin: 0; }
.kenn-head {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: #1a1a1a;
}
.kenn-head strong {
    font-weight: 700;
}
.kenn-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem 1.25rem;
    font-size: 0.82rem;
    line-height: 1.35;
}
.kenn-gruppe-title {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5a6a7a;
    margin-bottom: 0.55rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d8d2c6;
}
.kenn-gruppe {
    min-width: 0;
}
.kenn-item {
    display: contents;
}
.kenn-label {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.kenn-wert {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: #1a1a1a;
}
.kenn-led {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 0.2rem;
    box-shadow: 0 0 2px rgba(0,0,0,0.35);
}
.kenn-led-gruen { background: #2ecc40; }
.kenn-led-rot { background: #e74c3c; }
@media (max-width: 1100px) {
    .kenn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .kenn-grid { grid-template-columns: 1fr; }
}

.kenn-head-line { margin-bottom: 0.2rem; }
.kenn-head-meta {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

.kenn-wert.kenn-wert-leer {
    color: #9a9a9a;
    font-weight: 500;
}

.kenn-head-meta div {
    line-height: 1.35;
}
.kenn-lp {
    color: #c0392b;
    font-weight: 700;
    margin-left: 0.25rem;
}
.kenn-pfeil {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 0.2rem;
    vertical-align: -0.08em;
}
.kenn-zeit-line {
    display: grid !important;
    grid-template-columns: max-content 0.9em max-content max-content;
    column-gap: 6px;
    align-items: center;
    white-space: nowrap;
}
.kenn-zeit-grp {
    display: flex;
    align-items: center;
    gap: 1px;
    min-width: 10.6em;
}
.kenn-zeit-txt { justify-self: start; }
.kenn-weck-slot {
    width: 0.95em;
    min-height: 1em;
    text-align: left;
    margin-left: 1px;
}
.kenn-int-line {
    display: flex !important;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.kenn-int-txt {
    display: inline-block;
    min-width: 10ch;
    box-sizing: content-box;
}
.kenn-mem {
    width: 14px;
    height: 14px;
    color: #3a3834;
    display: block;
    flex: 0 0 auto;
}
.kenn-belegt-pct { white-space: nowrap; }
.kenn-gps-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    line-height: 1;
}
.kenn-gps-slot,
.kenn-prog-slot {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}
.kenn-gps-slot { min-width: 2.05em; }
.kenn-prog-slot { min-width: 2.7em; }
.kenn-gps-slot.is-off,
.kenn-prog-slot.is-off {
    visibility: hidden;
}
.kenn-batt {
    width: 11px;
    height: 20px;
    color: #3a3834;
    display: block;
}
.kenn-batt.warn,
.kenn-batt.low.warn {
    color: #c0392b;
}
.kenn-batt-pct { white-space: nowrap; }

.kenn-head-title {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}
.kenn-head-line {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.kenn-head-lizenz {
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: #1a1a1a;
}
.kenn-wert-warn {
    color: #c0392b !important;
    font-weight: 700;
}
.kenn-wert br {
    display: block;
    content: "";
    margin-top: 0.1rem;
}

.kenn-gruppe-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.kenn-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.2rem 0.35rem;
    border-radius: 3px;
    vertical-align: middle;
}
.kenn-badge-prog {
    background: #1a73e8;
    color: #fff;
}
.kenn-badge-nogps {
    position: relative;
    background: transparent;
    color: #666;
    border: 1px solid #999;
    padding: 0.15rem 0.35rem;
    overflow: hidden;
}
.kenn-badge-nogps::after {
    content: "";
    position: absolute;
    left: -10%;
    top: 50%;
    width: 120%;
    height: 0;
    border-top: 2px solid #c0392b;
    transform: rotate(-28deg);
    transform-origin: center;
    pointer-events: none;
}
.kenn-weck {
    margin-left: 0.15rem;
    font-size: 0.9em;
}

.kenn-grid {
    display: grid;
    grid-template-columns: 1.35fr 1.55fr 0.7fr 1.2fr;
    gap: 0.5rem 1rem;
    align-items: start;
}
.kenn-gruppe-schmal {
    min-width: 0;
}
.kenn-subcols {
    display: block;
}
.kenn-subcols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.8rem;
    align-items: start;
}
.kenn-subcol {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 10px;
    row-gap: 0.12rem;
    align-items: baseline;
}
.kenn-subcol .kenn-item {
    display: contents;
}
@media (max-width: 1100px) {
    .kenn-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .kenn-grid { grid-template-columns: 1fr; }
    .kenn-subcols-2 { grid-template-columns: 1fr; }
}

.kenn-head-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 5px;
}
.kenn-head {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0 !important;
}
.kenn-head-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.95rem;
    margin-bottom: 0;
}
.kenn-head-fw, .kenn-head-lizenz {
    font-weight: 700;
}
.kenn-head-sn {
    font-weight: 700 !important;
}
.kenn-head-row .progress-bar {
    flex: 0 0 14rem;
    height: 1.15rem;
    border: 1px solid #d0cbc0;
    border-bottom: 1px solid #d0cbc0;
    border-radius: 3px;
    background: #e8e4db;
}
.kenn-head-row .progress-bar-text {
    font-size: 0.72rem;
    color: #333;
    text-shadow: none;
}

.kenn-wert-2z {
    min-height: 2.5em;
    line-height: 1.25;
}
.kenn-subcol {
    min-height: 4.8em;
}

.kenn-subcols-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 0.7rem;
    align-items: start;
}

.kenn-grid {
    display: grid !important;
    grid-template-columns: minmax(12rem, 1.1fr) minmax(22rem, 1.8fr) minmax(8rem, 0.7fr) minmax(12rem, 1.1fr) !important;
}
.kenn-gruppe-breit .kenn-subcols-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
}
.kenn-subcols-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}
.kenn-subcols-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
}

/* Kenndaten: fest begrenzen, scrollen statt wachsen. Rest für Grafik/Tabelle. */
html, body {
    height: 100%;
    overflow: hidden;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#view-messung.view {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}
#view-messung[hidden] { display: none !important; }
.menubar { flex: 0 0 auto; }
.kenn-band {
    flex: 0 0 auto;
    max-height: 8.5rem;
    overflow: auto;
}
.kenn-tabelle,
.kenn-band-table {
    min-width: 58rem;
}
.kenn-grid {
    display: grid !important;
    grid-template-columns: minmax(12rem, 1.1fr) minmax(20rem, 1.8fr) minmax(8rem, 0.7fr) minmax(12rem, 1.1fr) !important;
    min-width: 56rem;
}
.mess-split {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.app-foot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 14px;
    margin: 0 0 0 12px;
    padding: 0;
    height: 14px;
    max-height: 14px;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 14px;
    color: #6e6a64;
    letter-spacing: 0.01em;
    user-select: none;
    pointer-events: none;
}
.app-foot-mark {
    position: static;
    display: block;
    height: 14px;
    text-align: center;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 11rem);
    box-sizing: border-box;
    margin: 0;
}
.app-foot-legal {
    position: absolute;
    right: 12px;
    top: 0;
    height: 14px;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    line-height: 14px;
}
.app-foot-legal button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #5a564f;
    font: inherit;
    font-size: 10px;
    height: 14px;
    min-height: 0;
    line-height: 14px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 1px;
}
.app-foot-legal button:hover { color: #005EB8; }
.mess-chart-pane,
.mess-table-pane {
    min-height: 0;
    overflow: hidden;
}
@media (max-width: 1100px) {
    .kenn-grid {
        grid-template-columns: minmax(12rem, 1.1fr) minmax(20rem, 1.8fr) minmax(8rem, 0.7fr) minmax(12rem, 1.1fr) !important;
    }
    .kenn-subcols-2,
    .kenn-subcols-3 {
        grid-template-columns: inherit;
    }
}
@media (max-width: 700px) {
    .kenn-grid {
        grid-template-columns: minmax(12rem, 1.1fr) minmax(20rem, 1.8fr) minmax(8rem, 0.7fr) minmax(12rem, 1.1fr) !important;
    }
    .kenn-subcols-2 { grid-template-columns: 1fr 1fr !important; }
    .kenn-subcols-3 { grid-template-columns: 1fr 1fr 1fr !important; }
}

/* Nur Kenndaten scrollt; Grafik/Tabelle später eigene Scrollbereiche. */
.kks-table-wrap,
.mess-chart-pane,
.mess-table-pane,
.mess-split,
main,
body {
    scrollbar-gutter: auto;
}
#kenn-band {
    overflow: auto !important;
    max-height: 8.5rem !important;
}
#kenn-band .kenn-tabelle,
#kenn-band .kenn-grid {
    overflow: visible;
}

/* Kompakte Kenndaten-Hauptspalten, 15px Abstand */
.kenn-grid {
    display: grid !important;
    grid-template-columns: max-content max-content max-content max-content !important;
    column-gap: 15px !important;
    row-gap: 0.35rem;
    min-width: 0 !important;
}
.kenn-tabelle,
.kenn-band-table {
    min-width: 0 !important;
}
.kenn-gruppe-breit .kenn-subcols-3 {
    grid-template-columns: max-content max-content max-content !important;
    column-gap: 12px !important;
}
.kenn-subcols-2 {
    column-gap: 12px !important;
}
.kenn-subcol {
    column-gap: 8px !important;
}

/* Kein vertikaler Scroll; Kategorien mit Abstand; seitlich blättern */
#kenn-band {
    overflow: hidden !important;
    max-height: none !important;
}
.kenn-carousel {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
}
.kenn-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.kenn-scroll::-webkit-scrollbar { display: none; }
.kenn-nav {
    flex: 0 0 1.6rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 3px;
    padding: 0;
}
.kenn-nav:hover { background: #eef3f8; }
.kenn-grid {
    column-gap: 28px !important;
}
.kenn-gruppe + .kenn-gruppe {
    margin-left: 0;
}

.menubar-drop {
    position: relative;
    display: inline-block;
}
.menubar-drop-list {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 12rem;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    padding: 0.2rem 0;
}
.menubar-drop-list button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
}
.menubar-drop-list button:hover:not(:disabled) {
    background: #eef3f8;
}
.kenn-head-sn { font-weight: 400 !important; }

.menubar {
    overflow: visible;
    flex-wrap: nowrap;
    position: relative;
    z-index: 5000;
}
.menubar-drop {
    position: relative;
    display: inline-block;
}
.menubar-drop-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 5001;
    min-width: 13rem;
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 16px rgba(0,0,0,.16);
    padding: 0.15rem 0;
}
.menubar-drop.open .menubar-drop-list,
.menubar-drop-list.open {
    display: flex !important;
}
.menubar-drop-list[hidden] {
    display: none !important;
}
.menubar-drop-list button {
    display: block;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    border: 0;
    background: #fff;
    padding: 0.4rem 0.8rem;
}
.menubar-drop-list button[hidden] {
    display: none !important;
}

.menubar-drop-list {
    background: #fffef9 !important;
    border: 1px solid #c8c2b6 !important;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(40, 36, 28, 0.16);
    padding: 0.35rem;
    min-width: 13.5rem;
    gap: 3px;
}
.menubar-drop-list button {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    color: #2c2a26 !important;
    background: #f4f0e8 !important;
    border-radius: 8px;
    padding: 0.42rem 0.6rem !important;
    font: 600 0.84rem/1.2 "Segoe UI", Tahoma, sans-serif;
}
.menubar-drop-list button svg {
    flex: 0 0 auto;
    color: #005EB8;
}
.menubar-drop-list button:hover:not(:disabled) {
    background: #e8eef5 !important;
    color: #1c1b18 !important;
}
.menubar-drop-list button:disabled {
    color: #8a857c !important;
    opacity: 0.65;
}
.menubar-drop-list button:disabled svg { color: #8a857c; }
.ml2-lvl1 { justify-content: space-between; width: 100%; }
.ml2-caret { margin-left: auto; color: #5a564e; font-size: 0.7rem; }
.menu-einlesen.open #btn-einlesen-sub.is-open .ml2-caret,
#btn-einlesen-sub.is-open .ml2-caret { transform: none; display: inline-block; }
.einlesen-pop {
    overflow: visible !important;
}
.ml2-sub {
    position: absolute;
    left: calc(100% + 4px);
    top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 13.5rem;
    margin: 0;
    padding: 0.35rem;
    background: #fffef9;
    border: 1px solid #c8c2b6;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(40, 36, 28, 0.16);
    z-index: 5003;
}
.ml2-sub::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 12px;
}
.ml2-sub[hidden] { display: none !important; }
#menu-einlesen.open #btn-einlesen-sub:hover + #ml2-sub-read,
#menu-einlesen.open #ml2-sub-read:hover {
    display: flex !important;
}

.progress-bar {
    background: #e8e4db;
}
.progress-bar-fill {
    background: #8fb4d4;
}
.progress-bar-text,
.kenn-head-row .progress-bar-text {
    color: #1a1a1a !important;
    font-weight: 700;
    text-shadow:
        0 0 3px #fff,
        0 0 3px #fff,
        1px 0 0 #fff,
        -1px 0 0 #fff,
        0 1px 0 #fff,
        0 -1px 0 #fff;
}

.kenn-head-row {
    min-height: 1.4rem;
    flex-wrap: nowrap;
}
.kenn-head-title {
    flex-wrap: nowrap !important;
    min-height: 1.2rem;
    overflow: hidden;
}
.kenn-head-sn {
    flex: 0 0 9.5rem;
}
.kenn-head-fw {
    flex: 0 0 4.5rem;
}
.kenn-head-lizenz {
    flex: 1 1 auto;
    min-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kenn-head-row .progress-bar {
    flex: 0 0 14rem !important;
    visibility: visible;
}
.kenn-head-row .progress-bar.progress-idle {
    visibility: hidden;
}
.menubar-drop-list button:hover,
.menubar-drop-list button:focus {
    background: #dce6f0;
}
.menubar-drop:not(.open) .menubar-drop-list button:hover {
    background: #f7f4ee;
}

.kenn-head-title {
    font-weight: 400 !important;
}
.kenn-head-ml {
    font-weight: 700;
    flex: 0 0 5.6rem;
}
.kenn-head-sn-lab {
    font-weight: 400 !important;
    flex: 0 0 5.2rem;
    color: #333;
}
.kenn-head-sn {
    font-weight: 400 !important;
    flex: 0 0 4.6rem;
}
.kenn-head-fw {
    font-weight: 700;
    flex: 0 0 4.4rem;
}
.kenn-head-lizenz {
    font-weight: 700;
    min-width: 0;
    max-width: 18rem;
}
.kenn-wert-2z {
    height: 2.5em;
    max-height: 2.5em;
    overflow: hidden;
}

.kenn-subcol .kenn-item .kenn-label {
    /* Lizenz sits above Kommentar */
}
.kenn-wert-2z {
    height: 3.2em;
    max-height: 3.2em;
    margin-top: 0.15rem;
}

.kenn-head-sn-lab {
    flex: 0 0 auto !important;
    margin-right: 0.35rem;
}
.kenn-head-sn {
    flex: 0 0 auto !important;
    margin-right: 1.25rem;
}
.kenn-head-fw {
    margin-left: 0;
}

.kenn-head-sn-lab { font-weight: 400 !important; }
.kenn-head-sn { font-weight: 700 !important; }

.mess-split {
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0.35rem 0.5rem 0;
    gap: 0;
}
.mess-chart-pane {
    flex: 1 1 var(--split-chart, 58%);
    width: var(--split-chart, 58%);
    min-width: 12rem;
    max-width: calc(100% - 10rem);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.mess-table-pane {
    flex: 1 1 auto;
    min-width: 10rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.mess-split-handle {
    flex: 0 0 8px;
    cursor: col-resize;
    background: linear-gradient(#d0cbc0, #d0cbc0) center/2px 100% no-repeat;
    background-color: transparent;
}
.mess-split-handle:hover,
.mess-split.dragging .mess-split-handle {
    background-color: #c5d4e4;
}
.mess-chart-pane .chart-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}
.mess-chart-pane .hint {
    flex: 0 0 auto;
    margin: 0.2rem 0 0;
}
.mess-table-pane .row {
    flex: 0 0 auto;
}
.kks-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
    max-height: none !important;
}
body.mess-dragging {
    cursor: col-resize;
    user-select: none;
}
html.wl-mobile .mess-split {
    flex-direction: column;
}
@media (max-width: 900px) {
    html.wl-mobile .mess-split {
        flex-direction: column;
    }
    html.wl-mobile .mess-split-handle {
        flex: 0 0 8px;
        cursor: row-resize;
        background: linear-gradient(#d0cbc0, #d0cbc0) 50%/100% 2px no-repeat;
    }
    html.wl-mobile .mess-chart-pane {
        width: auto;
        max-width: none;
        flex: 1 1 var(--split-chart, 50%);
        min-height: 10rem;
    }
}

/* Immer Grafik | Slider | Tabelle nebeneinander */
.mess-split,
.mess-split#mess-ansicht {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}
@media (max-width: 900px) {
    .mess-split,
    .mess-split#mess-ansicht {
        flex-direction: row !important;
        grid-template-columns: unset !important;
    }
}
.mess-split-handle {
    flex: 0 0 10px !important;
    width: 10px !important;
    min-width: 10px !important;
    align-self: stretch;
    cursor: col-resize !important;
    background: #c5bfb3 !important;
    border-left: 1px solid #b0aaa0;
    border-right: 1px solid #b0aaa0;
    border-radius: 2px;
    margin: 0 2px;
}
.mess-split-handle:hover,
.mess-split.dragging .mess-split-handle {
    background: #005EB8 !important;
}
.mess-chart-pane {
    flex: 1 1 58% !important;
    max-width: none;
}
.mess-table-pane {
    flex: 1 1 42% !important;
}

table.kks th.col-zeit,
table.kks td.col-zeit {
    width: 1%;
    white-space: nowrap;
    padding-left: 0.45rem;
    padding-right: 0.55rem;
}
table.kks th.col-k,
table.kks td.col-k {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
table.kks td.col-k1, table.kks th.col-k1 { color: #005EB8; }
table.kks td.col-k2, table.kks th.col-k2 { color: #c0392b; }
table.kks td.col-k3, table.kks th.col-k3 { color: #1b7a3a; }
table.kks td.col-k4, table.kks th.col-k4 { color: #e67e22; }

table.kks {
    width: auto !important;
    max-width: 100%;
    table-layout: auto !important;
}
table.kks thead th {
    color: inherit;
}
table.kks thead th.col-k1,
table.kks thead th.col-k2,
table.kks thead th.col-k3,
table.kks thead th.col-k4 {
    color: inherit !important;
}
table.kks th.col-zeit,
table.kks td.col-zeit {
    width: 1% !important;
    max-width: 6.2rem !important;
    padding: 0.2rem 0.4rem !important;
    white-space: nowrap !important;
}
table.kks th.col-k,
table.kks td.col-k {
    width: 1% !important;
    padding: 0.15rem 0.28rem !important;
    white-space: nowrap !important;
}
table.kks td.col-k1 { color: #005EB8 !important; }
table.kks td.col-k2 { color: #c0392b !important; }
table.kks td.col-k3 { color: #1b7a3a !important; }
table.kks td.col-k4 { color: #e67e22 !important; }

.mess-chart-pane {
    flex: 0 0 var(--split-chart, 62%) !important;
    width: var(--split-chart, 62%) !important;
    max-width: none !important;
}
.mess-table-pane {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}
.mess-split-handle {
    flex: 0 0 12px !important;
    width: 12px !important;
    z-index: 5;
    position: relative;
}
table.kks {
    width: max-content !important;
    min-width: 0 !important;
}
.kks-table-wrap {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: auto;
    max-width: 100%;
}
table.kks th.col-zeit,
table.kks td.col-zeit {
    width: auto !important;
    max-width: none !important;
}

.mess-datum {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem 0.25rem;
    color: var(--fg);
}
table.kks thead th {
    text-align: center !important;
}
table.kks th.col-zeit,
table.kks td.col-zeit {
    text-align: right !important;
    padding-left: 0.45rem !important;
    padding-right: 3px !important;
}
table.kks th.col-k,
table.kks td.col-k {
    padding-left: 10px !important;
    padding-right: 3px !important;
}
#series-nav { display: none !important; }

.mess-datum {
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.25rem 0.4rem;
    background: #e8e8e8;
    border: 1px solid #c8c8c8;
    border-bottom: 0;
}
table.kks thead th {
    text-align: center !important;
    background: #f3f3f3 !important;
    font-weight: 600;
    border: 1px solid #c8c8c8;
    color: #111 !important;
}
table.kks tbody tr:nth-child(odd) td {
    background: #fff;
}
table.kks tbody tr:nth-child(even) td {
    background: #8ec8f0 !important;
}
table.kks td.col-zeit {
    text-align: right !important;
    padding-right: 3px !important;
    padding-left: 8px !important;
}
table.kks td.col-k {
    padding-left: 10px !important;
    padding-right: 3px !important;
}
table.kks td.col-kom {
    min-width: 4rem;
    text-align: left !important;
    color: #111 !important;
    padding-left: 6px !important;
}
table.kks tbody tr.cursor-row td {
    outline: none;
    box-shadow: none !important;
    background: #d6e4f5 !important;
}

table.kks td.col-kom {
    min-width: 6rem;
    padding: 0 2px !important;
    background: inherit;
}
.kom-input {
    width: 100%;
    min-width: 5rem;
    border: 0;
    background: transparent;
    font: inherit;
    padding: 0.1rem 4px;
    color: inherit;
}
.kom-input:focus {
    background: #fff;
    outline: 1px solid var(--accent);
}

.mess-datum {
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 0.95rem;
    padding: 0.2rem 0.3rem 0.15rem !important;
    background: transparent !important;
    border: 0 !important;
}
table.kks {
    font-size: 0.8rem;
    line-height: 1.15;
}
table.kks thead th {
    padding: 0.12rem 0.25rem !important;
    line-height: 1.2;
}
table.kks thead th.col-kom {
    text-align: center !important;
}
table.kks td {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.2;
    height: 1.25rem;
}
table.kks td.col-kom {
    padding: 0 !important;
    min-width: 5rem;
}
.kom-input {
    display: block;
    width: 100%;
    height: 1.25rem;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit;
    line-height: 1.25rem;
    padding: 0 4px !important;
    color: inherit;
}
.kom-input:focus {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

table.kks td.col-zeit,
table.kks th.col-zeit {
    padding-left: 4px !important;
    padding-right: 4px !important;
}
table.kks td.col-k,
table.kks th.col-k {
    padding-left: 4px !important;
    padding-right: 4px !important;
}
table.kks thead th {
    font-size: 0.68rem !important;
    font-weight: 600;
}
table.kks thead th.col-k,
table.kks td.col-k {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}
table.kks thead th.col-k .mw-hn {
    display: inline-block;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
table.kks thead th .mw-hn {
    display: inline;
}
table.kks thead th.col-zeit .mw-hn,
table.kks thead th.col-kom .mw-hn {
    max-width: 5.2rem;
}
table.kks td.col-kom,
table.kks th.col-kom {
    min-width: 7rem;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
table.kks thead th {
    padding: 0.2rem 0.4rem !important;
}
.kks-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
.mess-table-pane {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 70%;
}

.kks-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
table.kks {
    width: max-content !important;
}

.mess-table-pane {
    overflow: hidden !important;
    flex: 0 0 auto !important;
}
.kks-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
}
table.kks {
    width: max-content !important;
}
table.kks th.col-zeit,
table.kks td.col-zeit {
    min-width: 6.6rem !important;
    padding-left: 12px !important;
    padding-right: 10px !important;
}

.mess-datum {
    margin: 0 !important;
    padding: 0 0 2px 0 !important;
    line-height: 1.2;
    background: transparent !important;
    border: 0 !important;
}
.mess-table-pane {
    padding: 0 !important;
    gap: 0 !important;
}
.kks-table-wrap {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0;
}
.mess-split-handle {
    flex: 0 0 6px !important;
    width: 6px !important;
    min-width: 6px !important;
    margin: 0 !important;
}
table.kks th.col-zeit,
table.kks td.col-zeit {
    min-width: 7.2rem !important;
}

.mess-table-pane {
    flex: 0 0 auto !important;
    width: fit-content !important;
    max-width: none !important;
    min-width: 0 !important;
}
.kks-table-wrap {
    width: fit-content !important;
    max-width: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
}
table.kks {
    width: max-content !important;
    max-width: none !important;
}

.mess-table-pane {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto !important;
    overflow: hidden !important;
    min-width: 0 !important;
}
.mess-datum {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 0 2px !important;
}
.kks-head {
    flex: 0 0 auto;
    overflow: hidden;
}
.kks-head table.kks thead th {
    position: static !important;
}
.kks-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: auto !important;
    max-width: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
}
table.kks {
    width: max-content !important;
    border-collapse: collapse;
}

.kks-head {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.kks-head::-webkit-scrollbar { height: 0; display: none; }

#mess-table-pane.mess-table-pane {
    flex: 0 0 auto !important;
    width: auto !important;
}
#kks-head,
#kks-table-wrap {
    width: auto !important;
    max-width: none !important;
}
#mess-table-head-tbl,
#mess-table {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    table-layout: fixed !important;
}
#mess-table td,
#mess-table-head-tbl th {
    box-sizing: border-box;
}
.mess-datum {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.25;
}
.kks-head { margin: 0; padding: 0; }

#mess-table,
#mess-table-head-tbl,
.kks-head table,
.kks-table-wrap table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.kks-head,
.kks-table-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#mess-table-head-tbl th.col-zeit,
#mess-table td.col-zeit {
    width: var(--wl-col-zeit, 96px) !important;
    min-width: var(--wl-col-zeit, 96px) !important;
    max-width: var(--wl-col-zeit, 96px) !important;
    box-sizing: border-box !important;
}

#mess-table-head-tbl th.col-kom,
#mess-table td.col-kom {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}
#mess-table td.col-k.wl-tbl-over,
.m-tbl td.col-k.wl-tbl-over {
    background: #c0392b !important;
    color: #fff !important;
}
#mess-table td.col-k.wl-tbl-over .mw-v,
#mess-table td.col-k.wl-tbl-over .wl-tbl-v,
.m-tbl td.col-k.wl-tbl-over .mw-v,
.m-tbl td.col-k.wl-tbl-over .wl-tbl-v {
    color: #fff !important;
}
#mess-table-pane {
    flex: 0 0 auto !important;
}

.mess-split {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
}
.mess-chart-pane {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}
.mess-split-handle {
    flex: 0 0 6px !important;
    width: 6px !important;
}
#mess-table-pane {
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
}
#kks-head,
#kks-table-wrap {
    width: auto !important;
    max-width: none !important;
    margin-left: 0;
}
#mess-table-head-tbl,
#mess-table {
    width: max-content !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    table-layout: auto !important;
}
#mess-table-head-tbl th.col-k,
#mess-table td.col-k,
#mess-table-head-tbl th.col-kom,
#mess-table td.col-kom {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}
#mess-table-head-tbl th.col-zeit,
#mess-table td.col-zeit {
    width: auto !important;
    max-width: 91px !important;
}

#mess-table-pane {
    flex: 0 0 auto !important;
    width: max-content !important;
}
#kks-table-wrap {
    overflow: auto !important;
    width: auto !important;
}
#mess-table {
    width: max-content !important;
    margin: 0 !important;
    table-layout: auto !important;
}
#mess-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.mess-chart-pane {
    flex: 1 1 auto !important;
    width: auto !important;
}
.mess-split-handle {
    flex: 0 0 6px !important;
    cursor: col-resize !important;
    z-index: 8;
}

.chart-ctx-menu {
    position: fixed;
    z-index: 4000;
    background: #fff;
    border: 1px solid #c8c2b6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 0.2rem 0;
    min-width: 10rem;
}
.chart-ctx-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font: inherit;
}
.chart-ctx-menu button:hover {
    background: #e8eef5;
}

.chart-ctx-menu {
    background: #f7f4ee !important;
    border: 1px solid #5c584f !important;
}
.chart-ctx-menu button {
    color: #1c1b18 !important;
    background: #f7f4ee !important;
}
.chart-ctx-menu button:hover {
    background: #d6e4f5 !important;
    color: #1c1b18 !important;
}

.mess-chart-pane .chart-wrap {
    position: relative;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
}
.mess-chart-pane .chart-wrap canvas,
#mess-chart {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}
#mess-chart-stack,
#mess-chart-stack-hover {
    display: none !important;
}
.stack-board[hidden] { display: none !important; }
.stack-board {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 72px;
    z-index: 4;
    flex-direction: column;
    min-height: 0;
}
.chart-body.is-stack #stack-col {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    top: 36px;
    bottom: 0;
    z-index: 4;
    min-width: 0;
    overflow: visible;
    pointer-events: none;
}
.chart-body.is-stack #stack-col .chset-proto {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    flex: 0 0 auto;
    width: max-content;
    margin: 0 0 0 56px;
    z-index: 5;
    max-width: calc(100% - 56px);
    pointer-events: auto;
}
.chart-body.is-stack #stack-col #chart-gps-band {
    display: none !important;
    height: 0 !important;
    flex: 0 0 0 !important;
    overflow: hidden !important;
}
.chart-body.is-stack #stack-col .stack-board {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin-top: 0;
    overflow: hidden;
    pointer-events: auto;
}
.chart-body.is-stack #mess-chart,
.chart-body.is-stack #mess-chart-hover {
    visibility: hidden;
    pointer-events: none;
}
.stack-slot {
    position: relative;
    flex: 1 1 0;
    min-height: 56px;
    overflow: hidden;
}
#stack-board canvas.stack-slot-cv,
.stack-slot-cv {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}
#stack-board canvas.stack-slot-hover,
.stack-slot-hover {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
}
.stack-vsplit {
    flex: 0 0 6px;
    cursor: row-resize;
    background: transparent;
    position: relative;
    z-index: 5;
}
.stack-vsplit::after {
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    top: 2px;
    height: 2px;
    border-radius: 1px;
    background: #c5bfb3;
}
 .stack-slot:has(.stack-vsplit-last) {
    padding-bottom: 8px;
    box-sizing: border-box;
}
.stack-vsplit-last {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    height: 6px;
    z-index: 6;
}
.chart-gps-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 2px;
    height: 18px;
    z-index: 6;
    pointer-events: none;
}
.chart-gps-band .chart-gps-pin {
    pointer-events: auto;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
#chart-map-preview {
    position: fixed !important;
    width: 320px !important;
    height: auto !important;
    z-index: 4000 !important;
    pointer-events: none !important;
}
#chart-map-preview canvas,
#chart-map-cv {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 320px !important;
    height: 224px !important;
    display: block !important;
}

.mess-split-handle {
    background: transparent !important;
    background-image: none !important;
}
.mess-split-handle:hover,
.mess-split.dragging .mess-split-handle {
    background-color: rgba(0, 0, 0, 0.06) !important;
}

/* Slider nur bei Hover/Ziehen sichtbar */
.mess-split-handle,
.mess-split .mess-split-handle {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}
.mess-split-handle:hover,
.mess-split.dragging .mess-split-handle {
    background: rgba(31, 78, 121, 0.18) !important;
    background-image: none !important;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    position: relative;
}
.chart-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.chart-info-wrap {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
}
.chart-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    font: italic 700 13px "Times New Roman", serif;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chart-info-btn[hidden] {
    display: none !important;
}
.chart-info-btn svg {
    display: block;
    margin: 0;
}
.chart-info-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}
.chart-info-btn:hover,
.chart-info-btn.open,
.chart-info-btn.on {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
#chart-filt-btn:not(.on):not(:hover) {
    background: #f4f1ea;
    color: #3a3834;
    border-color: #8a8680;
}
.chart-wrap .chart-map-preview,
.chart-map-preview {
    position: fixed !important;
    z-index: 4000;
    width: 320px !important;
    background: #f4f1ea !important;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 6px 18px rgba(20, 30, 40, 0.28);
    pointer-events: none !important;
    opacity: 1;
    overflow: hidden;
}
.chart-map-preview canvas,
#chart-map-cv {
    display: block;
    width: 320px !important;
    height: 224px !important;
    background: #e6e2dc;
    border-radius: 2px;
    opacity: 0.9;
}
.chart-map-preview span,
.chart-map-lbl {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: #3a3834;
    text-align: left;
    margin: 0;
    padding: 5px 8px 4px;
    box-sizing: border-box;
    background: #f4f1ea;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.chart-map-lbl .chart-map-coord {
    position: static;
    flex: 1 1 auto;
    text-align: left;
    min-width: 0;
}
.chart-map-lbl .chart-map-zeit {
    position: static;
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.55);
}
.chart-help-wrap {
    position: relative;
    flex: 0 0 auto;
}
.chart-info-pop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 120;
    width: 21rem;
    max-width: min(21rem, calc(100vw - 24px));
    max-height: min(70vh, 28rem);
    overflow: auto;
    padding: 0.65rem 0.75rem 0.55rem;
    background: #fffef9;
    border: 1px solid #c8c2b6;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    color: #3a3834;
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: normal;
}
.chart-info-pop[hidden] { display: none !important; }
.chart-info-pop:not([hidden]) { display: block !important; }
.chart-info-pop .cip-sec {
    margin: 0.15rem 0 0.2rem;
    font: 700 0.68rem/1.2 "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7a7468;
}
.chart-info-pop .cip-sec:first-child { margin-top: 0; }
.chart-info-pop dl {
    margin: 0 0 0.65rem;
}
.chart-info-pop dt {
    margin-top: 0.32rem;
    font-weight: 650;
    color: #2c2a26;
}
.chart-info-pop dt:first-child { margin-top: 0; }
.chart-info-pop dd {
    margin: 0.05rem 0 0;
    color: #5a564c;
    font-size: 0.78rem;
}
.chart-info-pop dt .cip-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    color: #3a3834;
}
.chart-info-pop dt .cip-ico svg {
    display: block;
    width: 15px;
    height: 13px;
}
.chart-info-pop dt .cip-ico-txt {
    font: 700 0.58rem/1 "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0;
    text-transform: none;
}
.mess-chart-pane > .hint { display: none; }

#kenn-band {
    box-sizing: border-box;
}
.chart-stats {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 0.6rem;
    font-size: 0.78rem;
    color: #3a3834;
}
.chart-stats-scope {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    color: #5c584f;
    cursor: pointer;
}
.chart-stats-scope input { margin: 0; }
.chart-stats-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}
.chart-stat-ch {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}
.chart-stat-ch b {
    font-weight: 700;
}
.chart-stat-ch span { color: #4a4741; }

.stat-scope-row {
    display: flex;
    gap: 0.7rem;
    padding: 0 0.35rem 0.15rem;
    font-size: 0.78rem;
    color: #5c584f;
}
.stat-table {
    width: max-content;
    margin: 0;
    border-bottom: 1px solid #c8c2b6;
}
.stat-table th,
.stat-table td {
    padding: 1px 10px 1px 3px;
    font-size: 0.78rem;
    line-height: 1.25;
}
.stat-table th.col-zeit,
.stat-table td.col-zeit {
    text-align: right;
    padding-right: 3px;
    font-weight: 600;
}
.stat-table td.col-k { text-align: right; }

.kenn-stat-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.kenn-stat-row #kenn-band {
    flex: 0 0 auto;
}
.stat-side {
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
    padding: 0 0.35rem 0.15rem;
    box-sizing: border-box;
}

.stat-side {
    padding: 0 !important;
    margin: 0;
}
.stat-scope-row {
    padding: 0 0 2px 0 !important;
}
.stat-table {
    width: max-content !important;
    margin: 0 !important;
    table-layout: fixed;
}
.stat-table th.col-zeit,
.stat-table td.col-zeit {
    width: 91px !important;
    min-width: 91px !important;
    max-width: 91px !important;
    box-sizing: border-box !important;
    text-align: right !important;
    padding-left: 12px !important;
    padding-right: 10px !important;
}
.stat-table th.col-k,
.stat-table td.col-k {
    padding-left: 10px !important;
    padding-right: 3px !important;
    text-align: right !important;
}
.mess-table-pane .mess-datum {
    text-align: center;
    font-weight: 700;
    padding: 2px 0 !important;
}

#view-messung {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#view-messung .mess-split {
    padding-bottom: 0 !important;
}
#view-messung > .app-foot,
#app-foot {
    flex: 0 0 14px !important;
    height: 14px !important;
    max-height: 14px !important;
    min-height: 0 !important;
    margin: 0 12px 0 12px !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 14px !important;
}
#app-foot button {
    height: 14px !important;
    min-height: 0 !important;
    max-height: 14px !important;
    padding: 0 !important;
    font-size: 10px !important;
    line-height: 14px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.mess-work {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}
.mess-work .mess-split {
    flex: 1 1 auto;
    min-height: 0;
}
#mess-table {
    width: 100% !important;
    min-width: 100% !important;
}
#mess-table th.col-kom,
#mess-table td.col-kom {
    width: auto !important;
    min-width: 7rem !important;
    max-width: none !important;
}
#kks-table-wrap,
.kks-table-wrap {
    background: #d4edfc;
}


#kks-table-wrap,
.kks-table-wrap {
    background: #d4edfc;
}

#mess-table thead th.col-k,
#stat-table thead th.col-k,
table.kks thead th.col-k {
    text-align: center !important;
}
#stat-table th.col-k {
    text-align: center !important;
}

#mess-table th.col-zeit,
#mess-table td.col-zeit,
#stat-table th.col-zeit,
#stat-table td.col-zeit {
    width: calc(4.6rem + 20px) !important;
    min-width: calc(4.6rem + 20px) !important;
    max-width: calc(4.6rem + 20px) !important;
    box-sizing: border-box !important;
}

.stat-side { display: flex; }
.mess-table-pane {
    min-width: 0 !important;
}
#kks-table-wrap {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
#stat-table,
#mess-table {
    min-width: 0;
}
#stat-table {
    width: max-content;
    border-bottom: 1px solid #c8c2b6;
}
.stat-scope-row {
    flex: 0 0 auto;
}

.stat-side {
    display: flex !important;
    flex-direction: column;
    overflow: hidden !important;
    min-width: 0;
}
.stat-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.stat-scroll::-webkit-scrollbar { display: none; }
#stat-table {
    margin: 0;
}

.panel-tabs {
    display: flex;
    gap: 0;
    flex: 0 0 auto;
    padding: 0 0.35rem;
    background: #e8e4da;
    border-bottom: 1px solid #c8c2b6;
}
.panel-tab {
    border: 0;
    border-right: 1px solid #c8c2b6;
    background: transparent;
    color: #3a3834;
    font: 600 0.8rem Segoe UI, Tahoma, sans-serif;
    padding: 0.28rem 0.75rem;
    cursor: pointer;
}
.panel-tab:hover { background: #f3efe6; }
.panel-tab.active {
    background: #f4f1ea;
    color: #005EB8;
    box-shadow: inset 0 -2px 0 #005EB8;
}
.kenn-stat-row {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.2s ease, opacity 0.15s ease;
}
.kenn-stat-row.open {
    max-height: 12rem;
    opacity: 1;
    pointer-events: auto;
    overflow: hidden;
}
.kenn-stat-row .kenn-band { display: none; }
.kenn-stat-row .stat-side { display: none !important; }
.kenn-stat-row.show-kenn .kenn-band { display: block; }
.kenn-stat-row.show-stat .stat-side { display: flex !important; }

.kenn-stat-row {
    display: flex !important;
    align-items: stretch !important;
    flex: 0 0 auto !important;
    height: auto !important;
}
.kenn-stat-row:not(.open) {
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    border: 0 !important;
}
.kenn-stat-row.open {
    max-height: none !important;
    min-height: 7.5rem !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
}
.kenn-stat-row.open.show-kenn #kenn-band,
.kenn-stat-row.show-kenn #kenn-band {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}
.kenn-stat-row.open.show-stat #stat-side,
.kenn-stat-row.show-stat .stat-side {
    display: flex !important;
    height: auto !important;
    min-height: 6rem !important;
}

.panel-tabs {
    align-items: stretch;
}
.panel-tabs .progress-bar {
    flex: 1 1 auto;
    min-width: 8rem;
    height: auto;
    margin: 3px 8px 3px 12px;
    border: 1px solid #c8c2b6;
    border-radius: 3px;
    align-self: center;
}
.panel-tabs .progress-bar.progress-idle {
    opacity: 0.35;
}
.panel-tabs .progress-bar-text {
    color: #222;
    text-shadow: none;
}

.panel-tabs {
    min-height: 2rem;
    align-items: center !important;
}
.panel-tabs #progress-wrap,
.panel-tabs .progress-bar {
    display: block !important;
    position: relative !important;
    flex: 1 1 auto !important;
    height: 1.35rem !important;
    min-height: 1.35rem !important;
    max-height: 1.35rem !important;
    margin: 0 0.6rem 0 0.8rem !important;
    background: #e5e0d6 !important;
    border: 1px solid #b0aaa0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.panel-tabs .progress-bar-fill {
    display: block !important;
    height: 100% !important;
    background: #8fb4d4 !important;
}
.panel-tabs .progress-bar-text {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #1a1a1a !important;
    font-weight: 700;
    font-size: 0.78rem;
    text-shadow: none;
}

.panel-tabs #progress-wrap,
.panel-tabs .progress-bar {
    flex: 0 0 14rem !important;
    width: 14rem !important;
    max-width: 14rem !important;
    min-width: 14rem !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
}

.panel-tabs .progress-bar.progress-idle,
.panel-tabs #progress-wrap.progress-idle {
    visibility: hidden !important;
    opacity: 0 !important;
}

.chart-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}
.chart-body.is-stack #axis-origin-btn {
    z-index: 8;
}
.kanal-panel {
    flex: 0 0 11.6rem;
    width: 11.6rem;
    overflow: auto;
    padding: 0.25rem 0.3rem 0.4rem 0.25rem;
    border-right: 1px solid #d0cbc0;
    background: #f7f4ee;
}
.kanal-card {
    border: 1px solid #d0cbc0;
    border-radius: 4px;
    padding: 0.28rem 0.32rem 0.35rem;
    margin-bottom: 0.3rem;
    background: #fffef9;
    font-size: 0.72rem;
}
.kanal-card-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}
.kanal-card-head input[type="color"] {
    width: 1.3rem;
    height: 1.15rem;
    padding: 0;
    border: 1px solid #bbb;
    background: #fff;
}
.kanal-card-head input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.72rem;
    padding: 1px 3px;
}
.kanal-card-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}
.kanal-card-row label { color: #5c584f; }
.kanal-card-row input[type="number"] {
    width: 3.2rem;
    font-size: 0.72rem;
    padding: 1px 2px;
}
.kanal-card select {
    font-size: 0.72rem;
    padding: 1px 2px;
}
.kanal-aktiv {
    margin-left: auto;
    white-space: nowrap;
}

.kanal-panel {
    flex: 0 0 13rem !important;
    width: 13rem !important;
    background: #eef1f4 !important;
    border-right: 1px solid #d5dbe2 !important;
    padding: 0.45rem 0.4rem 0.6rem !important;
}
.kanal-card {
    background: #fff !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.06), 0 0 0 1px rgba(20, 40, 70, 0.06);
    padding: 0.55rem 0.55rem 0.5rem !important;
    margin-bottom: 0.45rem !important;
    font-size: 0.75rem;
    position: relative;
    overflow: hidden;
}
.kanal-card::before { display: none !important; }
.kanal-card.is-off { opacity: 1; }
.kanal-card.is-off .kanal-titel,
.kanal-card.is-off .kanal-pop { pointer-events: none; }
.kanal-card.is-off .kanal-titel { color: #7a838c; }
.kanal-card-head {
    gap: 0.4rem !important;
    margin-bottom: 0.4rem !important;
}
.kanal-color {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #c5ccd4;
    flex: 0 0 auto;
}
.kanal-color input {
    transform: scale(1.8);
    transform-origin: center;
    cursor: pointer;
    border: 0 !important;
    width: 1.35rem !important;
    height: 1.35rem !important;
    padding: 0 !important;
}
.kanal-titel {
    flex: 0 0 auto;
    width: 12ch;
    min-width: 12ch;
    max-width: 12ch;
    border: 0 !important;
    border-bottom: 1px solid #e2e6ea !important;
    background: transparent !important;
    font: 600 0.82rem/1.3 Segoe UI, system-ui, sans-serif !important;
    padding: 2px 0 !important;
    color: #1c2330;
}
.kanal-titel:focus {
    outline: none;
    border-bottom-color: var(--ch, #005EB8) !important;
}
.kanal-switch {
    position: relative;
    width: 2rem;
    height: 1.15rem;
    flex: 0 0 auto;
    margin-left: auto;
}
.kanal-switch input { display: none; }
.kanal-switch span {
    position: absolute;
    inset: 0;
    background: #cfd5dc;
    border-radius: 99px;
    transition: background 0.15s;
}
.kanal-switch span::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 0.85rem;
    height: 0.85rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.15s;
}
.kanal-switch input:checked + span { background: var(--ch, #005EB8); }
.kanal-switch input:checked + span::after { transform: translateX(0.82rem); }
.kanal-seg {
    display: flex;
    background: #eef1f4;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 0.4rem;
}
.kanal-seg button {
    flex: 1;
    border: 0;
    background: transparent;
    border-radius: 6px;
    padding: 0.18rem 0;
    font: 600 0.75rem Segoe UI, system-ui, sans-serif;
    color: #5b6570;
    cursor: pointer;
}
.kanal-seg button.on {
    background: #fff;
    color: #1c2330;
    box-shadow: 0 1px 2px rgba(20,40,70,0.12);
}
.kanal-card-row {
    gap: 0.4rem !important;
}
.kanal-card-row label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #7a838c !important;
}
.kanal-card-row input[type="number"] {
    width: 100% !important;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    background: #f7f9fb;
    padding: 0.22rem 0.3rem !important;
    font: 0.78rem Segoe UI, system-ui, sans-serif !important;
    color: #1c2330;
}
.kanal-card-row input[type="number"]:focus {
    outline: none;
    border-color: var(--ch, #005EB8);
    background: #fff;
}

.kanal-panel {
    display: none;
}
.kanal-panel.open {
    display: block;
}
.kanal-panel {
    scrollbar-width: thin;
    scrollbar-color: #b7c0c9 transparent;
}
.kanal-panel::-webkit-scrollbar {
    width: 8px;
}
.kanal-panel::-webkit-scrollbar-track {
    background: transparent;
    margin: 6px 0;
}
.kanal-panel::-webkit-scrollbar-thumb {
    background: #c5ced6;
    border-radius: 99px;
    border: 2px solid #eef1f4;
}
.kanal-panel::-webkit-scrollbar-thumb:hover {
    background: #9aa6b2;
}
.kanal-einheit {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0.4rem;
}
.kanal-feld-lab {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #7a838c;
}
.kanal-einheit .kanal-seg { margin-bottom: 0; }

.chart-body {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
}
.chart-body .chart-wrap {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
}
.kanal-panel:not(.open) {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.chart-toolbar { display: none !important; height: 0 !important; }
.mess-chart-pane,
.mess-table-pane {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
}
.chart-body {
    flex: 1 1 auto !important;
    height: 100% !important;
}
.chart-wrap {
    position: relative !important;
}
.chart-wrap .chart-info-wrap {
    position: absolute !important;
    top: 6px;
    right: 8px;
    left: 8px;
    z-index: 8;
    margin: 0;
    width: auto !important;
    pointer-events: none;
}
.chart-wrap .chart-info-wrap > * { pointer-events: auto; }
.mess-chart-pane .chart-wrap {
    min-height: 180px !important;
}
.chart-info-pop {
    right: 0;
    left: auto;
}

.panel-tabs {
    display: none !important;
}
.panel-tabs .panel-tab {
    border: 0 !important;
    border-right: 0 !important;
    background: transparent !important;
    color: #5b6570 !important;
    font: 600 0.78rem Segoe UI, system-ui, sans-serif !important;
    padding: 0.28rem 0.85rem !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    letter-spacing: 0.01em;
}
.panel-tabs .panel-tab:hover {
    background: #e3e8ed !important;
    color: #1c2330 !important;
}
.panel-tabs .panel-tab.active {
    background: #fff !important;
    color: #1c2330 !important;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.12) !important;
}
.panel-tabs #progress-wrap {
    margin-left: auto !important;
}

.stat-side {
    padding: 0.2rem 0.2rem 0.15rem !important;
    min-height: 0 !important;
}
.stat-scope-row {
    display: flex !important;
    justify-content: flex-end;
    padding: 0 0 0.15rem !important;
    margin: 0 !important;
}
.stat-seg {
    width: auto;
    min-width: 9rem;
    margin: 0 !important;
}
.stat-seg button {
    padding: 0.12rem 0.55rem !important;
    font-size: 0.72rem !important;
}
.stat-table th,
.stat-table td {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    line-height: 1.15 !important;
    font-size: 0.75rem !important;
}
.kenn-stat-row.open {
    min-height: 0 !important;
}
.kenn-stat-row.open.show-stat #stat-side,
.kenn-stat-row.show-stat .stat-side {
    min-height: 0 !important;
}

#mess-table th.col-k,
#mess-table td.col-k,
#stat-table th.col-k,
#stat-table td.col-k {
    min-width: 5.6rem !important;
    width: 5.6rem;
    box-sizing: border-box !important;
}

.mess-table-pane {
    min-width: 0 !important;
    overflow: hidden !important;
}
#kks-table-wrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
#mess-table {
    width: max-content !important;
}
#stat-table {
    min-width: 0 !important;
}
.stat-side {
    min-width: 0 !important;
}

.chart-ctx-menu {
    position: fixed;
    z-index: 80;
    min-width: 12rem;
    background: #fff;
    color: #1c2330;
    border: 1px solid #c5ccd4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 40, 70, 0.16);
    padding: 0.25rem;
    font: 600 0.8rem Segoe UI, system-ui, sans-serif;
}
.chart-ctx-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #1c2330;
    padding: 0.38rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}
.chart-ctx-menu button:hover,
.chart-ctx-menu button.on {
    background: #eef1f4;
}

.chart-ctx-menu .chart-ctx-seg {
    display: flex;
    gap: 2px;
    background: #eef1f4;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 0.3rem;
}
.chart-ctx-menu .chart-ctx-seg button {
    flex: 1;
    text-align: center;
    border-radius: 6px;
    padding: 0.4rem 0.35rem;
    font-weight: 600;
    color: #5b6570;
}
.chart-ctx-menu .chart-ctx-seg button.on {
    background: #fff;
    color: #1c2330;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.12);
}
.chart-ctx-menu .chart-ctx-action {
    width: 100%;
    text-align: left;
    margin-top: 0.1rem;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
    color: #1c2330;
}
.chart-ctx-menu .chart-ctx-action:hover {
    background: #eef1f4;
}

.chart-ctx-menu .chart-ctx-seg button.on {
    background: #005EB8 !important;
    color: #fff !important;
    box-shadow: none !important;
}
.chart-ctx-menu .chart-ctx-seg button.on:hover {
    background: #16385a !important;
    color: #fff !important;
}

table.kks th.col-k1, table.kks td.col-k1 { color: var(--k1, #005EB8) !important; }
table.kks th.col-k2, table.kks td.col-k2 { color: var(--k2, #c0392b) !important; }
table.kks th.col-k3, table.kks td.col-k3 { color: var(--k3, #1b7a3a) !important; }
table.kks th.col-k4, table.kks td.col-k4 { color: var(--k4, #e67e22) !important; }
table.kks th.col-k5, table.kks td.col-k5 { color: var(--k5, #8e44ad) !important; }
table.kks th.col-k6, table.kks td.col-k6 { color: var(--k6, #16a085) !important; }
table.kks th.col-k7, table.kks td.col-k7 { color: var(--k7, #2c3e50) !important; }
table.kks th.col-k8, table.kks td.col-k8 { color: var(--k8, #d68910) !important; }

.chart-info-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow: visible;
}
.chart-mode-seg { display: none; }
#chart-mode-btn .ico-stack { display: none; }
#chart-mode-btn.is-stack .ico-overlay { display: none; }
#chart-mode-btn.is-stack .ico-stack { display: block; }
.chart-mode-seg button {
    border: 0;
    background: transparent;
    color: #5b6570;
    font: 600 0.72rem Segoe UI, system-ui, sans-serif;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
}
.chart-mode-seg button.on {
    background: #005EB8;
    color: #fff;
}

.chart-mode-seg button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.55rem;
    padding: 0.1rem !important;
}
.chart-mode-seg button svg { display: block; }

.chart-wrap .chart-info-wrap {
    top: 4px;
    right: 8px;
}

.chart-body.stack-sync {
    overflow-x: hidden;
    overflow-y: hidden !important;
    align-items: stretch;
}
.chart-body.stack-sync.stack-scroll {
    overflow-y: auto !important;
}
.chart-body.stack-sync .kanal-panel.open {
    display: block !important;
    position: relative;
    overflow: visible !important;
    height: auto !important;
    flex: 0 0 13rem !important;
}
.chart-body.stack-sync .chart-wrap {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}
.chart-body.stack-sync .kanal-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 0 6px 0 !important;
    box-sizing: border-box;
}
.chart-body:not(.stack-sync) .kanal-card {
    position: relative;
    top: auto;
    height: auto;
}

.chart-body.stack-sync .kanal-panel.open {
    padding-top: 42px !important;
    padding-right: 0.4rem !important;
    padding-bottom: 0 !important;
    padding-left: 0.4rem !important;
    box-sizing: border-box;
}
.chart-body.stack-sync .kanal-card {
    margin: 0 0 6px 0 !important;
}

.chart-body.stack-sync .kanal-panel.open {
    padding: 0 0.4rem 0 !important;
    position: relative !important;
}
.chart-body.stack-sync .kanal-card {
    position: absolute !important;
    left: 0.4rem !important;
    right: 0.4rem !important;
    margin: 0 !important;
    height: auto !important;
}

.chart-body.stack-sync .kanal-panel.open {
    flex: 0 0 11.2rem !important;
    width: 11.2rem !important;
    max-width: 11.2rem !important;
    overflow: hidden !important;
    z-index: 2;
}
.chart-body.stack-sync .chart-wrap {
    z-index: 3;
    min-width: 0 !important;
}
.chart-body.stack-sync .kanal-card {
    left: 0.3rem !important;
    right: 0.3rem !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.chart-body.stack-sync .kanal-panel.open {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100%;
}
.chart-body.stack-sync .kanal-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.kanal-panel,
.kanal-panel.open,
.chart-body.stack-sync .kanal-panel.open {
    flex: 0 0 11.2rem !important;
    width: 11.2rem !important;
    max-width: 11.2rem !important;
}

/* Einzelgrafik: Settings in der freien Fläche über der Zeichenfläche */
.chart-body:not(.stack-sync) {
    position: relative !important;
}
.chart-body:not(.stack-sync) .kanal-panel,
.chart-body:not(.stack-sync) .kanal-panel.open {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    z-index: 9;
    display: none;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    pointer-events: none;
    overflow: visible !important;
    margin-right: auto;
}
.chart-body:not(.stack-sync).show-chan-set .kanal-panel.open {
    display: flex !important;
}
.chart-body:not(.stack-sync) .kanal-card {
    pointer-events: auto;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 2px;
    width: auto !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 4px !important;
    padding: 0 4px 0 0 !important;
    margin: 0 !important;
}
.chart-body:not(.stack-sync) .kanal-card:hover {
    background: rgba(31, 78, 121, 0.05) !important;
}
.chart-body:not(.stack-sync) .kanal-card::before {
    width: 3px;
    border-radius: 2px;
}
.chart-body:not(.stack-sync) .kanal-card-head {
    display: flex;
    align-items: flex-end;
    gap: 2px !important;
    margin: 0 !important;
    height: 22px;
    align-self: flex-end;
}
.chart-body:not(.stack-sync) .kanal-pop .kanal-color {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}
.chart-body:not(.stack-sync) .kanal-pop .kanal-color input,
.chart-body:not(.stack-sync) .kanal-color input,
.chart-body:not(.stack-sync) .kanal-card-head input[type="color"] {
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    box-sizing: border-box;
    transform: none !important;
    border: 1px solid #c5ccd4 !important;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}
.chart-body:not(.stack-sync) .kanal-switch {
    width: 1.55rem;
    height: 16px;
    margin: 0 0.15rem 3px 0;
    align-self: flex-end;
    flex: 0 0 1.55rem;
}
.chart-body:not(.stack-sync) .kanal-switch span::after {
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
}
.chart-body:not(.stack-sync) .kanal-switch input:checked + span::after {
    transform: translateX(9px);
}
.chart-body:not(.stack-sync) .kanal-titel {
    width: 12ch !important;
    min-width: 12ch !important;
    max-width: 12ch !important;
    flex: 0 0 12ch !important;
    height: 22px;
    box-sizing: border-box;
    font-size: 0.72rem !important;
    font-weight: 600;
    padding: 0 2px !important;
    line-height: 22px;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    border-radius: 0 !important;
}
.chart-body:not(.stack-sync) .kanal-titel:focus {
    border-bottom-color: var(--ch, #005EB8) !important;
}
.chart-body:not(.stack-sync) .kanal-more {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3a424a;
    font-size: 18px;
    line-height: 18px;
    cursor: pointer;
}
.chart-body:not(.stack-sync) .kanal-card.is-open .kanal-more { color: #005EB8; }
.chart-body:not(.stack-sync) .kanal-card { position: relative !important; }
.chart-body:not(.stack-sync) .kanal-panel,
.chart-body:not(.stack-sync) .kanal-panel.open {
    pointer-events: auto !important;
}
.chart-body:not(.stack-sync) .kanal-pop {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
    padding: 6px 8px 7px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d5dbe2;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(20, 30, 40, 0.12);
}
.chart-body:not(.stack-sync) .kanal-card.is-open .kanal-pop {
    display: flex !important;
    position: fixed !important;
    z-index: 80 !important;
}
.chart-body.stack-sync .kanal-more { display: none; }
.chart-body.stack-sync .kanal-pop {
    display: flex;
    flex-direction: column;
    position: static;
}
.chart-body:not(.stack-sync) .kanal-feld-lab {
    display: block !important;
    height: 12px;
    font-size: 0.58rem;
    line-height: 12px;
    color: #6a727a;
    letter-spacing: 0.02em;
    margin: 0 0 2px;
    white-space: nowrap;
}
.chart-body:not(.stack-sync) .kanal-einheit {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    margin: 0 !important;
    gap: 1px !important;
}
.chart-body:not(.stack-sync) .kanal-card-row {
    display: flex !important;
    flex-direction: row;
    align-items: flex-end;
    margin: 0 !important;
    gap: 6px !important;
}
.chart-body:not(.stack-sync) .kanal-card-row label {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 !important;
    padding: 0 !important;
    gap: 1px !important;
}
.chart-body:not(.stack-sync) .kanal-card-row input[type="number"] {
    width: 2.6rem !important;
    height: 22px !important;
    box-sizing: border-box !important;
    font-size: 0.68rem !important;
    line-height: 20px;
    padding: 0 4px !important;
    background: #f4f6f8 !important;
    border: 0 !important;
    border-radius: 4px !important;
}
.chart-body:not(.stack-sync) .kanal-seg {
    height: 22px;
    padding: 1px;
    margin: 0 !important;
    box-sizing: border-box;
    align-items: stretch;
}
.chart-body:not(.stack-sync) .kanal-seg button {
    min-width: 1.35rem;
    height: 20px;
    line-height: 20px;
    font-size: 0.65rem;
    padding: 0 5px;
}

.chart-body:not(.stack-sync) .chart-wrap {
    padding-top: 34px;
    box-sizing: border-box;
}
.chart-body:not(.stack-sync) .chart-wrap canvas,
.chart-body:not(.stack-sync) #mess-chart {
    top: 34px !important;
    height: calc(100% - 34px) !important;
}

.mess-split#mess-ansicht,
.mess-split {
    align-items: stretch !important;
}
.mess-chart-pane,
.mess-table-pane {
    height: 100% !important;
    max-height: 100% !important;
    align-self: stretch !important;
}
.mess-chart-pane {
    overflow: hidden !important;
    border-bottom: 1px solid #c5ccd4;
    box-sizing: border-box;
}
.mess-table-pane {
    border-bottom: 1px solid #c5ccd4;
    box-sizing: border-box;
}
.chart-body {
    min-height: 0 !important;
}

.chart-body:not(.stack-sync) .kanal-panel.open {
    padding: 0 !important;
}
.chart-body:not(.stack-sync) .kanal-card {
    position: relative !important;
    top: auto !important;
    margin: 0 0 0.45rem 0 !important;
    height: auto !important;
}

.chart-stat-btn {
    font-family: "Times New Roman", Times, serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
}
.chart-stat-btn.on {
    background: #005EB8 !important;
    color: #fff !important;
}
.chart-stat-wrap {
    position: static;
    display: inline-flex;
    flex: 0 0 auto;
}
.chart-info-wrap .chart-stat-pop,
.chart-stat-pop {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: auto !important;
    right: 0 !important;
    width: 230px;
    z-index: 90;
}
#chart-trim-pop {
    width: 280px;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
#chart-trim-pop[hidden] { display: none; }
#chart-trim-pop .chart-ctx-action {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #3a362f;
    font: 650 0.78rem/1.25 "Segoe UI", Tahoma, sans-serif;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}
#chart-trim-pop .chart-ctx-action:hover {
    background: #efe8dc;
}
#chart-rate-pop {
    width: 200px;
    padding: 0.55rem 0.55rem 0.4rem;
}
#chart-rate-pop[hidden] { display: none; }
.chart-rate-now {
    font: 650 0.82rem/1.3 "Segoe UI", Tahoma, sans-serif;
    color: #5b554c;
    padding: 0 0.35rem 0.35rem;
}
#chart-rate-pop .chart-ctx-action {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #3a362f;
    font: 650 0.78rem/1.25 "Segoe UI", Tahoma, sans-serif;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}
#chart-rate-pop .chart-ctx-action:hover:not(:disabled) {
    background: #efe8dc;
}
#chart-rate-pop .chart-ctx-action:disabled {
    opacity: 0.4;
    cursor: default;
}
.stat-scope-seg {
    display: flex;
    background: #f4f0e8;
    border-radius: 8px;
    padding: 3px;
    margin: 0 0 0.65rem;
    gap: 3px;
}
.app-set-lang.is-locked,
.app-set-lang:disabled {
    opacity: 0.4;
    pointer-events: none;
}
.stat-scope-seg button:disabled {
    opacity: 0.4;
    cursor: default;
}
.stat-scope-seg button {
    flex: 1 1 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #5b554c;
    font: 650 0.78rem/1.2 "Segoe UI", Tahoma, sans-serif;
    padding: 0.38rem 0.2rem;
    border-radius: 6px;
    cursor: pointer;
}
.stat-scope-seg button.on {
    background: #005EB8;
    color: #fff;
}

.stack-tools {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}
.stack-head {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
    box-sizing: border-box;
    padding: 0 2px 0 0;
    overflow: hidden;
}
.stack-head input,
.stack-head button,
.stack-head label,
.stack-head select {
    pointer-events: auto;
}
.stack-head .kanal-switch { margin: 0; }
.stack-more {
    border: 1px solid #c5ccd4;
    background: #fff;
    border-radius: 6px;
    width: 1.55rem;
    height: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #3a4450;
    padding: 0;
}
.stack-more.on {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
.stack-more-row {
    display: none;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
}
.stack-head.open .stack-more-row { display: flex; }
.stack-more-row .kanal-titel { width: 7rem; min-width: 4rem; }
.stack-more-row .kanal-color { flex: 0 0 auto; }
.stack-more-row input[type="number"] { width: 3.2rem; }
.chart-body.stack-sync .kanal-panel.open {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
}

.chart-wrap .chart-set-btn {
    position: absolute;
    top: 4px;
    left: 8px;
    z-index: 9;
}
.chart-set-btn.on {
    background: #005EB8 !important;
    color: #fff !important;
}
.kanal-switch span {
    background: #b4bac2;
    opacity: 1;
}
.kanal-switch span::after {
    background: #fff;
}
.kanal-switch input:checked + span {
    background: var(--ch, #005EB8);
    opacity: 1;
}
.stack-head .kanal-switch { margin-left: 0; }
.chart-body.show-chan-set.stack-sync .stack-more-row { display: flex; }
.chart-body.show-chan-set:not(.stack-sync) .kanal-panel {
    display: flex !important;
}

.chart-set-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}
.stack-more-row .kanal-titel {
    width: auto;
    flex: 1 1 6rem;
    min-width: 4rem;
    max-width: 8rem;
    font-size: 0.75rem;
    padding: 1px 3px;
}
.stack-more-row .kanal-feld-lab,
.stack-more-row label {
    font-size: 0.72rem;
}
.stack-more-row input[type="number"] {
    width: 3.2rem;
    font-size: 0.72rem;
    padding: 1px 2px;
}
.stack-more-row .kanal-seg button {
    font-size: 0.72rem;
    padding: 1px 6px;
}
.chart-body.stack-sync.show-chan-set .kanal-panel {
    display: block !important;
    flex: 0 0 11.2rem !important;
    width: 11.2rem !important;
    max-width: 11.2rem !important;
}

.chart-body.stack-sync .kanal-panel,
.chart-body.stack-sync.show-chan-set .kanal-panel,
.chart-body.stack-sync .kanal-panel.open {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}
.chart-set-btn.chart-info-btn {
    width: 22px;
    height: 22px;
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}
.chart-set-btn.chart-info-btn svg {
    width: 13px;
    height: 13px;
    margin: 0 auto;
    display: block;
}

.stack-more-row {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.06), 0 0 0 1px rgba(20, 40, 70, 0.06);
    padding: 2px 8px 2px 6px;
    margin-left: 0.15rem;
}
.stack-more-row .kanal-titel {
    flex: 0 1 6.5rem;
    max-width: 7.5rem;
    font: 600 0.78rem/1.2 Segoe UI, system-ui, sans-serif !important;
    padding: 1px 0 !important;
}
.stack-more-row .kanal-einheit {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
}
.stack-more-row .kanal-feld-lab {
    font-size: 0.62rem;
    color: #6a7380;
    line-height: 1;
}
.stack-more-row .kanal-seg {
    margin: 0;
    min-width: 4.4rem;
}
.stack-more-row .kanal-seg button {
    flex: 1;
    min-width: 1.8rem;
    font-size: 0.72rem;
    padding: 2px 10px;
}
.stack-more-row .kanal-color {
    width: 1.2rem;
    height: 1.2rem;
}
.stack-num {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.62rem;
    color: #6a7380;
}
.stack-num input {
    width: 3.4rem;
    border: 0;
    border-bottom: 1px solid #e2e6ea;
    background: transparent;
    font: 600 0.75rem Segoe UI, system-ui, sans-serif;
    color: #1c2330;
    padding: 1px 0;
}
.stack-num input:focus {
    outline: none;
    border-bottom-color: var(--ch, #005EB8);
}

.stack-head {
    align-items: flex-end;
}
.stack-head-titel {
    flex: 0 1 7rem;
    max-width: 8rem;
    margin: 0 0.2rem 1px 0.15rem;
}
.stack-head.is-off .stack-head-titel {
    opacity: 0.45;
    color: #6a7380 !important;
    font-weight: 500 !important;
}
.stack-more-row {
    align-items: flex-end !important;
}
.stack-more-row .kanal-titel { display: none; }

.stack-head {
    align-items: center !important;
}
.stack-head-titel {
    margin: 0 0.35rem 0 0.2rem !important;
    align-self: center;
}
.stack-more-row {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap;
    gap: 0.35rem 0.45rem;
    padding: 2px 8px !important;
}
.stack-more-row .kanal-feld-lab {
    font-size: 0.68rem;
    color: #6a7380;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    margin: 0;
}
.stack-more-row .kanal-seg {
    margin: 0 !important;
    padding: 2px;
}
.stack-more-row .kanal-einheit { display: contents; }
.stack-inp {
    width: 3.4rem;
    border: 0;
    border-bottom: 1px solid #e2e6ea;
    background: transparent;
    font: 600 0.75rem Segoe UI, system-ui, sans-serif;
    color: #1c2330;
    padding: 1px 0;
    align-self: center;
}
.stack-inp:focus {
    outline: none;
    border-bottom-color: var(--ch, #005EB8);
}
.stack-num { display: none; }

.stack-more-row {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none;
    align-self: center;
    padding: 3px 8px !important;
    margin: 0 0 0 0.25rem !important;
    box-sizing: border-box;
}
.stack-head .stack-more-row {
    height: auto;
    min-height: 0;
}

.stack-more-row {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid #c5ccd4 !important;
    border-radius: 8px !important;
}

.stack-more-row {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.chart-wrap .chart-set-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
}
.stack-more-row {
    display: none !important;
}
.chart-body.show-chan-set .stack-more-row {
    display: flex !important;
}
.chart-info-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stack-vsplit {
    position: absolute;
    height: 7px;
    margin-top: -3px;
    cursor: ns-resize;
    pointer-events: auto;
    z-index: 7;
    background: transparent;
}
.stack-vsplit::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 2px;
    height: 3px;
    border-radius: 2px;
    background: #c5ccd4;
}
.stack-vsplit:hover::after,
.stack-split-drag .stack-vsplit::after {
    background: #005EB8;
}
body.stack-split-drag {
    cursor: ns-resize !important;
    user-select: none !important;
}

.stack-vsplit {
    height: 10px !important;
    margin-top: 0 !important;
    cursor: row-resize !important;
    background: #c5bfb3 !important;
    border-top: 1px solid #b0aaa0;
    border-bottom: 1px solid #b0aaa0;
    border-radius: 2px;
}
.stack-vsplit::after { display: none !important; }
.stack-vsplit:hover,
body.stack-split-drag .stack-vsplit {
    background: #005EB8 !important;
}
body.stack-split-drag {
    cursor: row-resize !important;
}

.stack-vsplit {
    height: 10px !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 2px;
    cursor: row-resize !important;
}
.stack-vsplit::after { display: none !important; content: none !important; }
.stack-vsplit:hover,
body.stack-split-drag .stack-vsplit {
    background: rgba(31, 78, 121, 0.18) !important;
}
#stack-board .stack-vsplit {
    flex: 0 0 6px !important;
    height: 6px !important;
    background: transparent !important;
    border: none !important;
}
#stack-board .stack-vsplit::after {
    display: block !important;
    content: '' !important;
    position: absolute;
    left: 50%;
    top: 1px;
    width: 3px;
    height: 3px;
    margin-left: -2px;
    border-radius: 50%;
    background: #8a8478;
    box-shadow: -10px 0 0 #8a8478, 10px 0 0 #8a8478;
}
#stack-board .stack-vsplit:hover::after,
body.stack-split-drag #stack-board .stack-vsplit::after {
    background: #005EB8;
    box-shadow: -10px 0 0 #005EB8, 10px 0 0 #005EB8;
}
#stack-board .stack-vsplit-last {
    height: 6px !important;
    bottom: 0;
}
.stack-slot:has(.stack-vsplit-last) {
    padding-bottom: 8px;
}

#mess-chart { pointer-events: none; z-index: 1; }
#mess-chart-hover.chart-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: auto;
    background: transparent !important;
}

.stack-tools { z-index: 8 !important; }
.stack-vsplit { z-index: 10 !important; }
.chart-wrap .chart-info-wrap { z-index: 40 !important; }

#winlog-busy {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(255,255,255,0.35);
    cursor: wait;
}
body.winlog-busy, body.winlog-busy *,
body.is-wait, body.is-wait * {
    cursor: wait !important;
}
#winlog-busy .busy-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #005EB8;
    color: #fff;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font: 600 0.85rem Segoe UI, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    min-width: 12rem;
    pointer-events: auto;
}
#winlog-busy span {
    text-align: center;
}
#winlog-busy .busy-warn {
    display: block;
    font: 500 0.75rem Segoe UI, sans-serif;
    opacity: 0.92;
    text-align: center;
    max-width: 16rem;
    line-height: 1.35;
}
#winlog-busy .busy-warn[hidden] { display: none !important; }
#winlog-busy .busy-cancel,
.btn-read-cancel {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: #f3efe6;
    color: #1c2330;
    font: 600 0.8rem Segoe UI, sans-serif;
    padding: 0.32rem 0.85rem;
    cursor: pointer !important;
    pointer-events: auto !important;
}
#winlog-busy .busy-cancel:hover,
.btn-read-cancel:hover {
    background: #fff;
}
#winlog-busy .busy-cancel:disabled,
.btn-read-cancel:disabled {
    opacity: 0.55;
}
.panel-tabs .btn-read-cancel {
    flex: 0 0 auto;
    margin-right: 0.45rem;
    height: 1.35rem;
    padding: 0 0.55rem;
    font-size: 0.72rem;
}
.panel-tabs .btn-read-cancel[hidden] {
    display: none !important;
}

.kenn-head-file {
    margin-left: 0.8rem;
    font-weight: 600;
    color: #005EB8;
    white-space: nowrap;
}

.chart-perf {
    position: absolute;
    left: 8px;
    top: 36px;
    z-index: 15;
    font: 11px/1.3 Consolas, "Segoe UI", monospace;
    color: #3a4338;
    background: rgba(255,253,248,0.88);
    border: 1px solid #c5bfb3;
    padding: 2px 6px;
    pointer-events: none;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mb-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
    border: 1px solid #c5bfb3;
    border-radius: 5px;
    background: #fff;
    color: #005EB8;
    cursor: pointer;
}
.mb-ico svg { display: block; }
.mb-ico:hover:not(:disabled) { background: #e8eef5; }
.mb-ico.on,
.mb-ico[aria-pressed="true"] {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
#btn-save.unsaved:not(:disabled) {
    background: #c45c26;
    border-color: #a84b1c;
    color: #fff;
}
#btn-save.unsaved:not(:disabled):hover {
    background: #a84b1c;
}
.mb-ico:disabled { opacity: 0.4; cursor: default; }
label.mb-ico { margin: 0; }
.menubar { flex-wrap: nowrap; }
.menubar .mb-ico { flex: 0 0 auto; }
.dlg {
    position: fixed;
    inset: 0;
    background: rgba(20,24,28,0.35);
    z-index: 30050;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.dlg[hidden] { display: none; }
#dlg-prog-ask { z-index: 30100; }
.dlg-kenn-card {
    --kenn-dlg-pad: 12px;
    width: max-content;
    max-width: calc(100vw - 24px);
    max-height: min(78vh, 36rem);
    display: flex;
    flex-direction: column;
    padding: 0 0 0.75rem !important;
    overflow: hidden;
}
.dlg-kenn-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 0.42rem var(--kenn-dlg-pad);
    background: #005EB8;
    color: #f4f0e8;
    border-radius: 7px 7px 0 0;
}
.dlg-kenn-heading {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.dlg-kenn-x {
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #f4f0e8;
    font: 700 1.2rem/1 "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
}
.dlg-kenn-x:hover,
.dlg-kenn-x:focus {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}
.dlg-kenn-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0.5rem 0 0.4rem;
    padding: 0 var(--kenn-dlg-pad);
}
.dlg-kenn-head {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.35rem 0.55rem;
    min-width: 0;
    font-size: 0.92rem;
}
.dlg-kenn-head .kenn-head-ml {
    flex: 0 0 auto;
}
.dlg-kenn-head .kenn-head-sn-lab {
    flex: 0 0 auto;
    margin-right: 0;
}
.dlg-kenn-head .kenn-head-sn {
    flex: 0 0 auto;
    margin-right: 0;
}
.dlg-kenn-head .kenn-head-fw {
    flex: 0 0 auto;
    font-weight: 700;
    margin-left: 0.75rem;
}
.dlg-kenn-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 0.55rem;
    padding: 0 var(--kenn-dlg-pad);
    width: max-content;
    box-sizing: border-box;
}
.dlg-kenn-tab {
    margin: 0;
    padding: 0.28rem 0.7rem;
    border: 1px solid #c5bfb3;
    background: #f4f1ea;
    color: #3a3834;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.dlg-kenn-tab.on {
    background: #005EB8;
    border-color: #005EB8;
    color: #fff;
}
.dlg-kenn-panes {
    display: grid;
    overflow: auto;
    min-height: 8rem;
    padding: 0 var(--kenn-dlg-pad);
    box-sizing: border-box;
}
.dlg-kenn-pane {
    grid-column: 1;
    grid-row: 1;
}
.dlg-kenn-pane.is-off {
    visibility: hidden;
    pointer-events: none;
}
.dlg-kenn-pane .kenn-item {
    display: grid;
    grid-template-columns: minmax(6.5rem, 40%) 1fr;
    column-gap: 4px;
    align-items: start;
    padding: 0.18rem 0;
    font-size: 0.82rem;
}
.dlg-kenn-pane .kenn-label {
    color: #5c584f;
}
.dlg-kenn-pane .kenn-wert {
    color: #1c1b18;
}
.dlg-kenn-pane-reg {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 50px;
    row-gap: 12px;
    align-content: start;
    justify-items: start;
}
.dlg-kenn-pane-reg .kenn-item {
    display: contents;
    margin: 0;
    padding: 0;
}
.dlg-kenn-pane-reg .kenn-label,
.dlg-kenn-pane-reg .kenn-wert {
    text-align: left;
    justify-self: start;
    white-space: nowrap;
}
.dlg-kenn-pane-reg .kenn-wert-2z {
    height: auto;
    max-height: none;
    white-space: pre-line;
    line-height: 1.25;
    min-height: 2.5em;
}
.dlg-kenn-pane-reg .kenn-item .kenn-label {
    align-self: start;
}
.dlg-kenn-pane-reg .kenn-int-txt {
    display: inline-block;
    min-width: 10ch;
}
.kenn-sync-line {
    display: inline-flex !important;
    align-items: baseline;
    gap: 0.7rem;
    white-space: nowrap;
}
.kenn-sync-extra {
    color: #5c584f;
    font-weight: 500;
    cursor: default;
}
html:not(.wl-mobile) #kenn-stat-row {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
.dlg-card {
    background: #fffdf8;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    min-width: 280px;
    padding: 1rem 1.1rem 0.9rem;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.dlg-fw-card {
    padding: 0 0 0.9rem !important;
    overflow: hidden;
}
.dlg-fw-card #dlg-fw-text,
.dlg-fw-card .dlg-act { padding: 0 1.1rem; }
.dlg-fw-card .dlg-act { margin-top: 0.4rem; }
.dlg-legal-card {
    width: min(44rem, calc(100vw - 24px));
    max-height: min(82vh, 40rem);
    display: flex;
    flex-direction: column;
    padding: 0.7rem 0.85rem 0.75rem;
}
.dlg-legal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.45rem;
}
.dlg-legal-bar h2 { margin: 0; }
.legal-body {
    overflow: auto;
    min-height: 0;
    padding-right: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #2c2a26;
}
.legal-body h1 {
    font-size: 1.05rem;
    margin: 1rem 0 0.35rem;
    color: #005EB8;
}
.legal-body h1:first-child { margin-top: 0; }
.legal-body h2 {
    font-size: 0.88rem;
    margin: 0.7rem 0 0.2rem;
    color: #3d3a34;
}
.legal-body p { margin: 0.15rem 0 0.35rem; }
.dlg-opt { display: flex; gap: 0.5rem; align-items: center; padding: 0.28rem 0; font-size: 0.92rem; }
.dlg-opt-off { color: #8a867c; }
.dlg-act { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.8rem; }
.btn-ghost { background: transparent; }

.dlg-field { display: block; font-size: 0.78rem; color: #5c584f; margin: 0.7rem 0 0.85rem; }
.dlg-name {
    display: flex;
    align-items: center;
    margin-top: 0.28rem;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    background: #fff;
    overflow: visible;
    position: relative;
}
.dlg-name input {
    flex: 1;
    border: 0;
    padding: 0.5rem 0.7rem;
    font: 0.95rem inherit;
    background: transparent;
    min-width: 0;
}
.dlg-name input:focus { outline: none; }
.dlg-name .dlg-ext,
.dlg-name #save-ext,
.dlg-name #export-ext {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-left: 1px solid #d4cfc4;
    border-radius: 0;
    background: #eef2f6;
    color: #005EB8;
    font: 600 0.85rem inherit;
    line-height: 1.2;
}
.dlg-name .dlg-ext:not(:disabled) {
    cursor: pointer;
}
.dlg-name .dlg-ext:not(:disabled):hover,
.dlg-name .dlg-ext.is-open {
    background: #dce6f0;
}
.dlg-ext-pop {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 4;
    min-width: 4.6rem;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(40,36,28,.16);
    overflow: hidden;
}
.dlg-ext-pop button {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: #005EB8;
    font: 600 0.85rem inherit;
    text-align: left;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}
.dlg-ext-pop button:hover,
.dlg-ext-pop button.on {
    background: #e8eef5;
}
.dlg-fmts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}
.dlg-fmt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    background: #fff;
    color: #005EB8;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.dlg-fmt span { font-weight: 500; font-size: 0.75rem; color: #5c584f; }
.dlg-fmt.on { border-color: #005EB8; background: #e8eef5; box-shadow: inset 0 0 0 1px #005EB8; }
.dlg-fmt:disabled { opacity: 0.4; cursor: default; }
.dlg-act { display: flex; justify-content: flex-end; gap: 0.45rem; margin-top: 1rem; }
.dlg-act .btn-prim {
    background: #005EB8;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}
.dlg-act .btn-ghost {
    border: 1px solid #c5bfb3;
    background: #fff;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}
.dlg-card { min-width: 22rem; }
.dlg-card > h2 {
    margin: -1rem -1.1rem 0.8rem;
    padding: 0.42rem 1.1rem;
    background: #005EB8;
    color: #f4f0e8;
    border-radius: 7px 7px 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#dlg-save .dlg-fmt {
    background: #fff !important;
    color: #005EB8 !important;
    border: 1px solid #c5bfb3 !important;
}
#dlg-save .dlg-fmt.on {
    background: #e8eef5 !important;
    border-color: #005EB8 !important;
}
#dlg-save .dlg-act button {
    min-width: 7.5rem;
    color: #005EB8 !important;
}
#dlg-save #dlg-save-ok {
    background: #005EB8 !important;
    color: #fff !important;
}
#dlg-save #dlg-save-cancel {
    background: #fff !important;
    color: #005EB8 !important;
    border: 1px solid #c5bfb3 !important;
}

.tbl-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 1.4rem;
}
.tbl-bar .mess-datum { flex: 1; }
.tbl-theme {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    border: 1px solid #c5bfb3;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.tbl-theme button {
    width: 26px;
    height: 22px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #5c584f;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.tbl-theme button.on {
    background: #005EB8;
    color: #fff;
}

/* Moderne Tabelle – klassische Regeln bleiben unangetastet */
#mess-table-pane.tbl-modern #kks-table-wrap,
#mess-table-pane.tbl-modern .kks-table-wrap {
    background: #f7f4ee !important;
    border: 1px solid #e4dfd4;
    border-radius: 10px;
}
#mess-table-pane.tbl-modern #mess-table,
#mess-table-pane.tbl-modern #stat-table {
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}
#mess-table-pane.tbl-modern #mess-table thead th,
#mess-table-pane.tbl-modern #stat-table thead th,
#mess-table-pane.tbl-modern #mess-table-head-tbl th,
#mess-table-pane.tbl-modern table.kks thead th {
    background: #f7f4ee !important;
    color: #6a655c !important;
    font-weight: 600;
    font-size: 0.62rem;
    letter-spacing: 0;
    text-transform: none;
    border: 0 !important;
    border-bottom: 1px solid #ddd6c8 !important;
    box-shadow: none !important;
}
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(odd),
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(even) {
    background: transparent;
}
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(odd) td {
    background: #fff !important;
}
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(even) td {
    background: #f3f0ea !important;
}
#mess-table-pane.tbl-modern table.kks td {
    border-bottom: 1px solid #ece7dc !important;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
}
#mess-table-pane.tbl-modern table.kks tbody tr:hover td {
    background: #e7eef6 !important;
}
#mess-table-pane.tbl-modern table.kks tbody tr.cursor-row td {
    background: #d6e4f5 !important;
    outline: none;
    box-shadow: none !important;
}
#mess-table-pane.tbl-modern td.col-zeit {
    color: #4a463e;
    font-variant-numeric: tabular-nums;
}
#mess-table-pane.tbl-modern td.col-kom input,
#mess-table-pane.tbl-modern td.col-kom {
    background: transparent !important;
    color: #6a655c;
}
#mess-table-pane.tbl-modern .stat-table {
    background: transparent;
}

/* Classic: extra markup stays inline */
.mw-pip { display: none; }
.mw-t, .mw-v { display: inline; }
.mw-u { display: inline; margin-left: 0.06rem; }
.mw-ms { display: inline !important; margin: 0; padding: 0; }
.mw-ms3 { display: none; }
.mw-ms::before { content: ","; }

#mess-table-pane.tbl-modern .mw-pip {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
#mess-table-pane.tbl-modern .mw-hn {
    vertical-align: middle;
    display: inline;
}
#mess-table-pane.tbl-modern th.col-k .mw-hn {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
#mess-table-pane.tbl-modern th.col-kom .mw-hn,
#mess-table-pane.tbl-modern th.col-zeit .mw-hn,
#mess-table-pane.tbl-modern th.col-gps .mw-hn {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}
#mess-table-pane.tbl-modern td.col-zeit {
    line-height: 1.15;
    text-align: right !important;
}
#mess-table-pane.tbl-modern .mw-t {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.01em;
}
#mess-table-pane.tbl-modern .mw-ms {
    display: inline;
    margin: 0;
    padding: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
#mess-table-pane.tbl-modern .mw-ms3 {
    display: inline;
    margin: 0 0 0 0.28rem;
    font-size: 0.68rem;
    color: #8a867c;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    vertical-align: baseline;
}
#mess-table-pane.tbl-modern .mw-ms3::after { content: " ms"; }
#mess-table-pane.tbl-modern th.col-zeit,
#mess-table-pane.tbl-modern td.col-zeit,
#mess-table th.col-zeit,
#mess-table td.col-zeit,
#stat-table th.col-zeit,
#stat-table td.col-zeit,
#mess-table-head-tbl th.col-zeit {
    width: var(--wl-col-zeit, 96px) !important;
    min-width: var(--wl-col-zeit, 96px) !important;
    max-width: var(--wl-col-zeit, 96px) !important;
    padding-left: 4px !important;
    padding-right: 2px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
#mess-table-pane.tbl-modern th.col-k,
#mess-table-pane.tbl-modern td.col-k {
    overflow: hidden !important;
    white-space: nowrap !important;
}
#mess-table-pane.tbl-modern th.col-kom,
#mess-table-pane.tbl-modern td.col-kom {
    width: 252px !important;
    min-width: 252px !important;
    max-width: 252px !important;
}
#mess-table-pane.tbl-modern #kks-table-wrap,
#mess-table-pane.tbl-modern .kks-table-wrap {
    overflow-x: auto !important;
}
#mess-table-pane.tbl-modern #mess-table,
#mess-table-pane.tbl-modern #stat-table {
    width: max-content !important;
    min-width: 100% !important;
}
#mess-table-pane {
    max-width: 36rem;
}
#mess-table-pane.tbl-modern #mess-table,
#mess-table-pane.tbl-modern #stat-table,
#mess-table-pane.tbl-modern table.kks {
    table-layout: fixed !important;
    width: auto !important;
}
#mess-table-pane.tbl-modern td.col-k {
    font-variant-numeric: tabular-nums;
}
#mess-table-pane.tbl-modern .mw-v {
    font-weight: 650;
    font-size: 0.86rem;
}
#mess-table-pane.tbl-modern .mw-u {
    margin-left: 0.08rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: #8a867c;
    opacity: 0.95;
}
#mess-table-pane.tbl-modern .kom-input {
    border: 0;
    background: transparent;
    width: 100%;
    padding: 0.1rem 0.2rem;
    color: #5c584f;
}
#mess-table-pane.tbl-modern .kom-input::placeholder { color: #c0bbb0; }
#mess-table-pane.tbl-modern table.kks tbody tr td:first-child {
    box-shadow: inset 2px 0 0 transparent;
}

#mess-table th.col-gps,
#mess-table td.col-gps {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    text-align: center;
    padding-left: 12px !important;
    padding-right: 2px !important;
    white-space: nowrap;
}
#mess-table th.col-gps {
    cursor: pointer;
    user-select: none;
}
#mess-table th.col-gps.open,
#mess-table td.col-gps.open {
    width: 178px;
    min-width: 178px;
    max-width: 178px;
    text-align: left;
    padding-left: 16px !important;
}
.gps-pin {
    display: inline-block;
    vertical-align: middle;
}
#mess-table .gps-pin-fix {
    width: 18px;
    height: 18px;
}
#mess-table .gps-pin-carry {
    width: 11px;
    height: 11px;
}
.gps-txt {
    margin-left: 6px;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: #4a463e;
    font-weight: 500;
}
#mess-table-pane.tbl-modern td.col-gps {
    background: inherit;
}

#mess-table td.col-gps.gps-fix,
#mess-table td.col-gps.gps-carry { cursor: pointer; }
#gps-hint {
    position: fixed;
    left: 50%;
    bottom: 1.4rem;
    transform: translateX(-50%);
    background: #3a3834;
    color: #fff;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    z-index: 40000;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
#gps-hint[hidden] { display: none !important; }

#wl-tip {
    position: fixed;
    z-index: 50000;
    max-width: 16.5rem;
    padding: 0.45rem 0.6rem 0.5rem;
    background: rgba(28, 32, 36, 0.94);
    color: #f4f1ea;
    border-radius: 8px;
    font: 500 0.78rem/1.35 "Segoe UI", Tahoma, sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    pointer-events: none;
    backdrop-filter: blur(6px);
}
#wl-tip[hidden] { display: none !important; }
#wl-tip .tip-gps strong {
    display: block;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.15rem;
}
#wl-tip .tip-sub { color: #c8c3b8; font-size: 0.72rem; }
#wl-tip .tip-art { margin-top: 0.35rem; }
#wl-tip .tip-fixzeit { display: block; margin-top: 0.2rem; }
#wl-tip .tip-leg {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.35rem;
    color: #c8c3b8;
    font-size: 0.7rem;
}
#wl-tip .tip-leg-col {
    flex-direction: column;
    gap: 0.28rem;
    align-items: flex-start;
}
#wl-tip .tip-leg-col span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
#wl-tip .tip-pin {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    margin-right: 5px;
    vertical-align: 1px;
}
#wl-tip .tip-pin.rot { background: #e74c3c; }
#wl-tip .tip-pin.grau { background: #b0aaa0; }
#wl-tip .tip-leg .gps-pin {
    width: 14px;
    height: 14px;
    vertical-align: -3px;
    margin-right: 4px;
}
.chart-gps-band { display: none; }
.chart-body.is-stack .chart-gps-band:not([hidden]) {
    display: block !important;
    height: 22px;
    overflow: visible !important;
    pointer-events: none;
}
.chart-body.is-stack .chart-gps-band .chart-gps-pin {
    pointer-events: auto;
}

.stack-vsplit {
    height: 8px !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    cursor: row-resize !important;
}
.stack-vsplit::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 4px !important;
    height: 4px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #8a867c !important;
    box-shadow: -8px 0 #8a867c, 8px 0 #8a867c !important;
    transform: translate(-50%, -50%) !important;
}
.stack-vsplit:hover,
body.stack-split-drag .stack-vsplit {
    background: transparent !important;
}
.stack-vsplit:hover::after,
body.stack-split-drag .stack-vsplit::after {
    background: #005EB8 !important;
    box-shadow: -8px 0 #005EB8, 8px 0 #005EB8 !important;
}

.stack-pane {
    position: relative;
    pointer-events: none;
    box-sizing: border-box;
}
.stack-pane .stack-head {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 28px;
    overflow: visible !important;
    pointer-events: auto;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box;
    padding: 0 6px;
    z-index: 22;
}
.stack-pane .stack-vsplit {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    width: auto !important;
    pointer-events: auto;
}
.stack-pane.is-collapsed .stack-vsplit { display: none; }

.chart-wrap > .chart-perf { display: none !important; }
.chart-info-wrap { position: relative; }
#chart-perf.chart-perf {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 12;
    max-width: min(42rem, 70vw);
    padding: 0.35rem 0.45rem 0.35rem 0.6rem;
    background: rgba(28, 32, 36, 0.92);
    color: #f3efe6;
    border-radius: 8px;
    font: 500 0.72rem/1.35 "Segoe UI", Tahoma, sans-serif;
    box-shadow: 0 8px 22px rgba(0,0,0,.2);
    pointer-events: auto;
}
#chart-perf.chart-perf[hidden] { display: none !important; }
.chart-perf-body { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-perf-reset {
    flex: 0 0 auto;
    border: 0;
    background: #4a463e;
    color: #fff;
    border-radius: 5px;
    padding: 0.15rem 0.45rem;
    font: 600 0.7rem/1 "Segoe UI", sans-serif;
    cursor: pointer;
}
.chart-perf-reset:hover { background: #005EB8; }
#chart-diag-btn.open { background: #005EB8; color: #fff; }

.stack-tools {
    z-index: 20 !important;
    pointer-events: none;
}
.stack-offbar {
    position: absolute;
    top: 8px;
    left: 72px;
    right: 86px;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    pointer-events: auto;
    z-index: 21;
}
.stack-offchip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.35rem 0 0.15rem;
    height: 26px;
    pointer-events: auto;
    background: transparent;
}
.stack-offname {
    font-size: 0.78rem;
    color: #6a655c;
    font-weight: 600;
    opacity: 0.75;
}
.stack-pane { z-index: 21; }

.stack-tools.stack-board {
    display: flex !important;
    flex-direction: column;
    inset: 0;
    pointer-events: none;
    z-index: 20 !important;
}
.stack-board .stack-offbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex: 0 0 30px;
    margin: 4px 86px 0 72px;
    width: auto;
    height: 30px !important;
    pointer-events: auto;
}
.stack-board .stack-pane {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    pointer-events: none;
}
.stack-board .stack-head {
    flex: 0 0 auto;
    height: auto !important;
    margin-left: 72px;
    margin-right: 86px;
    width: auto !important;
    overflow: visible !important;
    pointer-events: auto;
    background: transparent !important;
    border: 0 !important;
}
.stack-board .stack-gps {
    flex: 0 0 16px;
    margin-left: 72px;
    margin-right: 86px;
    position: relative;
    pointer-events: auto;
    z-index: 40;
}
.chart-gps-pin {
    position: absolute;
    top: 0;
    width: 14px;
    height: 16px;
    margin-left: -7px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}
.chart-gps-pin svg {
    display: block;
    width: 14px;
    height: 16px;
}
.stack-board .stack-plot {
    flex: 1 1 auto;
    min-height: 24px;
    margin-left: 72px;
    margin-right: 86px;
    pointer-events: none;
}
.stack-board .stack-xaxis {
    flex: 0 0 36px;
    margin-left: 72px;
    margin-right: 86px;
    pointer-events: none;
}
.stack-board .stack-vsplit {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    flex: 0 0 8px;
    margin-left: 72px;
    margin-right: 86px;
    pointer-events: auto;
}

.stack-tools .stack-pane {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}
.stack-tools .stack-offbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
}
.stack-tools .stack-vsplit {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}
.stack-tools.stack-board {
    padding-top: 38px;
    box-sizing: border-box;
}

#stack-tools.stack-board {
    padding-top: 0 !important;
}
#stack-tools .stack-offbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.6rem !important;
    flex: 0 0 auto !important;
    min-height: 34px;
    height: auto !important;
    margin: 4px 11.5rem 2px 12px !important;
    width: auto !important;
    z-index: 30 !important;
    pointer-events: auto !important;
}
#stack-tools .stack-offchip {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    gap: 0.3rem;
    z-index: 31 !important;
}
#stack-tools .stack-pane {
    position: relative !important;
    top: auto !important;
    left: auto !important;
}

.chart-info-wrap {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.28rem;
    pointer-events: none;
}
.chart-info-wrap > * { pointer-events: auto; }
.chart-help-wrap {
    position: relative !important;
    flex: 0 0 auto !important;
}
#chart-info-pop.chart-info-pop {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    z-index: 120 !important;
    white-space: normal !important;
}
#stack-offbar.stack-offbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 auto 0 0 !important;
    height: auto !important;
    min-height: 0;
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    pointer-events: auto;
    z-index: 40;
}
#stack-offbar[hidden] { display: none !important; }
#stack-offbar .stack-offchip {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0.1rem 0.4rem 0.1rem 0.2rem;
    background: rgba(255,252,246,0.92);
    border-radius: 6px;
    cursor: pointer;
}
#stack-offbar .stack-offchip input { display: none; }
#stack-offbar .stack-offsw {
    width: 1.55rem;
    height: 0.9rem;
    border-radius: 1rem;
    background: #c5bfb3;
    position: relative;
    flex: 0 0 auto;
}
#stack-offbar .stack-offsw::after {
    content: "";
    position: absolute;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #fff;
    top: 0.1rem;
    left: 0.1rem;
}

#stack-tools.stack-board {
    padding-top: 72px !important;
    box-sizing: border-box;
}
.chart-body:not(.show-chan-set) #stack-tools.stack-board {
    padding-top: 8px !important;
}
#stack-tools .stack-head,
#stack-tools .stack-more-row {
    display: none !important;
}
#stack-tools .stack-pane.is-off {
    position: relative !important;
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    height: auto !important;
    min-height: 28px;
    margin: 0 86px 10px 72px !important;
    z-index: 24;
}
#stack-tools .stack-pane.is-off .stack-head {
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    z-index: 24;
}
#stack-tools .stack-pane.is-off .stack-plot,
#stack-tools .stack-pane.is-off .stack-xaxis,
#stack-tools .stack-pane.is-off .stack-vsplit {
    display: none !important;
}

#stack-tools.stack-board .stack-pane.is-off {
    margin-bottom: 18px !important;
    padding-bottom: 6px !important;
}
#stack-tools.stack-board .stack-pane.is-off .stack-vsplit,
#stack-tools .stack-pane.is-off .stack-vsplit,
.stack-pane.is-off > .stack-vsplit {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.chart-body.show-chan-set #stack-tools .stack-more-row,
#stack-tools .stack-pane:not(.is-off) .stack-more-row {
    display: flex !important;
    visibility: visible !important;
}
#stack-tools .stack-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    height: auto !important;
    min-height: 28px !important;
    overflow: visible !important;
}
#stack-tools.stack-board {
    display: flex !important;
    flex-direction: column !important;
}
#stack-tools .stack-pane {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    top: auto !important;
    left: auto !important;
}
#stack-tools .stack-pane.is-off {
    flex: 0 0 auto !important;
    min-height: 32px !important;
    margin-bottom: 14px !important;
}
.chart-body:not(.show-chan-set) #stack-tools .stack-more-row {
    display: none !important;
}

#stack-tools.stack-board {
    display: block !important;
    padding-top: 0 !important;
    background: transparent !important;
}
#stack-tools .stack-pane,
#stack-tools .stack-plot,
#stack-tools .stack-xaxis,
#stack-tools .stack-gps {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}
#stack-tools .stack-vsplit {
    display: block !important;
    visibility: visible !important;
    height: 10px !important;
    background: #d4cec3 !important;
    border-top: 1px solid #b8b2a8 !important;
    border-bottom: 1px solid #b8b2a8 !important;
    border-radius: 2px !important;
    cursor: row-resize !important;
    pointer-events: auto !important;
    z-index: 30 !important;
}
#stack-tools .stack-vsplit::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    background: #6e6a62 !important;
    box-shadow: -8px 0 #6e6a62, 8px 0 #6e6a62 !important;
    transform: translate(-50%, -50%) !important;
}
#stack-tools .stack-vsplit:hover,
body.stack-split-drag #stack-tools .stack-vsplit {
    background: #c5bfb3 !important;
}

.menubar .mb-ico {
    width: 2.35rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.menubar .mb-ico svg {
    width: 22px;
    height: 22px;
}
.menubar #chart-perf.chart-perf {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: min(46rem, 58vw);
    margin: 0 0.35rem 0 0;
    padding: 0.2rem 0.45rem;
    background: rgba(28, 32, 36, 0.9);
    color: #f3efe6;
    border-radius: 6px;
    font: 500 0.72rem/1.3 "Segoe UI", Tahoma, sans-serif;
    box-shadow: none;
}
.menubar #chart-perf.chart-perf[hidden] { display: none !important; }
.menubar #chart-diag-btn.on,
.menubar #chart-diag-btn.open {
    background: #005EB8;
    color: #fff;
}

.menubar .mb-ico-diag {
    width: 2.6rem !important;
    height: 2.35rem !important;
}
.menubar .mb-ico-diag svg {
    width: 26px !important;
    height: 26px !important;
}

#btn-port { display: none !important; }
#kenn-band,
.kenn-band {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
}
#kenn-stat-row.open,
#kenn-stat-row.show-kenn {
    width: 100%;
}

.topbar-file {
    font-size: 1.02rem;
    font-weight: 600;
}
.topbar-file strong {
    font-weight: 800;
    margin-right: 0.35rem;
}

.nav [data-view="messung"],
.nav [data-view="archiv"],
.tbl-theme { display: none !important; }
.mess-table-pane { /* immer modern */ }

#view-login,
#user-label,
#btn-logout { display: none !important; }
#nav-app { visibility: hidden; }

.mb-ico.is-locked,
.mb-ico[aria-disabled="true"] {
    opacity: 0.35;
    pointer-events: none;
}

.topbar-online {
    margin-left: auto;
    margin-right: 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    white-space: nowrap;
}


.logo-pop {
    min-width: 9.5rem;
    padding: 0.35rem;
    left: auto;
    right: 0;
}
.logo-prev {
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f1ea;
    color: #6a6458;
    font-size: 0.72rem;
    margin-bottom: 0.3rem;
    overflow: hidden;
}
.logo-prev img {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
}
#btn-logo.has-logo {
    color: #f0c000;
}
.wl-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.wl-sheet-head .fw-veraltet {
    color: #c0392b;
}
.wl-head-logo {
    height: 9mm;
    max-width: 40mm;
    object-fit: contain;
}
.wl-brand-logo {
    align-items: center;
    justify-content: center;
    padding: 2mm;
}
.wl-brand-logo img {
    max-width: 42mm;
    max-height: 16mm;
    object-fit: contain;
}
.wl-brand-default {
    align-items: flex-end;
    gap: 0.8mm;
    padding: 1mm 2.5mm 1mm 3mm;
}
.wl-brand-default img {
    max-width: 50mm;
    max-height: 16mm;
}
.wl-brand-tag {
    display: block;
    color: #0057a6;
    font: 600 5.2px/1.15 Arial, Helvetica, sans-serif;
    letter-spacing: 0.01em;
    text-align: right;
    white-space: normal;
    max-width: 50mm;
}


.topbar-brand {
    margin-left: auto;
    align-self: center;
    display: grid;
    grid-template-columns: max-content max-content max-content;
    justify-items: start;
    align-items: end;
    column-gap: 0;
    row-gap: 0;
    line-height: 1;
    color: #fff;
    pointer-events: none;
}
.topbar-brand .tb-pre,
.topbar-brand .tb-lek,
.topbar-brand .tb-post {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0;
    line-height: 0.78;
}
.topbar-brand .tb-pre { justify-self: end; }
.topbar-brand .tb-lek { text-align: center; }
.menubar-logo-slot {
    margin-left: 0.25rem;
}
.menubar-logo {
    height: 28px;
    max-width: 120px;
    object-fit: contain;
    margin-left: 0.25rem;
}


#dlg-port .dlg-hint {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    color: #5c564c;
}
.port-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 3rem;
    margin-bottom: 0.8rem;
}
.port-item {
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cfc8b8;
    background: #f7f4ee;
    cursor: pointer;
}
.port-item.likely { border-color: #005EB8; }
.port-item.on,
.port-item.on.likely {
    background: #005EB8 !important;
    color: #fff !important;
    border-color: #005EB8 !important;
}
.port-item:hover { background: #ece6d8; }
.port-empty {
    margin: 0;
    font-size: 0.82rem;
    color: #6a6458;
}


#dlg-port button,
#dlg-save button,
.port-item,
.dlg-act .btn-ghost,
.dlg-act .btn-prim {
    color: #1c1b18 !important;
}
.port-item,
#dlg-port .port-item {
    background: #f3efe6 !important;
    color: #1c1b18 !important;
    border: 1px solid #b8b2a6 !important;
}
.port-item.likely {
    background: #e4edf5 !important;
    color: #10263d !important;
}
#dlg-port #dlg-port-new,
#dlg-port #dlg-port-cancel,
#dlg-save #dlg-save-cancel,
.dlg-act .btn-ghost {
    background: #fff !important;
    color: #005EB8 !important;
    border: 1px solid #b8b2a6 !important;
}
#dlg-save #dlg-save-ok,
.dlg-act .btn-prim {
    background: #005EB8 !important;
    color: #fff !important;
    border: 0 !important;
}


.menubar-online {
    margin: 0 0.45rem 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #005EB8;
    background: #e6eef5;
    border: 1px solid #b4c6d8;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    white-space: nowrap;
    flex: 0 0 auto;
}


.wl-sheet-foot {
    position: relative !important;
    display: grid !important;
    grid-template-columns: max-content 4mm max-content minmax(40mm, 1fr) 52mm !important;
    align-items: stretch;
    overflow: visible !important;
}
.wl-sheet-foot.no-stat {
    grid-template-columns: max-content 4mm minmax(40mm, 1fr) 52mm !important;
}
.wl-sheet-foot.has-map {
    grid-template-columns: max-content 4mm max-content minmax(24mm, 1fr) 32mm 52mm !important;
}
.wl-sheet-foot.no-stat.has-map {
    grid-template-columns: max-content 4mm minmax(24mm, 1fr) 32mm 52mm !important;
}
.wl-stat-sep {
    width: 0;
    align-self: stretch;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1.2px solid #222;
}
.wl-stat {
    padding: 1mm 2mm 1mm 0;
    color: #111;
    border-right: 1.2px solid #222;
}
.wl-note {
    padding: 1mm 2.5mm;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    min-width: 0;
}
.wl-note-line {
    font-size: 9px;
    color: #111;
    line-height: 1.2;
    min-height: 3.8mm;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.wl-leg-tbl,
.wl-stat-tbl {
    border-collapse: collapse;
    font-size: 8.5px;
    color: #111;
}
.wl-leg-tbl th,
.wl-leg-tbl td,
.wl-stat-tbl th,
.wl-stat-tbl td {
    height: 3.8mm;
    padding: 0 4px;
    vertical-align: middle;
    color: #111 !important;
    background: #fff;
    line-height: 1.15;
}
.wl-leg-tbl th,
.wl-stat-tbl th {
    font-weight: 700;
    text-align: left;
}
.wl-stat-tbl th,
.wl-stat-tbl td {
    text-align: right;
}
.wl-swatch {
    display: inline-block;
    width: 10px;
    height: 2px;
    margin-right: 5px;
    vertical-align: middle;
    background: #333;
}

/* —— Mobil: Desktop-Layout unangetastet, eigene Struktur unter 760px —— */
.m-dock { display: none; }

@media print {
    .m-dock,
    .topbar,
    .menubar,
    #view-messung,
    #chart-map-preview { display: none !important; }
}

html:not(.wl-mobile) .mess-split {
    padding: 5px 5px 8px 5px !important;
    box-sizing: border-box;
    border-bottom: 1px solid #c5bfb3;
}
html:not(.wl-mobile) .mess-chart-pane {
    flex-shrink: 0 !important;
}
html:not(.wl-mobile) .mess-chart-pane .chart-wrap,
html:not(.wl-mobile) .chart-body {
    border-radius: 10px;
    overflow: hidden;
    border-bottom: none;
}
html:not(.wl-mobile) .chart-fft-pane {
    border-radius: 10px;
    border-bottom: none;
}
html:not(.wl-mobile) #mess-table-pane,
html:not(.wl-mobile) .kks-table-wrap {
    border-radius: 10px;
}
html:not(.wl-mobile) #mess-table-pane {
    max-width: none !important;
    width: auto !important;
}
html:not(.wl-mobile) .kks-table-wrap {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto;
    max-width: 100%;
    box-sizing: border-box;
}
html:not(.wl-mobile),
html:not(.wl-mobile) body {
    overflow-x: auto;
    padding-bottom: 0;
    box-sizing: border-box;
}

@media (hover: none) and (pointer: coarse) {
    html, body {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }
    body {
        display: flex;
        flex-direction: column;
    }
    .topbar {
        padding: 0.15rem 0.5rem;
        padding-top: max(0.15rem, env(safe-area-inset-top));
        gap: 0.35rem;
        flex: 0 0 auto;
        min-height: 0;
    }
    .topbar-brand,
    .topbar .nav,
    #user-label,
    #btn-logout {
        display: none !important;
    }
    .topbar-file {
        max-width: 42%;
        font-size: 0.82rem;
    }
    .menubar {
        gap: 0.15rem;
        padding: 0;
        overflow-x: visible;
        flex-wrap: nowrap;
        background: transparent;
        border: 0;
        min-height: 0;
    }
    .menubar .mb-ico {
        min-width: 34px;
        min-height: 34px;
        width: 34px;
        height: 34px;
        flex: 0 0 auto;
        padding: 0;
    }
    .menubar .mb-ico svg {
        width: 18px;
        height: 18px;
    }
    .menubar-online,
    #chart-diag-btn,
    #chart-perf,
    #menu-logo,
    #btn-port,
    #menu-einlesen,
    #btn-einlesen,
    #menubar-logo,
    #serial-status {
        display: none !important;
    }
    .m-axis-chips {
        display: flex;
        flex: 1 1 auto;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 2px;
        min-width: 0;
    }
    .m-chip {
        flex: 0 0 auto;
        border: 1px solid var(--ch, #005EB8);
        background: #fff;
        color: var(--ch, #005EB8);
        font: 600 0.72rem var(--font);
        padding: 0.28rem 0.5rem;
        border-radius: 999px;
        max-width: 7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .m-chip.on {
        background: var(--ch, #005EB8);
        color: #fff;
    }
    .panel-tabs {
        display: flex !important;
        padding: 2px 4px;
        align-items: center;
        min-height: 36px;
        height: 36px;
        gap: 0.25rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        background: #eef1f4;
        border-bottom: 1px solid #d5dbe2;
    }
    .panel-tabs .menubar {
        flex: 0 0 auto;
    }
    .panel-tabs .menubar-sep { display: none; }
    .panel-tabs .chart-info-wrap {
        position: static !important;
        top: auto !important;
        right: auto !important;
        margin-left: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
        z-index: 8;
    }
    .panel-tabs .chart-info-pop {
        right: 0;
        left: auto;
        top: calc(100% + 4px);
    }
    .chart-wrap .chart-info-wrap {
        display: none;
    }
    .panel-tab {
        min-height: 36px;
        padding: 0.35rem 0.7rem;
    }
    .kenn-tabelle,
    .kenn-band-table,
    .kenn-grid {
        min-width: 0 !important;
    }
    .kenn-grid {
        grid-template-columns: 1fr !important;
    }
    .kenn-carousel .kenn-nav {
        display: none;
    }
    .kenn-scroll {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .kenn-band {
        max-height: none;
    }
    .mess-split-handle {
        display: none !important;
    }
    .mess-split,
    .mess-split#mess-ansicht {
        flex-direction: column !important;
        flex: 1 1 auto;
        min-height: 0;
    }
    .mess-chart-pane,
    .mess-table-pane {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-width: none !important;
    }
    .panel-tabs #progress-wrap,
    .panel-tabs .progress-bar {
        display: none !important;
        flex: 0 0 0 !important;
        min-width: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .panel-tabs #progress-wrap:not(.progress-idle),
    .panel-tabs .progress-bar:not(.progress-idle) {
        display: block !important;
        flex: 0 1 4.5rem !important;
        width: auto !important;
        min-width: 3.2rem !important;
        height: 1.1rem !important;
        margin: 0 4px !important;
    }
    .chart-body {
        flex-direction: column !important;
        position: relative;
        overflow: hidden;
    }
    .chart-wrap.chart-landscape-lock {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        transform-origin: center center;
        z-index: 1;
    }
    .chart-wrap.chart-landscape-lock canvas {
        width: 100% !important;
        height: 100% !important;
        touch-action: none;
    }
    .stack-pane {
        scroll-snap-align: start;
    }
    .chart-body.show-chan-set .kanal-panel,
    .chart-body.show-chan-set:not(.stack-sync) .kanal-panel,
    .kanal-panel.open,
    .kanal-panel {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--line);
        padding: 0.3rem 0.4rem !important;
        gap: 0.3rem;
    }
    .kanal-card {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        gap: 0.35rem !important;
        margin-bottom: 0 !important;
        padding: 0.28rem 0.4rem 0.28rem 0.55rem !important;
    }
    .kanal-card-head,
    .kanal-einheit,
    .kanal-card-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        margin: 0 !important;
        gap: 0.3rem;
    }
    .kanal-card-head {
        flex: 1 1 8rem;
        min-width: 0;
    }
    .kanal-einheit,
    .kanal-card-row {
        flex: 0 1 auto;
    }
    .chart-info-wrap {
        flex-wrap: nowrap;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .chart-info-btn,
    .chart-mode-seg button {
        min-width: 32px;
        min-height: 32px;
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
    }
    .mess-work,
    .mess-split,
    .mess-chart-pane,
    .chart-body {
        min-height: 0 !important;
    }
    .mess-chart-pane,
    .chart-body {
        flex: 1 1 auto !important;
    }
    .m-axis-chips { display: none !important; }
    .chart-wrap {
        scroll-snap-type: y mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .chart-body.stack-scroll .chart-wrap,
    .chart-wrap.chart-landscape-lock {
        overflow-y: auto;
        overflow-x: hidden;
        scroll-snap-type: y mandatory;
    }
    .stack-vsplit,
    .stack-tools .stack-vsplit {
        display: none !important;
    }
    .stack-head {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        gap: 0.35rem 0.5rem !important;
    }
    .stack-more-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        margin: 0 !important;
        flex: 1 1 auto;
    }
    .m-dock {
        display: flex;
        flex: 0 0 auto;
        gap: 0;
        border-top: 1px solid var(--line);
        background: #fff;
        padding: 0 0.2rem;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 20;
        min-height: 0;
    }
    .m-dock-btn {
        flex: 1 1 0;
        min-height: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        color: var(--muted);
        font: 600 0.75rem var(--font);
        border-radius: 6px;
        padding: 0;
    }
    .m-dock-btn.on {
        background: #e8eef4;
        color: var(--accent);
    }
    html.wl-mobile .app-foot {
        display: none !important;
    }
    html.wl-mobile .menubar .mb-ico:not(.menubar-file):not(#btn-save):not(#btn-settings) {
        display: none !important;
    }
    #view-messung[data-mview="chart"] .mess-table-pane,
    #view-messung[data-mview="chart"] #kenn-stat-row {
        display: none !important;
    }
    #view-messung[data-mview="table"] .mess-chart-pane,
    #view-messung[data-mview="table"] #kenn-stat-row {
        display: none !important;
    }
    #view-messung[data-mview="kenn"] .mess-split,
    #view-messung[data-mview="info"] .mess-split {
        display: none !important;
    }
    #tab-kenn,
    #tab-stat,
    html.wl-mobile #panel-tabs {
        display: none !important;
    }
    #view-messung[data-mview="kenn"] #kenn-stat-row,
    #view-messung[data-mview="info"] #kenn-stat-row {
        display: flex !important;
        flex: 1 1 auto !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        opacity: 1 !important;
        overflow: auto !important;
        pointer-events: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    #view-messung[data-mview="kenn"] #kenn-band,
    #view-messung[data-mview="info"] #kenn-band {
        display: block !important;
        max-height: none;
        flex: 1 1 auto;
    }
    #view-messung[data-mview="kenn"] .stat-side,
    #view-messung[data-mview="info"] .stat-side {
        display: none !important;
    }
    #view-messung[data-mview="chart"] #kenn-stat-row,
    #view-messung[data-mview="table"] #kenn-stat-row {
        display: none !important;
    }
    #view-messung[data-mview="chart"] #tab-kenn,
    #view-messung[data-mview="chart"] #tab-stat,
    #view-messung[data-mview="table"] #tab-kenn,
    #view-messung[data-mview="table"] #tab-stat {
        display: none;
    }
}

.chart-body:not(.stack-sync) #kanal-panel {
    display: none !important;
}
.chset-proto {
    position: absolute;
    left: 72px;
    top: 40px;
    z-index: 20;
    padding: 3px 4px;
    min-height: 0;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    max-width: none;
    overflow: visible;
}
.chset-proto[hidden] { display: none !important; }
.axis-origin-btn {
    position: absolute;
    z-index: 9;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #d8d2c4;
    background: #fffdf8;
    color: #5c564c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(40, 30, 10, 0.12);
    pointer-events: auto;
}
.axis-origin-btn[hidden] { display: none !important; }
.axis-origin-btn:hover,
.axis-origin-btn.on {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
.axis-scale-pop {
    position: fixed;
    z-index: 4000;
    min-width: 232px;
    max-width: 280px;
    padding: 8px 10px 9px;
    background: #fffdf8;
    border: 1px solid #d8d2c4;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(30, 24, 10, 0.16);
    pointer-events: auto;
    font-size: 11px;
    color: #3a3530;
}
.axis-scale-pop[hidden] { display: none !important; }
.axis-scale-pop h4 {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
}
.axis-scale-pop label {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 6px;
    align-items: center;
    margin: 0 0 4px;
}
.axis-scale-pop .ax-y-row {
    display: grid;
    grid-template-columns: minmax(52px, 1fr) 1fr 1fr;
    gap: 4px;
    align-items: center;
    margin: 0 0 4px;
}
.axis-scale-pop input {
    width: 100%;
    min-width: 0;
    height: 22px;
    border: 1px solid #d8d2c4;
    border-radius: 5px;
    background: #fffdf8;
    font-size: 11px;
    padding: 0 5px;
    box-sizing: border-box;
}
.axis-scale-pop .ax-dt {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 22px;
    gap: 0;
    align-items: stretch;
}
.axis-scale-pop .ax-dt input[type="text"] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.axis-scale-pop .ax-dt-pick {
    width: 22px;
    min-width: 22px;
    padding: 0;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: #005EB8;
    cursor: pointer;
}
.axis-scale-pop .ax-act {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}
.axis-scale-pop .ax-act button {
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    border: 1px solid #b7b0a4;
    background: #efebe3;
    color: #2c281f;
    font-size: 11px;
    cursor: pointer;
}
.axis-scale-pop .ax-act .ax-ok {
    background: #005EB8;
    color: #fff;
    border-color: #005EB8;
}
.chset-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.chset-chip {
    --ch: #1f77b4;
    display: grid;
    grid-template-rows: 18px 16px;
    grid-template-columns: min-content;
    row-gap: 3px;
    width: max-content;
    min-width: max-content;
    flex: 0 0 auto;
    padding: 3px 4px;
    background: #fffdf8;
    border: 1px solid #d8d2c4;
    border-radius: 10px;
    box-sizing: border-box;
}
.chset-chip.is-off {
    grid-template-rows: 20px;
    row-gap: 0;
}
.chset-chip.is-off .chset-row {
    display: none;
}
.chset-chip.is-off .chset-color,
.chset-chip.is-off .chset-seg {
    visibility: hidden;
}
.chset-top {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    min-height: 18px;
    width: max-content;
    overflow: hidden;
}
.chset-led {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}
.chset-led span {
    display: block;
    width: 0;
    height: 0;
    margin: 2px auto 0;
    border-style: solid;
    border-width: 0 5px 8px 5px;
    border-color: transparent transparent #5c564c transparent;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
.chset-led.on span {
    margin-top: 3px;
    border-width: 8px 5px 0 5px;
    border-color: #5c564c transparent transparent transparent;
    background: transparent;
    box-shadow: none;
}
.chset-title {
    width: calc(12ch - 9px);
    min-width: calc(12ch - 9px);
    max-width: calc(12ch - 9px);
    height: 16px;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid #d8d2c4;
    background: transparent;
    padding: 0;
    font: 600 11px Segoe UI, system-ui, sans-serif;
    color: #1c2330;
}
.chset-color {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #d8d2c4;
    border-radius: 4px;
    background: #fffdf8;
    cursor: default;
    flex: 0 0 18px;
    -webkit-appearance: none;
    appearance: none;
}
.chset-top,
.chset-row {
    width: 100%;
    box-sizing: border-box;
}
.chset-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0;
    padding: 0;
    line-height: 1;
    height: 16px;
}
.chset-row label span {
    display: inline;
    font-size: 8px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #7a838c;
    white-space: nowrap;
}
.chset-seg {
    display: flex;
    background: #efebe3;
    border-radius: 6px;
    padding: 1px;
    height: 18px;
    box-sizing: border-box;
}
.chset-seg button {
    border: 0;
    background: transparent;
    border-radius: 5px;
    padding: 0 4px;
    font: 600 10px Segoe UI, system-ui, sans-serif;
    color: #5b6570;
    line-height: 14px;
    cursor: default;
}
.chset-seg button.on {
    background: #fffdf8;
    color: #1c1b18;
    box-shadow: 0 1px 2px rgba(80,60,30,0.10);
}
.chset-row label {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    gap: 3px;
    font-size: 8px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #7a838c;
    line-height: 1;
}
.chset-row input.chset-num {
    flex: 0 0 auto;
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
    height: 16px;
    box-sizing: content-box;
    border: 1px solid #d8d2c4;
    border-radius: 4px;
    background: #fffdf8;
    padding: 0 1px;
    font: 10px Segoe UI, system-ui, sans-serif;
    color: #1c2330;
}
.chset-row input.chset-num[data-feld="faktor"] {
    width: 6ch;
    min-width: 6ch;
    max-width: 6ch;
}
input[data-feld="faktor"].wl-faktor-fremd,
#m-chset-faktor.wl-faktor-fremd {
    background: #A8FFE3 !important;
}
.chset-row input.chset-num[data-feld="offset"] {
    width: 5ch;
    min-width: 5ch;
    max-width: 5ch;
}


.app-set-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}
.app-set-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    z-index: 80;
    width: 220px;
    padding: 0.75rem 0.8rem 0.7rem;
    background: #fffef9;
    border: 1px solid #c8c2b6;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(40, 36, 28, 0.16);
    color: #3a3834;
}
.app-set-title {
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #005EB8;
    margin: 0 0 0.55rem;
}
.app-set-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6b665c;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.35rem;
}
.app-set-langs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.app-set-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0.42rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f4f0e8;
    color: #2c2a26;
    font: 600 0.86rem/1.2 "Segoe UI", Tahoma, sans-serif;
    text-align: left;
    cursor: pointer;
}
.app-set-lang:hover {
    background: #e8eef5;
    border-color: #c5d0de;
}
.app-set-lang.is-on {
    background: #005EB8;
    border-color: #005EB8;
    color: #fff;
}
.app-set-lang .tick {
    width: 1rem;
    margin-left: auto;
    opacity: 0;
    font-weight: 700;
}
.app-set-lang.is-on .tick { opacity: 1; }
.app-set-lang .lang-flag,
.m-head-langs .lang-flag {
    flex: 0 0 auto;
    width: 21px;
    height: 15px;
    display: block;
    border: 1px solid rgba(0,0,0,.22);
    border-radius: 2px;
    box-sizing: content-box;
}
.app-set-lang.is-on .lang-flag {
    border-color: rgba(255,255,255,.45);
}
.app-set-lang {
    gap: 8px;
    justify-content: flex-start;
}

#mess-table th.col-kom {
    text-align: left !important;
}
#kks-table-wrap,
html:not(.wl-mobile) .kks-table-wrap,
html:not(.wl-mobile) #kks-table-wrap {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
}
#mess-table-pane.mess-table-pane,
.mess-table-pane {
    min-width: 0 !important;
}
.chart-body {
    flex-direction: column !important;
}
.chart-body.show-scatter {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 1fr) 10px minmax(120px, var(--scatter-h, 200px));
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    min-height: 0 !important;
}
.chart-body.show-scatter .chart-wrap {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    grid-row: 1;
    z-index: 2;
}
.chart-body.show-scatter .chart-wrap:has(.chart-stat-pop:not([hidden])) {
    overflow: visible !important;
    z-index: 20;
}
.chart-scatter-split {
    display: none;
    cursor: row-resize;
    background: transparent;
    position: relative;
    z-index: 8;
}
.chart-body.show-scatter .chart-scatter-split {
    display: block;
    grid-row: 2;
}
.chart-scatter-split::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6e6a62;
    box-shadow: -8px 0 #6e6a62, 8px 0 #6e6a62;
    transform: translate(-50%, -50%);
}
.chart-scatter-split:hover::after,
.chart-body.scatter-split-drag .chart-scatter-split::after {
    background: #4a463e;
    box-shadow: -8px 0 #4a463e, 8px 0 #4a463e;
}
.chart-scatter-pane {
    display: none;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line, #c5bfb3);
    border-bottom: none;
    border-radius: 10px;
    background: #fffdf8;
    padding: 4px 8px 6px;
    box-sizing: border-box;
}
.chart-body.show-scatter .chart-scatter-pane {
    display: flex;
    grid-row: 3;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    z-index: 1;
}
.chart-scatter-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 600 0.78rem Segoe UI, Tahoma, sans-serif;
    color: #3d3a34;
    padding: 0 2px 4px 6px;
    flex: 0 0 auto;
}
.chart-scatter-info-btn {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    font: 600 11px/16px Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
    padding: 0;
}
.chart-scatter-info-btn:hover { background: #005EB8; color: #fff; border-color: #163a5c; }
.chart-scatter-info-tip {
    position: fixed;
    z-index: 90;
    max-width: 22rem;
    background: #f7f3ea;
    color: #2c2a26;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    padding: 8px 10px 9px;
    font: 12px Segoe UI, Tahoma, sans-serif;
    box-shadow: 0 6px 18px rgba(40, 36, 28, 0.16);
    pointer-events: none;
    line-height: 1.4;
}
.chart-scatter-range {
    font-weight: 500;
    font-size: 0.72rem;
    color: #6a655c;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.chart-scatter-swap {
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    border-radius: 11px;
    width: 28px;
    height: 20px;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}
.chart-scatter-swap:hover,
.chart-scatter-swap.on {
    background: #005EB8;
    color: #fff;
    border-color: #163a5c;
}
.chart-scatter-info {
    position: fixed;
    z-index: 90;
    background: #f7f3ea;
    color: #2c2a26;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    padding: 6px 9px;
    font: 12px Segoe UI, Tahoma, sans-serif;
    line-height: 1.45;
    box-shadow: 0 6px 18px rgba(40, 36, 28, 0.16);
    pointer-events: none;
    white-space: nowrap;
}
.chart-scatter-info b { font-variant-numeric: tabular-nums; }
#chart-scatter-cv {
    display: block;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto;
    min-height: 0 !important;
}
.chart-body.show-fft {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 1fr) 10px minmax(100px, var(--fft-h, 168px));
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    min-height: 0 !important;
}
.mess-chart-pane:has(.chart-body.show-fft),
.mess-chart-pane:has(.show-fft) {
    overflow: hidden !important;
    max-height: 100% !important;
}
.chart-body.show-fft .chart-wrap {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    grid-row: 1;
}
.chart-fft-split {
    display: none;
    cursor: row-resize;
    background: transparent;
    position: relative;
    z-index: 6;
}
.chart-body.show-fft .chart-fft-split {
    display: block;
    grid-row: 2;
}
.chart-fft-split::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6e6a62;
    box-shadow: -8px 0 #6e6a62, 8px 0 #6e6a62;
    transform: translate(-50%, -50%);
}
.chart-fft-split:hover::after,
.chart-body.fft-split-drag .chart-fft-split::after {
    background: #4a463e;
    box-shadow: -8px 0 #4a463e, 8px 0 #4a463e;
}
.chart-fft-pane {
    display: none;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    height: auto !important;
    overflow: hidden;
    border: 1px solid var(--line, #c5bfb3);
    border-bottom: none;
    border-radius: 10px;
    background: #fffdf8;
    padding: 4px 8px 6px;
    box-sizing: border-box;
    overflow: hidden;
}
.chart-body.show-fft .chart-fft-pane {
    display: flex;
    grid-row: 3;
    min-height: 0 !important;
    max-height: 100%;
    height: 100% !important;
    overflow: hidden !important;
}
.chart-fft-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font: 600 0.78rem Segoe UI, Tahoma, sans-serif;
    color: #3d3a34;
    padding: 0 2px 4px 42px;
    flex: 0 0 auto;
}
#chart-fft-title {
    cursor: help;
    border-bottom: 1px dotted #8a8680;
}
.chart-fft-range {
    font-weight: 500;
    font-size: 0.72rem;
    color: #6a655c;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.chart-fft-meta {
    display: none !important;
}
.chart-fft-info-tip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 90;
    min-width: 16rem;
    max-width: 22rem;
    background: #f7f3ea;
    color: #2c2a26;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    padding: 8px 10px 9px;
    font: 12px Segoe UI, Tahoma, sans-serif;
    box-shadow: 0 6px 18px rgba(40, 36, 28, 0.16);
    pointer-events: none;
}
.fft-info-h {
    font-weight: 700;
    font-size: 12px;
    margin: 0 0 6px;
    color: #005EB8;
}
.fft-info-row {
    display: grid;
    grid-template-columns: 6.2rem 1fr;
    gap: 8px;
    align-items: baseline;
    line-height: 1.45;
}
.fft-info-row span { color: #6a655c; }
.fft-info-row b {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.fft-info-note {
    margin: 7px 0 0;
    padding-top: 6px;
    border-top: 1px solid #e0dacd;
    color: #5a564e;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
}
#chart-fft-cv {
    display: block;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: 100%;
}
#chart-fft-btn[hidden] { display: none !important; }
.chart-left-tools {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    margin-right: auto;
}
.chart-left-tools[hidden] { display: none !important; }
.chart-notch-group {
    display: flex;
    align-items: center;
    gap: 0.18rem;
}
.chart-left-tools .chart-notch-btn,
.chart-left-tools .chart-info-btn {
    box-sizing: border-box;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 22px;
    padding: 0;
    border-radius: 11px;
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    font: 600 0.68rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 0 0 34px;
}
.chart-left-tools .chart-notch-btn[data-hz="16.67"] {
    font-size: 0.6rem;
    letter-spacing: -0.02em;
}
.chart-left-tools .chart-info-btn.on,
.chart-left-tools .chart-info-btn[aria-pressed="true"],
.chart-left-tools .chart-info-btn.open,
.chart-left-tools .chart-info-btn:hover {
    background: #005EB8 !important;
    color: #fff !important;
    border-color: #163a5c !important;
}
.chart-left-tools .chart-info-btn svg {
    display: block;
    width: 13px;
    height: 13px;
    margin: 0;
    flex: 0 0 auto;
}
.chart-notch-btn {
    height: 22px;
    min-width: 28px;
    padding: 0 0.35rem;
    border-radius: 11px;
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    font: 600 0.68rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
    line-height: 1;
}
.chart-notch-btn.on,
.chart-notch-btn[aria-pressed="true"] {
    background: #005EB8 !important;
    color: #fff !important;
    border-color: #163a5c !important;
}
.chart-notch-btn.is-locked {
    opacity: 0.4;
    pointer-events: none;
    background: #f4f1ea !important;
    color: #3a3834 !important;
    border-color: #8a8680 !important;
}
.chart-filt-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
}
.chart-filt-edit {
    box-sizing: border-box;
    height: 22px;
    min-width: 58px;
    padding: 0 0.4rem;
    border-radius: 11px;
    border: 1px solid #8a8680;
    background: #f4f1ea;
    color: #3a3834;
    font: 600 0.68rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}
.chart-filt-edit.on,
.chart-filt-edit[aria-pressed="true"] {
    background: #005EB8;
    color: #fff;
    border-color: #163a5c;
}
.chart-filt-edit.is-locked {
    opacity: 0.4;
    pointer-events: none;
    background: #f4f1ea !important;
    color: #3a3834 !important;
    border-color: #8a8680 !important;
}
.chart-filt-edit input {
    width: 3.6em;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    padding: 0;
    margin: 0;
    outline: none;
    pointer-events: none;
}
.chart-filt-edit.is-edit input {
    pointer-events: auto;
    background: #fff;
    color: #1a1916;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px #8a8680;
}
.chart-filt-edit.on.is-edit input {
    background: #fff;
    color: #1a1916;
}
.chart-filt-unit {
    font: 600 0.62rem Segoe UI, Tahoma, sans-serif;
    opacity: 0.85;
}
.chart-wrap .chart-info-wrap:has(.chart-info-pop:not([hidden])),
.chart-wrap .chart-info-wrap:has(.chart-stat-pop:not([hidden])) {
    z-index: 80 !important;
    overflow: visible;
}
.filt-hz-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0 0.7rem;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
    color: #3a3834;
}
.filt-hz-row input[type="number"] {
    width: 5rem;
    height: 22px;
    border: 1px solid #8a8680;
    border-radius: 6px;
    background: #f7f3ea;
    padding: 0 0.3rem;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
}
.filt-ma-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
    color: #3a3834;
}
.filt-led {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid #8a8680;
    border-radius: 50%;
    background: #c8c3b8;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.45);
    cursor: pointer;
    flex: 0 0 16px;
}
.filt-led.on {
    background: #3d9a4a;
    border-color: #2d7a38;
    box-shadow: 0 0 0 2px rgba(61,154,74,0.25);
}
.filt-led:disabled {
    opacity: 0.4;
    cursor: default;
}
.filt-ma-row input[type="number"] {
    width: 3.4rem;
    height: 22px;
    border: 1px solid #8a8680;
    border-radius: 6px;
    background: #f7f3ea;
    padding: 0 0.25rem;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
}
.chart-stat-btn .stat-ico {
    font: italic 700 14px "Times New Roman", serif;
    line-height: 1;
}
.chart-fft-tip {
    position: fixed;
    z-index: 80;
    pointer-events: none;
    background: #f7f3ea;
    color: #2c2a26;
    border: 1px solid #c5bfb3;
    border-radius: 6px;
    padding: 5px 8px 6px;
    font: 12px Segoe UI, Tahoma, sans-serif;
    box-shadow: 0 4px 14px rgba(40, 36, 28, 0.18);
    white-space: nowrap;
}
.chart-fft-tip b { font-weight: 650; }
.chart-fft-tip .fft-raw { color: #6a655c; font-weight: 500; }
.chart-fft-tip .fft-amp {
    display: inline-block;
    margin-left: 10px;
    font-variant-numeric: tabular-nums;
    min-width: 3.2em;
    text-align: right;
}
#stat-table,
#mess-table {
    min-width: 0 !important;
}
#mail-fmts { display: none !important; }

.prog-overlay {
    position: fixed;
    inset: 0;
    z-index: 30050;
    background: rgba(40, 36, 30, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 12px 16px;
    overflow: auto;
}
.prog-overlay[hidden] { display: none !important; }
.prog-dlg [hidden] { display: none !important; }
.prog-dlg {
    width: max-content;
    max-width: calc(100vw - 24px);
    background: #f7f3ea;
    color: #2c2a26;
    border: 1px solid #c5bfb3;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(40, 36, 30, 0.28);
}
.prog-tabs { display: none; }
.prog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #005EB8;
    color: #fff;
    border-radius: 9px 9px 0 0;
    font: 650 0.92rem Segoe UI, Tahoma, sans-serif;
}
.prog-head-meta { display: none; }
.prog-x {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.prog-body { padding: 8px 12px 4px; }
.prog-top {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
}
.prog-kenn, .prog-zeit { margin-bottom: 0; flex: 0 0 auto; }
.prog-mode { margin-bottom: 10px; }
.prog-block {
    margin: 0 0 10px;
    padding: 8px 10px 10px;
    border: 1px solid #e0dacd;
    border-radius: 8px;
    background: #fffdf8;
}
.prog-block h3 {
    margin: 0 0 8px;
    width: 100%;
    box-sizing: border-box;
    font: 650 0.78rem Segoe UI, Tahoma, sans-serif;
    color: #005EB8;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prog-block h3 > span { flex: 0 0 auto; }
.prog-sec-send {
    margin-left: auto;
    flex: 0 0 auto;
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    border: 1px solid #163a5c;
    background: #005EB8;
    color: #fff;
    font: 650 0.68rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
}
.prog-sec-send:disabled {
    opacity: 0.38;
    cursor: default;
    background: #8a9aac;
    border-color: #7a8a9a;
}
#prog-split { display: none !important; }
.prog-kenn { min-width: 0; width: max-content; padding: 8px 10px 10px; box-sizing: border-box; }
.prog-grid {
    display: grid;
    grid-template-columns: max-content 18ch;
    gap: 6px 8px;
    align-items: center;
    font: 600 0.78rem Segoe UI, Tahoma, sans-serif;
}
.prog-grid input,
.prog-kom input {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 4px;
    padding-right: 4px;
}
.prog-grid input[readonly] {
    background: #eeeae2;
    color: #5a564e;
    border: 1px solid #d0cbc0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prog-grid input, .prog-kom input, .prog-tz, .prog-rate-lab select, .prog-box select,
.prog-wk-row input[type="date"], .prog-wk-row input[type="time"] {
    height: 24px;
    border: 1px solid #8a8680;
    border-radius: 6px;
    background: #f7f3ea;
    padding: 0 0.35rem;
    font: 600 0.78rem Segoe UI, Tahoma, sans-serif;
    color: #2c2a26;
}
.prog-kom { display: grid; gap: 4px; }
.prog-time {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 8px;
}
.prog-clock {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #f4f1ea, #d8d2c6);
    border: 2px solid #8a8680;
    box-shadow: inset 0 1px 2px #fff;
    flex: 0 0 72px;
}
.prog-clock-h, .prog-clock-m, .prog-clock-s {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    background: #2c2a26;
    border-radius: 1px;
}
.prog-clock-h { width: 3px; height: 18px; margin-left: -1.5px; }
.prog-clock-m { width: 2px; height: 24px; margin-left: -1px; }
.prog-clock-s { width: 1px; height: 26px; margin-left: -0.5px; background: #c0392b; }
.prog-clock-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #2c2a26;
}
.prog-time-vals {
    font: 600 0.78rem Segoe UI, Tahoma, sans-serif;
    display: grid;
    gap: 4px;
}
.prog-time-vals span { color: #6a655c; margin-right: 8px; }
.prog-dst { color: #005EB8; }
.prog-tz-lab { display: block; font: 600 0.72rem Segoe UI, Tahoma, sans-serif; margin: 4px 0 2px; color: #6a655c; text-align: left; }
.prog-tz {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: 24px;
    line-height: 24px;
    box-sizing: content-box;
    text-align: left;
}
.prog-check {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
    width: auto;
    text-align: left;
}
.prog-check input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px;
    flex: 0 0 15px;
    margin: 0;
    padding: 0;
    accent-color: #005EB8;
}
.prog-rec {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 8px;
    align-items: start;
    width: max-content;
    max-width: 100%;
}
.prog-box {
    margin: 0;
    padding: 6px 8px 8px;
    border: 1px solid #e0dacd;
    border-radius: 6px;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
    min-width: 0;
}
.prog-box.is-off {
    opacity: 0.45;
    pointer-events: none;
}
.prog-box legend { padding: 0 4px; color: #5a564e; }
.prog-box label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    white-space: nowrap;
}
.prog-box input[type="checkbox"],
.prog-box input[type="radio"] {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px;
    flex: 0 0 15px;
    margin: 0;
    padding: 0;
    accent-color: #005EB8;
}
#prog-ch-box,
#prog-rng-a,
#prog-rng-b {
    width: 9.6rem;
    height: 8.6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}
#prog-ch-box legend,
#prog-rng-a legend,
#prog-rng-b legend {
    flex: 0 0 auto;
    white-space: nowrap;
}
#prog-ch-box label,
#prog-rng-a label,
#prog-rng-b label {
    flex: 0 0 1.45rem;
    margin: 0;
}
.prog-ch-cols,
.prog-ch-col { display: contents; }
#prog-rate-box,
#prog-wait-box {
    height: 4.4rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
#prog-rate-box { grid-column: 1; }
#prog-rate-box select { width: 100%; max-width: 10rem; }
#prog-wait-box { grid-column: 2; }
#prog-wait-box label { margin: 0; height: 1.45rem; }
#prog-ch-box { grid-column: 1; }
#prog-rng-a { grid-column: 2; }
#prog-rng-b { grid-column: 3; }
.prog-wk-dur {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: calc(9.6rem * 3 + 16px);
    box-sizing: border-box;
}
.prog-wecker {
    flex: 0 0 auto;
    width: max-content;
    height: 5.4rem;
    box-sizing: border-box;
}
#prog-dur-box {
    flex: 1 1 auto;
    min-width: 0;
    height: 5.4rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
#prog-dur-box .prog-dur {
    flex: 0 0 1.45rem;
    margin: 0;
    align-items: center;
    gap: 1.2rem;
    justify-content: space-between;
}
.prog-wk-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}
.prog-wk-row span { min-width: 2.4rem; }
.prog-wk-row input[type="date"] {
    width: calc(11ch + 1.6rem) !important;
    min-width: 0 !important;
    max-width: calc(11ch + 1.6rem);
    flex: 0 0 auto;
    box-sizing: content-box;
}
.prog-wk-row input[type="time"] {
    width: calc(6ch + 1.5rem) !important;
    min-width: 0 !important;
    max-width: calc(6ch + 1.5rem);
    flex: 0 0 auto;
    box-sizing: content-box;
}
.prog-dur { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0; }
.prog-akt {
    grid-column: 1 / -1;
    width: calc(9.6rem * 3 + 16px);
    box-sizing: border-box;
    margin-top: 10px;
    font: 600 0.72rem Segoe UI, Tahoma, sans-serif;
    text-align: left;
}
.prog-akt legend { text-align: left; }
.prog-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0;
    flex-wrap: wrap;
}
.prog-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 1.5rem;
    min-width: 4.4rem;
    padding: 0 6px;
    border-radius: 4px;
    background: #3d9a4a;
    color: #fff;
    font: 700 0.68rem Segoe UI, Tahoma, sans-serif;
    letter-spacing: 0.02em;
}
.prog-chip.logger {
    min-width: 3.8rem;
    background: #3d9a4a;
}
.prog-chip.prog { background: #005EB8; }
.prog-chip.start { background: #3d9a4a; }
.prog-chip.ok {
    min-width: 5.4rem;
    background: #3d9a4a;
}
.prog-arr {
    color: #3a3834;
    font: 800 1.15rem Segoe UI, Tahoma, sans-serif;
    line-height: 1;
    transform: scaleX(1.15);
}
.prog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px 12px;
}
.prog-ok, .prog-cancel {
    height: 28px;
    min-width: 7rem;
    border-radius: 6px;
    border: 1px solid #8a8680;
    font: 650 0.78rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
}
.prog-ok { background: #005EB8; color: #fff; border-color: #163a5c; }
.prog-cancel {
    background: #f4f1ea;
    color: #2c2a26;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}
.prog-split {
    position: relative;
    display: flex;
    align-items: stretch;
}
.prog-split #prog-apply {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 10.5rem;
}
.prog-split-chev {
    min-width: 1.7rem;
    width: 1.7rem;
    padding: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid #3a6a96;
}
.prog-split-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 4px);
    min-width: 12rem;
    background: #fffdf8;
    border: 1px solid #d0cbc0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(40, 36, 28, 0.16);
    padding: 4px;
    z-index: 5;
}
.prog-split-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 5px;
    font: 600 0.75rem Segoe UI, Tahoma, sans-serif;
    color: #2c2a26;
    cursor: pointer;
}
.prog-split-menu button:hover,
.prog-split-menu button.is-on {
    background: #e8f0f8;
    color: #005EB8;
}
.chart-aus-opts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid #e4ddd0;
}
.chart-aus-opts[hidden] { display: none; }
.chart-aus-opts label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font: 650 0.75rem/1.2 "Segoe UI", Tahoma, sans-serif;
    color: #5b554c;
}
.chart-aus-opts select,
.chart-aus-opts input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 8.5rem;
    font: 650 0.75rem/1.2 "Segoe UI", Tahoma, sans-serif;
    padding: 0.22rem 0.3rem;
    border: 1px solid #d2cbbd;
    border-radius: 6px;
    background: #fffdf8;
    color: #3a362f;
}
.wl-waik {
    padding: 1mm 2mm 1mm 0;
    color: #111;
    border-right: 1.2px solid #222;
    font-size: 8.5px;
    line-height: 1.25;
    min-width: 42mm;
}
.wl-waik-title {
    font-weight: 700;
    margin-bottom: 2.2mm;
    white-space: nowrap;
}
.wl-waik-tbl {
    border-collapse: collapse;
    font-size: 8px;
    color: #111;
}
.wl-waik-tbl th,
.wl-waik-tbl td {
    padding: 0 3px;
    text-align: center;
    white-space: nowrap;
    border-left: 1px solid #222;
}
.wl-waik-tbl th:first-child,
.wl-waik-tbl td:first-child { border-left: 0; }
.live-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(18, 16, 14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.live-overlay[hidden] { display: none !important; }
.live-rec {
    width: min(1180px, 100%);
    height: min(668px, 100%);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #8a8d92 0%, #5c5f64 18%, #3e4146 100%);
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.28);
    color: #efece6;
    overflow: hidden;
}
.live-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 16px;
    font: 650 0.92rem/1 "Segoe UI", Tahoma, sans-serif;
}
.live-mark {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 16px;
    font-weight: 900;
    font-style: italic;
    color: #efece6;
    letter-spacing: 0;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0,0,0,.35);
    margin-right: 18px;
    white-space: nowrap;
}
.lv-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 112px;
}
.lv-stat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 650 0.68rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #cfc9be;
    letter-spacing: 0.02em;
}
@media (max-width: 820px) {
    .lv-stat { flex-direction: row; gap: 12px; min-width: 0; }
}
.live-chrome-sp { flex: 1; }
.live-brand {
    display: grid;
    grid-template-columns: max-content max-content max-content;
    justify-items: start;
    align-items: end;
    column-gap: 0;
    row-gap: 0;
    line-height: 1;
    color: #efece6;
    pointer-events: none;
    margin-right: 10px;
}
.live-brand .tb-pre,
.live-brand .tb-lek,
.live-brand .tb-post {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: #efece6;
    letter-spacing: 0;
    line-height: 0.78;
    text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.live-brand .tb-pre { justify-self: end; }
.live-brand .tb-lek { text-align: center; }
.lv-pwr {
    position: relative;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 42px;
}
.lv-pwr-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, #f2efe6 0%, #b8b3a6 38%, #6d6a62 72%, #3a3834 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,.4),
        0 3px 6px rgba(0,0,0,.45),
        inset 0 0 0 2px #8a867c;
}
.lv-pwr-knob {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 30%, #5a5854, #1a1917 70%);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.12), inset 0 -3px 4px rgba(0,0,0,.55);
}
.lv-pwr-knob::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    width: 3px;
    height: 10px;
    margin-left: -1.5px;
    border-radius: 1px;
    background: #e8c56a;
    box-shadow: 0 0 4px rgba(232,197,106,.5);
    transform: rotate(-38deg);
    transform-origin: 50% 12px;
}
.lv-pwr-cap {
    position: absolute;
    left: 50%;
    bottom: -13px;
    transform: translateX(-50%);
    font: 700 0.55rem/1 "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d7d2c6;
    text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.lv-pwr:hover .lv-pwr-knob {
    background: radial-gradient(circle at 38% 30%, #6a6864, #221f1c 70%);
}
.live-body {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 10px;
    padding: 0 12px 12px;
}
.live-deck {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #2a2c30;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #1a1c1f, inset 0 8px 16px rgba(0,0,0,.35);
    overflow: hidden;
}
.live-sprocket {
    height: 22px;
    flex: 0 0 22px;
    background:
        radial-gradient(circle at 11px 11px, #1a1a1a 4px, #6a6e74 5px, #6a6e74 7px, transparent 8px) 0 0 / 22px 22px,
        linear-gradient(180deg, #9aa0a6, #5c6168);
}
.live-write {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    background: #1f2124;
}
.live-paper-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    background: #f3ead0;
}
.live-paper {
    display: block;
    width: 100%;
    height: 100%;
}
.live-scale {
    flex: 0 0 148px;
    width: 148px;
    height: 100%;
    display: block;
    background: #f4f1ea;
    box-shadow: inset 1px 0 0 #c8c4ba;
}
.live-pens { position: absolute; inset: 0; pointer-events: none; }
.lv-pen {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
}
.lv-arm {
    position: absolute;
    top: -3px;
    height: 6px;
    border-radius: 2px 0 0 2px;
    background: linear-gradient(180deg, #f4f5f7 0%, #9aa1a8 48%, #5f656c 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.lv-tip {
    position: absolute;
    top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50% 2px 50% 50%;
    background: var(--pen, #333);
    box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.4);
}
.lv-slide {
    position: absolute;
    top: -7px;
    width: 0;
    height: 0;
    border-radius: 0;
    background: transparent;
    border-style: solid;
    border-width: 7px 0 7px 13px;
    border-color: transparent transparent transparent var(--pen, #333);
    box-shadow: none;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.live-panel {
    width: 210px;
    flex: 0 0 210px;
    background: linear-gradient(180deg, #2b2d31, #1c1e22);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #111;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
}
.live-digits {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    flex: 0 0 auto;
}
.live-panel-title {
    font: 650 0.64rem/1 "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b7b3aa;
    padding: 1px 0 0;
}
.live-panel-title-sub {
    margin-top: 4px;
    color: #8d887e;
}
.lv-ch {
    background: #0b0c0e;
    border-radius: 5px;
    padding: 6px 7px 6px;
    box-shadow: inset 0 0 0 1px #000;
}
.lv-ch-body {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.lv-ch-read {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.lv-ch-scale {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
}
.lv-ch-scale .lv-sw button {
    width: 16px;
    height: 15px;
    font-size: 0.52rem;
    line-height: 15px;
}
.lv-ch-lab {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 650 0.68rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #cfc9be;
    margin-bottom: 3px;
}
.lv-rng {
    margin-left: auto;
    display: inline-flex;
    gap: 7px;
    font: 650 0.62rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #6e6a62;
    letter-spacing: 0.03em;
}
.lv-rng i { font-style: normal; }
.lv-rng i.on { color: #f3d36a; }
.lv-clock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    margin-bottom: 0;
    flex: 0 0 auto;
}
.lv-clock-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    font: 650 0.68rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #cfc9be;
    background: #0b0c0e;
    border-radius: 5px;
    padding: 5px 7px 4px;
    box-shadow: inset 0 0 0 1px #000;
}
.lv-clock-row .lv-ch-lab {
    width: 100%;
}
.lv-clock-row .lv-ch-lab .lv-unit-inline {
    margin-left: auto;
}
.lv-clock-row .lv-seg {
    justify-content: flex-end;
    width: 100%;
    height: 20px;
    overflow: hidden;
}
.lv-seg-clock,
.lv-seg-batt {
    justify-content: flex-end;
    width: 100%;
    transform: scale(0.68);
    transform-origin: right center;
}
.lv-sep-dot::before { display: none; }
.lv-sep-dot::after {
    top: auto;
    bottom: 4px;
}
.lv-unit-inline {
    font: 650 0.68rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #8d887e;
}
.lv-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a1210;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.7), 0 0 0 1px #1a0a08;
}
.lv-led.on {
    background: radial-gradient(circle at 35% 30%, #ff8a78, #ff3b2f 55%, #7a1008);
    box-shadow: 0 0 6px #ff3b2f;
}
.lv-readout {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.lv-lamp {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #3a1816, #140807 72%);
    box-shadow:
        inset 0 2px 3px rgba(255,255,255,.08),
        inset 0 -2px 3px rgba(0,0,0,.55),
        0 0 0 1px #2a1614,
        0 0 0 2px #6a5a52;
}
.lv-lamp.on {
    background: radial-gradient(circle at 32% 28%, #ffd0c4, #ff3b2f 46%, #6a0e08 78%);
    box-shadow:
        inset 0 2px 2px rgba(255,255,255,.35),
        0 0 9px #ff3b2f,
        0 0 0 1px #4a1814,
        0 0 0 2px #8a7a70;
}
.lv-seg {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 3px;
    min-height: 32px;
    color: #ff3b2f;
}
.lv-unit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 4px;
}
.lv-unit {
    text-align: right;
    font: 650 0.72rem/1 "Segoe UI", Tahoma, sans-serif;
    color: #cfc9be;
    min-width: 1.4rem;
    margin-top: 0;
}
.lv-sw {
    display: inline-flex;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.45);
    background: linear-gradient(180deg, #8a8680, #4e4b46);
}
.lv-sw button {
    width: 22px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-right: 1px solid #2e2c28;
    background: linear-gradient(180deg, #c4bfb4 0%, #8e887c 55%, #6a665c 100%);
    color: #2a2722;
    font: 700 0.62rem/18px "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
}
.lv-sw button:last-child { border-right: 0; }
.lv-sw button.on {
    background: linear-gradient(180deg, #5a574f 0%, #2f2d29 100%);
    color: #f0e6c8;
    box-shadow: inset 0 2px 3px rgba(0,0,0,.45);
}
.lv-sw-pos button,
.lv-sw-span button {
    width: 18px;
    font-size: 0.58rem;
}
.lv-colon {
    width: 8px;
    height: 28px;
    position: relative;
    flex: 0 0 8px;
}
.lv-colon::before,
.lv-colon::after {
    content: '';
    position: absolute;
    left: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff3b2f;
    box-shadow: 0 0 5px rgba(255,59,47,.55);
}
.lv-colon::before { top: 7px; }
.lv-colon::after { bottom: 6px; }
.lv-d {
    position: relative;
    width: 18px;
    height: 28px;
    display: inline-block;
    flex: 0 0 18px;
}
.live-digits .lv-seg {
    gap: 7px;
}
.lv-d i {
    position: absolute;
    background: #3a1412;
    border-radius: 1px;
}
.lv-d i.on { background: #ff3b2f; box-shadow: 0 0 6px rgba(255,59,47,.55); }
.lv-d .sa { top: 1px; left: 3px; right: 3px; height: 3px; }
.lv-d .sb { top: 3px; right: 1px; width: 3px; height: 10px; }
.lv-d .sc { top: 15px; right: 1px; width: 3px; height: 10px; }
.lv-d .sd { bottom: 1px; left: 3px; right: 3px; height: 3px; }
.lv-d .se { top: 15px; left: 1px; width: 3px; height: 10px; }
.lv-d .sf { top: 3px; left: 1px; width: 3px; height: 10px; }
.lv-d .sg { top: 13px; left: 3px; right: 3px; height: 3px; }
.lv-dot {
    position: absolute;
    right: -5px;
    bottom: 1px;
    width: 4px;
    height: 4px;
    margin: 0;
    border-radius: 50%;
    background: #3a1412;
    display: block;
}
.lv-dot.on { background: #ff3b2f; box-shadow: 0 0 5px rgba(255,59,47,.55); }

.mess-chart-pane {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}

#kks-table-wrap,
.kks-table-wrap {
    overflow-y: auto !important;
}

/* —— Mobil-Schale: eigene Ansicht, Desktop unberührt —— */
html.wl-mobile,
html.wl-mobile body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
}
html.wl-mobile body {
    display: flex;
    flex-direction: column;
}
html.wl-mobile main,
html.wl-mobile #view-messung.view {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}
html.wl-mobile .topbar {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 4px 8px;
    padding-top: max(4px, env(safe-area-inset-top));
}
html.wl-mobile .topbar-brand,
html.wl-mobile .topbar .nav,
html.wl-mobile .app-foot,
html.wl-mobile #panel-tabs,
html.wl-mobile .mess-split-handle,
html.wl-mobile #stack-tools,
html.wl-mobile #stack-offbar,
html.wl-mobile #kanal-panel,
html.wl-mobile #chart-left-tools,
html.wl-mobile #chart-info-wrap,
html.wl-mobile #chart-gps-pins,
html.wl-mobile .chart-mode-seg,
html.wl-mobile #btn-print,
html.wl-mobile #btn-kenn-panel,
html.wl-mobile #menu-einlesen,
html.wl-mobile #btn-port,
html.wl-mobile #chart-diag-btn,
html.wl-mobile #menubar-logo,
html.wl-mobile .menubar-online,
html.wl-mobile .menubar-sep {
    display: none !important;
}
html.wl-mobile .menubar {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    padding: 4px 8px;
    background: #eef1f4;
    border-bottom: 1px solid #d5dbe2;
}
html.wl-mobile .menubar .mb-ico {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}
html.wl-mobile #mess-work {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}
html.wl-mobile .mess-split,
html.wl-mobile .mess-split#mess-ansicht {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    flex-direction: column !important;
    padding: 0 !important;
}
html.wl-mobile .mess-chart-pane,
html.wl-mobile .mess-table-pane,
html.wl-mobile .chart-body,
html.wl-mobile .chart-wrap {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    border-radius: 0 !important;
}
html.wl-mobile .chart-wrap {
    position: relative;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    overflow: hidden !important;
}
html.wl-mobile .chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
}
html.wl-mobile .m-dock {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    flex: 0 0 auto;
    gap: 0;
    border-top: 1px solid #c5bfb3;
    background: #f4f1ea;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}
html.wl-mobile .m-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    width: auto;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5c5850;
    font: 600 11px/1.1 var(--font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.wl-mobile .m-dock-btn.on {
    background: #fff;
    color: #005EB8;
    box-shadow: inset 0 3px 0 #005EB8;
}
html.wl-mobile .m-dock-ico {
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}
html.wl-mobile .m-dock-txt {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.wl-mobile #view-messung[data-mview="chart"] .mess-table-pane,
html.wl-mobile #view-messung[data-mview="chart"] #kenn-stat-row {
    display: none !important;
}
html.wl-mobile #view-messung[data-mview="table"] .mess-chart-pane,
html.wl-mobile #view-messung[data-mview="table"] #kenn-stat-row {
    display: none !important;
}
html.wl-mobile #view-messung[data-mview="kenn"] .mess-split,
html.wl-mobile #view-messung[data-mview="info"] .mess-split {
    display: none !important;
}
html.wl-mobile #view-messung[data-mview="kenn"] #kenn-stat-row,
html.wl-mobile #view-messung[data-mview="info"] #kenn-stat-row {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}
html.wl-mobile #view-messung[data-mview="kenn"] .stat-side,
html.wl-mobile #view-messung[data-mview="info"] .stat-side {
    display: none !important;
}

html.wl-mobile .menubar {
    display: none !important;
}
html.wl-mobile #chset-proto,
html.wl-mobile .chset-proto,
html.wl-mobile .chset-bar,
html.wl-mobile #axis-scale-btn,
html.wl-mobile #axis-scale-pop,
html.wl-mobile #chart-stat-wrap,
html.wl-mobile #chart-stat-pop,
html.wl-mobile .chart-stat-btn {
    display: none !important;
}
html.wl-mobile .mess-chart-pane,
html.wl-mobile .chart-wrap,
html.wl-mobile .chart-body {
    overflow: hidden !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
html.wl-mobile .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
}
html.wl-mobile .topbar .app-name {
    flex: 0 0 auto;
}
html.wl-mobile .topbar-file {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: none;
}
.m-burger,
.m-menu {
    display: none;
}
html.wl-mobile .m-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    flex: 0 0 auto;
}
html.wl-mobile .m-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #005EB8;
    border-radius: 1px;
}
html.wl-mobile .m-burger.open {
    background: #e8eef4;
}
html.wl-mobile .m-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(var(--topbar-h, 44px) + env(safe-area-inset-top));
    right: 8px;
    z-index: 80;
    min-width: 10rem;
    background: #fff;
    border: 1px solid #c5bfb3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(40,36,28,.18);
    padding: 4px;
}
html.wl-mobile .m-menu[hidden] {
    display: none !important;
}
html.wl-mobile .m-menu button {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    font: 600 14px var(--font);
    color: #2c2a26;
    border-radius: 6px;
}
html.wl-mobile .m-menu button:active {
    background: #e8eef4;
}
html.wl-mobile header.topbar {
    position: relative;
}

.fw-veraltet {
    color: #c0392b !important;
    cursor: pointer;
}
.topbar-file .fw-veraltet,
.topbar .fw-veraltet {
    color: #ff8d85 !important;
    pointer-events: auto;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#stack-board .stack-hover-tip {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    z-index: 8;
}

/* Messwertspalten: volle Zahl + Einheit, gleiche Breite für alle Kanäle */
#mess-table th.col-k,
#mess-table td.col-k,
#stat-table th.col-k,
#stat-table td.col-k,
#mess-table-head-tbl th.col-k,
table.kks th.col-k,
table.kks td.col-k {
    width: var(--wl-col-k, 72px) !important;
    min-width: var(--wl-col-k, 72px) !important;
    max-width: var(--wl-col-k, 72px) !important;
    padding-left: 4px !important;
    padding-right: 8px !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
table.kks thead th.col-k .mw-hn,
#mess-table thead th.col-k .mw-hn,
#stat-table thead th.col-k .mw-hn {
    display: inline-block !important;
    max-width: calc(var(--wl-col-k, 72px) - 6px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: middle;
}
#mess-table-pane.tbl-modern td.col-k .mw-v,
#mess-table td.col-k .mw-v {
    overflow: visible !important;
}
#mess-table-pane.tbl-modern td.col-k .mw-u,
#mess-table td.col-k .mw-u {
    display: inline !important;
    overflow: visible !important;
}

/* Programmier-Overlay nur Mobil: drei Tabs, volle Gerätebreite, Höhe scrollbar */
html.wl-mobile .prog-overlay {
    padding: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom));
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    background: rgba(40, 36, 30, 0.45);
}
html.wl-mobile .prog-dlg {
    width: min(22.5rem, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    height: auto;
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
    border: 1px solid #c5bfb3;
    box-shadow: 0 12px 40px rgba(40, 36, 30, 0.28);
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
}
html.wl-mobile .prog-head {
    flex: 0 0 auto;
    border-radius: 9px 9px 0 0;
    padding: 8px 12px;
}
html.wl-mobile .prog-head-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    flex: 0 0 auto;
    padding: 6px 12px 8px;
    background: #f7f3ea;
    color: #2c2a26;
    font: 400 0.82rem Segoe UI, Tahoma, sans-serif;
    border-bottom: 1px solid #e0dacd;
}
html.wl-mobile .prog-head-meta .kenn-head-ml {
    flex: 0 0 auto;
    font-weight: 700;
}
html.wl-mobile .prog-head-meta .kenn-head-sn-lab {
    flex: 0 0 auto;
    font-weight: 400;
    color: #333;
}
html.wl-mobile .prog-head-meta .kenn-head-sn {
    flex: 0 0 auto;
    font-weight: 400;
}
html.wl-mobile .prog-head-meta .kenn-head-fw {
    flex: 0 0 auto;
    font-weight: 700;
    margin-left: 0.55rem;
}
html.wl-mobile .prog-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 8px 8px 6px;
    background: #f7f3ea;
    border-bottom: 1px solid #e0dacd;
}
html.wl-mobile .prog-tabs[hidden] { display: flex !important; }
html.wl-mobile .prog-tab {
    flex: 1 1 0;
    margin: 0;
    padding: 0.4rem 0.2rem;
    border: 1px solid #c5bfb3;
    background: #f4f1ea;
    color: #3a3834;
    border-radius: 6px;
    font: 650 0.78rem Segoe UI, Tahoma, sans-serif;
    cursor: pointer;
    min-width: 0;
}
html.wl-mobile .prog-tab.on {
    background: #005EB8;
    border-color: #005EB8;
    color: #fff;
}
html.wl-mobile .prog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px max(16px, env(safe-area-inset-bottom));
}
html.wl-mobile .prog-top {
    display: block;
    margin: 0;
}
html.wl-mobile .prog-block {
    margin: 0;
    padding: 8px 8px 10px;
}
html.wl-mobile .prog-block.is-off { display: none !important; }
html.wl-mobile .prog-kenn,
html.wl-mobile .prog-zeit,
html.wl-mobile .prog-mode {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
html.wl-mobile .prog-grid {
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    width: 100%;
}
html.wl-mobile .prog-grid input,
html.wl-mobile .prog-kom input,
html.wl-mobile .prog-tz,
html.wl-mobile .prog-box select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}
html.wl-mobile .prog-time {
    flex-wrap: wrap;
    gap: 10px;
}
html.wl-mobile .prog-clock {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}
html.wl-mobile .prog-check {
    display: flex;
    white-space: normal;
    align-items: flex-start;
}
html.wl-mobile .prog-rec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
html.wl-mobile #prog-rate-box {
    grid-column: 1;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}
html.wl-mobile #prog-rate-box select {
    width: auto !important;
    max-width: 7.2rem !important;
    min-width: 0 !important;
}
html.wl-mobile #prog-wait-box {
    grid-column: 2;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}
html.wl-mobile #prog-ch-box,
html.wl-mobile .prog-wk-dur,
html.wl-mobile .prog-akt {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}
html.wl-mobile #prog-ch-box {
    margin-bottom: 12px;
    padding: 8px 10px 12px;
}
html.wl-mobile #prog-rng-a,
html.wl-mobile #prog-rng-b {
    grid-column: auto;
    width: auto;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 8px 10px 12px;
}
html.wl-mobile .prog-ch-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
html.wl-mobile .prog-ch-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
html.wl-mobile #prog-ch-box label,
html.wl-mobile #prog-rng-a label,
html.wl-mobile #prog-rng-b label {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}
html.wl-mobile #prog-rng-a,
html.wl-mobile #prog-rng-b {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
html.wl-mobile .prog-wk-dur {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
html.wl-mobile .prog-wk-row {
    flex-wrap: wrap;
}
html.wl-mobile .prog-wk-row input[type="date"],
html.wl-mobile .prog-wk-row input[type="time"] {
    width: auto !important;
    max-width: 100%;
    flex: 1 1 auto;
}
html.wl-mobile .prog-chips {
    gap: 6px;
}
html.wl-mobile .prog-foot,
html.wl-mobile .prog-cancel,
html.wl-mobile #prog-split { display: none !important; }

.mod1 {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 50060;
    pointer-events: auto;
    width: min(520px, calc(100vw - 16px));
    max-height: min(48vh, 420px);
    display: flex;
    flex-direction: column;
    background: #1c1b18;
    color: #f4f1ea;
    border: 1px solid #5c584f;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    font: 12px/1.35 Consolas, "Courier New", monospace;
}
.mod1[hidden] { display: none !important; }
.mod1-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #2a2824;
    border-bottom: 1px solid #5c584f;
}
.mod1-bar strong { font: 600 12px var(--font); }
#mod1-meta { color: #c4bba8; flex: 1; }
.mod1-bar button {
    background: #005EB8;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 3px 8px;
    font: 600 11px var(--font);
}
#mod1-x { background: transparent; color: #f4f1ea; font-size: 16px; line-height: 1; padding: 0 6px; }
.mod1-out {
    margin: 0;
    padding: 8px;
    overflow: auto;
    flex: 1;
    min-height: 140px;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d7f0c8;
}
html.wl-mobile .mod1 {
    left: 8px;
    right: 8px;
    width: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

#mess-table-pane table.kks tbody tr td.col-k.wl-tbl-over,
#mess-table-pane table.kks tbody tr:nth-child(odd) td.col-k.wl-tbl-over,
#mess-table-pane table.kks tbody tr:nth-child(even) td.col-k.wl-tbl-over,
#mess-table-pane table.kks tbody tr:hover td.col-k.wl-tbl-over,
#mess-table-pane table.kks tbody tr.cursor-row td.col-k.wl-tbl-over,
#mess-table-pane.tbl-modern table.kks tbody tr td.col-k.wl-tbl-over,
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(odd) td.col-k.wl-tbl-over,
#mess-table-pane.tbl-modern table.kks tbody tr:nth-child(even) td.col-k.wl-tbl-over,
#mess-table-pane.tbl-modern table.kks tbody tr:hover td.col-k.wl-tbl-over,
#mess-table-pane.tbl-modern table.kks tbody tr.cursor-row td.col-k.wl-tbl-over,
.m-tbl tbody tr td.col-k.wl-tbl-over {
    background: #c0392b !important;
    color: #fff !important;
}
#mess-table-pane td.col-k.wl-tbl-over .mw-v,
#mess-table-pane td.col-k.wl-tbl-over .wl-tbl-v,
.m-tbl td.col-k.wl-tbl-over .mw-v {
    color: #fff !important;
}

#mess-table-head-tbl th.col-zeit,
#mess-table td.col-zeit,
#stat-table th.col-zeit,
#stat-table td.col-zeit,
.m-tbl th.col-zeit,
.m-tbl td.col-zeit {
    padding-right: 12px !important;
}
