/* =====================================================================
   Gewässermonitoring – J.A.R.V.I.S. HUD Theme
   ===================================================================== */
:root {
  --bg: #02070d;
  --bg2: #041120;
  --panel: rgba(5, 22, 38, .74);
  --panel-solid: #061a2c;
  --line: rgba(0, 229, 255, .22);
  --line-strong: rgba(0, 229, 255, .55);
  --cyan: #00e5ff;
  --cyan-soft: #63e9ff;
  --glow: 0 0 6px rgba(0, 229, 255, .7), 0 0 18px rgba(0, 229, 255, .35);
  --text: #d4f4ff;
  --muted: #6f9fb3;
  --dim: #3d6577;
  --amber: #ffb300;
  --up: #3dffb0;
  --down: #ff4f7b;
  --flat: #7fb8cc;
  --accent: var(--cyan);
  --radius: 4px;
  --f-hud: "Orbitron", "Segoe UI", sans-serif;
  --f-text: "Rajdhani", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(ellipse at 20% -10%, rgba(0, 120, 180, .25), transparent 55%),
    radial-gradient(ellipse at 100% 110%, rgba(80, 40, 200, .15), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { /* hex grid */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .18;
  background-image:
    linear-gradient(rgba(0,229,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
}
#fx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
#scanline {
  position: fixed; left: 0; right: 0; top: -20vh; height: 20vh; z-index: 50; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 229, 255, .045), transparent);
  animation: scan 9s linear infinite;
}
body.no-scan #scanline { display: none; }
@keyframes scan { to { transform: translateY(140vh); } }

a { color: var(--cyan); }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }

/* --------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: linear-gradient(to bottom, rgba(2, 10, 18, .96), rgba(2, 10, 18, .82));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 6s ease-in-out infinite;
}
@keyframes sweep { 0%,100% { opacity: .2; transform: scaleX(.3); } 50% { opacity: 1; transform: scaleX(1); } }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-text b { display: block; font-family: var(--f-hud); font-size: 17px; letter-spacing: 3px; color: #fff; text-shadow: var(--glow); }
.brand-text small { display: block; font-family: var(--f-hud); font-size: 9px; letter-spacing: 3px; color: var(--muted); }

.reactor { width: 44px; height: 44px; }
.reactor circle { fill: none; stroke: var(--cyan); transform-origin: center; }
.reactor .r1 { stroke-width: 3; stroke-dasharray: 14 6; animation: spin 14s linear infinite; opacity: .8; }
.reactor .r2 { stroke-width: 1.5; stroke-dasharray: 3 5; animation: spin 7s linear infinite reverse; opacity: .7; }
.reactor .r3 { stroke-width: 4; stroke-dasharray: 40 20; animation: spin 4s linear infinite; opacity: .5; }
.reactor .core { fill: #bff8ff; stroke: none; filter: drop-shadow(0 0 6px var(--cyan)) drop-shadow(0 0 14px var(--cyan)); animation: corePulse 2.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes corePulse { 50% { opacity: .65; } }

.nav-main { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.nav-main a, .nav-sub a, .nav-sub button {
  position: relative; padding: 8px 16px; text-decoration: none; color: var(--muted);
  font-family: var(--f-hud); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  border: 1px solid transparent; background: none; cursor: pointer; transition: .25s;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.nav-main a:hover, .nav-sub a:hover, .nav-sub button:hover { color: var(--text); background: rgba(0, 229, 255, .08); }
.nav-main a.active, .nav-sub a.active {
  color: #001018; background: linear-gradient(90deg, var(--cyan), #6ff3ff); box-shadow: var(--glow); font-weight: 700;
}
.nav-main a .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px currentColor; }
.nav-sub { display: flex; gap: 4px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: rgba(2, 10, 18, .6); flex-wrap: wrap; align-items: center; }
.nav-sub:empty { display: none; }
.nav-sub .spacer { flex: 1; }
.nav-sub .btn-full { color: var(--amber); border: 1px solid rgba(255, 179, 0, .4); }

.sys { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.clock { font-family: var(--f-hud); font-size: 20px; letter-spacing: 2px; color: #fff; text-shadow: var(--glow); font-variant-numeric: tabular-nums; }
.link { display: flex; align-items: center; gap: 8px; font-family: var(--f-hud); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.link i { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.link.on i { background: var(--up); box-shadow: 0 0 10px var(--up); animation: beat 1.4s infinite; }
.link.on { color: var(--up); }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.5); } 30% { transform: scale(1); } 45% { transform: scale(1.3); } }

/* --------------------------------------------------------------- layout */
.view { padding: 18px 20px 40px; max-width: 1920px; margin: 0 auto; }
.grid { display: grid; gap: 16px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.two { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
.mt { margin-top: 16px; }

.statusbar {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 14px;
  font-family: var(--f-hud); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase;
}
.statusbar b { color: var(--text); font-weight: 500; }
.statusbar .err { color: var(--down); }
.statusbar .title { font-size: 22px; letter-spacing: 5px; color: #fff; text-shadow: var(--glow); margin-right: 10px; }
/* Herzschlag: Farbe und Tempo je Zustand (Form und Abläufe siehe GM.fx.ecg) */
.ecg { --hb: var(--up); --hb-t: 3.4s; width: 120px; height: 22px; overflow: visible; }
.ecg-late { --hb: #ff9d2e; --hb-t: 3.2s; }
.ecg-partial { --hb: #e9640c; --hb-t: 3.4s; }
.ecg-dead { --hb: var(--down); }
.ecg path { fill: none; stroke: var(--hb); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--hb)); transition: stroke .6s; }
.ecg-dot { fill: var(--hb); filter: drop-shadow(0 0 2px var(--hb)) drop-shadow(0 0 5px var(--hb)); transition: fill .6s; }
.ecg-win, .ecg-dot { animation-duration: var(--hb-t); animation-timing-function: linear; animation-iteration-count: infinite; }
html.mailshot .ecg-g { mask: none; }
html.mailshot .ecg-dot { display: none; }
@media (prefers-reduced-motion: reduce) { .ecg-g { mask: none; } .ecg-dot { display: none; } }

/* --------------------------------------------------------------- HUD panel */
.hud {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px 16px;
  box-shadow: inset 0 0 40px rgba(0, 229, 255, .04), 0 10px 30px rgba(0, 0, 0, .35);
  animation: panelIn .7s cubic-bezier(.2, .8, .2, 1) both;
  overflow: hidden;
}
.hud::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  --c: var(--cyan);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px var(--c));
}
.hud::after { /* shimmer */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(0, 229, 255, .06), transparent);
  animation: shimmer 7s ease-in-out infinite; animation-delay: var(--d, 0s);
}
@keyframes shimmer { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.hud > header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-family: var(--f-hud); font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--cyan-soft);
}
.hud > header svg.ic { width: 20px; height: 20px; stroke: var(--cyan); fill: none; stroke-width: 1.6; filter: drop-shadow(0 0 4px var(--cyan)); flex-shrink: 0; }
.hud > header .sub { margin-left: auto; font-size: 9px; color: var(--muted); letter-spacing: 1.5px; }
.hud > header select, .hud > header .seg { margin-left: auto; }
.hud h2 { font-family: var(--f-hud); font-size: 14px; letter-spacing: 3px; margin: 0 0 10px; color: #fff; text-transform: uppercase; }

/* --------------------------------------------------------------- tiles */
.tile { min-height: 230px; display: flex; flex-direction: column; }
.tile .main { display: flex; align-items: center; gap: 14px; margin: 2px 0 10px; }
.tile .big { font-family: var(--f-hud); font-size: 46px; font-weight: 700; color: #fff; text-shadow: var(--glow); line-height: 1; white-space: nowrap; }
.tile .big .unit { font-size: 18px; font-weight: 400; color: var(--cyan-soft); margin-left: 4px; }
.tile .big2 { font-family: var(--f-hud); font-size: 26px; font-weight: 500; color: #fff; line-height: 1; white-space: nowrap; }
.tile .big2 .unit { font-size: 13px; color: var(--cyan-soft); }
.tile .trend { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-family: var(--f-hud); font-size: 12px; }
.tile .trend small { font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.tile .gauge { margin-left: auto; width: 86px; height: 86px; flex-shrink: 0; }
.rows { display: grid; gap: 5px; font-size: 15px; margin-top: auto; }
.row { display: grid; grid-template-columns: 74px 1fr; align-items: baseline; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(0, 229, 255, .08); }
.row > label { font-family: var(--f-hud); font-size: 9.5px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.row .val { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tm { color: var(--muted); font-size: .85em; margin-left: 3px; }
.trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin-top: 6px; }
.tr-box { border: 1px solid rgba(0, 229, 255, .14); padding: 5px 7px; background: rgba(0, 229, 255, .03); }
.tr-box label { display: block; font-family: var(--f-hud); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
.tr-box div { font-family: var(--f-hud); font-size: 13px; white-space: nowrap; }
.tr-box small { color: var(--muted); font-size: 9px; font-family: var(--f-text); }
.sumtag { color: var(--cyan-soft); font-size: .9em; }

.arrow { display: inline-block; font-size: 1.05em; margin-right: 3px; }
.up { color: var(--up); text-shadow: 0 0 8px rgba(61, 255, 176, .6); }
.down { color: var(--down); text-shadow: 0 0 8px rgba(255, 79, 123, .6); }
.flat { color: var(--flat); }
.up .arrow { animation: bobUp 1.8s ease-in-out infinite; }
.down .arrow { animation: bobDown 1.8s ease-in-out infinite; }
@keyframes bobUp { 50% { transform: translateY(-3px); } }
@keyframes bobDown { 50% { transform: translateY(3px); } }

/* rolling digits */
.roll { display: inline-flex; align-items: flex-end; line-height: 1; font-variant-numeric: tabular-nums; }
.roll .dg { display: inline-block; height: 1em; overflow: hidden; position: relative; }
.roll .strip { display: flex; flex-direction: column; transition: transform 1.2s cubic-bezier(.18, .89, .32, 1.18); }
.roll.first .strip { transition-duration: 2s; }
.roll .strip > span { height: 1em; line-height: 1em; text-align: center; }
.roll .ch { display: inline-block; height: 1em; line-height: 1em; }
body.no-roll .roll .strip { transition: none; }

.pulse-up { animation: pulseUp 1.8s ease-out; }
.pulse-down { animation: pulseDown 1.8s ease-out; }
@keyframes pulseUp {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 176, .0); }
  12% { box-shadow: 0 0 0 2px rgba(61, 255, 176, .8), 0 0 40px rgba(61, 255, 176, .45); transform: scale(1.012); }
  24% { transform: scale(1); }
  36% { box-shadow: 0 0 0 1px rgba(61, 255, 176, .6), 0 0 26px rgba(61, 255, 176, .3); transform: scale(1.008); }
  100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
}
@keyframes pulseDown {
  0% { box-shadow: 0 0 0 0 rgba(255, 79, 123, 0); }
  12% { box-shadow: 0 0 0 2px rgba(255, 79, 123, .8), 0 0 40px rgba(255, 79, 123, .45); transform: scale(1.012); }
  24% { transform: scale(1); }
  36% { box-shadow: 0 0 0 1px rgba(255, 79, 123, .6), 0 0 26px rgba(255, 79, 123, .3); transform: scale(1.008); }
  100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
}
.flash-up { animation: flashUp 1.6s ease-out; }
.flash-down { animation: flashDown 1.6s ease-out; }
@keyframes flashUp { 15% { color: var(--up); text-shadow: 0 0 18px var(--up); } }
@keyframes flashDown { 15% { color: var(--down); text-shadow: 0 0 18px var(--down); } }

/* gauges */
.ring-bg { fill: none; stroke: rgba(0, 229, 255, .12); stroke-width: 7; }
.ring-val { fill: none; stroke: var(--cyan); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 5px var(--cyan)); }
/* Kreis lädt sich beim Aufbau von leer auf den Wert auf */
.ring-val { animation: ringFill 1.8s cubic-bezier(.3, .7, .2, 1) backwards; }
@keyframes ringFill { from { stroke-dashoffset: 213.63px; } }
.ring-tick { fill: none; stroke: var(--cyan); stroke-width: 1; stroke-dasharray: 1 5; opacity: .5; transform-origin: center; animation: spin 30s linear infinite; }
.wave-box { position: relative; width: 70px; height: 86px; margin-left: auto; border: 1px solid var(--line-strong); overflow: hidden; background: rgba(0, 229, 255, .03); }
.wave-box .fill { position: absolute; left: 0; right: 0; bottom: 0; transition: height 1.4s cubic-bezier(.2, .8, .2, 1); background: linear-gradient(to top, rgba(0, 229, 255, .45), rgba(0, 229, 255, .12)); }
.wave-box svg { position: absolute; left: 0; top: -8px; width: 200%; height: 12px; animation: wave 3s linear infinite; }
.wave-box svg path { fill: rgba(0, 229, 255, .5); }
@keyframes wave { to { transform: translateX(-50%); } }
.wave-box .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0 9px, rgba(0, 229, 255, .3) 9px 10px); width: 8px; }

.moon { width: 64px; height: 64px; margin-left: auto; filter: drop-shadow(0 0 10px rgba(200, 240, 255, .4)); }
.astro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.astro-grid .cell { border: 1px solid rgba(0, 229, 255, .12); padding: 6px 8px; }
.astro-grid label { display: block; font-family: var(--f-hud); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.astro-grid div > span { font-family: var(--f-hud); font-size: 14px; color: #fff; }

/* weather icons */
.wi { width: 44px; height: 44px; overflow: visible; }
.wi .sun-c { fill: #ffb300; filter: drop-shadow(0 0 7px #ff8f00); }
.wi .sun-r { stroke: #ffa726; stroke-width: 2.2; stroke-linecap: round; transform-origin: 32px 32px; animation: spin 18s linear infinite; }
.wi .moon-c { fill: #ffe082; filter: drop-shadow(0 0 6px #ffc107); }
.wi .cl { fill: #8cc4f0; stroke: #dff1ff; stroke-width: 1; }
.wi .cl2 { fill: #4f79b0; }
.wi .cloud-g { animation: drift 6s ease-in-out infinite; }
.wi .drop { stroke: #1e9bff; stroke-width: 2.2; stroke-linecap: round; animation: rain 1s linear infinite; }
.wi .flake { fill: #a6ecff; animation: snow 2.4s linear infinite; }
.wi .bolt { fill: #ffd600; filter: drop-shadow(0 0 7px #ff9100); animation: bolt 2.6s infinite; }
.wi .fog { stroke: #b3bdf0; stroke-width: 3; stroke-linecap: round; animation: drift 4s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateX(3px); } }
@keyframes rain { from { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(8px); opacity: 0; } }
@keyframes snow { from { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(9px); opacity: 0; } }
@keyframes bolt { 0%, 88%, 100% { opacity: 1; } 90% { opacity: .1; } 93% { opacity: 1; } 95% { opacity: .2; } }

/* --------------------------------------------------------------- forecast */
.hours { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1300px) { .hours { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 800px) { .hours { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hour {
  position: relative; text-align: center; padding: 8px 4px; border: 1px solid rgba(0, 229, 255, .14);
  background: rgba(0, 229, 255, .03); font-size: 13px; animation: panelIn .6s both; animation-delay: calc(var(--i) * 25ms);
}
.hour.past { opacity: .45; }
.hour.now { border-color: var(--cyan); box-shadow: var(--glow); background: rgba(0, 229, 255, .1); }
.hour.now::before { content: "JETZT"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--cyan); color: #001018; font-family: var(--f-hud); font-size: 8px; padding: 1px 6px; letter-spacing: 1px; }
.hour .h { font-family: var(--f-hud); font-size: 12px; color: var(--cyan-soft); }
.hour .t { font-family: var(--f-hud); font-size: 18px; color: #fff; margin: 2px 0 4px; }
.hour .wi { width: 40px; height: 40px; }
.hour .m { display: flex; justify-content: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.hour .m b { color: var(--text); font-weight: 600; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1300px) { .days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.day { border: 1px solid rgba(0, 229, 255, .16); padding: 10px; background: rgba(0, 229, 255, .03); animation: panelIn .6s both; animation-delay: calc(var(--i) * 60ms); }
.day.today { border-color: var(--cyan); box-shadow: inset 0 0 30px rgba(0, 229, 255, .1); }
.day .dname { font-family: var(--f-hud); font-size: 13px; letter-spacing: 2px; color: #fff; }
.day .ddate { font-size: 12px; color: var(--muted); }
.day .top { display: flex; align-items: center; justify-content: space-between; }
.day .temps { font-family: var(--f-hud); font-size: 20px; margin: 6px 0; }
.day .temps .hi { color: #ffb38a; } .day .temps .lo2 { color: #7fd8ff; margin-left: 8px; }
.day .kv { display: grid; grid-template-columns: 1fr; gap: 3px; font-size: 13px; }
.day .kv div { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid rgba(0, 229, 255, .07); padding-top: 3px; }
.day .kv label { color: var(--muted); }

/* --------------------------------------------------------------- details */
.st-panel { --accent: var(--cyan); }
.st-panel.avg { --accent: var(--amber); }
.st-panel.avg > header { color: var(--amber); }
.st-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(380px, 1.6fr); gap: 14px; }
@media (max-width: 1250px) { .st-grid { grid-template-columns: 1fr 1fr; } .st-grid .hist { grid-column: 1 / -1; } }
@media (max-width: 700px) { .st-grid { grid-template-columns: 1fr; } }
.field { border: 1px solid rgba(0, 229, 255, .14); padding: 10px 12px; background: rgba(0, 229, 255, .025); }
.field h3 { margin: 0 0 8px; font-family: var(--f-hud); font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; font-weight: 500; }
.trend-list { display: grid; gap: 4px; }
.trend-list div { display: flex; justify-content: space-between; border-top: 1px solid rgba(0, 229, 255, .07); padding: 3px 0; font-family: var(--f-hud); font-size: 13px; }
.trend-list label { font-family: var(--f-text); color: var(--muted); font-size: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-family: var(--f-hud); font-size: 9px; letter-spacing: 1.5px; color: var(--muted); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.tbl td { padding: 4px 6px; border-bottom: 1px solid rgba(0, 229, 255, .06); }
.tbl tr:hover td { background: rgba(0, 229, 255, .06); }
.tbl tr.today td { color: #fff; background: rgba(0, 229, 255, .07); }
.hist .scroll { max-height: 330px; overflow: auto; }

/* --------------------------------------------------------------- charts & map */
.chart-box { position: relative; height: 340px; }
.chart-box.sm { height: 230px; }
.map { height: 460px; border: 1px solid var(--line); background: #01060b; }
.leaflet-container { background: #01060b; font-family: var(--f-text); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(185deg) saturate(.55) brightness(.62) contrast(1.25); }
.leaflet-control-attribution { background: rgba(2, 10, 18, .7) !important; color: var(--muted) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--cyan-soft) !important; }
.leaflet-bar a { background: var(--panel-solid) !important; color: var(--cyan) !important; border-color: var(--line) !important; }
.river-glow { stroke: var(--rc, #00e5ff); stroke-opacity: .18; stroke-width: 14; filter: blur(3px); }
.river-core { stroke: var(--rc, #00e5ff); stroke-opacity: .9; stroke-width: 3; }
.river-flow { stroke: #e9fdff; stroke-width: 2; stroke-dasharray: 2 18; animation: flow 1.6s linear infinite; stroke-opacity: .9; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.st-marker { position: relative; }
.st-marker .dotm { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan), 0 0 0 3px rgba(0, 0, 0, .6); }
.st-marker .ping { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; border: 2px solid var(--cyan); animation: ping 2.2s ease-out infinite; }
.st-marker .ping.b { animation-delay: 1.1s; }
@keyframes ping { from { transform: scale(1); opacity: 1; } to { transform: scale(4.2); opacity: 0; } }
.st-label {
  position: absolute; left: 16px; top: -12px; white-space: nowrap; padding: 3px 8px; font-family: var(--f-hud); font-size: 10px; letter-spacing: 1px;
  background: rgba(2, 12, 22, .88); border: 1px solid var(--line-strong); color: #fff; pointer-events: none;
}
.st-label small { display: block; color: var(--cyan-soft); font-size: 11px; }

.tip {
  position: fixed; z-index: 1000; width: 320px; pointer-events: none;
  background: rgba(3, 16, 28, .96); border: 1px solid var(--line-strong); box-shadow: var(--glow), 0 20px 50px rgba(0, 0, 0, .6);
  animation: tipIn .25s ease-out;
}
@keyframes tipIn { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.tip img { display: block; width: 100%; height: 170px; object-fit: cover; border-bottom: 1px solid var(--line); }
.tip .tb { padding: 10px 12px; }
.tip h4 { margin: 0; font-family: var(--f-hud); font-size: 13px; letter-spacing: 2px; color: #fff; }
.tip .riv { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.tip .vals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.tip .vals div { border: 1px solid rgba(0, 229, 255, .15); padding: 5px 7px; }
.tip .vals label { display: block; font-size: 9px; font-family: var(--f-hud); color: var(--muted); letter-spacing: 1px; }
.tip .vals b { font-family: var(--f-hud); font-size: 17px; color: #fff; }
.tip dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 13px; }
.tip dt { color: var(--muted); } .tip dd { margin: 0; text-align: right; }

/* --------------------------------------------------------------- forms / admin */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer;
  background: rgba(0, 229, 255, .08); border: 1px solid var(--line-strong); color: var(--cyan);
  font-family: var(--f-hud); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; transition: .2s;
}
.btn:hover { background: rgba(0, 229, 255, .2); box-shadow: var(--glow); color: #fff; }
.btn.primary { background: linear-gradient(90deg, var(--cyan), #6ff3ff); color: #001018; font-weight: 700; }
.btn.danger { border-color: rgba(255, 79, 123, .6); color: var(--down); background: rgba(255, 79, 123, .06); }
.btn.sm { padding: 4px 10px; font-size: 9px; }
.btn:disabled { opacity: .4; cursor: default; }
input[type=text], input[type=email], input[type=number], input[type=password], input[type=time], select {
  background: rgba(0, 12, 22, .8); border: 1px solid var(--line); padding: 7px 10px; color: var(--text); border-radius: 2px; outline: none;
}
input:focus, select:focus { border-color: var(--cyan); box-shadow: var(--glow); }
select option { background: #041120; }
input[type=time] { font-family: var(--f-hud); font-size: 15px; }
label.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
input[type=checkbox] { appearance: none; width: 18px; height: 18px; border: 1px solid var(--line-strong); background: rgba(0, 12, 22, .8); position: relative; cursor: pointer; flex-shrink: 0; }
input[type=checkbox]:checked { background: var(--cyan); box-shadow: var(--glow); }
input[type=checkbox]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #001018; border-width: 0 2px 2px 0; transform: rotate(45deg); }
input[type=checkbox].switch { position: relative; width: 46px; height: 24px; appearance: none; border: 1px solid var(--line-strong); background: rgba(0, 12, 22, .8); border-radius: 12px; cursor: pointer; transition: .2s; }
input[type=checkbox].switch::after { content: ""; border: 0; transform: none; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .25s; }
input[type=checkbox].switch:checked { background: rgba(0, 229, 255, .25); }
input[type=checkbox].switch:checked::after { left: 25px; background: var(--cyan); box-shadow: var(--glow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-grid label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.note { color: var(--muted); font-size: 14px; line-height: 1.45; }
.note.warn { color: var(--amber); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.slot { border: 1px solid var(--line); padding: 12px; text-align: center; transition: .3s; }
.slot.on { border-color: var(--cyan); box-shadow: inset 0 0 30px rgba(0, 229, 255, .12); }
.slot .n { font-family: var(--f-hud); font-size: 10px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.slot input[type=time] { width: 100%; text-align: center; margin: 8px 0; }
.station-pick { max-height: 260px; overflow: auto; border: 1px solid var(--line); padding: 8px; display: grid; gap: 4px; }
.station-pick .grp { font-family: var(--f-hud); font-size: 10px; color: var(--cyan-soft); letter-spacing: 1.5px; margin-top: 6px; }
.water-card { border: 1px solid var(--line); padding: 14px; margin-bottom: 12px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.img-card { border: 1px solid var(--line); }
.img-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.img-card .b { padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 2000; padding: 12px 18px; max-width: 420px;
  background: rgba(3, 16, 28, .97); border: 1px solid var(--cyan); box-shadow: var(--glow); font-size: 15px; animation: tipIn .3s;
}
.toast.err { border-color: var(--down); box-shadow: 0 0 18px rgba(255, 79, 123, .5); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.loading { padding: 60px; text-align: center; font-family: var(--f-hud); letter-spacing: 4px; color: var(--cyan); animation: corePulse 1.2s infinite; }
iframe.preview { width: 100%; height: 640px; border: 1px solid var(--line); background: #050b14; }

/* --------------------------------------------------------------- boot */
#boot { position: fixed; inset: 0; z-index: 3000; background: radial-gradient(circle at center, #031a2a, #000 70%); display: grid; place-items: center; transition: opacity .6s; cursor: pointer; }
#boot[hidden] { display: none; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-core { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.reactor.big { width: 220px; height: 220px; }
.boot-lines { font-family: var(--f-hud); font-size: 12px; letter-spacing: 3px; color: var(--cyan); min-height: 120px; width: min(560px, 90vw); }
.boot-lines div { animation: panelIn .3s both; margin: 4px 0; }
.boot-lines .ok { color: var(--up); float: right; }

/* --------------------------------------------------------------- kiosk */
body.kiosk .topbar, body.kiosk .nav-sub { display: none; }
body.kiosk .view { padding: 10px; max-width: none; height: 100vh; }
.kiosk-wrap { height: calc(100vh - 20px); display: grid; grid-template-rows: auto auto 1fr; gap: 10px; }
.kiosk-head { display: flex; align-items: center; gap: 18px; }
.kiosk-head .title { font-family: var(--f-hud); font-size: 26px; letter-spacing: 6px; color: #fff; text-shadow: var(--glow); }
.kiosk-head .clock { font-size: 30px; margin-left: auto; }
.kiosk-head .meta { font-family: var(--f-hud); font-size: 10px; letter-spacing: 1.5px; color: var(--muted); line-height: 1.6; }
.kiosk-head .btn { padding: 6px 10px; }
.kiosk-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kiosk-tiles .tile { min-height: 0; padding: 10px 12px; }
.kiosk-tiles .tile .big { font-size: clamp(26px, 2.4vw, 42px); }
.kiosk-tiles .tile .big2 { font-size: clamp(18px, 1.5vw, 24px); }
.kiosk-tiles .rows { font-size: clamp(12px, .85vw, 15px); gap: 2px; }
.kiosk-tiles .row { grid-template-columns: 58px 1fr; padding: 2px 0; }
.kiosk-tiles .gauge, .kiosk-tiles .wave-box { width: 60px; height: 60px; }
.kiosk-tiles .moon { width: 46px; height: 46px; }
.kiosk-tiles .tr-box { padding: 3px 5px; }
.kiosk-tiles .tr-box div { font-size: 11px; }
.kiosk-bottom { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 10px; min-height: 0; }
.kiosk-bottom > .hud { display: flex; flex-direction: column; min-height: 0; }
.kiosk-bottom .chart-box, .kiosk-bottom .map { flex: 1; height: auto; min-height: 180px; }
.kiosk-bottom .hours { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; overflow: auto; }
.kiosk-bottom .hour { padding: 4px 2px; font-size: 11px; }
.kiosk-bottom .hour .t { font-size: 14px; margin: 0; }
.kiosk-bottom .hour .wi { width: 28px; height: 28px; }
@media (max-width: 1400px) { .kiosk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  body.kiosk .view { height: auto; }
  .kiosk-wrap { height: auto; }
  .kiosk-bottom { grid-template-columns: 1fr; }
  .kiosk-bottom .chart-box, .kiosk-bottom .map { height: 300px; flex: none; }
}
@media (max-width: 700px) { .kiosk-tiles { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 10px; }
  .nav-main { order: 3; width: 100%; }
  .sys { margin-left: auto; }
  .view { padding: 12px; }
  .tiles { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Vollbild-Hinweis im Kiosk-Modus */
.fs-hint {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2500; pointer-events: none;
  padding: 10px 22px; font-family: var(--f-hud); font-size: 12px; letter-spacing: 2px; color: var(--cyan);
  background: rgba(3, 16, 28, .92); border: 1px solid var(--cyan); box-shadow: var(--glow);
  animation: corePulse 2s ease-in-out infinite;
}
.fs-hint[hidden] { display: none; }

/* ---------------------------------------------------------------
   Peak/Low-Tabelle in den Kacheln
   Heute steht direkt unter dem aktuellen Wert, Gestern/Morgen abgesetzt.
   --------------------------------------------------------------- */
table.pl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pl thead th {
  font-family: var(--f-hud); font-size: 9.5px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 0 6px 4px; border-bottom: 1px solid var(--line);
}
.pl thead th small { font-family: var(--f-text); font-size: 11px; letter-spacing: 0; text-transform: none; }
.pl tbody th {
  font-family: var(--f-hud); font-size: 9.5px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 4px 6px 4px 0; white-space: nowrap; vertical-align: middle; width: 1%;
}
.pl td { padding: 4px 6px; font-size: 15px; white-space: nowrap; color: var(--text); }
.pl td b { font-weight: 600; color: #fff; }
.pl td i { font-style: normal; color: var(--muted); font-size: .82em; margin-left: 6px; }
.pl td.sub { color: var(--muted); font-size: 13px; width: 1%; padding-left: 0; }
.pl td.na { color: var(--dim); }
.pl td.sum b { color: var(--cyan-soft); }
/* Heute: gehört zum aktuellen Wert – kräftiger, etwas größer */
.pl tr.is-today th { color: var(--cyan); }
.pl tr.is-today td { font-size: 17px; padding-top: 6px; padding-bottom: 6px; }
.pl tr.is-today td b { font-size: 1.05em; font-weight: 700; }
.pl tr.is-today td.sub { font-size: 13px; }
/* Gestern / Morgen: abgesetzt durch Abstand + Linie, etwas zurückgenommen */
.pl tr.first-past > * { border-top: 1px solid var(--line); padding-top: 9px; }
.pl tr:not(.is-today) td { opacity: .85; }
.pl tr:not(.is-today) td b { font-weight: 500; }
.tile > table.pl + .rows { margin-top: 10px; }
.tile > .rows { margin-top: auto; padding-top: 10px; }
.pl-note { font-size: 12px; color: var(--muted); }
.kiosk-tiles .pl td { font-size: clamp(12px, .85vw, 15px); padding: 2px 5px; }
.kiosk-tiles .pl tr.is-today td { font-size: clamp(13px, .95vw, 16px); padding: 4px 5px; }
.kiosk-tiles .pl tr.first-past > * { padding-top: 5px; }
.kiosk-tiles .pl tbody th, .kiosk-tiles .pl thead th { font-size: 8.5px; }

/* 7-Tage-Karten: Peak/Low-Tabelle */
table.dtbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.dtbl thead th { font-family: var(--f-hud); font-size: 8.5px; letter-spacing: 1.5px; color: var(--muted); font-weight: 500; text-align: right; padding: 0 2px 3px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.dtbl tbody th { text-align: left; color: var(--muted); font-weight: 400; padding: 3px 0; }
.dtbl td { text-align: right; padding: 3px 2px; color: #fff; white-space: nowrap; }
.dtbl td i { font-style: normal; color: var(--muted); font-size: .85em; }
.dtbl tr + tr > * { border-top: 1px solid rgba(0, 229, 255, .07); }

/* =====================================================================
   Gewässerseite: 5 einrastende Seiten (Scroll-Snap) – v0.1.2
   ===================================================================== */
:root { --hdr: 66px; --ph: calc(100vh - var(--hdr)); }
@supports (height: 100dvh) { :root { --ph: calc(100dvh - var(--hdr)); } }
body.snap-mode { overflow: hidden; }
body.snap-mode .nav-sub { display: none; }
body.snap-mode .view {
  padding: 0; max-width: none; height: var(--ph); overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior: contain;
}
.page { scroll-snap-align: start; scroll-snap-stop: always; min-height: var(--ph); position: relative; }
.page + .page { border-top: 1px solid var(--line); }
.page-in {
  max-width: 1920px; margin: 0 auto; min-height: var(--ph);
  padding: 12px 54px 14px 18px; display: flex; flex-direction: column; gap: 12px;
}
.page-in > .mt { margin-top: 0; }
@media (min-width: 1200px) and (min-height: 700px) {
  .page, .page-in { height: var(--ph); }
}

.page-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-family: var(--f-hud); font-size: 20px; letter-spacing: 5px; color: #fff; text-shadow: var(--glow); text-transform: uppercase; font-weight: 500; }
.page-title .pt-water { font-family: var(--f-hud); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
.page-title .pt-sub { font-family: var(--f-hud); font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }

/* Punkt-Navigation rechts */
.dots { position: fixed; right: 14px; top: calc(var(--hdr) + var(--ph) / 2); transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 16px; }
.dots a { position: relative; display: flex; align-items: center; justify-content: flex-end; text-decoration: none; }
.dots a i { display: block; width: 12px; height: 12px; border: 1px solid var(--line-strong); transform: rotate(45deg); background: rgba(0, 229, 255, .05); transition: .25s; }
.dots a:hover i { background: rgba(0, 229, 255, .35); }
.dots a.active i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent), 0 0 22px var(--accent); }
.dots .lbl {
  position: absolute; right: 24px; white-space: nowrap; padding: 3px 10px; opacity: 0; transform: translateX(6px); transition: .2s; pointer-events: none;
  font-family: var(--f-hud); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan);
  background: rgba(3, 16, 28, .95); border: 1px solid var(--line-strong);
}
.dots a:hover .lbl { opacity: 1; transform: none; }
.dots a.active .lbl { color: #001018; background: var(--accent); border-color: var(--accent); }

/* ---------- Seite 1: Übersicht ---------- */
.statusbar#sb-wrap { margin: 0; flex-wrap: nowrap; }
.statusbar .sb-in { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; flex: 1; min-width: 0; }
.statusbar .title { font-size: 20px; }
#sb-wrap .btn-full {
  flex-shrink: 0; padding: 6px 14px; text-decoration: none; color: var(--amber); border: 1px solid rgba(255, 179, 0, .45);
  font-family: var(--f-hud); font-size: 11px; letter-spacing: 2px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
#sb-wrap .btn-full:hover { background: rgba(255, 179, 0, .12); }

.ov-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 12px; }
.ov-grid.no-right { grid-template-columns: 1fr; }
.ov-left { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ov-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ov-right > .hud { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ov-right .ov-map { flex: 1.15; }
.ov-right .map, .ov-right .chart-box { flex: 1; min-height: 160px; height: auto; }
.ov-tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; }

/* kompakte Kacheln */
.ov-tiles .tile { min-height: 0; padding: 9px 12px 10px; }
.ov-tiles .hud > header { margin-bottom: 4px; font-size: 11px; letter-spacing: 2px; }
.ov-tiles .hud > header svg.ic { width: 16px; height: 16px; }
.ov-tiles .hud > header .sub, .kiosk-tiles .hud > header .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 8.5px; }
.ov-tiles .tile .main { margin: 0 0 4px; gap: 10px; }
.ov-tiles .tile .big { font-size: clamp(26px, 2vw, 36px); }
.ov-tiles .tile .big .unit { font-size: 14px; }
.ov-tiles .tile .big2 { font-size: 20px; }
.ov-tiles .gauge, .ov-tiles .wave-box { width: 56px; height: 56px; }
.ov-tiles .wi { width: 36px; height: 36px; }
.ov-tiles .moon { width: 46px; height: 46px; }
.ov-tiles .pl td { font-size: 13px; padding: 2px 5px; }
.ov-tiles .pl tr.is-today td { font-size: 14.5px; padding: 3px 5px; }
.ov-tiles .pl tr.first-past > * { padding-top: 5px; }
.ov-tiles .pl thead th { padding-bottom: 2px; font-size: 8.5px; }
.ov-tiles .pl tbody th { padding: 2px 5px 2px 0; font-size: 8.5px; }
.ov-tiles .pl td.sub { font-size: 12px; }
.ov-tiles .tile > .rows { padding-top: 6px; }
.ov-tiles .trends { gap: 5px; margin-top: 0; }
.ov-tiles .tr-box { padding: 2px 6px; }
.ov-tiles .tr-box div { font-size: 12px; }
.ov-tiles .pl-note { font-size: 11px; }
.ov-tiles .astro-grid { gap: 5px; }
.ov-tiles .astro-grid .cell { padding: 3px 6px; }
.ov-tiles .astro-grid div > span { font-size: 12.5px; }
.ov-tiles .trend small { font-size: 8.5px; }

/* 24h-Leiste auf der Übersicht */
.ov-hours { flex-shrink: 0; padding: 8px 12px 10px; }
.ov-hours > header { margin-bottom: 6px; font-size: 11px; }
.hours24 { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.hours24 .hour { padding: 3px 1px; font-size: 10.5px; }
.hours24 .hour .h { font-size: 10px; }
.hours24 .hour .wi { width: 26px; height: 26px; }
.hours24 .hour .t { font-size: 13px; margin: 0 0 1px; }
.hours24 .hour .m { gap: 1px; font-size: 10px; }
.hours24 .hour.now::before { top: -7px; font-size: 7px; padding: 0 4px; }

/* ---------- Seite 3/4: Details Wasser (Messstellen als Spalten) ---------- */
.det-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
.det-cols .st-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px 12px 12px; }
.det-cols .st-panel > header { margin-bottom: 0; }
.det-cols .field { padding: 8px 10px; }
.det-cols .field h3 { margin-bottom: 4px; }
.det-cols .field .main { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.det-cols .field .big { font-family: var(--f-hud); font-size: 32px; font-weight: 700; color: #fff; text-shadow: var(--glow); line-height: 1; }
.det-cols .field .big .unit { font-size: 14px; color: var(--cyan-soft); margin-left: 3px; font-weight: 400; }
.det-cols .field .trend { display: flex; flex-direction: column; font-family: var(--f-hud); font-size: 12px; }
.det-cols .field .trend small { font-size: 8.5px; color: var(--muted); }
.det-cols .pl td { font-size: 13px; padding: 2px 5px; }
.det-cols .pl tr.is-today td { font-size: 15px; }
.kvline { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-top: 4px; color: var(--muted); }
.kvline b { color: #fff; }
.det-cols .trend-list div { padding: 2px 0; font-size: 12px; }
.det-cols .trend-list label { font-size: 13px; }
.det-cols .hist { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.det-cols .hist .scroll { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.det-cols .tbl { font-size: 12.5px; }
.det-cols .tbl td, .det-cols .tbl th { padding: 3px 4px; }
.det-chart { flex: 0 0 28%; min-height: 200px; display: flex; flex-direction: column; padding: 10px 14px; }
.det-chart > header { margin-bottom: 4px; }
.det-chart .chart-box { flex: 1; height: auto; min-height: 0; }

/* ---------- Seite 5: Details Wetter ---------- */
.wx-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; }
.wx-grid > .hud { display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.wx-grid > .hud > header { margin-bottom: 4px; }
.wx-grid .chart-box { flex: 1; height: auto; min-height: 0; }
.wx-now { display: grid; gap: 4px; font-size: 14px; overflow: auto; }
.wx-now-top { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.wx-now-top .big2 { font-family: var(--f-hud); font-size: 28px; color: #fff; }
.wx-now > div:not(.wx-now-top) { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(0, 229, 255, .08); padding-top: 3px; }
.wx-now label { color: var(--muted); }

/* ---------- kleinere / schmale Bildschirme: Inhalte fließen, Einrasten weich ---------- */
@media (max-width: 1199px), (max-height: 699px) {
  body.snap-mode .view { scroll-snap-type: y proximity; }
  .page { scroll-snap-stop: normal; }
  .ov-grid { grid-template-columns: 1fr; }
  .ov-tiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-auto-rows: auto; }
  .ov-right > .hud { min-height: 340px; }
  .hours24 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .det-cols { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .det-cols .hist .scroll { max-height: 320px; }
  .det-chart { flex: none; height: 320px; }
  .wx-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); grid-auto-rows: 260px; }
  .page-in { padding-right: 18px; }
  .dots { display: none; }
}
@media (max-width: 700px) {
  .hours24 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Wind-Kachel kompakter, Kachelzeilen mindestens so hoch wie ihr Inhalt */
.ov-tiles { grid-auto-rows: minmax(min-content, 1fr); }
.trend.two { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.trend.two small { margin-right: 4px; }
[data-tile="wind"] .trend.two { display: grid; grid-template-columns: auto auto; gap: 1px 6px; align-items: baseline; justify-content: start; white-space: nowrap; }
[data-tile="wind"] .trend.two small { margin-right: 0; }
.hud > header .sub .keep-case { text-transform: none; }
.st-panel > header .sub { white-space: nowrap; flex-shrink: 0; font-family: var(--f-text); font-size: 12px; letter-spacing: .5px; }
/* Kopf und Felder aller Spalten bündig, auch wenn Stationsnamen umbrechen */
.det-cols .st-panel > header { letter-spacing: 1px; line-height: 1.15; }
@media (min-width: 1200px) {
  .det-cols { grid-template-rows: auto auto auto minmax(0, 1fr); }
  .det-cols .st-panel { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 8px; }
}
.ov-tiles [data-tile="wind"] .pl td, .ov-tiles [data-tile="wind"] .pl tbody th { padding-top: 1px; padding-bottom: 1px; }
.ov-tiles [data-tile="wind"] .pl tr.is-today td { padding-top: 2px; padding-bottom: 2px; }
.ov-tiles [data-tile="wind"] .pl tr.first-past > * { padding-top: 4px; }

/* Übersicht: füllt den Bildschirm, wird aber bei wenig Höhe länger statt zu überlappen */
@media (min-width: 1200px) and (min-height: 700px) {
  #pg-overview, #pg-overview .page-in { height: auto; min-height: var(--ph); }
}
#pg-overview .ov-grid, #pg-overview .ov-left, #pg-overview .ov-tiles { min-height: auto; }
#pg-overview .page-in { padding-top: 8px; padding-bottom: 8px; gap: 9px; }
#pg-overview .ov-left, #pg-overview .ov-right, #pg-overview .ov-grid { gap: 9px; }
#pg-overview .ov-tiles { gap: 8px; }
#pg-overview .ov-hours { padding: 6px 10px 8px; }
#pg-overview .ov-hours > header { margin-bottom: 4px; }
body.snap-mode .view { position: relative; }

/* Breite, aber niedrige Bildschirme: Übersicht behält das Raster und wird per Skalierung eingepasst */
@media (min-width: 1200px) and (max-height: 699px) {
  .ov-grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
  .ov-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(min-content, 1fr); }
  .ov-right > .hud { min-height: 0; }
  .hours24 { grid-template-columns: repeat(24, minmax(0, 1fr)); }
  #pg-overview .page-in { padding-right: 54px; }
  .dots { display: flex; }
}

/* =====================================================================
   Peak/Low horizontal: Spalten Gestern | Heute | Morgen – v0.1.2
   ===================================================================== */
table.plh { table-layout: fixed; }
.plh thead th { text-align: left; }
.plh thead th.corner { width: 52px; }
.plh thead th.corner small { font-size: 10px; color: var(--muted); }
.plh thead th.is-today { color: var(--cyan); text-shadow: 0 0 6px rgba(0, 229, 255, .6); }
.plh tbody th { width: 52px; text-align: left; }
.plh tbody th .sn { color: var(--text); letter-spacing: 1px; }
.plh td { opacity: .8; }
.plh td b { font-weight: 500; }
.plh td i { margin-left: 5px; }
.plh td.is-today, .plh th.is-today { background: rgba(0, 229, 255, .08); box-shadow: inset 1px 0 0 rgba(0, 229, 255, .3), inset -1px 0 0 rgba(0, 229, 255, .3); }
.plh td.is-today { opacity: 1; }
.plh td.is-today b { font-weight: 700; color: #fff; font-size: 1.06em; }
.plh tr.grp > * { border-top: 1px solid var(--line); }
.plh td .na { color: var(--dim); }
.ov-tiles .plh td, .kiosk-tiles .plh td, .det-cols .plh td { padding: 3px 5px; }
.ov-tiles .plh tbody th, .ov-tiles .plh thead th.corner { width: 46px; }
.ov-tiles [data-tile="wind"] .plh tbody th { width: 64px; }
.ov-tiles [data-tile="precip"] .plh tbody th:only-child, .plh tbody th { white-space: nowrap; }
.ov-tiles [data-tile="precip"] .plh tbody th, .ov-tiles [data-tile="precip"] .plh thead th.corner { width: 64px; }
.ov-tiles [data-tile="wind"] .plh thead th.corner, .kiosk-tiles [data-tile="wind"] .plh thead th.corner { width: 78px; }
.kiosk-tiles [data-tile="precip"] .plh thead th.corner { width: 64px; }


/* =====================================================================
   Übersicht v0.1.3: Kacheln | Karte oben, 24h (12×2) | breites Diagramm unten
   ===================================================================== */
.ov-grid2 {
  flex: 1; min-height: auto; display: grid; gap: 9px;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  grid-template-areas: "tiles map" "bottom bottom";
}
.ov-grid2.no-map { grid-template-areas: "tiles tiles" "bottom bottom"; }
.ov-grid2 > .ov-tiles { grid-area: tiles; }
.ov-grid2 > .ov-map { grid-area: map; display: flex; flex-direction: column; min-height: 0; }
.ov-grid2 > .ov-map .map { flex: 1; min-height: 200px; height: auto; }
.ov-bottom { grid-area: bottom; display: grid; gap: 9px; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); min-height: 230px; }
.ov-grid2.no-chart .ov-bottom { grid-template-columns: 1fr; }
.ov-bottom > .hud { display: flex; flex-direction: column; min-height: 0; }
.ov-bottom .ov-chart { padding: 8px 12px 8px; }
.ov-bottom .ov-chart > header { margin-bottom: 2px; }
.ov-bottom .chart-box { flex: 1; height: auto; min-height: 170px; }
#pg-overview .ov-tiles { min-height: auto; }

/* 24h-Vorhersage zweizeilig (12 × 2) */
.ov-bottom .hours24 { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; flex: 1; align-content: stretch; }
.ov-bottom .hours24 .hour { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 2px; }
.ov-bottom .hours24 .hour .h { font-size: 10.5px; }
.ov-bottom .hours24 .hour .wi { width: 28px; height: 28px; }
.ov-bottom .hours24 .hour .t { font-size: 14px; }
.ov-bottom .hours24 .hour .m { font-size: 10.5px; }
.ov-bottom .hours24 .hour.now::before { top: -6px; }

/* Kacheln etwas kompakter (mehr Platz für die untere Reihe) */
.ov-grid2 .ov-tiles { gap: 8px; }
.ov-grid2 .ov-tiles .tile { padding: 8px 11px 8px; }
.ov-grid2 .ov-tiles .tile .big { font-size: clamp(24px, 1.8vw, 32px); }
.ov-grid2 .ov-tiles .gauge, .ov-grid2 .ov-tiles .wave-box { width: 50px; height: 50px; }
.ov-grid2 .ov-tiles .plh td { padding: 2px 5px; }

/* Karte: Zoom-Button und kleinere Stationsbeschriftung */
.gm-fit a { display: flex !important; align-items: center; justify-content: center; }
.gm-fit svg { width: 16px; height: 16px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.gm-fit a:hover svg { stroke: #fff; }
.st-label { font-size: 8.5px; padding: 2px 6px; left: 13px; top: -10px; letter-spacing: .5px; }
.st-label small { font-size: 9.5px; }
.st-marker .dotm, .st-marker .ping { width: 11px; height: 11px; margin: -5.5px; }

/* schmale Bildschirme: alles untereinander */
@media (max-width: 1199px) {
  .ov-grid2 { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "tiles" "map" "bottom"; }
  .ov-grid2 > .ov-map { min-height: 360px; }
  .ov-bottom { grid-template-columns: 1fr; }
  .ov-bottom .chart-box { min-height: 260px; }
  .ov-bottom .hours24 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}


/* =====================================================================
   Übersicht v0.1.3b: Karte schmaler, untere Reihe höher, 24h breiter
   ===================================================================== */
.ov-grid2 { grid-template-columns: minmax(0, 2.05fr) minmax(0, .9fr); }
.ov-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); min-height: 290px; }
.ov-bottom .hours24 { gap: 5px; }
.ov-bottom .hours24 .hour { padding: 5px 2px; }
.ov-bottom .hours24 .hour .h { font-size: 11px; }
.ov-bottom .hours24 .hour .wi { width: 34px; height: 34px; }
.ov-bottom .hours24 .hour .t { font-size: 16px; margin: 1px 0 2px; }
.ov-bottom .hours24 .hour .m { font-size: 11px; }
.ov-bottom .chart-box { min-height: 220px; }

/* Quelle / Ende auf der Karte */
.end-marker { position: relative; }
.end-marker .em-dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; }
.end-marker.src .em-dot { border: 2px solid var(--rc); background: rgba(0, 0, 0, .7); box-shadow: 0 0 8px var(--rc); }
.end-marker.end .em-dot { background: var(--rc); border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 10px var(--rc); }
.em-label {
  position: absolute; left: 12px; top: -9px; white-space: nowrap; padding: 2px 6px; pointer-events: none;
  font-family: var(--f-text); font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(2, 12, 22, .85); border: 1px dashed var(--rc);
}
.em-label small { display: block; font-family: var(--f-hud); font-size: 7.5px; font-weight: 400; letter-spacing: 1.5px; color: var(--rc); text-transform: uppercase; }


/* =====================================================================
   Kacheln v0.1.3c: Info-Kästchen, Windrose, Tagesbogen
   ===================================================================== */
.tr-box.ib div { font-family: var(--f-hud); font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-box.ib div small { font-family: var(--f-text); color: var(--muted); font-size: 11px; }
.tr-box.ib > small { display: block !important; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-tiles .tr-box.ib > small { display: block !important; }
.warn { color: var(--amber); }

/* Windrose */
.compass { margin-left: auto; display: flex; flex-direction: row; align-items: center; gap: 6px; flex-shrink: 0; }
.compass svg { width: 62px; height: 62px; }
.compass .c-ring { fill: rgba(0, 229, 255, .04); stroke: rgba(0, 229, 255, .35); stroke-width: 1; }
.compass .c-ticks line { stroke: var(--cyan); stroke-width: 1; opacity: .6; }
.compass .c-n { fill: var(--cyan); font-family: var(--f-hud); font-size: 7px; text-anchor: middle; }
.compass .c-arrow { transform-origin: 36px 36px; transform-box: view-box; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.compass .c-arrow path { fill: var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); }
.compass .c-hub { fill: #001018; stroke: var(--cyan); }
.compass .c-txt { font-family: var(--f-hud); font-size: 12px; letter-spacing: 1px; color: var(--cyan-soft); white-space: nowrap; text-align: right; line-height: 1.25; }
.ov-tiles .compass svg { width: 54px; height: 54px; }
.tile .main > div:first-child .trend.two { margin-top: 4px; }

/* Sonne + Mond: Tagesbogen + Mondphase */
.astro-main { display: flex; align-items: center; gap: 10px; width: 100%; }
.sun-arc { flex: 1; min-width: 0; height: auto; max-height: 86px; }
.sa-horizon { stroke: rgba(0, 229, 255, .25); stroke-width: 1; }
.sa-path { fill: none; stroke: rgba(255, 213, 79, .25); stroke-width: 1.5; stroke-dasharray: 3 4; }
.sa-done { fill: none; stroke: #ffd54f; stroke-width: 2; filter: drop-shadow(0 0 3px #ffb300); }
.sa-sun { fill: #ffd54f; filter: drop-shadow(0 0 6px #ffb300); animation: corePulse 3s ease-in-out infinite; }
.sa-sun.night { fill: #3d6577; filter: none; animation: none; }
.sa-t { fill: var(--muted); font-family: var(--f-hud); font-size: 8.5px; }
.sa-t.mid { fill: var(--cyan-soft); }
.moon-box { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.moon-box .moon { margin: 0; width: 48px; height: 48px; }
.mb-txt { display: flex; flex-direction: column; align-items: center; font-size: 11px; line-height: 1.15; }
.mb-txt b { font-family: var(--f-hud); font-size: 13px; color: #fff; }
.astro-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.astro-grid.g3 .cell { padding: 3px 6px; }
.astro-grid.g3 label { font-size: 8px; }
.astro-grid.g3 div > span { font-size: 12.5px; }
.ov-tiles .moon-box .moon { width: 42px; height: 42px; }

/* Kompaktere Wind-Kachel und Tagesbogen */
.ov-tiles [data-tile="wind"] .main { margin-bottom: 2px; }
.ov-tiles [data-tile="wind"] .main > div:first-child { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; }
.ov-tiles [data-tile="wind"] .main > div:first-child .trend.two { margin-top: 0; }
.ov-tiles .compass { flex-direction: row; gap: 6px; }
.ov-tiles .compass svg { width: 54px; height: 54px; }
.ov-tiles .compass .c-txt { font-size: 11px; }
.ov-tiles .sun-arc { max-height: 58px; }
.ov-tiles .astro-main { gap: 6px; }
.ov-tiles .moon-box .moon { width: 36px; height: 36px; }
.ov-tiles .astro-grid.g3 { gap: 4px; }
.ov-tiles .astro-grid.g3 .cell { padding: 2px 6px; }
.ov-tiles .tr-box.ib > small { font-size: 9px; }
.ov-bottom { min-height: 270px; }

/* Kacheln innen verdichten (gleiche Inhalte, weniger Höhe) */
.ov-grid2 .ov-tiles .tile { padding: 6px 10px 7px; }
.ov-grid2 .ov-tiles .hud > header { margin-bottom: 1px; }
.ov-grid2 .ov-tiles .tile .main { margin: 0 0 2px; gap: 8px; }
.ov-grid2 .ov-tiles .tile .big { font-size: clamp(22px, 1.6vw, 29px); }
.ov-grid2 .ov-tiles .tile .big .unit { font-size: 12px; }
.ov-grid2 .ov-tiles .gauge, .ov-grid2 .ov-tiles .wave-box { width: 40px; height: 40px; }
.ov-grid2 .ov-tiles .gauge text { display: none; }
.ov-grid2 .ov-tiles .wi { width: 30px; height: 30px; }
.ov-grid2 .ov-tiles .compass svg { width: 54px; height: 54px; }
.ov-grid2 .ov-tiles .plh td { padding: 1px 5px; font-size: 12.5px; }
.ov-grid2 .ov-tiles .plh tbody th { padding-top: 1px; padding-bottom: 1px; }
.ov-grid2 .ov-tiles .plh thead th { padding-bottom: 1px; }
.ov-grid2 .ov-tiles .plh td.is-today b { font-size: 1.04em; }
.ov-grid2 .ov-tiles .tile > .rows { padding-top: 4px; }
.ov-grid2 .ov-tiles .trends { gap: 4px; }
.ov-grid2 .ov-tiles .tr-box { padding: 1px 6px 2px; }
.ov-grid2 .ov-tiles .tr-box label { font-size: 7.5px; }
.ov-grid2 .ov-tiles .tr-box div { font-size: 11.5px; }
.ov-grid2 .ov-tiles .tr-box.ib > small { font-size: 8.5px; line-height: 1.1; }
.ov-grid2 .ov-tiles .sun-arc { max-height: 50px; }
.ov-grid2 .ov-tiles .astro-grid.g3 .cell { padding: 1px 6px; }
.ov-grid2 .ov-tiles .astro-grid.g3 div > span { font-size: 12px; }
.ov-bottom { min-height: 262px; }


/* =====================================================================
   Karte v0.1.3d: Etiketten automatisch platziert, Quelle/Mündung dezent
   ===================================================================== */
.st-label { transition: left .25s ease, top .25s ease; }
.end-marker .em-dot { width: 8px; height: 8px; margin: -4px; opacity: .75; }
.end-marker.src .em-dot { border: 1.5px solid var(--rc); background: transparent; box-shadow: none; }
.end-marker.end .em-dot { background: transparent; border: 1.5px solid var(--rc); border-radius: 1px; box-shadow: none; }
.em-label {
  left: 9px; top: -8px; padding: 0 3px; background: none; border: none;
  font-family: var(--f-text); font-size: 10px; font-weight: 500; font-style: italic; color: rgba(212, 244, 255, .7);
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 0 8px #000; transition: left .25s ease, top .25s ease;
}
.em-label small { display: inline; margin-right: 4px; font-family: var(--f-text); font-style: normal; font-size: 8.5px; letter-spacing: 1px; color: rgba(127, 184, 204, .8); }


/* Einheit direkt am Peak/Low-Wert */
.u { font-size: .78em; color: var(--muted); margin-left: 2px; font-weight: 400; }
.plh td.is-today .u { color: var(--cyan-soft); }
.plh td i { margin-left: 4px; }
.plh thead th.corner, .plh tbody th { width: 44px; }
.ov-tiles [data-tile="wind"] .plh thead th.corner { width: 70px; }
.ov-tiles [data-tile="precip"] .plh thead th.corner { width: 52px; }
.dtbl .u { margin-left: 1px; }
.det-cols .tbl .u { font-size: .75em; }
.u { font-size: .86em; color: #9cc6d6; margin-left: 2px; }
.plh td.is-today .u { color: #bfefff; }
.ov-grid2 .ov-tiles .plh td .u { font-size: .9em; }


/* =====================================================================
   Vollbild v0.1.3: Dashboard ohne Kopfleiste (gleiche 5 Seiten)
   ===================================================================== */
body.kiosk .topbar, body.kiosk .nav-sub { display: none; }
body.kiosk.snap-mode .view { padding: 0; height: var(--ph); }
body.kiosk #sb-wrap .btn-full { display: none; }
body.kiosk #pg-overview .statusbar#sb-wrap { padding-right: 260px; }
.kiosk-ctl {
  position: fixed; top: 8px; right: 54px; z-index: 60; display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 12px; background: rgba(2, 10, 18, .78); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.kiosk-ctl .clock { font-size: 20px; margin-right: 4px; }
.kiosk-ctl .btn { padding: 4px 9px; }
.kiosk-ctl .btn svg.ic { width: 14px; height: 14px; stroke: var(--cyan); fill: none; stroke-width: 2; }


/* =====================================================================
   v0.1.3e: Vollbild-Kacheln verteilt, Wettervorhersage füllt die Seite
   ===================================================================== */
/* Kacheln: Inhalte gleichmäßig über die verfügbare Höhe verteilen */
.ov-tiles .tile { justify-content: space-between; }
.ov-tiles .tile > .rows { margin-top: 0; }

/* Vollbild: Schrift wächst mit der Bildschirmhöhe */
body.kiosk .ov-grid2 .ov-tiles .tile .big { font-size: clamp(24px, 3.3vh, 42px); }
body.kiosk .ov-grid2 .ov-tiles .tile .big .unit { font-size: clamp(12px, 1.5vh, 17px); }
body.kiosk .ov-grid2 .ov-tiles .plh td { font-size: clamp(12px, 1.45vh, 16px); padding: 2px 6px; }
body.kiosk .ov-grid2 .ov-tiles .plh thead th, body.kiosk .ov-grid2 .ov-tiles .plh tbody th { font-size: clamp(8px, .95vh, 10.5px); }
body.kiosk .ov-grid2 .ov-tiles .tr-box div { font-size: clamp(11px, 1.35vh, 15px); }
body.kiosk .ov-grid2 .ov-tiles .tr-box label { font-size: clamp(7.5px, .9vh, 9.5px); }
body.kiosk .ov-grid2 .ov-tiles .gauge, body.kiosk .ov-grid2 .ov-tiles .wave-box { width: clamp(40px, 5vh, 58px); height: clamp(40px, 5vh, 58px); }
body.kiosk .ov-grid2 .ov-tiles .wi { width: clamp(30px, 4vh, 44px); height: clamp(30px, 4vh, 44px); }
body.kiosk .ov-grid2 .ov-tiles .compass svg { width: clamp(52px, 6.6vh, 76px); height: clamp(52px, 6.6vh, 76px); }
body.kiosk .ov-grid2 .ov-tiles .sun-arc { max-height: clamp(50px, 7vh, 80px); }
body.kiosk .ov-grid2 .ov-tiles .astro-grid.g3 div > span { font-size: clamp(12px, 1.4vh, 15px); }
body.kiosk .ov-grid2 .ov-tiles .hud > header { font-size: clamp(11px, 1.2vh, 13px); }
.kiosk-ctl { padding: 4px; right: 50px; }

/* Seite 2: 24h-Raster und 7-Tage-Karten füllen die Höhe */
@media (min-width: 1200px) and (min-height: 700px) {
  #pg-weather .page-in > section.hud { display: flex; flex-direction: column; min-height: 0; }
  #pg-weather .page-in > section.hud:nth-of-type(1) { flex: 1; }
  #pg-weather .page-in > section.hud:nth-of-type(2) { flex: 1.25; }
  #pg-weather .hours { flex: 1; grid-auto-rows: 1fr; min-height: 0; }
  #pg-weather .hours .hour { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; }
  #pg-weather .hours .hour .wi { width: clamp(36px, 5vh, 54px); height: clamp(36px, 5vh, 54px); }
  #pg-weather .hours .hour .t { font-size: clamp(16px, 2.2vh, 24px); }
  #pg-weather .hours .hour .m { font-size: clamp(12px, 1.4vh, 15px); }
  #pg-weather .days { flex: 1; min-height: 0; }
  #pg-weather .day { display: flex; flex-direction: column; justify-content: space-between; }
  #pg-weather .day .dtbl { font-size: clamp(12px, 1.45vh, 15px); }
  #pg-weather .day .dtbl td, #pg-weather .day .dtbl th { padding-top: clamp(2px, .5vh, 6px); padding-bottom: clamp(2px, .5vh, 6px); }
  #pg-weather .day .kv { font-size: clamp(12px, 1.4vh, 15px); }
  #pg-weather .day .temps { font-size: clamp(20px, 2.6vh, 28px); }
}
body.kiosk .ov-tiles [data-tile="wind"] .plh thead th.corner { width: clamp(70px, 8.2vh, 92px); }
body.kiosk .ov-tiles .plh thead th.corner { width: clamp(44px, 5vh, 58px); }
body.kiosk .ov-tiles [data-tile="precip"] .plh thead th.corner { width: clamp(52px, 6vh, 68px); }
body.kiosk #pg-overview .statusbar#sb-wrap { padding-right: 60px; }


/* =====================================================================
   Bewertung Wassertemperatur (Farbzonen)
   ===================================================================== */
.wt-sk { --wz: #5b8cff; } .wt-k { --wz: #4fc3ff; } .wt-ok { --wz: #3dffb0; }
.wt-w { --wz: #ffd54f; } .wt-sw { --wz: #ff9f43; } .wt-kw { --wz: #ff4f7b; }
.wt-gauge { margin-left: auto; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.wt-gauge svg { width: 78px; height: 43px; overflow: visible; }
.wt-gauge .seg { fill: none; stroke: var(--wz); stroke-width: 6; stroke-linecap: butt; opacity: .22; transition: opacity .6s; }
.wt-gauge .seg.on { opacity: 1; filter: drop-shadow(0 0 4px var(--wz)); }
.wt-gauge .needle { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .7)); }
.wt-gauge .hub { fill: #fff; }
.wt-label {
  margin-top: 1px; font-family: var(--f-hud); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap;
  color: var(--wz); text-shadow: 0 0 6px var(--wz);
}
.wt-gauge.wt-kw .wt-label, .wt-chip.wt-kw { animation: wtAlarm 1.2s ease-in-out infinite; }
@keyframes wtAlarm { 50% { opacity: .35; } }
.wt-chip {
  margin-left: auto; padding: 2px 8px; border: 1px solid var(--wz); color: var(--wz);
  font-family: var(--f-hud); font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap;
  background: color-mix(in srgb, var(--wz) 12%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--wz) 40%, transparent);
}
.ov-grid2 .ov-tiles .wt-gauge svg { width: 66px; height: 37px; }
.ov-grid2 .ov-tiles .wt-label { font-size: 8px; }
body.kiosk .ov-grid2 .ov-tiles .wt-gauge svg { width: clamp(66px, 8vh, 96px); height: clamp(37px, 4.5vh, 54px); }
body.kiosk .ov-grid2 .ov-tiles .wt-label { font-size: clamp(8px, 1vh, 11px); }


/* Wassertemperatur-Anzeige: leicht animiert */
.wt-gauge .needle-rot, .wt-gauge .needle-wob { transform-box: view-box; transform-origin: 40px 38px; }
.wt-gauge .needle-rot { transform: rotate(var(--rot)); transition: transform 1.4s cubic-bezier(.2, .9, .3, 1.15); animation: needleIn 1.6s cubic-bezier(.2, .9, .3, 1.15) backwards; }
.wt-gauge .needle-wob { animation: needleWobble 3.2s ease-in-out 1.6s infinite; }
@keyframes needleIn { from { transform: rotate(0deg); } }
@keyframes needleWobble { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(1.6deg); } 60% { transform: rotate(-1.2deg); } 80% { transform: rotate(.6deg); } }
.wt-gauge .seg.on { animation: segBreathe 2.8s ease-in-out infinite; }
@keyframes segBreathe { 0%, 100% { filter: drop-shadow(0 0 2px var(--wz)); } 50% { filter: drop-shadow(0 0 7px var(--wz)) drop-shadow(0 0 12px var(--wz)); } }
.wt-gauge .hub { animation: corePulse 2.8s ease-in-out infinite; }

/* Wasserstand-Tank breiter */
.ov-grid2 .ov-tiles .wave-box { width: 74px; height: 42px; }
body.kiosk .ov-grid2 .ov-tiles .wave-box { width: clamp(74px, 9.5vh, 110px); height: clamp(42px, 5vh, 58px); }
.wave-box { width: 96px; }

/* Außentemperatur: größeres Wetter-Icon */
.ov-grid2 .ov-tiles [data-tile="temp"] .main .wi { width: 54px; height: 54px; margin: -6px -4px -6px 0; }
body.kiosk .ov-grid2 .ov-tiles [data-tile="temp"] .main .wi { width: clamp(54px, 7vh, 80px); height: clamp(54px, 7vh, 80px); }

/* Sonne + Mond: Mond größer, Prozent + zu-/abnehmend links daneben */
.moon-box { flex-direction: row-reverse; align-items: center; gap: 8px; }
.moon-box .mb-txt { align-items: flex-end; text-align: right; gap: 2px; }
.moon-box .mb-txt b { font-size: 16px; }
.moon-box .mb-txt span { font-size: 10px; white-space: nowrap; }
.ov-grid2 .ov-tiles .moon-box .moon, .ov-tiles .moon-box .moon { width: 54px; height: 54px; }
body.kiosk .ov-grid2 .ov-tiles .moon-box .moon { width: clamp(54px, 7vh, 82px); height: clamp(54px, 7vh, 82px); }
body.kiosk .ov-grid2 .ov-tiles .moon-box .mb-txt b { font-size: clamp(16px, 2vh, 22px); }
body.kiosk .ov-grid2 .ov-tiles .moon-box .mb-txt span { font-size: clamp(10px, 1.2vh, 13px); }


/* Tagesbogen größer und an die Kachel angepasst */
.astro-main { align-items: center; }
.sun-arc { flex: 1; min-width: 0; width: 100%; max-height: none; }
.ov-grid2 .ov-tiles .sun-arc, .ov-tiles .sun-arc { height: 66px; max-height: none; }
body.kiosk .ov-grid2 .ov-tiles .sun-arc { height: clamp(66px, 9.5vh, 110px); max-height: none; }
.sa-t { font-size: 13px; letter-spacing: .5px; }
.sa-t.mid { font-size: 12px; }
.sa-path { stroke-width: 1.6; stroke-dasharray: 4 5; }
.sa-done { stroke-width: 2.6; }
.sa-tick { fill: rgba(255, 213, 79, .35); }
.sa-tick.past { fill: #ffd54f; }


/* Startanimation Tagesbogen */
.sa-tick { transition: fill .25s, r .25s; }
.sa-tick.past.pending { fill: rgba(255, 213, 79, .2); }
.sa-tick.past:not(.pending) { animation: saTick .5s ease-out; }
@keyframes saTick { 0% { r: 1.6; } 40% { r: 3.4; filter: drop-shadow(0 0 4px #ffd54f); } 100% { r: 1.6; } }
.sa-sun.arrived { animation: sunArrive .9s ease-out, corePulse 3s ease-in-out .9s infinite; }
@keyframes sunArrive { 0% { r: 8; } 35% { r: 12; filter: drop-shadow(0 0 14px #ffb300); } 100% { r: 8; } }

/* Startanimation Wetter-Icon (Außentemperatur) */
[data-tile="temp"] .main .wi { animation: wiIn 2.1s cubic-bezier(.2, .9, .3, 1.35) .15s backwards; transform-origin: 50% 50%; }
@keyframes wiIn { 0% { opacity: 0; transform: scale(.2) rotate(-140deg); filter: blur(4px); } 38% { opacity: 1; filter: none; } 62% { transform: none; } 80% { transform: scale(1.14); } 100% { transform: none; } }
[data-tile="temp"] .main .wi .cloud-g { animation: cloudIn 1.1s cubic-bezier(.2, .9, .3, 1.1) .5s backwards, drift 6s ease-in-out 1.6s infinite; }
@keyframes cloudIn { from { transform: translateX(-22px); opacity: 0; } to { transform: none; opacity: 1; } }
[data-tile="temp"] .main .wi .sun-r { animation: spin 1.4s cubic-bezier(.1, .7, .3, 1) .2s, spin 18s linear 1.6s infinite; }
[data-tile="temp"] .main .wi .drop, [data-tile="temp"] .main .wi .flake { animation-delay: 1.2s; }


/* =====================================================================
   Startanimationen Wasserstand / Wassertemperatur, Barometer
   ===================================================================== */
/* Wasserstand: Tank füllt sich beim Aufruf */
.wave-box .fill { animation: tankFill 3s cubic-bezier(.25, .9, .3, 1) .2s backwards; }
@keyframes tankFill { 0% { height: 0%; } 40% { height: 100%; } 60% { height: 45%; } }
.wave-box .ticks { animation: tankTicks 2s ease-out backwards; }
@keyframes tankTicks { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: .3; } 60% { opacity: 1; } }

/* Wassertemperatur: Nadel fährt einmal bis Anschlag und dann auf den Wert */
.wt-gauge .needle-rot { animation: needleSweep 2.6s cubic-bezier(.45, .05, .25, 1) backwards; }
@keyframes needleSweep {
  0% { transform: rotate(0deg); }
  42% { transform: rotate(180deg); }
  52% { transform: rotate(180deg); }
  100% { transform: rotate(var(--rot)); }
}
.wt-gauge .needle-wob { animation-delay: 2.6s; }
.wt-gauge .seg:not(.on) { animation: segScan 2.6s ease-in-out backwards; }
@keyframes segScan { 0%, 100% { opacity: .22; } 35%, 50% { opacity: .9; } }

/* Barometer */
.baro-gauge { margin-left: auto; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; --bc: #c07cff; }
.baro-gauge svg { width: 66px; height: 37px; overflow: visible; }
.baro-gauge .b-arc { fill: none; stroke: color-mix(in srgb, var(--bc) 45%, transparent); stroke-width: 1.2; }
.baro-gauge .bt { stroke: color-mix(in srgb, var(--bc) 60%, transparent); stroke-width: .8; }
.baro-gauge .bt.major { stroke: var(--bc); stroke-width: 1.4; filter: drop-shadow(0 0 2px var(--bc)); }
.baro-gauge .b-end { fill: var(--muted); font-family: var(--f-hud); font-size: 6px; }
.baro-gauge .needle-rot, .baro-gauge .needle-wob { transform-box: view-box; transform-origin: 40px 38px; }
.baro-gauge .needle-rot { transform: rotate(var(--rot)); transition: transform 1.4s cubic-bezier(.2, .9, .3, 1.15); animation: needleSweep 2.6s cubic-bezier(.45, .05, .25, 1) .3s backwards; }
.baro-gauge .needle-wob { animation: needleWobble 4s ease-in-out 2.1s infinite; }
.baro-gauge .needle { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--bc)); }
.baro-gauge .hub { fill: var(--bc); animation: corePulse 3s ease-in-out infinite; }
.baro-label { margin-top: 1px; font-family: var(--f-hud); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bc); text-shadow: 0 0 6px var(--bc); white-space: nowrap; }
body.kiosk .ov-grid2 .ov-tiles .baro-gauge svg { width: clamp(66px, 8vh, 96px); height: clamp(37px, 4.5vh, 54px); }
body.kiosk .ov-grid2 .ov-tiles .baro-label { font-size: clamp(8px, 1vh, 11px); }


/* Tagesbogen: Dämmerung */
.sa-twi { fill: none; stroke: #ff8a5c; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 3 3; opacity: .55; }
.sa-twi.past { stroke-dasharray: none; opacity: .9; filter: drop-shadow(0 0 3px #ff6b9a); }
.sa-tw { fill: #ff9f7a; font-family: var(--f-hud); font-size: 10.5px; opacity: .9; }
.sa-sun.twilight { fill: #ff8a5c; filter: drop-shadow(0 0 6px #ff6b9a); animation: corePulse 3s ease-in-out infinite; }
.sa-done.full { opacity: .55; }
.sa-twi { stroke-width: 3; }
.sa-tw { font-size: 11.5px; }
/* Flussverlauf: feste Anzeige, normaler Mauszeiger */
.ov-map .leaflet-container, .map.leaflet-container { cursor: default; }


/* Startanimation Flussverlauf: Stationen ploppen auf */
.leaflet-marker-icon > * { transition: opacity .25s; }
.leaflet-marker-icon.st-wait > * { opacity: 0; transform: scale(.2); }
.leaflet-marker-icon.st-pop > * { animation: stPop 1s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes stPop { 0% { opacity: 0; transform: scale(.2); } 45% { opacity: 1; transform: scale(1.45); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }
.leaflet-marker-icon.st-pop .ping { animation: ping .8s ease-out 3; }
.leaflet-marker-icon.st-pop .dotm { box-shadow: 0 0 22px var(--cyan), 0 0 40px var(--cyan); }


/* Seen im Flussverlauf */
.river-flow.lake { stroke-dasharray: 2 22; animation-duration: 3.2s; stroke-opacity: .6; }
.river-core.lake { stroke-width: 2.2; }
.river-glow.lake { stroke-width: 10; stroke-opacity: .14; }
.river-core.lake.side { stroke: #8a97a1; stroke-opacity: .6; stroke-width: 1.4; }
.river-glow.lake.side { stroke-opacity: 0; }
.river-flow.lake.side { stroke-opacity: 0; animation: none; }

/* Glanzeffekt über den Feldern: dezenter */
.hud::after {
  width: 26%;
  background: linear-gradient(100deg, transparent, rgba(0, 229, 255, .022), transparent);
  animation: shimmer 14s ease-in-out infinite; animation-delay: var(--d, 0s);
}
@keyframes shimmer { 0%, 82% { left: -60%; } 100% { left: 130%; } }

/* Wettervorhersage: Inhalte nie im Feld abschneiden – zu wenig Platz wird per Einpassung gelöst */
#pg-weather .page-in > section.hud { min-height: min-content; }
#pg-weather .hours, #pg-weather .days { min-height: min-content; }

/* =====================================================================
   Kopfleiste kompakter: Gewässer-Reiter schmaler, Mail/Einstellungen als Symbole
   ===================================================================== */
.topbar { gap: 14px; padding: 8px 16px; }
.reactor { width: 38px; height: 38px; }
.brand-text b { font-size: 15px; letter-spacing: 2.5px; }
.nav-main { gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav-main::-webkit-scrollbar { display: none; }
.nav-main a { padding: 6px 12px; font-size: 11px; letter-spacing: 1.5px; white-space: nowrap; flex-shrink: 0; }
.nav-main a .dot { width: 6px; height: 6px; margin-right: 6px; }
.nav-tools { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }
.nav-tools .tool {
  display: flex; align-items: center; gap: 5px; padding: 5px 8px; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); font-family: var(--f-hud); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; transition: .2s;
}
.nav-tools .tool svg.ic { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav-tools .tool:hover { color: var(--text); border-color: var(--line-strong); background: rgba(0, 229, 255, .08); }
.nav-tools .tool.active { color: #001018; background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow); }
.sys { gap: 12px; }
.clock { font-size: 18px; }
@media (max-width: 900px) { .nav-tools { margin-left: 0; } .nav-tools .tool span { display: none; } }

/* Uhr: feste Ziffernbreite */
.clock { display: inline-flex; white-space: nowrap; }
.clock .cd { display: inline-block; width: .78em; text-align: center; }
.clock .cs { display: inline-block; width: .38em; text-align: center; }

/* Live-Zeitangaben (Countdown, "vor x min"): feste Ziffernbreite, Platz reserviert */
.live-t { display: inline-block; white-space: nowrap; }
.live-t .cd { display: inline-block; width: .78em; text-align: center; }
.live-t.until { min-width: 8.2em; }
.live-t.ago { min-width: 7.6em; text-align: center; }

/* Wettervorhersage (Firefox-fest): Felder mindestens so hoch wie ihr Inhalt,
   zusätzlicher Platz wird anteilig verteilt (flex-basis auto statt 0) */
@media (min-width: 1200px) and (min-height: 700px) {
  #pg-weather .page-in > section.hud:nth-of-type(1) { flex: 1 1 auto; }
  #pg-weather .page-in > section.hud:nth-of-type(2) { flex: 1.25 1 auto; }
  #pg-weather .hours, #pg-weather .days { flex: 1 1 auto; }
}
@media (max-width: 1199px), (max-height: 699px) {
  .wx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(300px, auto); }
}
@media (max-width: 1000px) { .wx-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }

/* =====================================================================
   Daily-Mail: Empfänger-Karten mit eigenen Versandzeiten
   ===================================================================== */
.rc-card { border: 1px solid var(--line); background: rgba(0, 229, 255, .03); padding: 12px 14px; margin-bottom: 12px; transition: opacity .2s; }
.rc-card.off { opacity: .55; }
.rc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rc-who { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.rc-who b { font-family: var(--f-hud); font-size: 13px; letter-spacing: 1px; color: #fff; font-weight: 500; }
.rc-who span { font-size: 13px; color: var(--muted); }
.rc-body { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr); gap: 16px; margin-top: 10px; }
@media (max-width: 900px) { .rc-body { grid-template-columns: 1fr; } }
.rc-col h4 { margin: 0 0 6px; font-family: var(--f-hud); font-size: 10px; letter-spacing: 2px; color: var(--cyan-soft); text-transform: uppercase; font-weight: 500; }
.rc-col h4 small { font-family: var(--f-text); letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12px; margin-left: 6px; }
.rc-waters { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rc-waters .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.rc-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .rc-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-slot { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 6px 8px; transition: .2s; }
.rc-slot.on { border-color: var(--cyan); box-shadow: inset 0 0 18px rgba(0, 229, 255, .12); }
.rc-slot input[type=time] { flex: 1; min-width: 0; padding: 4px 6px; font-size: 14px; }
.rc-slot:not(.on) input[type=time] { opacity: .5; }

/* Screenshot für die Daily-Mail: keine Bedienelemente */
html.mailshot .kiosk-ctl, html.mailshot .fs-hint, html.mailshot .dots, html.mailshot #scanline,
html.mailshot #sb-wrap .btn-full, html.mailshot .tip { display: none !important; }
html.mailshot .page-in { padding-right: 18px; }
html.mailshot #sb span:has(> [data-until]), html.mailshot #sb > span:has(> b[data-until]) { display: none; }
/* Screenshot für die Mail: kein Seitenrand */
html.mailshot .page-in { padding-left: 4px; padding-right: 4px; }

/* Daily-Mail: Wochentage je Empfänger */
.rc-body { grid-template-columns: minmax(200px, 1fr) auto minmax(320px, 2fr); }
@media (max-width: 1200px) { .rc-body { grid-template-columns: 1fr 1fr; } .rc-body > .rc-col:last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) { .rc-body { grid-template-columns: 1fr; } }
.rc-days { display: flex; gap: 4px; flex-wrap: wrap; }
.day-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; cursor: pointer; user-select: none;
  border: 1px solid var(--line); font-family: var(--f-hud); font-size: 11px; letter-spacing: 1px; color: var(--muted); transition: .2s;
}
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip:hover { border-color: var(--line-strong); color: var(--text); }
.day-chip.on { color: #001018; background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow); font-weight: 700; }
/* Empfänger-Karte: Gewässer | Wochentage, darunter Versandzeiten über die volle Breite */
.rc-body { grid-template-columns: minmax(220px, 1fr) auto; }
.rc-body > .rc-col:last-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .rc-body { grid-template-columns: 1fr; } }
.rc-slot input[type=time] { min-width: 96px; }


/* Daily-Mail: Wochenplan je Empfänger */
.rc-body { grid-template-columns: 1fr; }
.rc-week { display: grid; gap: 4px; }
.wk-row { display: grid; grid-template-columns: 54px repeat(5, minmax(0, 1fr)) auto; gap: 6px; align-items: center; padding: 3px 4px; border: 1px solid transparent; }
.wk-row.has { border-color: rgba(0, 229, 255, .12); background: rgba(0, 229, 255, .03); }
.wk-day { font-family: var(--f-hud); font-size: 13px; letter-spacing: 1.5px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.1; }
.wk-row.has .wk-day { color: var(--cyan); }
.wk-day small { font-family: var(--f-text); font-size: 10px; letter-spacing: 0; color: var(--muted); }
.wk-copy { display: flex; gap: 3px; }
.wk-copy .btn { padding: 3px 7px; font-size: 8.5px; letter-spacing: 1px; opacity: .55; }
.wk-row:hover .wk-copy .btn { opacity: 1; }
.wk-row .rc-slot { padding: 4px 6px; }
.wk-row .rc-slot input[type=time] { min-width: 84px; font-size: 13px; }
@media (max-width: 1250px) { .wk-row { grid-template-columns: 44px repeat(5, minmax(0, 1fr)); } .wk-copy { grid-column: 2 / -1; justify-content: flex-end; } }
@media (max-width: 800px) { .wk-row { grid-template-columns: 1fr 1fr; } .wk-day { grid-column: 1 / -1; flex-direction: row; gap: 8px; } }

/* Vollbild: Uhr links neben dem Schließen-Button */
.kiosk-ctl { padding: 3px 4px 3px 12px; gap: 10px; }
.kiosk-ctl .clock { font-size: 20px; margin: 0; }
body.kiosk #pg-overview .statusbar#sb-wrap { padding-right: 300px; }
body.kiosk .page-title { padding-right: 300px; }

/* ---------------- Ausfall von Messstellen / Durchschnitt ---------------- */
.big.stale-val, .big.stale-val .unit { color: var(--down) !important; text-shadow: 0 0 12px rgba(255, 79, 123, .7) !important; }
.big.stale-val { animation: stalePulse 1.6s ease-in-out infinite; }
@keyframes stalePulse { 50% { opacity: .35; } }
.avg-why { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-family: var(--f-text); font-size: 12px; line-height: 1.2; color: var(--down); }
.avg-why b { font-weight: 600; color: var(--down); }
.out-note { color: var(--down); }
.big.warn-val, .big.warn-val .unit { color: #ff9d2e !important; text-shadow: 0 0 10px rgba(255, 157, 46, .55) !important; }
.avg-warn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; font-family: var(--f-text); font-size: 12px; line-height: 1.15; color: #ff9d2e; }
.avg-warn b { font-weight: 600; }
.avg-why .late, .warn-note { color: #ff9d2e; }
.st-marker.warn .dotm { background: #ff9d2e; box-shadow: 0 0 12px #ff9d2e, 0 0 0 3px rgba(0, 0, 0, .6); }
.st-marker.warn .ping { border-color: #ff9d2e; }
.st-marker.warn .st-label small { color: #ff9d2e; }
.st-marker.out .dotm { background: var(--down); box-shadow: 0 0 12px var(--down), 0 0 0 3px rgba(0, 0, 0, .6); }
.st-marker.out .ping { border-color: var(--down); }
.st-marker.out .st-label small { color: var(--down); }

/* Einheiten in den kleinen Kästchen der Übersicht */
.ov-tiles .tr-box div small { font-family: var(--f-text); color: var(--muted); font-size: 9.5px; }
body.kiosk .ov-grid2 .ov-tiles .tr-box div small { font-size: clamp(9.5px, 1.1vh, 12px); }

/* ---------------- Seitenaufbau: Felder klappen nacheinander aus einer leuchtenden Linie auf ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .page .hud { animation: hudBuild 1.1s cubic-bezier(.3, .7, .2, 1) var(--b, 0ms) backwards; }
  .page .hud > header { animation: hudHead .6s ease-out calc(var(--b, 0ms) + .45s) backwards; }
  .page .hud > :not(header) { animation: hudFill .6s ease-out calc(var(--b, 0ms) + .6s) backwards; }
  .page .page-title, .page #sb-wrap { animation: hudHead .7s ease-out backwards; }
  .page .hour { animation-delay: calc(var(--b, 0ms) + .6s + var(--i) * 25ms); }
  .page .day { animation-delay: calc(var(--b, 0ms) + .6s + var(--i) * 60ms); }
  /* Seiten warten, bis sie zum ersten Mal zu sehen sind */
  .page:not(.built) .hud, .page:not(.built) .hud *, .page:not(.built) .page-title, .page:not(.built) #sb-wrap { animation-play-state: paused; }
  /* Reihenfolge */
  .ov-tiles .tile:nth-child(1) { --b: 150ms; }
  .ov-tiles .tile:nth-child(2) { --b: 280ms; }
  .ov-tiles .tile:nth-child(3) { --b: 410ms; }
  .ov-tiles .tile:nth-child(4) { --b: 540ms; }
  .ov-tiles .tile:nth-child(5) { --b: 670ms; }
  .ov-tiles .tile:nth-child(6) { --b: 800ms; }
  .ov-tiles .tile:nth-child(7) { --b: 930ms; }
  .ov-tiles .tile:nth-child(8) { --b: 1060ms; }
  .ov-tiles .tile:nth-child(9) { --b: 1190ms; }
  .ov-map { --b: 1350ms; }
  .ov-hours { --b: 1500ms; }
  .ov-chart { --b: 1650ms; }
  #pg-weather .page-in > section.hud:nth-of-type(2) { --b: 350ms; }
  .det-cols .st-panel:nth-child(1) { --b: 120ms; }
  .det-cols .st-panel:nth-child(2) { --b: 320ms; }
  .det-cols .st-panel:nth-child(3) { --b: 520ms; }
  .det-cols .st-panel:nth-child(4) { --b: 720ms; }
  .det-cols .st-panel:nth-child(5) { --b: 920ms; }
  .det-cols .st-panel:nth-child(6) { --b: 1120ms; }
  .det-chart { --b: 1000ms; }
  .wx-grid > .hud:nth-child(1) { --b: 100ms; }
  .wx-grid > .hud:nth-child(2) { --b: 230ms; }
  .wx-grid > .hud:nth-child(3) { --b: 360ms; }
  .wx-grid > .hud:nth-child(4) { --b: 490ms; }
  .wx-grid > .hud:nth-child(5) { --b: 620ms; }
  .wx-grid > .hud:nth-child(6) { --b: 750ms; }
  .wx-grid > .hud:nth-child(7) { --b: 880ms; }
  .wx-grid > .hud:nth-child(8) { --b: 1010ms; }
  /* Inhalte der Felder starten erst, wenn ihr Feld steht */
  .page .tile .wt-gauge .needle-rot, .page .tile .wt-gauge .seg:not(.on) { animation-delay: calc(var(--b, 0ms) + .6s); }
  .page .tile .wt-gauge .needle-wob { animation-delay: calc(var(--b, 0ms) + 3.2s); }
  .page .tile .baro-gauge .needle-wob { animation-delay: calc(var(--b, 0ms) + 3.4s); }
  .page .tile .baro-gauge .needle-rot { animation-delay: calc(var(--b, 0ms) + .7s); }
  .page .tile .wave-box .fill { animation-delay: calc(var(--b, 0ms) + .6s); }
  .page .tile .ring-val { animation-delay: calc(var(--b, 0ms) + .6s); }
  .page .tile .wave-box .ticks { animation-delay: calc(var(--b, 0ms) + .6s); }
  .page [data-tile="temp"] .main .wi { animation-delay: calc(var(--b, 0ms) + .6s); }
  .page [data-tile="temp"] .main .wi .cloud-g { animation-delay: calc(var(--b, 0ms) + .95s), calc(var(--b, 0ms) + 2.1s); }
  .page [data-tile="temp"] .main .wi .sun-r { animation-delay: calc(var(--b, 0ms) + .65s), calc(var(--b, 0ms) + 2.1s); }
  .page .tile .roll.first .strip { transition-delay: calc(var(--b, 0ms) + .6s); }
}
@keyframes hudBuild {
  0% { opacity: 0; clip-path: inset(50% 0 50% 0); border-color: var(--cyan); }
  12% { opacity: 1; clip-path: inset(49% 0 49% 0); border-color: var(--cyan); }
  38% { clip-path: inset(48% 0 48% 0); border-color: var(--cyan); }
  100% { clip-path: inset(-50px); }
}
@keyframes hudHead { from { opacity: 0; transform: translateX(-12px); } }
@keyframes hudFill { from { opacity: 0; } }
