/* Pforte – Farbwelt nach saar-app.de: Dunkelblau, Orange, helles Papiergrau */
:root {
  --navy: #003C6E; --deep: #062A4D; --blau: #0A5A9C; --himmel: #4FA3E3;
  --orange: #F28700; --orange-d: #D97800; --orange-hell: #FFB54D;
  --paper: #F4F6F8; --flaeche: #ffffff; --ink: #10243A; --slate: #55687C; --line: #DDE3EA;
  --gut: #1E9E6A; --warn: #B42318; --kalt: #3B82C4;
  --spur: #E6ECF2;
  --schatten: 0 1px 2px rgba(0, 20, 40, .06), 0 8px 24px rgba(0, 20, 40, .08);
  --schatten-hoch: 0 2px 4px rgba(0, 20, 40, .08), 0 18px 50px rgba(0, 20, 40, .18);
  --radius: 20px;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, system-ui, sans-serif;
  --cond: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #04172B; --flaeche: #0B2743; --ink: #EAF1F8; --slate: #9DB2C8; --line: #17406A; --spur: #123758;
    --navy: #6DB3F2; --kalt: #6DB3F2; --gut: #3CCB92; --warn: #FF8A80;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --schatten-hoch: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 50px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
.lade { text-align: center; color: var(--slate); margin-top: 30vh; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }

@keyframes auf { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(60, 203, 146, .6); } 70% { box-shadow: 0 0 0 9px rgba(60, 203, 146, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 203, 146, 0); } }
@keyframes schweben { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3%, -4%) scale(1.08); } }
@keyframes glimmen { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes welle { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes laden { to { background-position: -200% 0; } }

/* ------------------------------------------------ Kopfbereich */
/* Schmale Leiste, die oben haften bleibt */
.kopfleiste {
  position: sticky; top: 0; z-index: 20; color: #fff; background: linear-gradient(100deg, #003C6E, #0A5A9C);
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  transition: box-shadow .25s;
}
.kopfleiste.gescrollt { box-shadow: 0 6px 22px rgba(0, 20, 40, .35); }
.innen { max-width: 1040px; margin: 0 auto; }
.leiste-oben { display: flex; align-items: center; gap: 8px; }
.marke-logo { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.marke-logo { gap: 12px; }
.marke-logo img { width: 44px; height: 44px; border-radius: 13px; flex: none;
  box-shadow: 0 0 0 1.500px rgba(255, 255, 255, .28), 0 6px 16px rgba(0, 0, 0, .35); }
.wortmarke { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wortmarke b { font: 700 25px/1 var(--cond); letter-spacing: .09em; }
.wortmarke small { font: 600 10.500px/1 var(--sans); letter-spacing: .17em; text-transform: uppercase; color: #C9D8E6; white-space: nowrap;
  padding-top: 5px; border-top: 2px solid #F28700; align-self: flex-start; }
@media (max-width: 560px) {
  .marke-logo { gap: 9px; }
  .marke-logo img { width: 36px; height: 36px; border-radius: 11px; }
  .wortmarke b { font-size: 21px; }
  .wortmarke small { display: none; }
}
.mini { display: flex; align-items: center; gap: 6px; font: 700 17px/1 var(--cond); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transform: translateY(5px); transition: opacity .25s, transform .25s; margin-right: 4px; }
.mini svg { width: 22px; height: 22px; color: var(--orange-hell); }
.gescrollt .mini { opacity: 1; transform: none; }
.rund {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); flex: none;
  background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; transition: background .2s, transform .15s;
}
.rund:hover { background: rgba(255, 255, 255, .2); }
.rund:active { transform: scale(.94); }
.rund svg { width: 20px; height: 20px; }
/* Begrüßung darunter, rollt beim Scrollen weg */
.buehne {
  position: relative; overflow: hidden; color: #fff; background: linear-gradient(100deg, #003C6E, #0A5A9C);
  padding: 2px max(16px, env(safe-area-inset-right)) 58px max(16px, env(safe-area-inset-left));
}
.buehne.flach { padding-bottom: 16px; }
.buehne::before, .buehne::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(46px); pointer-events: none;
  animation: schweben 16s ease-in-out infinite;
}
.buehne::before { width: 280px; height: 280px; right: -80px; top: -170px; background: rgba(242, 135, 0, .5); }
.buehne::after { width: 260px; height: 260px; left: -120px; bottom: -200px; background: rgba(79, 163, 227, .5); animation-delay: -7s; }
.buehne > * { position: relative; z-index: 1; }
.gruss { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gruss h1 { margin: 0; font: 700 clamp(22px, 5.400vw, 32px)/1.08 var(--cond); letter-spacing: .01em; }
.gruss p { margin: 4px 0 0; color: #C9D8E6; font-size: 13.500px; display: flex; align-items: center; gap: 7px; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: #FF8A80; flex: none; }
.online .punkt { background: #3CCB92; animation: puls 2.400s infinite; }
.wetter-gross { display: flex; align-items: center; gap: 9px; text-align: right; flex: none; }
.wetter-gross svg { width: 42px; height: 42px; color: var(--orange-hell); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.wetter-gross .grad { font: 700 32px/1 var(--cond); font-variant-numeric: tabular-nums; }
.wetter-gross .grad small { font-size: 16px; font-weight: 500; color: #C9D8E6; }
.wetter-gross .lage { color: #C9D8E6; font-size: 12.500px; margin-top: 2px; }

/* Kennzahlen, die in den Kopf hineinragen */
@media (max-width: 420px) { .kennzahlen { grid-template-columns: 1fr 1fr !important; gap: 9px !important; } .kennzahl .w { font-size: 21px; } .kennzahl .bild { width: 36px; height: 36px; } }
.kennzahlen {
  max-width: 1040px; margin: -46px auto 0; padding: 0 max(16px, env(safe-area-inset-left));
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; position: relative; z-index: 2;
}
.topzeile { max-width: 1040px; margin: 6px auto -6px; padding: 0 16px; display: flex; justify-content: flex-end; }
.topzeile .textknopf { padding: 2px 0; font-size: 12.500px; }
.rubrik { font: 700 19px/1 var(--cond); letter-spacing: .02em; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.rubrik::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, #FFB54D, #F28700); }
.rubrik::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.kachel.flach { min-height: 92px; }
.kachel.laeuft .chip { background: linear-gradient(135deg, #3CCB92, #1E9E6A); color: #fff; box-shadow: 0 0 0 5px rgba(30, 158, 106, .16); }
.kachel.laeuft .zustand { color: var(--gut); }
.kennzahl {
  background: var(--flaeche); border-radius: 18px; padding: 12px 14px; box-shadow: var(--schatten-hoch);
  display: flex; align-items: center; gap: 12px; animation: auf .5s both;
}
.kennzahl .bild { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #FFB54D, #F28700); color: #fff; box-shadow: 0 6px 14px rgba(242, 135, 0, .35); }
.kennzahl.blau .bild { background: linear-gradient(135deg, #0A5A9C, #003C6E); box-shadow: 0 6px 14px rgba(0, 60, 110, .35); }
.kennzahl.gruen .bild { background: linear-gradient(135deg, #3CCB92, #1E9E6A); box-shadow: 0 6px 14px rgba(30, 158, 106, .35); }
.kennzahl .bild svg { width: 22px; height: 22px; }
.kennzahl .t { font-size: 12.5px; color: var(--slate); }
.kennzahl .w { font: 700 24px/1.1 var(--cond); font-variant-numeric: tabular-nums; }
.kennzahl .w small { font: 500 14px var(--sans); color: var(--slate); margin-left: 3px; }

/* ------------------------------------------------ Reiter */
.reiter {
  max-width: 1040px; margin: 18px auto 0; padding: 0 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
  border: 1px solid var(--line); background: var(--flaeche); padding: 9px 16px 9px 12px; border-radius: 999px; color: var(--slate);
  white-space: nowrap; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 7px; transition: all .2s;
}
.reiter button svg { width: 18px; height: 18px; }
.reiter button.aktiv { background: linear-gradient(100deg, #003C6E, #0A5A9C); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(0, 60, 110, .3); }
@media (max-width: 700px) {
  .reiter {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; gap: 0; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--flaeche) 88%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  }
  .reiter button { flex: 1; flex-direction: column; gap: 2px; border: 0; background: none; padding: 6px 2px; font-size: 11px; border-radius: 12px; min-width: 0; }
  .reiter button svg { width: 23px; height: 23px; }
  .reiter button.aktiv { background: none; box-shadow: none; color: var(--orange); }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
}

/* ------------------------------------------------ Bereiche und Kacheln */
main { padding: 6px 16px 48px; max-width: 1040px; margin: 0 auto; }
section { margin-top: 26px; }
section > h2 {
  font: 700 22px/1 var(--cond); letter-spacing: .02em; margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
section > h2 .bild { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0A5A9C, #003C6E); }
section > h2 .bild svg { width: 18px; height: 18px; }
section > h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .gitter { grid-template-columns: 1fr 1fr; gap: 10px; } }

.kachel {
  position: relative; background: var(--flaeche); border-radius: var(--radius); padding: 16px; box-shadow: var(--schatten);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); text-align: left; min-height: 118px; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; animation: auf .5s both; transition: transform .18s, box-shadow .18s, background .3s;
}
.kachel:nth-child(2) { animation-delay: .04s; } .kachel:nth-child(3) { animation-delay: .08s; }
.kachel:nth-child(4) { animation-delay: .12s; } .kachel:nth-child(5) { animation-delay: .16s; }
.kachel:nth-child(n+6) { animation-delay: .2s; }
button.kachel { width: 100%; }
@media (hover: hover) { button.kachel:hover, .kachel.hebt:hover { transform: translateY(-3px); box-shadow: var(--schatten-hoch); } }
button.kachel:active { transform: scale(.975); }
.kachel.breit { grid-column: span 2; }
.gitter.dicht { grid-auto-flow: dense; }
.kachel.voll { grid-column: 1 / -1; }
.kachel .kopf { display: flex; align-items: center; gap: 9px; }
.kachel .chip { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--navy) 10%, transparent); color: var(--navy); transition: all .3s; }
.kachel .chip svg { width: 19px; height: 19px; }
.kachel .titel { font-size: 13.5px; color: var(--slate); line-height: 1.25; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.kachel .wert { font: 700 30px/1.05 var(--cond); font-variant-numeric: tabular-nums; margin-top: auto; }
.kachel .wert small { font: 500 15px var(--sans); color: var(--slate); margin-left: 4px; }
.kachel .neben { font-size: 12.5px; color: var(--slate); }
.kachel.fehlt .wert { font: 500 16px var(--sans); color: var(--slate); }
.kachel.wartet { pointer-events: none; }
.kachel.wartet::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) 0 0 / 200% 100%;
  animation: laden 1s linear infinite;
}

/* Ring-Anzeige */
.ring { display: flex; align-items: center; gap: 16px; flex: 1; }
.ring svg { width: 124px; height: 124px; flex: none; transform: rotate(-90deg); }
.ring .spur { fill: none; stroke: var(--spur); stroke-width: 11; }
.ring .bogen { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ring .mitte { position: absolute; inset: 0; display: grid; place-items: center; }
.ring .halter { position: relative; width: 124px; height: 124px; flex: none; }
.ring .halter .chip { background: none; width: 30px; height: 30px; color: var(--orange); }
.ring .halter .chip svg { width: 28px; height: 28px; }
.ring .zahlen .wert { font-size: 38px; }
.ring .skala { font-size: 12px; color: var(--slate); margin-top: 6px; }
.kachel.aktiv .ring .halter .chip { animation: glimmen 2.4s ease-in-out infinite; }

/* Balken, Thermometer */
.balken { height: 9px; border-radius: 9px; background: var(--spur); overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 9px; width: 0; background: linear-gradient(90deg, #0A5A9C, #4FA3E3); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.thermo { position: relative; height: 9px; border-radius: 9px; background: linear-gradient(90deg, #3B82C4, #7FC8F0 30%, #FFD27A 55%, #F28700 78%, #B42318); margin: 4px 0 2px; }
.thermo i { position: absolute; top: 50%; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid var(--ink);
  transform: translate(-50%, -50%); left: 0; transition: left .9s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* Speicher (Akku) */
.akku { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.akku .huelle { position: relative; width: 74px; height: 36px; border: 3px solid var(--ink); border-radius: 9px; padding: 3px; flex: none; }
.akku .huelle::after { content: ""; position: absolute; right: -8px; top: 9px; width: 5px; height: 12px; background: var(--ink); border-radius: 0 3px 3px 0; }
.akku .huelle i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #1E9E6A, #3CCB92); transition: width .9s cubic-bezier(.2, .8, .2, 1), background .4s; }
.akku.niedrig .huelle i { background: linear-gradient(90deg, #D97800, #FFB54D); }
.akku.leer .huelle i { background: linear-gradient(90deg, #B42318, #F0685C); }

/* Heizöltank */
.tank { display: flex; align-items: flex-end; gap: 14px; margin-top: auto; }
.tank .gefaess { position: relative; width: 62px; height: 62px; border-radius: 14px; border: 3px solid var(--ink); overflow: hidden; flex: none; background: var(--spur); }
.tank .gefaess i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #FFB54D, #D97800); transition: height 1s cubic-bezier(.2, .8, .2, 1); }
.tank .gefaess i::before { content: ""; position: absolute; left: 0; top: -5px; width: 200%; height: 10px;
  background: radial-gradient(circle at 10px 10px, #FFB54D 9px, transparent 10px) 0 0 / 20px 10px repeat-x; animation: welle 3s linear infinite; }

/* Umschalter (Heizstoß, freier Tag) und Licht */
.schalter-bild { margin-left: auto; width: 50px; height: 29px; border-radius: 29px; background: var(--spur); position: relative; flex: none; transition: background .3s; }
.schalter-bild::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.kachel.an .schalter-bild { background: var(--orange); }
.kachel.an .schalter-bild::after { transform: translateX(21px); }
.kachel.an { background: linear-gradient(145deg, #FFF4E0, #FFE3B8); border-color: #FFC978; box-shadow: 0 10px 30px rgba(242, 135, 0, .25); color: #10243A; }
.kachel.an .titel, .kachel.an .neben { color: #6B4A12; }
.kachel.an .chip { background: linear-gradient(135deg, #FFB54D, #F28700); color: #fff; box-shadow: 0 0 0 6px rgba(242, 135, 0, .18), 0 6px 18px rgba(242, 135, 0, .5); }
.kachel.licht .chip { width: 46px; height: 46px; border-radius: 50%; }
.kachel.licht .chip svg { width: 25px; height: 25px; }
.kachel .zustand { font: 700 22px/1 var(--cond); margin-top: auto; }

/* Knöpfe „Alle auf / Alle zu“ */
.kachel.knopf { background: linear-gradient(120deg, #003C6E, #0A5A9C); color: #fff; border: 0; min-height: 96px; box-shadow: 0 10px 26px rgba(0, 60, 110, .32); }
.kachel.knopf.zu { background: linear-gradient(120deg, #062A4D, #003C6E); }
.kachel.knopf .titel, .kachel.knopf .neben { color: #C9D8E6; }
.kachel.knopf .gross { font: 700 24px/1 var(--cond); display: flex; align-items: center; gap: 10px; margin-top: auto; }
.kachel.knopf .gross svg { width: 26px; height: 26px; color: var(--orange-hell); }

/* Rollladen */
.rollo { display: flex; gap: 12px; align-items: center; }
.fenster { position: relative; width: 46px; height: 56px; border-radius: 7px; border: 3px solid var(--ink); overflow: hidden; flex: none;
  background: linear-gradient(160deg, #BFE3FA, #7FC8F0); }
.fenster::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(16, 36, 58, .35); }
.fenster i { position: absolute; left: 0; right: 0; top: 0; height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1);
  background: repeating-linear-gradient(180deg, #8494A6 0 4px, #6B7C90 4px 5px); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.tasten { display: flex; gap: 7px; margin-top: auto; }
.tasten button { flex: 1; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 9px 0; display: grid; place-items: center; transition: all .15s; }
.tasten button svg { width: 19px; height: 19px; }
.tasten button:hover { border-color: var(--navy); }
.tasten button:active { background: var(--orange); color: #fff; border-color: var(--orange); transform: scale(.94); }

/* Räume */
.raeume { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 26px; }
.raum { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.raum .name { font-weight: 600; font-size: 15px; }
.raum .ist { font: 700 21px/1 var(--cond); font-variant-numeric: tabular-nums; text-align: right; }
.raum .ist small { font: 500 12px var(--sans); color: var(--slate); margin-left: 2px; }
.raum .strich { height: 6px; border-radius: 6px; background: var(--spur); position: relative; overflow: hidden; }
.raum .strich i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, #4FA3E3, #F28700); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.raum .soll { font-size: 12px; color: var(--slate); text-align: right; white-space: nowrap; }
.raum.stellbar { padding: 10px 0; }
.sollknopf { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); font: 600 13.500px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; transition: all .15s; }
.sollknopf svg { width: 14px; height: 14px; color: var(--orange-d); }
.titelzeile { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.titelzeile h2 { font: 700 22px/1 var(--cond); letter-spacing: .02em; margin: 0; display: flex; align-items: center; gap: 10px; flex: 1; }
.titelzeile h2 .bild { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FFB54D, #F28700); }
.titelzeile h2 .bild svg { width: 18px; height: 18px; }
.titelzeile h2 .bild.blau { background: linear-gradient(135deg, #0A5A9C, #003C6E); }
.titelzeile h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.textknopf { background: none; border: 0; color: var(--slate); font-size: 13.500px; text-decoration: underline; padding: 8px 0 0; align-self: flex-start; }
[hidden] { display: none !important; }
.leer { background: var(--flaeche); border-radius: var(--radius); padding: 34px 22px; text-align: center; box-shadow: var(--schatten); animation: auf .5s both;
  border: 1px dashed var(--line); }
.leer-bild { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #FFB54D, #F28700); box-shadow: 0 10px 24px rgba(242, 135, 0, .35); }
.leer-bild svg { width: 32px; height: 32px; }
.leer b { font: 700 22px var(--cond); display: block; }
.leer p { color: var(--slate); max-width: 360px; margin: 8px auto 0; }
.leer .haupt { max-width: 280px; }
dialog.blatt.hoch { max-height: min(86vh, 760px); }
dialog.blatt.hoch form { display: flex; flex-direction: column; max-height: inherit; }
.favliste { overflow-y: auto; margin: 14px -6px 0; padding: 0 6px; flex: 1; min-height: 0; }
.favgruppe h3 { font: 700 16px var(--cond); letter-spacing: .03em; color: var(--slate); margin: 12px 0 0; text-transform: uppercase; }
.favgruppe .marken { margin: 8px 0 6px; }
.favkopf { font: 700 18px var(--cond); margin: 16px 0 8px; }
.favkopf:first-child { margin-top: 2px; }
.folgezeile { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); margin-bottom: 7px; }
.folgezeile .nr { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font: 700 13px var(--sans);
  background: linear-gradient(135deg, #FFB54D, #F28700); }
.folgezeile .was { flex: 1; min-width: 0; font-weight: 600; font-size: 14.500px; overflow-wrap: anywhere; }
.folgezeile button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--flaeche); display: grid; place-items: center; flex: none; transition: all .15s; }
.folgezeile button svg { width: 20px; height: 20px; }
.folgezeile button:active:not(:disabled) { background: var(--orange); border-color: var(--orange); color: #fff; transform: scale(.93); }
.folgezeile button:disabled { opacity: .3; cursor: default; }
.folgezeile button.weg { font-size: 22px; line-height: 1; color: var(--warn); }
.sollknopf:hover { border-color: var(--orange); }
.sollknopf:active { transform: scale(.96); }

/* Fenster zum Einstellen */
dialog.blatt { border: 0; padding: 0; border-radius: 26px; width: min(440px, calc(100vw - 24px)); background: var(--flaeche); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 10, 30, .5); animation: auf .28s both; }
dialog.blatt::backdrop { background: rgba(4, 23, 43, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.blatt form { padding: 22px 22px calc(20px + env(safe-area-inset-bottom)); }
@media (max-width: 700px) {
  dialog.blatt { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 26px 26px 0 0; }
}
.blatt-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.blatt-kopf h2 { font: 700 26px/1.1 var(--cond); margin: 0; }
.blatt-kopf p { margin: 4px 0 0; color: var(--slate); font-size: 14px; }
.schliessen { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--paper); font-size: 24px; line-height: 1; color: var(--slate); flex: none; }
.regler-wert { text-align: center; font: 700 68px/1 var(--cond); font-variant-numeric: tabular-nums; margin: 18px 0 14px; color: var(--orange-d); }
.regler-wert small { font: 500 24px var(--sans); color: var(--slate); margin-left: 6px; }
.regler-zeile { display: flex; align-items: center; gap: 12px; }
.pm { width: 48px; height: 48px; border-radius: 15px; border: 1px solid var(--line); background: var(--paper); font-size: 28px; line-height: 1; flex: none;
  display: grid; place-items: center; transition: all .15s; }
.pm:active { background: var(--orange); border-color: var(--orange); color: #fff; transform: scale(.93); }
.regler-zeile input[type=range] { flex: 1; min-width: 0; height: 44px; margin: 0; background: none; -webkit-appearance: none; appearance: none; --anteil: 50%; touch-action: pan-y; }
.regler-zeile input[type=range]::-webkit-slider-runnable-track { height: 14px; border-radius: 14px;
  background: linear-gradient(90deg, #4FA3E3, #FFB54D 60%, #F28700) 0 0 / 100% 100% no-repeat; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2); }
.regler-zeile input[type=range]::-moz-range-track { height: 14px; border-radius: 14px; background: linear-gradient(90deg, #4FA3E3, #FFB54D 60%, #F28700); }
.regler-zeile input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; border-radius: 50%; margin-top: -10px;
  background: #fff; border: 4px solid var(--orange); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.regler-zeile input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--orange); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.regler-skala { display: flex; justify-content: space-between; padding: 2px 60px 0; font-size: 12px; color: var(--slate); }
#sollfeld { font: 700 22px var(--cond); text-align: center; }
.regler-hinweis { color: var(--slate); font-size: 13px; margin: 10px 0 0; text-align: center; }
.blatt-fuss { display: flex; gap: 10px; margin-top: 8px; }
.blatt-fuss .haupt { margin-top: 0; flex: 2; max-width: none; }
.neben-knopf { flex: 1; padding: 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; }
.raum.wartet { opacity: .55; pointer-events: none; }
.raum.warm .ist { color: var(--orange-d); } .raum.kuehl .ist { color: var(--kalt); }

/* ------------------------------------------------ Anmeldung */
.tor {
  min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #062A4D, #003C6E 55%, #0A5A9C);
  padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
}
.tor::before, .tor::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); animation: schweben 18s ease-in-out infinite; }
.tor::before { width: 460px; height: 460px; right: -140px; top: -160px; background: rgba(242, 135, 0, .45); }
.tor::after { width: 420px; height: 420px; left: -160px; bottom: -180px; background: rgba(79, 163, 227, .45); animation-delay: -8s; }
.karte {
  position: relative; z-index: 1; width: 100%; max-width: 430px; background: var(--flaeche); color: var(--ink); border-radius: 26px;
  padding: 30px 26px; box-shadow: 0 30px 80px rgba(0, 10, 30, .45); animation: auf .6s both;
}
.karte .logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.karte .logo img { width: 62px; height: 62px; border-radius: 17px; box-shadow: 0 10px 24px rgba(0, 60, 110, .35); }
.karte .logo b { font: 700 34px/1 var(--cond); letter-spacing: .02em; display: block; }
.karte .logo span { font-size: 13.5px; color: var(--slate); }
.karte h1 { font: 700 26px/1.1 var(--cond); margin: 0 0 4px; }
.karte p { color: var(--slate); margin: 6px 0 14px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin: 14px 0 5px; }
input[type=text], input[type=password] {
  width: 100%; padding: 13px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--paper); transition: border-color .2s, box-shadow .2s;
}
input[type=text]:focus, input[type=password]:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 135, 0, .18); }
.haupt {
  width: 100%; margin-top: 20px; padding: 14px; border: 0; border-radius: 13px; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(100deg, #F28700, #FF9F1C); box-shadow: 0 10px 24px rgba(242, 135, 0, .4); transition: transform .15s, box-shadow .2s, filter .2s;
}
.haupt:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(242, 135, 0, .5); }
.haupt:active { transform: scale(.98); }
.haupt:disabled { opacity: .6; }
.fehler { color: var(--warn); font-size: 14px; min-height: 20px; margin-top: 12px; }
.fuss { position: relative; z-index: 1; color: #9FB6CC; font-size: 12.5px; text-align: center; margin-top: 18px; }
.tor .mitte { width: 100%; max-width: 430px; }
.qr { display: block; width: 190px; height: 190px; margin: 8px auto; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--schatten); }
.geheim { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; font-size: 13.5px; background: var(--paper); padding: 9px 11px; border-radius: 10px; user-select: all; border: 1px dashed var(--line); }
ol.schritte { padding-left: 0; list-style: none; counter-reset: s; margin: 16px 0 0; }
ol.schritte li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 18px; }
ol.schritte li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #0A5A9C, #003C6E); color: #fff; font-weight: 700; font-size: 14px; }
a { color: var(--orange-d); font-weight: 600; }

/* ------------------------------------------------ Verwaltung */
.block { background: var(--flaeche); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--schatten); margin-top: 18px; animation: auf .5s both;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.block h2 { font: 700 23px/1 var(--cond); margin: 0 0 6px; }
.block > p { color: var(--slate); margin: 4px 0 12px; font-size: 14.5px; }
.zeile { border-top: 1px solid var(--line); padding: 14px 0; }
.zeile:first-of-type { border-top: 0; }
.zeile .kopfzeile { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.zeile .wer { display: flex; align-items: center; gap: 11px; }
.zeile .bildchen { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 17px var(--cond);
  background: linear-gradient(135deg, #0A5A9C, #003C6E); }
.zeile .bildchen.chef { background: linear-gradient(135deg, #FFB54D, #F28700); }
.zeile b { font-size: 16px; display: block; }
.zeile .bildchen svg { width: 20px; height: 20px; }
.zeile .wer { min-width: 0; }
.zeile .wer > div { min-width: 0; }
.abzeichen { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font: 600 11.500px var(--sans); vertical-align: middle;
  background: linear-gradient(100deg, #F28700, #FF9F1C); color: #fff; }
.abzeichen.grau { background: var(--slate); }
.block .haupt { max-width: 340px; }
.zeile .neben { font-size: 13px; color: var(--slate); }
.marken { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.marke { font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: none; color: var(--slate); transition: all .2s; }
.marke.an { background: linear-gradient(100deg, #003C6E, #0A5A9C); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(0, 60, 110, .3); }
.leiste { display: flex; gap: 7px; flex-wrap: wrap; }
.leiste button { font-size: 13px; padding: 7px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; transition: border-color .2s; }
.leiste button:hover { border-color: var(--navy); }
.leiste button.gefahr { color: var(--warn); }
.link { background: var(--paper); padding: 12px; border-radius: 12px; word-break: break-all; font-size: 13px; user-select: all; margin: 10px 0; border: 1px dashed var(--orange); }
table.protokoll { width: 100%; border-collapse: collapse; font-size: 13px; }
table.protokoll td { padding: 7px 8px 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.protokoll td:first-child { white-space: nowrap; color: var(--slate); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rollen { overflow-x: auto; }

#meldung {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  background: var(--deep); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; box-shadow: var(--schatten-hoch);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center; z-index: 30; border-left: 4px solid var(--orange);
}
#meldung.zeigen { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
