/* ============================================================ Grundlagen */
:root {
  --paper: #F4F6F8; --paper-2: #EAEEF2;
  --surface: #FFFFFF; --line: rgba(22,32,43,.08);
  --text: #16202B; --muted: #6C7A8A;
  --primary: #0EA5E9; --primary-deep: #0284C7; --primary-soft: #DDF3FD;
  --band-a: #22B3EE; --band-b: #0A8FD0;
  --success: #16A26B; --success-soft: #DDF5EA;
  --warn: #E4A11B; --warn-soft: #FFF2D6;
  --danger: #D94848; --danger-soft: #FCE4E4;
  --shadow: 0 10px 30px rgba(20,40,70,.10), 0 1px 2px rgba(20,40,70,.06);
  --shadow-lg: 0 24px 60px rgba(20,40,70,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0B1A2B; }
body { font-family: 'Inter', Roboto, system-ui, sans-serif; color: var(--text); font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow: hidden; user-select: none; }
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 22px; } h2 { font-size: 26px; }
p { margin: 0; } button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.muted { color: var(--muted); } [hidden] { display: none !important; }
svg.lucide { width: 20px; height: 20px; stroke-width: 2; }

/* ============================================================ Rahmen */
.app { position: relative; width: 800px; height: 480px; margin: 0 auto; overflow: hidden; background: var(--paper); isolation: isolate; }
.app.has-panel .hero, .app.has-panel .grid-view { visibility: hidden; }
.ambient { position: absolute; inset: 0; width: 800px; height: 480px; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .blob { position: absolute; border-radius: 50%; will-change: transform; }
.ambient .streak { position: absolute; left: 0; width: 440px; height: 360px; margin-top: -120px; transform: rotate(-20deg); background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.14) 50%, rgba(255,255,255,0) 100%); will-change: transform; }

/* ------------------------------------------------------------ Kopf */
.top { position: absolute; top: 0; left: 0; right: 0; height: 50px; padding: 0 18px 0 22px; display: flex; align-items: center; justify-content: space-between; z-index: 8; }
.brand { line-height: 1; font: inherit; cursor: default; }
.top-right { display: flex; align-items: center; gap: 4px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s, transform .15s var(--ease); }
.chip:active { transform: scale(.95); }
.chip svg.lucide { width: 17px; height: 17px; }
.chip-icon { padding: 0 9px; }
.chip.is-on { background: var(--text); color: #fff; }
.chip-badge::after { content: ''; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid var(--paper); }

/* ------------------------------------------------------------ Hero */
.hero { position: absolute; inset: 50px 0 0 0; overflow: hidden; z-index: 1; }
.band { position: absolute; left: 0; right: 0; bottom: 0; height: 230px; pointer-events: none; overflow: hidden; }
.band .wave-layer { position: absolute; left: 0; top: 0; width: 100%; height: 230px; }
.band .wave-layer svg { display: block; width: 100%; height: 230px; }
.band .wave { transition: fill-opacity .6s; }
.band-soft { height: 150px; opacity: .22; }
/* Farbstopps je Zustand, weich ueberblendet */
.wave-a1 { stop-color: #93E1FD; transition: stop-color 1s; } .wave-a2 { stop-color: #45C3F7; transition: stop-color 1s; }
.wave-b1 { stop-color: #66CFF6; transition: stop-color 1s; } .wave-b2 { stop-color: #23A3E0; transition: stop-color 1s; }
.wave-c1 { stop-color: #47B8EA; transition: stop-color 1s; } .wave-c2 { stop-color: #1682C4; transition: stop-color 1s; }
.app.is-done .wave-a1 { stop-color: #5EE0A9; } .app.is-done .wave-a2 { stop-color: #22B57E; } .app.is-done .wave-b1 { stop-color: #2EC48B; } .app.is-done .wave-b2 { stop-color: #118F62; } .app.is-done .wave-c1 { stop-color: #17A170; } .app.is-done .wave-c2 { stop-color: #0A6A48; }
.app.is-bad .wave-a1 { stop-color: #F59A9A; } .app.is-bad .wave-a2 { stop-color: #E05C5C; } .app.is-bad .wave-b1 { stop-color: #E86262; } .app.is-bad .wave-b2 { stop-color: #B83A3A; } .app.is-bad .wave-c1 { stop-color: #C94747; } .app.is-bad .wave-c2 { stop-color: #8F2626; }

.hero-track { position: absolute; top: 0; bottom: 0; left: 0; display: flex; align-items: stretch; will-change: transform; touch-action: pan-y; }
.slide { will-change: transform, opacity; position: relative; width: 520px; flex: 0 0 520px; display: flex; flex-direction: column; align-items: center; padding-top: 18px; cursor: pointer; }
.slide-title { margin-top: 18px; font-family: 'Quicksand', 'Inter', sans-serif; font-size: 42px; font-weight: 400; letter-spacing: .01em; text-transform: none; color: var(--text); line-height: 1; transition: color .3s; }
.slide-art { width: 340px; height: 262px; margin-top: -6px; position: relative; }
.slide-art svg { width: 100%; height: 100%; overflow: visible; }
.slide-art:has(.art-img) { height: 286px; margin-top: -14px; display: flex; align-items: center; justify-content: center; }
.slide-art .art-img { display: block; width: 70%; height: 70%; object-fit: contain; object-position: center; transform: translateY(4px); }
.slide-info { position: absolute; bottom: 34px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--text); }
.slide-info svg.lucide { width: 16px; height: 16px; color: var(--primary); }
.slide-info.ok { color: var(--success); } .slide-info.ok svg.lucide { color: var(--success); }
.slide-info.warn { color: #9A6700; } .slide-info.warn svg.lucide { color: var(--warn); }
.slide-info.live { background: var(--text); color: #fff; } .slide-info.live svg.lucide { color: #7DD3FC; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: transform .3s var(--ease), background .3s; }
.hero-dots i.is-active { background: #fff; transform: scale(1.5); }

/* Live-Orb klein im Slide */
.mini-orb { position: absolute; inset: 0; display: grid; place-items: center; }
.mini-orb .orb { width: 220px; height: 220px; }

/* ------------------------------------------------------------ Übersicht */
.grid-view { position: absolute; inset: 50px 0 0 0; z-index: 7; background: var(--paper); padding: 10px 22px 16px; }
.grid-tiles { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 12px; }
.gtile { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; transition: transform .15s var(--ease); }
.gtile:active { transform: scale(.96); }
.gtile svg { width: 110px; height: 80px; overflow: visible; }
.gtile b { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.gtile span { font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------ Bereiche */
.panels { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.panels .band { z-index: 1; display: none; } .app.has-panel .panels .band { display: block; }
.panel { position: absolute; inset: 0; display: none; flex-direction: column; padding: 10px 22px 0; background: var(--paper); pointer-events: auto; z-index: 0; }
.panel > * { position: relative; z-index: 2; }
.panel.is-active { display: flex; }
.panel-head { height: 44px; flex: 0 0 44px; display: flex; align-items: center; gap: 12px; z-index: 1; }
.panel-head h1 { flex: 1; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.chip-live { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(14,165,233,.35); } .chip-live .pulse { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.chip-ok { color: var(--success); } .chip-bad { color: var(--danger); }
.panel-head .chip { background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.panel-head .chip.chip-live { background: var(--primary); color: #fff; }
.panel-head .chip.chip-ok { color: var(--success); } .panel-head .chip.chip-bad { color: var(--danger); }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }

/* ------------------------------------------------------------ Orb */
.orb-wrap { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; z-index: 1; }
.orb { position: relative; width: 240px; height: 240px; border-radius: 50%; }
.orb::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 38% 28%, #FFFFFF 0%, #F3F6FA 40%, #DEE6EF 78%, #C9D4E1 100%); box-shadow: 0 34px 50px -18px rgba(20,40,70,.35), 0 10px 24px rgba(20,40,70,.10), inset 0 -14px 26px rgba(20,40,70,.10), inset 0 10px 18px rgba(255,255,255,.95), 0 0 0 1px rgba(255,255,255,.9); transition: box-shadow .8s, background .8s; }
.orb::after { content: ''; position: absolute; left: 22%; top: 9%; width: 42%; height: 26%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); pointer-events: none; }
.app.is-idle .orb::before { animation: breathe 4.2s ease-in-out infinite; }
@keyframes breathe { 0%,100% { box-shadow: 0 30px 60px rgba(20,40,70,.16), 0 0 0 0 rgba(14,165,233,0); } 50% { box-shadow: 0 30px 60px rgba(20,40,70,.16), 0 0 0 22px rgba(14,165,233,.08); } }
.app.is-running .orb::before { box-shadow: 0 34px 50px -18px rgba(14,165,233,.5), 0 0 70px rgba(14,165,233,.3), inset 0 -14px 26px rgba(14,165,233,.14), inset 0 10px 18px rgba(255,255,255,.95), 0 0 0 1px rgba(255,255,255,.9); }
.app.is-done .orb::before { background: radial-gradient(circle at 38% 28%, #FFFFFF 0%, #EFFBF5 40%, #D6F3E4 78%, #BDE9D3 100%); box-shadow: 0 34px 50px -18px rgba(22,162,107,.5), 0 0 70px rgba(22,162,107,.25), inset 0 -14px 26px rgba(22,162,107,.14), inset 0 10px 18px rgba(255,255,255,.95), 0 0 0 1px rgba(255,255,255,.9); }
.app.is-bad .orb::before { background: radial-gradient(circle at 35% 30%, #FFFFFF, #FDF0F0 60%, #F8DCDC); box-shadow: 0 30px 60px rgba(217,72,72,.2); }
.orb-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(14,165,233,.14); stroke-width: 7; }
.ring-fill { fill: none; stroke: var(--primary); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 679; stroke-dashoffset: 679; filter: drop-shadow(0 0 8px rgba(14,165,233,.6)); opacity: 0; transition: opacity .5s; }
.app.is-running .ring-fill { opacity: 1; }
.app.is-done .ring-fill, .app.is-done .ring-track { stroke: var(--success); opacity: 1; filter: drop-shadow(0 0 8px rgba(22,162,107,.5)); }
.app.is-bad .ring-fill, .app.is-bad .ring-track { stroke: var(--danger); opacity: 1; }
.orb-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; padding: 0 28px; }
.orb-icon { width: 72px; height: 72px; color: var(--success); margin-bottom: 0; display: none; stroke-width: 2.8; }
.app.is-done .orb-icon { display: block; } .app.is-bad .orb-icon { display: block; color: var(--danger); }
.orb-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.app.is-running .orb-kicker { color: var(--primary-deep); }
.orb-title { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.app.is-running .orb-title { font-size: 48px; } .app.is-done .orb-title, .app.is-bad .orb-title { font-size: 26px; }
.app.is-done .orb-kicker, .app.is-bad .orb-kicker { display: none; }
.app.is-done .orb-sub, .app.is-bad .orb-sub { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.orb-sub { font-size: 12.5px; color: var(--muted); max-width: 180px; }
.mini-orb .orb-title { font-size: 34px; } .mini-orb .orb-sub { display: none; }
.app.is-done .mini-orb .orb-title, .app.is-done .mini-orb .orb-kicker, .app.is-bad .mini-orb .orb-title, .app.is-bad .mini-orb .orb-kicker { display: none; }
.app.is-done .mini-orb .orb-icon, .app.is-bad .mini-orb .orb-icon { width: 76px; height: 76px; stroke-width: 2.6; }
.app.is-running .mini-orb .orb-title { font-size: 40px; }
.side { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.side-l { right: calc(50% + 150px); align-items: flex-end; text-align: right; } .side-r { left: calc(50% + 150px); align-items: flex-start; }
.side-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side-label svg.lucide { width: 15px; height: 15px; color: var(--primary); }
.side b { font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.side small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.app.is-running .side { opacity: 1; }
.phases { list-style: none; margin: 0 0 18px; padding: 0; display: flex; justify-content: center; gap: 8px; flex: 0 0 auto; opacity: 0; transition: opacity .4s; z-index: 1; }
.phases li { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.75); transition: background .3s, color .3s, transform .3s var(--ease); }
.phases li.is-done { color: var(--success); }
.phases li.is-active { background: var(--primary); color: #fff; transform: scale(1.06); box-shadow: 0 8px 20px rgba(14,165,233,.3); }
.app.is-running .phases { opacity: 1; }
.app.is-done .phases, .app.is-bad .phases { display: none; }
.done-row { display: flex; justify-content: center; gap: 10px; margin: 0 0 18px; flex: 0 0 auto; z-index: 1; }

/* ------------------------------------------------------------ Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.96); } .btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(14,165,233,.32); }
.btn-soft { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn-xl { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 18px; }
.round { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--text); transition: transform .15s var(--ease); }
.round:active { transform: scale(.92); } .round svg.lucide { width: 22px; height: 22px; }
.round-sm { width: 40px; height: 40px; } .round-sm svg.lucide { width: 18px; height: 18px; }
.seg { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.seg button.is-active { background: var(--text); color: #fff; }
.seg-lg button { height: 42px; padding: 0 20px; font-size: 15px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); color: var(--muted); }
.search input { border: 0; outline: 0; background: none; font: inherit; color: var(--text); width: 90px; }
.search svg.lucide { width: 16px; height: 16px; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: #C9D3DF; position: relative; transition: background .25s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.is-on { background: var(--primary); } .switch.is-on i { transform: translateX(20px); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-deep); }

/* ------------------------------------------------------------ Chargen-Karten */
.carousel { flex: 1; display: flex; align-items: center; gap: 16px; overflow-x: auto; overflow-y: hidden; padding: 8px 0 22px; scroll-snap-type: x mandatory; scrollbar-width: none; z-index: 1; }
.carousel::-webkit-scrollbar { display: none; }
.ccard { flex: 0 0 236px; height: 270px; scroll-snap-align: center; border-radius: 26px; padding: 18px 20px; background: var(--surface); box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; gap: 4px; transition: transform .2s var(--ease); }
.ccard:active { transform: scale(.97); }
.ccard-top { display: flex; justify-content: space-between; align-items: center; }
.ccard-num { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ccard-num small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ccard .chip { background: var(--paper-2); color: var(--text); height: 28px; font-size: 12px; }
.ccard .chip.chip-ok { color: var(--success); background: var(--success-soft); } .ccard .chip.chip-warn { color: #9A6700; background: var(--warn-soft); } .ccard .chip.chip-bad { color: var(--danger); background: var(--danger-soft); }
.ccard-prog { font-size: 15px; font-weight: 700; margin-top: 8px; }
.ccard-date { font-size: 12.5px; color: var(--muted); }
.ccard-spark { width: 100%; height: 54px; margin-top: auto; }
.ccard-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ccard-foot b { color: var(--text); }
.carousel-empty { flex: 1; display: grid; place-items: center; color: var(--muted); }
/* Listenansicht (Standard) */
.carousel.is-list { flex-direction: column; align-items: stretch; gap: 8px; overflow-x: hidden; overflow-y: auto; min-height: 0; scroll-snap-type: none; padding: 6px 2px 16px; }
.carousel.is-list .ccard { flex: 0 0 auto; width: 100%; height: 58px; padding: 0 18px; border-radius: 16px; scroll-snap-align: none; display: grid; grid-template-columns: 116px minmax(0,1fr) 128px 158px 112px; grid-template-areas: "num prog date foot st"; align-items: center; column-gap: 14px; }
.carousel.is-list .ccard-top { display: contents; }
.carousel.is-list .ccard-num { grid-area: num; font-size: 24px; white-space: nowrap; }
.carousel.is-list .ccard-num small { display: inline; margin: 0 6px 0 0; font-size: 10px; }
.carousel.is-list .ccard .chip { grid-area: st; justify-self: end; }
.carousel.is-list .ccard-prog { grid-area: prog; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel.is-list .ccard-date { grid-area: date; white-space: nowrap; }
.carousel.is-list .ccard-spark { display: none; }
.carousel.is-list .ccard-foot { grid-area: foot; justify-content: flex-start; gap: 10px; white-space: nowrap; }

/* ------------------------------------------------------------ Detail */
.cd { flex: 1; display: grid; grid-template-columns: 1fr 230px; gap: 16px; min-height: 0; margin: 6px 0 18px; z-index: 1; }
#panel-detail .panel-head .btn { height: 40px; }
.cd-chart { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 16px 10px; display: flex; flex-direction: column; }
.cd-chart svg { width: 100%; flex: 1; }
.cd-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.sw-temp { background: var(--danger); } .sw-press { background: var(--primary); }
.cd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.fact { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 10px 12px; }
.fact b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.fact span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.fact.wide { grid-column: 1 / -1; }
.cd-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 18px; z-index: 1; }
.cd-actions .round { margin-left: auto; } .cd-actions .round ~ .round { margin-left: 0; }

/* ------------------------------------------------------------ Platzhalter */
.generic { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; z-index: 1; }
.generic-art { width: 320px; height: 230px; } .generic-art svg { width: 100%; height: 100%; overflow: visible; }

/* ------------------------------------------------------------ Freigabe */
.wizard { position: absolute; inset: 0; z-index: 30; background: var(--paper); }
.wiz-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: rgba(14,165,233,.12); z-index: 2; }
.wiz-bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .4s var(--ease); }
.wiz-close { position: absolute; top: 16px; right: 18px; z-index: 2; } .wiz-back { position: absolute; top: 16px; left: 18px; z-index: 2; }
.wiz-body { position: absolute; inset: 0; z-index: 1; }
.wiz-step { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 0 60px; }
.wiz-step.is-active { display: flex; }
.facts-row { display: flex; gap: 8px; }
.facts-row span { background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 8px 14px; font-size: 13.5px; }
.facts-row b { font-weight: 800; }
.choice { display: flex; gap: 16px; margin-top: 10px; }
.choice-btn { width: 230px; height: 110px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 700; transition: transform .15s var(--ease), background .2s; }
.choice-btn:active { transform: scale(.95); }
.choice-btn svg.lucide { width: 34px; height: 34px; }
.choice-btn.ok { color: var(--success); } .choice-btn.ok:active { background: var(--success-soft); }
.choice-btn.bad { color: var(--danger); } .choice-btn.bad:active { background: var(--danger-soft); }
.sign-row { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; width: 100%; max-width: 680px; margin-top: 4px; }
.sign-pad { position: relative; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.sign-pad canvas { display: block; touch-action: none; }
.sign-hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; transition: opacity .2s; }
.sign-pad::after { content: ''; position: absolute; left: 28px; right: 28px; bottom: 40px; border-top: 1.5px dashed var(--line); pointer-events: none; }
.sign-clear { position: absolute; top: 10px; right: 10px; }
.sign-meta { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.sign-meta b { font-size: 18px; font-weight: 800; }
.sign-meta .btn { margin-top: 10px; align-self: flex-start; }
.burst { width: 130px; height: 130px; } .check { width: 100%; height: 100%; }
.check-ring { fill: none; stroke: var(--success); stroke-width: 5; stroke-dasharray: 340; stroke-dashoffset: 340; }
.check-mark { fill: none; stroke: var(--success); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.wiz-final .done-row { margin: 8px 0 0; }

/* ------------------------------------------------------------ Simulation */
.sheet { position: absolute; left: 40px; right: 40px; bottom: 0; z-index: 70; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); padding: 10px 20px 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-body { display: grid; grid-template-columns: 1fr; gap: 8px; }
.sim-row { display: flex; align-items: center; gap: 12px; }
.sim-row label { width: 110px; flex: 0 0 110px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sim-row .seg button { height: 30px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }
.sim-row .seg button:disabled { opacity: .35; }
.sim-rec { margin-left: 8px; font: 600 12px ui-monospace, monospace; color: var(--muted); }
.sim-actions { display: flex; gap: 8px; margin-top: 2px; }
.sim-actions .btn { height: 40px; }

/* ------------------------------------------------------------ Toast */
.toast { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); z-index: 80; display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 16px; border-radius: 999px; background: var(--text); color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); white-space: nowrap; max-width: 420px; }
.toast svg.lucide { color: #4ADE80; }
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 60; }

/* ============================================================ Bereiche */
.panel-head h1 { font-family: 'Quicksand', 'Inter', sans-serif; font-weight: 500; font-size: 26px; letter-spacing: 0; }
.bub { position: absolute; top: 16px; left: 16px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--primary-deep);
  background: radial-gradient(circle at 34% 28%, #fff 0%, #E9F7FE 45%, #BFE6FA 100%);
  box-shadow: inset 0 -5px 10px rgba(2,132,199,.18), inset 0 2px 3px rgba(255,255,255,.9), 0 8px 16px rgba(14,165,233,.22); }
.bub .lucide { width: 24px; height: 24px; }
.bub.warn { color: #9A6700; background: radial-gradient(circle at 34% 28%, #fff 0%, #FFF6E0 45%, #FBDF9F 100%); box-shadow: inset 0 -5px 10px rgba(180,120,0,.16), inset 0 2px 3px rgba(255,255,255,.9), 0 8px 16px rgba(228,161,27,.22); }
.bub.ok { color: var(--success); background: radial-gradient(circle at 34% 28%, #fff 0%, #E6F8EF 45%, #B5E8CF 100%); box-shadow: inset 0 -5px 10px rgba(22,162,107,.16), inset 0 2px 3px rgba(255,255,255,.9), 0 8px 16px rgba(22,162,107,.2); }
.bub.bad { color: var(--danger); background: radial-gradient(circle at 34% 28%, #fff 0%, #FDEBEB 45%, #F6BDBD 100%); box-shadow: inset 0 -5px 10px rgba(217,72,72,.16), inset 0 2px 3px rgba(255,255,255,.9), 0 8px 16px rgba(217,72,72,.2); }

/* ============================================================ Ablauf-Karte */
.task { position: absolute; inset: 0; z-index: 66; display: grid; place-items: center; background: rgba(11,26,43,.34); }
.task-card { position: relative; width: 540px; max-height: 440px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 24px 28px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.task-card > .round { position: absolute; top: 14px; right: 14px; }
.task-card .bub { position: static; width: 68px; height: 68px; flex: 0 0 68px; } .task-card .bub .lucide { width: 30px; height: 30px; }
.task-card h2 { font-family: 'Quicksand', 'Inter', sans-serif; font-weight: 600; font-size: 26px; letter-spacing: 0; }
.task-card p { color: var(--muted); max-width: 420px; }
.task-actions { display: flex; gap: 12px; margin-top: 6px; }
.task-ring { position: relative; width: 136px; height: 136px; margin: 4px 0; }
.task-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.task-ring .trk { stroke: var(--paper-2); } .task-ring .bar { stroke: var(--primary); stroke-linecap: round; transition: stroke .3s; }
.task-ring.done .bar { stroke: var(--success); }
.task-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Quicksand', 'Inter', sans-serif; font-size: 32px; font-weight: 600; }
.task-ring svg.tick { position: absolute; inset: 0; transform: none; }
.task-step { height: 20px; font-weight: 600; color: var(--muted); }
.task-opts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.task-opts.one { grid-template-columns: 1fr; }
.task-opt { height: 60px; border-radius: 16px; background: var(--paper); display: flex; align-items: center; gap: 12px; padding: 0 16px; font-weight: 700; text-align: left; transition: background .2s, box-shadow .2s, transform .15s var(--ease); }
.task-opt:active { transform: scale(.97); }
.task-opt .lucide { width: 22px; height: 22px; color: var(--primary-deep); flex: 0 0 22px; }
.task-opt.warn .lucide { color: #9A6700; } .task-opt.bad .lucide { color: var(--danger); } .task-opt.ok .lucide { color: var(--success); }
.task-opt small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.task-opt.is-active { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.task-count { display: flex; align-items: center; gap: 26px; margin: 8px 0; }
.task-count b { min-width: 120px; font-family: 'Quicksand', 'Inter', sans-serif; font-size: 64px; font-weight: 400; line-height: 1; }
.task-count b small { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.task-facts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.task-facts div { background: var(--paper); border-radius: 14px; padding: 10px 14px; text-align: left; }
.task-facts b { display: block; font-size: 16px; } .task-facts span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.task-dots { display: flex; gap: 6px; height: 8px; } .task-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--paper-2); transition: width .3s, background .3s; } .task-dots i.on { width: 24px; background: var(--primary); }
.task-big { font-family: 'Quicksand', 'Inter', sans-serif; font-size: 64px; font-weight: 400; line-height: 1; }

/* ============================================================ Übersicht mit Bildern */
.gtile img { width: 130px; height: 96px; object-fit: contain; }
.gtile b { font-family: 'Quicksand', 'Inter', sans-serif; font-size: 17px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.gtile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* weiche Welle hinter den Bereichen, nicht davor */
.panels .band { z-index: 0; }
.panel { background: transparent; z-index: 1; }
.app.has-panel .panels { background: var(--paper); }
.grid-tiles, #gridTiles { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.gtile { min-width: 0; }

/* ============================================================ Bereichs-Karussell */
.app.car-panel .panels .band-soft { height: 230px; opacity: 1; }
.panel-head .chip[data-view] { margin-left: auto; }
.sub-car { position: relative; flex: 1; min-height: 0; margin: 0 -22px; overflow: hidden; }
.sc-track { position: absolute; top: 0; bottom: 0; left: 0; display: flex; will-change: transform; touch-action: pan-y; }
.sc-slide { position: relative; width: 440px; flex: 0 0 440px; display: flex; flex-direction: column; align-items: center; padding-top: 6px; cursor: pointer; will-change: transform, opacity; }
.sc-title { font-family: 'Quicksand', 'Inter', sans-serif; font-size: 38px; font-weight: 400; line-height: 1; white-space: nowrap; }
.sc-art { width: 320px; height: 236px; margin-top: 10px; display: grid; place-items: center; }
.sc-art img { width: 100%; height: 100%; object-fit: contain; }
.sc-slide .slide-info { bottom: 32px; white-space: nowrap; }
.sub-car .hero-dots { bottom: 10px; }

/* 3D-Ball: matt glaenzende Kugel mit Lichtkante und Glanzpunkt */
.orb3 { position: relative; width: 186px; height: 186px; border-radius: 50%; display: grid; place-items: center; color: var(--primary-deep);
  background: radial-gradient(circle at 36% 26%, #FFFFFF 0%, #F2FAFF 26%, #CFEBFA 66%, #9CD3F2 100%);
  box-shadow: inset 0 -18px 30px rgba(2,132,199,.26), inset 0 8px 14px rgba(255,255,255,.95), 0 28px 40px rgba(10,60,110,.26), 0 6px 12px rgba(10,60,110,.12); }
.orb3::after { content: ''; position: absolute; top: 9%; left: 20%; width: 44%; height: 24%; border-radius: 50%; transform: rotate(-18deg);
  background: radial-gradient(ellipse at center, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 72%); pointer-events: none; }
.orb3 .lucide { position: relative; z-index: 1; width: 80px; height: 80px; stroke-width: 1.6; }
.orb3.ok { color: #0E7F53; background: radial-gradient(circle at 36% 26%, #FFFFFF 0%, #F1FBF6 26%, #C9EEDB 66%, #92D9B5 100%);
  box-shadow: inset 0 -18px 30px rgba(22,162,107,.24), inset 0 8px 14px rgba(255,255,255,.95), 0 28px 40px rgba(10,60,50,.22), 0 6px 12px rgba(10,60,50,.1); }
.orb3.warn { color: #9A6700; background: radial-gradient(circle at 36% 26%, #FFFFFF 0%, #FFF9EC 26%, #FCE5B3 66%, #F5CC74 100%);
  box-shadow: inset 0 -18px 30px rgba(200,140,0,.22), inset 0 8px 14px rgba(255,255,255,.95), 0 28px 40px rgba(80,60,10,.22), 0 6px 12px rgba(80,60,10,.1); }
.orb3 .val { position: relative; z-index: 1; font-family: 'Quicksand', 'Inter', sans-serif; font-size: 58px; font-weight: 500; line-height: 1; color: var(--text); text-align: center; }
.orb3 .val small { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--muted); }
.gring { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); transform: rotate(-90deg); pointer-events: none; }
.gtrk { stroke: rgba(255,255,255,.92); }
.gbar { stroke: var(--primary); } .orb3.ok .gbar { stroke: var(--success); } .orb3.warn .gbar { stroke: var(--warn); }

/* Raster: Kacheln mit Motiv und Text mittig */
.sc-grid { position: absolute; inset: 6px 22px 22px; display: grid; grid-auto-rows: 1fr; gap: 14px; }
.sc-tile { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 10px; min-width: 0; transition: transform .15s var(--ease); }
.sc-tile:active { transform: scale(.96); }
.sc-tart { width: 124px; height: 112px; display: grid; place-items: center; margin-bottom: 6px; }
.sc-tart img { width: 100%; height: 100%; object-fit: contain; }
.sc-tart .orb3 { width: 88px; height: 88px; box-shadow: inset 0 -9px 15px rgba(2,132,199,.24), inset 0 4px 7px rgba(255,255,255,.95), 0 12px 18px rgba(10,60,110,.22); }
.sc-tart .orb3.ok { box-shadow: inset 0 -9px 15px rgba(22,162,107,.22), inset 0 4px 7px rgba(255,255,255,.95), 0 12px 18px rgba(10,60,50,.2); }
.sc-tart .orb3.warn { box-shadow: inset 0 -9px 15px rgba(200,140,0,.2), inset 0 4px 7px rgba(255,255,255,.95), 0 12px 18px rgba(80,60,10,.2); }
.sc-tart .orb3 .lucide { width: 38px; height: 38px; stroke-width: 1.8; }
.sc-tart .orb3 .val { font-size: 28px; } .sc-tart .orb3 .val small { font-size: 10px; margin-top: 0; }
.sc-tart .gring { inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); }
.sc-tile b { font-family: 'Quicksand', 'Inter', sans-serif; font-size: 17px; font-weight: 600; }
.sc-tile span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sc-tile span.ok { color: var(--success); } .sc-tile span.warn { color: #9A6700; }
/* Endlos-Karussell: Elemente frei auf dem Kreis, Nachbarn halb sichtbar */
.hero-track, .sc-track { position: absolute; inset: 0; display: block; touch-action: pan-y; }
.slide, .sc-slide { position: absolute; top: 0; bottom: 0; left: 0; width: 400px; flex: none; transform-origin: 50% 45%; }
.slide-art { width: 330px; }
/* Welle je Zustand: laeuft = tuerkisgruen, Warnung = orange (steht nach Fertig/Fehler und gewinnt) */
.app.is-running .wave-a1 { stop-color: #6BE3C8; } .app.is-running .wave-a2 { stop-color: #1FBF9A; } .app.is-running .wave-b1 { stop-color: #2CC9A4; } .app.is-running .wave-b2 { stop-color: #0E9C80; } .app.is-running .wave-c1 { stop-color: #14A88A; } .app.is-running .wave-c2 { stop-color: #08705F; }
.app.is-warn .wave-a1 { stop-color: #FFC978; } .app.is-warn .wave-a2 { stop-color: #F59E0B; } .app.is-warn .wave-b1 { stop-color: #F7AE3A; } .app.is-warn .wave-b2 { stop-color: #C97A06; } .app.is-warn .wave-c1 { stop-color: #E08D12; } .app.is-warn .wave-c2 { stop-color: #9A5A03; }
/* Warnung: Kugel, Ring und Symbol orange statt gruen/rot */
.app.is-warn .orb::before { background: radial-gradient(circle at 38% 28%, #FFFFFF 0%, #FFF8EA 40%, #FDEBC6 78%, #F9DA9E 100%); box-shadow: 0 34px 50px -18px rgba(228,161,27,.5), 0 0 70px rgba(228,161,27,.25), inset 0 -14px 26px rgba(228,161,27,.14), inset 0 10px 18px rgba(255,255,255,.95), 0 0 0 1px rgba(255,255,255,.9); }
.app.is-warn .ring-fill, .app.is-warn .ring-track { stroke: var(--warn); opacity: 1; }
.app.is-warn .orb-icon { color: #C97A06; }
/* Bilder nie groesser als ihr Feld, egal welches Seitenverhaeltnis */
.sc-art, .sc-tart { display: flex; align-items: center; justify-content: center; }
.sc-art img, .sc-tart img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; }
/* Live-Schalter in der Simulation */
.sim-live button { display: inline-flex; align-items: center; gap: 5px; }
.sim-live button .lucide { width: 14px; height: 14px; }
.sim-live button:disabled { opacity: .35; }
.sim-live button[data-live="warn"].is-active { background: var(--warn); color: #fff; }
.sim-live button[data-live="abort"]:not(:disabled), .sim-live button[data-live="error"]:not(:disabled) { color: var(--danger); }
/* Symbol in der Kugel je Ergebnis: Haken, Kreuz oder Warndreieck */
.app.is-done .orb-icon.orb-bad, .app.is-done .orb-icon.orb-warn, .app.is-bad .orb-icon.orb-ok, .app.is-bad .orb-icon.orb-warn, .app.is-warn .orb-icon.orb-ok { display: none; }
.app.is-bad .orb-icon.orb-bad { display: block; color: var(--danger); }
.app.is-warn:not(.is-running) .orb-icon.orb-warn { display: block; color: #C97A06; }
svg.lucide.orb-icon { width: 84px; height: 84px; stroke-width: 2.6; }
.mini-orb svg.lucide.orb-icon { width: 76px; height: 76px; }
/* Kleiner Kreis bei Fehler/Abbruch: Kreuz plus Wort, nicht nur das Symbol */
.app.is-bad .mini-orb .orb-title { display: block; font-size: 20px; margin-top: 2px; color: var(--danger); }
.app.is-bad .mini-orb .orb-kicker { display: block; margin-bottom: 0; }
.app.is-bad .mini-orb svg.lucide.orb-icon { width: 56px; height: 56px; }
/* Simulation als Schublade von links */
.sheet { left: 0; right: auto; top: 0; bottom: 0; width: 460px; border-radius: 0 24px 24px 0; padding: 14px 20px 14px 22px; display: flex; flex-direction: column; }
.sheet .sheet-body { gap: 10px; flex: 1; min-height: 0; overflow-y: auto; }
.sheet .sim-row { flex-direction: column; align-items: flex-start; gap: 4px; }
.sheet .sim-row label { width: auto; flex: none; }
.sheet .sim-row .seg { flex-wrap: wrap; border-radius: 18px; }
.sheet .sim-actions { margin-top: auto; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 10px 24px rgba(217,72,72,.32); }
.slide-info.bad { background: var(--danger); color: #fff; } .slide-info.bad svg.lucide { color: #fff; }
/* Phasen als Zeitstrahl: Punkte auf einer Linie, Namen darunter, nichts wirkt klickbar */
.phases { gap: 0; width: 560px; margin: 0 auto 16px; justify-content: space-between; position: relative; pointer-events: none; }
.phases li { position: relative; flex: 1; padding: 26px 0 0; background: none !important; box-shadow: none !important; transform: none !important; border-radius: 0; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
/* Verbindungslinie zum naechsten Punkt: grau, mit gruener/blauer Fuellung nach Fortschritt */
.phases li:not(:last-child)::after { content: ''; position: absolute; top: 9px; left: 50%; width: 100%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--success) 0, var(--success) calc(var(--p, 0) * 100%), rgba(22,32,43,.12) calc(var(--p, 0) * 100%)); }
.phases li.is-active:not(:last-child)::after { background: linear-gradient(90deg, var(--primary) 0, var(--primary) calc(var(--p, 0) * 100%), rgba(22,32,43,.12) calc(var(--p, 0) * 100%)); }
/* Punkt */
.phases li::before { content: ''; position: absolute; top: 3px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; z-index: 1;
  background: #fff; box-shadow: inset 0 0 0 3px rgba(22,32,43,.18); }
.phases li.is-done { color: var(--success); }
.phases li.is-done::before { background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: none; }
.phases li.is-active { color: var(--primary-deep); font-weight: 800; }
.phases li.is-active::before { top: -1px; width: 24px; height: 24px; margin-left: -12px; background: var(--primary); box-shadow: 0 0 0 5px rgba(14,165,233,.22); animation: phasePulse 1.6s ease-in-out infinite; }
@keyframes phasePulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(14,165,233,.28); } 50% { box-shadow: 0 0 0 10px rgba(14,165,233,.08); } }
/* Protokoll-Detail: wenig auf einen Blick, Rest aufklappbar */
.fact-main b { font-size: 21px; } .fact-main span { text-transform: none; letter-spacing: 0; font-size: 13px; }
.fact-hint { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.fact-hint b { font-size: 14px; font-weight: 700; letter-spacing: 0; line-height: 1.25; }
.fact-hint .lucide { width: 22px; height: 22px; flex: 0 0 22px; }
.fact-hint.bad { background: var(--danger-soft); color: #A32F2F; box-shadow: none; } .fact-hint.bad .lucide { color: var(--danger); }
.fact-hint.warn { background: var(--warn-soft); color: #8A5A00; box-shadow: none; } .fact-hint.warn .lucide { color: var(--warn); }
.fact-more { grid-column: 1 / -1; height: 46px; }
.task-card .task-photo { height: 104px; max-width: 180px; object-fit: contain; margin: -6px 0 -4px; }
/* Dialog: Werte scrollen bei Bedarf, Kopf bleibt stehen */
.task-card { max-height: calc(100% - 28px); overflow: hidden; padding-bottom: 24px; }
.task-card .task-facts { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.task-card .task-facts div { padding: 9px 14px; }

/* ============================================================ Dunkelblauer Grund wie auf dem Geraetedisplay
   Alles oberhalb der Welle ist Nachtblau, darauf weisse Schrift und hellblaue Akzente.
   Weisse Karten, Kugeln und Pills bleiben weiss. */
:root { --stage: linear-gradient(180deg, #08203B 0%, #0D3058 52%, #12447A 100%); --on-stage: #FFFFFF; --on-stage-muted: rgba(214,232,248,.74); --on-stage-accent: #5CCBFA; }
.app, .grid-view, .app.has-panel .panels, .wizard { background: var(--stage); }
.app { color: var(--text); }

.top .chip { color: var(--on-stage-muted); } .top .chip svg.lucide { color: var(--on-stage-muted); }
.top .chip.is-on { background: #fff; color: #0D3058; } .top .chip.is-on svg.lucide { color: #0D3058; }
.chip-badge::after { border-color: #0D3058; }
.slide-title, .sc-title, .panel-head h1 { color: var(--on-stage); }
/* Messwerte neben der Kugel */
.side-label { color: var(--on-stage-accent); } .side-label svg.lucide { color: var(--on-stage-accent); }
.side b { color: var(--on-stage); } .side small { color: var(--on-stage-muted); }
/* Zeitstrahl */
.phases li { color: var(--on-stage-muted); }
.phases li::before { background: #0D3058; box-shadow: inset 0 0 0 3px rgba(214,232,248,.4); }
.phases li:not(:last-child)::after { background: linear-gradient(90deg, #3DDC97 0, #3DDC97 calc(var(--p, 0) * 100%), rgba(214,232,248,.22) calc(var(--p, 0) * 100%)); }
.phases li.is-active:not(:last-child)::after { background: linear-gradient(90deg, var(--on-stage-accent) 0, var(--on-stage-accent) calc(var(--p, 0) * 100%), rgba(214,232,248,.22) calc(var(--p, 0) * 100%)); }
.phases li.is-done { color: #3DDC97; } .phases li.is-done::before { background-color: #2CC48A; }
.phases li.is-active { color: var(--on-stage); } .phases li.is-active::before { background: var(--on-stage-accent); }
/* Freigabe-Ablauf */
.wizard .kicker { color: var(--on-stage-accent); }
.wizard h2, .wizard .sign-meta b, #usableUntil { color: var(--on-stage); }
.wizard .muted, .wizard p { color: var(--on-stage-muted); }
.carousel-empty { color: var(--on-stage-muted); }

/* Eigene Fotos (vom USB-Stick) */
.sc-art img.user-photo, .sc-tart img.user-photo { border-radius: 22px; box-shadow: var(--shadow); object-fit: cover; }
.task-card .task-photo.user-photo { border-radius: 16px; object-fit: cover; max-width: 200px; box-shadow: var(--shadow); }

/* Bilder in den Bereichs-Karussells 20 % kleiner, gleichauf mit dem Startscreen */
.sc-art img:not(.user-photo) { max-width: 80%; max-height: 80%; }
/* Kacheln in der Uebersicht: blau auf dem dunkelblauen Grund statt weiss */
.gtile, .sc-tile { background: linear-gradient(180deg, rgba(120,214,252,.40) 0%, rgba(40,170,232,.30) 100%); box-shadow: inset 0 0 0 1px rgba(214,232,248,.24), 0 10px 24px rgba(4,16,34,.28); }
.gtile b, .sc-tile b { color: var(--on-stage); }
.gtile span, .sc-tile span { color: var(--on-stage-muted); }
.sc-tile span.ok { color: #3DDC97; } .sc-tile span.warn { color: #FFC978; }
.gtile:active, .sc-tile:active { background: rgba(120,214,252,.48); }
/* Wellen immer sichtbar, in Uebersicht und Bereichen gedaempft im Hintergrund */
.app.grid-open .grid-view { background: transparent; }
.app.grid-open .hero-track, .app.grid-open .hero-dots { visibility: hidden; }
.app.grid-open #bandHero { opacity: .55; transition: opacity .3s; }
.band-soft { height: 200px; opacity: .55; }
.app.car-panel .panels .band-soft { height: 230px; opacity: 1; }
/* Karten auf dem dunkelblauen Grund: halbtransparent blaeulich statt weiss */
:root { --glass: linear-gradient(180deg, rgba(92,203,250,.18) 0%, rgba(14,165,233,.10) 100%); --glass-edge: inset 0 0 0 1px rgba(214,232,248,.16), 0 10px 24px rgba(4,16,34,.28); }
.ccard, .cd-chart, .fact, .facts-row span, .choice-btn { background: var(--glass); box-shadow: var(--glass-edge); color: var(--on-stage); }
.ccard-num, .ccard-prog, .ccard-foot b, .fact b, .facts-row b { color: var(--on-stage); }
.ccard-num small, .ccard-date, .ccard-foot, .fact span, .cd-legend, .facts-row span { color: var(--on-stage-muted); }
.ccard .chip { background: rgba(255,255,255,.14); color: var(--on-stage); }
.ccard .chip.chip-ok { background: rgba(61,220,151,.18); color: #5BE3A8; }
.ccard .chip.chip-warn { background: rgba(255,201,120,.18); color: #FFC978; }
.ccard .chip.chip-bad { background: rgba(255,123,123,.18); color: #FF9A9A; }
.sw-temp { background: #FF7B7B; } .sw-press { background: #5CCBFA; }
.choice-btn.ok { color: #5BE3A8; } .choice-btn.bad { color: #FF9A9A; }
.choice-btn.ok:active { background: rgba(61,220,151,.22); } .choice-btn.bad:active { background: rgba(255,123,123,.22); }
.ccard:active, .fact-more:active { filter: brightness(1.1); }
/* Hinweis-Karte im Detail behaelt ihre Farbe, nur dunkel passend */
.fact-hint.bad { background: rgba(255,123,123,.18); color: #FFB3B3; } .fact-hint.bad .lucide { color: #FF8A8A; }
.fact-hint.warn { background: rgba(255,201,120,.18); color: #FFD9A0; } .fact-hint.warn .lucide { color: #FFC978; }
/* Dialoge: nie abgeschnitten. Kompakter, und die Optionsliste scrollt, falls es doch zu viel wird */
.task-card { gap: 8px; padding-top: 20px; }
.task-card .task-photo { height: 84px; margin: -4px 0 -2px; }
.task-card .bub { width: 60px; height: 60px; flex: 0 0 60px; } .task-card .bub .lucide { width: 26px; height: 26px; }
.task-card h2 { font-size: 24px; line-height: 1.15; }
.task-opts { gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px; -webkit-overflow-scrolling: touch; }
.task-opt { height: 52px; flex: 0 0 auto; }
.task-card > * { flex-shrink: 0; } .task-card > .task-opts, .task-card > .task-facts { flex-shrink: 1; }
/* Verlaufskurve: feine Hilfslinien, passende Legendenfarben */
.cd-chart svg { overflow: visible; }
.cd-chart .cg { stroke: rgba(214,232,248,.12); stroke-width: 1; stroke-dasharray: 3 6; }
.sw-temp { background: #FFB86B; box-shadow: 0 0 8px rgba(255,184,107,.7); } .sw-press { background: #5CCBFA; box-shadow: 0 0 8px rgba(92,203,250,.7); }
/* Kurve: Achsen- und Plateauwerte */
.cd-chart .cl { font: 600 10.5px 'Inter', sans-serif; fill: rgba(214,232,248,.62); }
.cd-chart .cl-t { fill: rgba(255,184,107,.85); } .cd-chart .cl-p { fill: rgba(92,203,250,.85); }
.cd-chart .cv { font: 800 15px 'Inter', sans-serif; paint-order: stroke; stroke: rgba(8,32,59,.65); stroke-width: 4px; }
.cd-chart .cv-t { fill: #FFC98A; } .cd-chart .cv-p { fill: #8FDCFF; }
/* Etikett-Vorschau im Druckdialog */
.label-prev { width: 300px; background: #fff; color: #16202B; border-radius: 10px; padding: 12px 16px 10px; box-shadow: inset 0 0 0 1px rgba(22,32,43,.14), 0 8px 18px rgba(20,40,70,.12); text-align: left; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.lp-head { display: flex; justify-content: space-between; align-items: baseline; } .lp-head b { font-size: 11px; letter-spacing: .14em; } .lp-head b span { color: var(--primary); } .lp-head small { color: var(--muted); }
.lp-big { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.lp-row { display: flex; justify-content: space-between; gap: 12px; color: #3C4A5A; } .lp-row b { color: #16202B; }
.lp-code { height: 30px; margin-top: 6px; border-radius: 2px; background: repeating-linear-gradient(90deg, #16202B 0 2px, transparent 2px 4px, #16202B 4px 5px, transparent 5px 8px, #16202B 8px 11px, transparent 11px 12px); }
/* Verlauf als Text: scrollbare Messwert-Tabelle */
.task-card .raw { width: 100%; flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--paper); border-radius: 14px; padding: 4px 14px; -webkit-overflow-scrolling: touch; }
.raw table { width: 100%; border-collapse: collapse; font: 500 13px ui-monospace, 'Cascadia Mono', Consolas, monospace; font-variant-numeric: tabular-nums; }
.raw th { position: sticky; top: 0; background: var(--paper); text-align: right; font: 700 11px 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 0 6px; }
.raw th:first-child, .raw td:first-child { text-align: left; }
.raw td { text-align: right; padding: 4px 0; border-top: 1px solid rgba(22,32,43,.06); color: var(--text); }
.task-card > .raw { flex-shrink: 1; }
/* echte Messpunkte in der Kurve */
.cd-chart .cd-dot { stroke: #0D3058; stroke-width: 1.5; }
.cd-chart .cd-dot-t { fill: #FFC98A; filter: drop-shadow(0 0 4px rgba(255,184,107,.9)); }
.cd-chart .cd-dot-p { fill: #8FDCFF; filter: drop-shadow(0 0 4px rgba(92,203,250,.9)); }
/* Verlauf als Text: Phasenspalte */
.raw td.ph, .raw th.ph { text-align: left; padding-left: 14px; font-family: 'Inter', sans-serif; color: var(--muted); }
/* Kopfleiste: groessere Tippflaechen */
.top .chip { height: 42px; padding: 0 14px; gap: 9px; font-size: 15px; }
.top .chip svg.lucide { width: 22px; height: 22px; }
.top .chip-icon { padding: 0 11px; }
.top .chip-badge::after { top: 8px; right: 8px; width: 9px; height: 9px; }
.top-right { gap: 6px; }

/* Protokolle: aeltere nachladen */
.ccard-more { align-items: center; justify-content: center; text-align: center; gap: 6px; color: var(--on-stage-accent); }
.ccard-more .lucide { width: 26px; height: 26px; } .ccard-more b { color: var(--on-stage); } .ccard-more span { font-size: 12.5px; color: var(--on-stage-muted); }
.carousel.is-list .ccard-more { display: flex; flex-direction: row; justify-content: center; }
.carousel:not(.is-list) .ccard-more { display: flex; flex-direction: column; }
/* Detail ohne Verlauf: Werte ueber die ganze Breite */
.cd-chart .cd-none { font: 800 20px 'Inter', sans-serif; fill: rgba(214,232,248,.85); }
.cd-chart .cd-none-sub { font: 600 14px 'Inter', sans-serif; fill: rgba(214,232,248,.62); }
.cd.no-chart { grid-template-columns: 1fr; }
.cd.no-chart .cd-chart { display: none; }
.cd.no-chart .cd-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 12px; }
.cd.no-chart .fact { padding: 16px 18px; } .cd.no-chart .fact b { font-size: 22px; }
.cd.no-chart .fact-wide2 { grid-column: span 2; }
.cd.no-chart .fact-hint { grid-column: 1 / -1; }
/* Kurve ruhiger: weniger Glow an Punkten und Werten */
.cd-chart .cd-dot { stroke-width: 1.2; }
.cd-chart .cd-dot-t { filter: none; } .cd-chart .cd-dot-p { filter: none; }
.cd-chart .cv { font-size: 14px; stroke: rgba(8,32,59,.45); stroke-width: 3px; }
.sw-temp, .sw-press { box-shadow: none; }
/* Rohprotokoll: Originaltext vom Geraet */
.task-card .raw-pre { margin: 0; white-space: pre; text-align: left; font: 500 12.5px/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--text); padding: 12px 16px; overflow: auto; }
.raw-seg { align-self: center; }

/* Ein/Aus-Schalter in Einstellungen und Daten */
.switch-sm { flex: none; width: 40px; height: 24px; pointer-events: none; }
.switch-sm i { top: 3px; left: 3px; width: 18px; height: 18px; }
.switch-sm.is-on i { transform: translateX(16px); }
.slide-info.has-switch { padding-right: 8px; gap: 10px; }
.slide-info.ok .switch-sm.is-on, .sc-tile .ok .switch-sm.is-on { background: var(--success); }
.sc-tile:has(.switch-sm) { position: relative; }
.sc-tile span.has-switch .switch-sm { position: absolute; top: 14px; right: 14px; }

/* Name der Musterbeladung */
.task-input { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); padding: 0 16px; font: 600 18px Inter, sans-serif; color: var(--text); outline: none; user-select: text; }
.task-input:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.task-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.task-chip { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); font-size: 13px; font-weight: 700; }
.task-chip:active { transform: scale(.96); }

/* ============================================================ Tastgefühl
   Sofortiges Feedback schon beim Berühren (pointerdown, siehe Skript in
   index.html): Jeder Knopf bekennt den Druck mit einem blauen Aufleuchten,
   noch bevor der – auf der langsamen Panel-Hardware träge – Screenwechsel
   kommt. Der Inset-Schatten legt sich über JEDEN Untergrund (Füllung,
   Verlauf, Bild), ohne die eigene Hintergrundfarbe zu überschreiben, und
   erscheint ohne Übergang sofort. Farbe statt Bewegung: greift auch bei
   prefers-reduced-motion und kollidiert nicht mit den :active-Transforms. */
.pressing {
  box-shadow: inset 0 0 0 2.5px var(--primary), inset 0 0 0 999px rgba(14,165,233,.22) !important;
  transition: none !important;
}

/* ============================================================ Kopfleiste neu
   Wenige, große Ziele statt vieler kleiner Chips. Der Panel-Touchscreen sitzt
   in einer Mulde mit dickem Rahmen – die Ränder sind schwer zu treffen. Daher:
   höhere Leiste, vom Rand eingerückt, 56-px-Knöpfe. WLAN und Uhr sind NUR
   Anzeige (kein Knopf, pointer-events: none); Netzwerk, Datum/Zeit und die
   Galerie-Ansicht stehen im Zahnrad. Hintergrund ist immer die blaue Bühne
   (auch hinter Panels), darum helle Knöpfe. */
.top { height: 66px; padding: 0 26px; }
.top-right { gap: 10px; }

/* Nur-Anzeige: WLAN-Symbol und Uhr */
.top-stat { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 4px; color: var(--on-stage-muted); font-weight: 700; font-size: 18px; pointer-events: none; -webkit-user-select: none; user-select: none; }
.top-stat svg.lucide { width: 26px; height: 26px; color: var(--on-stage-muted); }
.top-stat.clock { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Große Knöpfe: Glocke, Gerät/Datenmonitor, Zahnrad */
.top-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; color: var(--on-stage); background: rgba(255,255,255,.16); transition: transform .12s var(--ease), background .2s; }
.top-btn svg.lucide { width: 28px; height: 28px; }
.top-btn:active { transform: scale(.92); background: rgba(255,255,255,.26); }
.top-btn.is-off { background: rgba(255,123,123,.22); color: #FFC9C9; }     /* Autoklav nicht verbunden (nur Live) */
/* Aufgaben-Punkt an der Glocke – größer passend zum 56-px-Knopf */
.top-btn.chip-badge::after { top: 10px; right: 10px; width: 10px; height: 10px; }

/* ============================================================ Hintergrund-Wellen (statisch)
   Ruhige, unbewegte SVG-Wellen für Tiefe. Liegen hinter dem Inhalt (Geräte, Panels). */
.waves-bg { position: absolute; inset: 0; width: 800px; height: 480px; z-index: 0; pointer-events: none; }

/* ============================================================ Header aufgeräumt
   Zwei klare Gruppen statt einer bunten Reihe: links die Status-Kapsel (WLAN + Uhr, nur
   Anzeige), rechts davon die wenigen großen Aktions-Knöpfe (Glocke, Zahnrad). */
.top-right { gap: 12px; }
/* gleiche Höhe, Ecken und Fläche wie die Knöpfe daneben (.top-btn), damit die Kopfzeile aus einem Guss wirkt */
.top-status { display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 18px; border-radius: 18px; background: rgba(255,255,255,.16); }
.top-status .top-stat { height: auto; padding: 0; }
.top-sep { width: 1px; height: 24px; background: rgba(255,255,255,.26); border-radius: 1px; }

/* Glas für die Kopfzeile (Vorgabe Auftraggeber 29.10.2026): nicht nur durchsichtig, sondern wie eine Scheibe –
   heller Verlauf, deutlicherer heller Rand mit Lichtkante oben, feiner Schatten.
   KEIN backdrop-filter: Der Weichzeichner machte das Panel 5-6-mal langsamer (Befund 29.10.2026, 0.1.44),
   weil er bei jeder Bewegung darunter neu gerechnet wird. */
.top-btn, .top-status, .top .admin-out {
  background: linear-gradient(160deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.12) 55%, rgba(255,255,255,.20) 100%);
  border: 1px solid rgba(255,255,255,.50);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.60), inset 0 -1px 0 rgba(255,255,255,.12), 0 6px 18px rgba(8,32,59,.14);
  box-sizing: border-box;
}
.top-btn:active, .top .admin-out:active { background: linear-gradient(160deg, rgba(255,255,255,.46) 0%, rgba(255,255,255,.24) 100%); }
.top-btn.is-off { background: linear-gradient(160deg, rgba(255,150,150,.38) 0%, rgba(255,123,123,.20) 100%); border-color: rgba(255,190,190,.6); }
