/* MiniDisplay – Pastell-Mint, weiche Karten, kleiner Pixel-Dino. Keine externen Fonts/CDNs. */
:root {
  color-scheme: light;
  --bg: #eef8f2;
  --bg-blob-1: #d7f3e4;
  --bg-blob-2: #fdeee6;
  --bg-blob-3: #ece8ff;
  --card: #fffefb;
  --card-2: #f6fbf8;
  --ink: #1f2d28;
  --ink-2: #44574f;
  --muted: #5f726a;
  --line: #e1ebe5;
  --accent: #138a5f;
  --accent-ink: #ffffff;
  --accent-text: #0f7a53;
  --accent-soft: #dcf4e8;
  --accent-softer: #edf9f3;
  --focus: #2f6fe0;
  --peach: #ffe5d8;
  --lav: #ece7ff;
  --sun: #fff0c4;
  --pink: #ffe1ea;
  --good-bg: #dcf4e4; --good-ink: #146b37;
  --ok-bg: #e2f1fb; --ok-ink: #1d5f8f;
  --warn-bg: #fff0c9; --warn-ink: #7a4f00;
  --bad-bg: #ffe2e0; --bad-ink: #a32a26;
  --wait-bg: #eef1ef; --wait-ink: #4f5d57;
  --shadow: 0 1px 2px rgba(25, 70, 50, .05), 0 10px 30px -14px rgba(25, 90, 60, .22);
  --shadow-lift: 0 2px 4px rgba(25, 70, 50, .06), 0 16px 36px -14px rgba(25, 90, 60, .3);
  --radius: 22px;
  /* Diagramme (validiert: dataviz validate_palette, Oberfläche #fffefb) */
  --series-1: #16996a;
  --series-2: #7c6fd6;
  --grid: #e7eeea;
  --axis: #c3d0c9;
  --night: rgba(72, 82, 150, .085);
  /* Dino */
  --dino: #5cc977; --dino-dark: #2c8a4e; --dino-hi: #93e3a6; --dino-belly: #d9f6c9; --dino-ink: #1d2b26; --dino-cheek: #ff9eb4;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101614;
    --bg-blob-1: #15261f;
    --bg-blob-2: #241b1a;
    --bg-blob-3: #1c1a2c;
    --card: #1c2422;
    --card-2: #212b28;
    --ink: #e8f2ed;
    --ink-2: #bccbc4;
    --muted: #95a8a0;
    --line: #2b3734;
    --accent: #2aa877;
    --accent-ink: #06130d;
    --accent-text: #63d6a6;
    --accent-soft: #1c3a2e;
    --accent-softer: #19302a;
    --focus: #7fb0ff;
    --peach: #3a2a24; --lav: #2a2640; --sun: #3a321a; --pink: #3a2329;
    --good-bg: #173a26; --good-ink: #7fe0a3;
    --ok-bg: #16303f; --ok-ink: #8cc8f0;
    --warn-bg: #3a2f12; --warn-ink: #f5cf6b;
    --bad-bg: #3d1d1c; --bad-ink: #ff9d97;
    --wait-bg: #26302d; --wait-ink: #b3c2bb;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 36px -16px rgba(0, 0, 0, .7);
    --series-1: #2aa877;
    --series-2: #8a7fe6;
    --grid: #29332f;
    --axis: #3b4843;
    --night: rgba(150, 160, 235, .09);
    --dino: #4fbf6c; --dino-dark: #2a7d47; --dino-hi: #7fd796; --dino-belly: #c5ecb5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at -10% -10%, var(--bg-blob-1), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, var(--bg-blob-3), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, var(--bg-blob-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h3 { font-size: 1.02rem; font-weight: 750; letter-spacing: -.01em; }
h4.sub { font-size: .85rem; margin: 18px 0 8px; color: var(--ink-2); font-weight: 700; }
p { margin: 0 0 .5em; }
a { color: var(--accent-text); }
code, pre { font-family: var(--mono); font-size: .85em; }
pre { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 6px 0 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.block { display: block; }
.center { text-align: center; }
.err-text { color: var(--bad-ink); font-weight: 600; }
.warn-text { color: var(--warn-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

/* ---------- Kopf ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-dino { display: inline-flex; filter: drop-shadow(0 4px 6px rgba(30, 110, 60, .18)); animation: bob 2.4s steps(2, jump-none) infinite; }
.brand-dino svg { width: 46px; height: auto; }
.brand-title { line-height: 1; }
.pixel-title { color: var(--ink); display: inline-flex; }
.pixel-title svg { height: 18px; width: auto; }
.brand-sub { margin: 4px 0 0; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: .8rem; font-weight: 650; color: var(--ink-2); white-space: nowrap;
}
.pill.small { padding: 3px 10px 3px 8px; font-size: .76rem; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #b9c4bf; }
.pill.on .dot { background: #19b46a; box-shadow: 0 0 0 0 rgba(25, 180, 106, .5); animation: pulse 2.2s infinite; }
.pill.on { color: var(--good-ink); background: var(--good-bg); border-color: transparent; }
.pill.warn .dot { background: #e0a100; }
.pill.dev-off { color: var(--wait-ink); background: var(--wait-bg); }
.pill.dev-off .dot { background: #9aa7a1; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(25, 180, 106, .45); } 70% { box-shadow: 0 0 0 7px rgba(25, 180, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(25, 180, 106, 0); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); cursor: pointer; font-size: 1rem; transition: transform .15s, background .15s;
}
.icon-btn:hover { background: var(--accent-softer); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.small { width: 32px; height: 32px; border-radius: 10px; font-size: .85rem; }
.icon-btn.armed { width: auto; padding: 0 10px; background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; font-weight: 700; font-size: .78rem; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Navigation ---------- */
.tabs {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 6px;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lift);
}
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 18px;
  color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 650; transition: background .2s, color .2s;
}
.tabs a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tabs a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.tabs a[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.badge { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff6f8e; color: #fff; font-size: .68rem; line-height: 18px; text-align: center; font-weight: 800; box-shadow: 0 0 0 2px var(--card); }

main { max-width: 1240px; margin: 0 auto; padding: 4px 12px 16px; outline: none; }
main:focus, main:focus-visible { outline: none; }
/* Start: auf Mobil Reihenfolge Display → Gerät → Now Playing → Kurz & knapp */
.grid-start .col { display: contents; }
.grid-start .card-oled { order: 1; } .grid-start .card-device { order: 2; } .grid-start .card-np { order: 3; } .grid-start .card-mini { order: 4; } .grid-start .card-wifi { order: 5; }
.view { animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Karten & Grid ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; min-width: 0; position: relative;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: .8rem; margin: 10px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; vertical-align: middle; margin-left: 6px;
}
.chip.good { background: var(--good-bg); color: var(--good-ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.waiting, .chip.muted { background: var(--wait-bg); color: var(--wait-ink); }
.chip time { font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 14px;
  border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .2s, background .2s; color: var(--ink);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 8px 20px -8px var(--accent); filter: brightness(1.05); }
.btn.ghost { background: var(--card-2); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--accent-softer); }
.btn.ghost.danger:hover:not(:disabled) { background: var(--bad-bg); color: var(--bad-ink); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 11px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.spotify { background: #1db954; color: #04140a; margin: 4px 0 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1 1 auto; }
.btn-row.end { justify-content: flex-end; }
.btn-row.end .btn { flex: 0 0 auto; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .84rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn.armed { color: var(--bad-ink); font-weight: 700; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 13px; background: var(--accent-softer); border: 1px solid var(--line); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 650;
  padding: 6px 11px; border-radius: 10px; cursor: pointer; min-height: 32px;
}
.seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.sw { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.sw-white { background: #eef6ff; }

/* ---------- OLED ---------- */
.card-oled { padding-bottom: 14px; }
.oled-wrap { display: grid; justify-items: center; gap: 10px; }
.oled-bezel {
  position: relative; width: min(100%, 640px); padding: 26px 16px 18px; border-radius: 20px;
  background: linear-gradient(160deg, #234a73, #17324f 60%, #132a43);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 6px rgba(0, 0, 0, .35), 0 14px 30px -14px rgba(16, 40, 70, .7);
}
.oled-bezel::before, .oled-bezel::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #0c1b2b; box-shadow: inset 0 0 0 2px #d8b25a; bottom: 6px;
}
.oled-bezel::before { left: 8px; }
.oled-bezel::after { right: 8px; }
.oled-pcb { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; }
.oled-pcb i { width: 10px; height: 10px; border-radius: 50%; background: #0c1b2b; box-shadow: inset 0 0 0 2.5px #e2bd62; }
.oled-glass {
  position: relative; border-radius: 6px; padding: 4%; background: #030505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 8px 18px rgba(0, 0, 0, .8);
}
.oled-glass::after { /* Spiegelung */
  content: ""; position: absolute; inset: 0; border-radius: 6px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 38%);
}
#oled-main { display: block; width: 100%; aspect-ratio: 2 / 1; height: auto; image-rendering: pixelated; }
.oled-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; color: #f1f6f3;
  background: rgba(5, 10, 9, .45); border-radius: 6px; font-size: .86rem; backdrop-filter: blur(1px);
}
.oled-overlay strong { font-size: 1rem; }
.oled-overlay .ov-icon { font-size: 1.6rem; animation: bob 3s ease-in-out infinite; }
.oled-caption { margin: 0; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5b7a; animation: pulse-red 1.6s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 91, 122, .5); } 70% { box-shadow: 0 0 0 7px rgba(255, 91, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 91, 122, 0); } }

.pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.page-tile {
  display: grid; gap: 6px; padding: 7px 7px 8px; border-radius: 16px; background: var(--card-2); border: 2px solid var(--line);
  color: var(--ink-2); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; transition: transform .18s cubic-bezier(.3, 1.5, .5, 1), border-color .2s, background .2s;
}
.page-tile canvas { width: 100%; aspect-ratio: 2 / 1; height: auto; border-radius: 7px; background: #050807; display: block; }
.page-tile:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.page-tile.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 8px 18px -12px var(--accent); }
.page-tile.pending { animation: wiggle .5s ease; }
.page-tile:disabled { cursor: default; opacity: .75; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

/* ---------- Gerät ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd b { font-weight: 750; }
.rssi { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; vertical-align: -1px; margin-left: 2px; }
.rssi i { width: 4px; border-radius: 1.5px; background: var(--line); }
.rssi i:nth-child(1) { height: 4px; } .rssi i:nth-child(2) { height: 7px; } .rssi i:nth-child(3) { height: 10px; } .rssi i:nth-child(4) { height: 13px; }
.rssi i.on { background: var(--accent); }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles-4 { margin-bottom: 14px; }
.tile { background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; display: grid; gap: 1px; min-width: 0; }
.tiles-4 .tile { background: var(--card); box-shadow: var(--shadow); border-radius: 18px; padding: 13px 15px; }
.tile-label { font-size: .76rem; color: var(--muted); font-weight: 650; }
.tile-value { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-note { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-msg { display: flex; gap: 8px; margin-top: 12px; }
.quick-msg input { flex: 1; min-width: 0; }

input, textarea {
  font: inherit; color: var(--ink); background: var(--card-2); border: 1.5px solid var(--line); border-radius: 13px; padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=range] { padding: 0; min-height: 28px; border: 0; background: transparent; accent-color: var(--accent); box-shadow: none; }
textarea { width: 100%; resize: vertical; min-height: 104px; line-height: 1.45; }
.field { display: grid; gap: 5px; font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.field.inline { display: flex; align-items: center; gap: 8px; }
.field.inline input { width: 150px; }

/* ---------- Now Playing ---------- */
.np { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.np-covers { display: flex; gap: 8px; align-items: flex-end; }
.np-img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5); display: grid; place-items: center; background: var(--accent-soft); font-size: 2rem; }
.np-dith-wrap { display: grid; gap: 3px; justify-items: center; }
.np-dith { width: 72px; height: 72px; border-radius: 8px; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.np-dith-label { font-size: .64rem; color: var(--muted); }
.np-title { font-weight: 750; font-size: 1.04rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist { margin: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-album { margin: 0; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-progress { margin-top: 10px; }
.np-bar { display: block; height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.np-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 1s linear; }
.np-times { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.np-state { color: var(--accent-text); font-weight: 700; }
.np-foot { display: flex; gap: 14px; margin-top: 6px; }
.np-idle { text-align: center; padding: 8px 0; }
.np-idle-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--lav); font-size: 1.5rem; margin-bottom: 6px; animation: bob 2.6s ease-in-out infinite; }
.copybox { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; margin: 6px 0 8px; }
.copybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }

/* ---------- Nachrichten ---------- */
.compose { display: grid; gap: 10px; }
.emoji-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.emoji-row button {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: var(--card-2); font-size: 1.05rem; cursor: pointer; color: var(--ink);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), background .15s;
}
.emoji-row button:hover { transform: translateY(-2px) rotate(-4deg); background: var(--pink); }
.counter { margin-left: auto; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 650; }
.counter.over { color: var(--bad-ink); }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-list, .timeline, .fw-list, .ota-list { list-style: none; margin: 0; padding: 0; }
.msg { padding: 10px 0 12px; border-bottom: 1px dashed var(--line); animation: pop .35s cubic-bezier(.3, 1.5, .5, 1); }
.msg:last-child { border-bottom: 0; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.msg-bubble { background: var(--accent-softer); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px; display: inline-block; max-width: 100%; }
.msg.is-read .msg-bubble { background: var(--card-2); }
.msg.archived { opacity: .65; }
.msg-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .98rem; }
.msg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.msg-meta .chip { margin-left: 0; }
.msg-meta .icon-btn { margin-left: auto; }
.msg-from { font-weight: 700; color: var(--ink-2); }
.steps { margin: 10px 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }
.steps li::marker { color: var(--accent-text); font-weight: 800; }
details.cli, details.table-view { margin-top: 12px; }
details > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--ink-2); padding: 6px 0; list-style-position: inside; }
details > summary:hover { color: var(--accent-text); }

.empty { text-align: center; padding: 10px 6px; }
.empty.big { padding: 24px 10px; }
.empty.big [data-dino] { display: inline-block; margin-bottom: 8px; animation: bob 2.4s steps(2, jump-none) infinite; }
.empty.big [data-dino] svg { width: 84px; height: auto; }
.empty .copybox { text-align: left; }

/* ---------- Aktivität ---------- */
.tl-day { font-size: .76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 0 4px; }
.tl-day:first-child { padding-top: 0; }
.tl-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 7px 0; position: relative; }
.tl-item + .tl-item::before { content: ""; position: absolute; left: 18px; top: -8px; height: 14px; width: 2px; background: var(--line); border-radius: 1px; }
.tl-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.08rem; background: var(--accent-soft); }
.tl-icon.peach { background: var(--peach); } .tl-icon.lav { background: var(--lav); } .tl-icon.sun { background: var(--sun); } .tl-icon.mint { background: var(--accent-soft); }
.tl-body { display: grid; min-width: 0; }
.tl-title { font-weight: 700; font-size: .92rem; }
.tl-detail { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-time { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.timeline { max-height: 560px; overflow-y: auto; padding-right: 4px; }

/* ---------- Diagramme ---------- */
.chart { position: relative; width: 100%; min-height: 190px; transition: opacity .2s; }
.chart.loading { opacity: .5; }
.viz { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.viz .gl { stroke: var(--grid); stroke-width: 1; }
.viz .base { stroke: var(--axis); stroke-width: 1; }
.viz .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz .val { fill: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.viz .empty { fill: var(--muted); font-size: 13px; }
.viz .night { fill: var(--night); }
.viz .night-moon { fill: var(--muted); font-size: 11px; opacity: .8; }
.viz .area { fill: var(--series-1); opacity: .1; }
.viz .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .end { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.viz .ev { fill: var(--series-2); stroke: var(--card); stroke-width: 2; }
.viz .cross { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.viz .col { fill: var(--series-1); transition: opacity .15s; }
.viz .bar.hover .col, .viz .bar:focus .col { opacity: .75; }
.viz .bar:focus { outline: none; }
.viz .game-dot { fill: var(--series-2); stroke: var(--card); stroke-width: 2; }
.viz:focus { outline: none; }
.viz:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px;
  box-shadow: var(--shadow-lift); font-size: .78rem; color: var(--muted); white-space: nowrap; transform: translateY(-100%);
}
.tip-v { color: var(--ink); font-weight: 800; font-size: .95rem; }
.tip-l { display: flex; align-items: center; gap: 6px; }
.tip-key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.tip-key.k-ev, .tip-key.k-game { background: var(--series-2); }
.tip-key.k-night { background: var(--night); height: 10px; box-shadow: inset 0 0 0 1px var(--axis); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--ink-2); margin: -4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { width: 16px; height: 2px; border-radius: 1px; background: var(--series-1); }
.lg-band { width: 14px; height: 12px; border-radius: 3px; background: var(--night); box-shadow: inset 0 0 0 1px var(--axis); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--series-2); }
.table-view table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table-view th, .table-view td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table-view th { color: var(--muted); font-weight: 700; }
.table-view > div { max-height: 320px; overflow: auto; }
.filter-row { display: flex; gap: 10px; margin: 2px 0 12px; }

.light-hero { display: flex; align-items: center; gap: 16px; }
.light-orb { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 2.1rem; flex: none; transition: background .4s; }
.is-on .light-orb { background: radial-gradient(circle at 35% 35%, #fff8d6, var(--sun)); box-shadow: 0 0 0 8px color-mix(in srgb, var(--sun) 45%, transparent); color: #d08b00; }
.is-off .light-orb { background: radial-gradient(circle at 35% 35%, #f0edff, var(--lav)); box-shadow: 0 0 0 8px color-mix(in srgb, var(--lav) 45%, transparent); color: #6a5bd0; }
.light-hero > div { display: grid; }
.hero-num { font-size: 3.4rem; font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.hero-num small { font-size: 1.3rem; color: var(--muted); font-weight: 650; letter-spacing: 0; }
.hero-label { font-weight: 700; margin-top: 2px; }
.card-light-now > p { margin-top: 12px; }

/* Einstellungen */
.cfg { display: grid; gap: 14px 28px; }
.cfg-col { align-content: start; border: 0; margin: 0; padding: 14px 14px 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 8px; min-width: 0; }
.cfg-col legend { float: left; width: 100%; padding: 0; font-weight: 750; font-size: .92rem; }
.cfg-col > p { margin: 0 0 2px; clear: both; }
.cfg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l o" "r r"; gap: 0 8px; align-items: center; }
.cfg-row label { grid-area: l; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.cfg-row input { grid-area: r; width: 100%; }
.cfg-row output { grid-area: o; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; font-size: .86rem; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; cursor: pointer; font-size: .9rem; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--axis); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Update ---------- */
.drop {
  display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 18px;
  background: var(--accent-softer); cursor: pointer; text-align: center; transition: background .2s, transform .2s; position: relative; overflow: hidden;
}
.drop:hover, .drop.over { background: var(--accent-soft); }
.drop.over { transform: scale(1.01); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop-dino svg { width: 56px; height: auto; }
.drop.over .drop-dino { animation: bob .5s steps(2, jump-none) infinite; }
.drop-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--accent-soft); }
.drop-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.fw { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fw:last-child { border-bottom: 0; }
.fw-main { display: grid; gap: 1px; min-width: 0; }
.fw-ver { font-weight: 800; font-size: 1.05rem; }
.fw-actions { display: flex; gap: 6px; align-items: center; }
.ota-run { background: var(--accent-softer); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.ota-run-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.progress { height: 12px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; margin-bottom: 6px; }
.progress i { display: block; height: 100%; border-radius: 6px; background: repeating-linear-gradient(45deg, var(--accent) 0 10px, color-mix(in srgb, var(--accent) 80%, #fff) 10px 20px); background-size: 28px 28px; animation: stripes 1s linear infinite; transition: width .3s; }
@keyframes stripes { to { background-position: 28px 0; } }
.ota-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.ota-list li:last-child { border-bottom: 0; }
.ota-list .chip { margin-left: 0; }

/* ---------- Dialog / Toast ---------- */
.dialog { border: 0; border-radius: 24px; padding: 22px; max-width: min(92vw, 380px); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lift); text-align: center; }
.dialog::backdrop { background: rgba(20, 40, 30, .35); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .3s cubic-bezier(.3, 1.5, .5, 1); }
.dialog h3 { font-size: 1.15rem; margin: 6px 0; }
.dialog p { color: var(--ink-2); }
.dialog-dino svg { width: 60px; height: auto; }
.dialog .btn-row { justify-content: center; }
.toasts { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: max-content; max-width: 92vw; }
.toast {
  display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 16px; font-size: .88rem; font-weight: 650;
  box-shadow: var(--shadow-lift); animation: toastin .35s cubic-bezier(.3, 1.5, .5, 1); transition: opacity .4s, transform .4s;
}
.toast.err { background: var(--bad-ink); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; padding: 20px; }
.login { width: min(100%, 400px); text-align: center; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lift); padding: 26px 24px 24px; }
.login-card.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.login-scene { position: relative; height: 150px; margin: -4px -6px 10px; border-radius: 20px; background: linear-gradient(180deg, var(--accent-softer), var(--accent-soft)); overflow: hidden; }
.login-dino { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 18px; animation: bob 2.4s steps(2, jump-none) infinite; }
.login-dino svg { display: block; }
.login-dino svg { width: 110px; height: auto; }
.login-bug { position: absolute; left: 18px; bottom: 18px; animation: crawl 6s ease-in-out infinite alternate; }
.login-bug svg { width: 46px; height: auto; }
.login-heart { position: absolute; left: calc(50% + 62px); top: 14px; animation: float 2.6s ease-in-out infinite; }
.login-heart svg { width: 22px; height: auto; }
.login-ground { position: absolute; left: 0; right: 0; bottom: 14px; height: 4px; background: repeating-linear-gradient(90deg, var(--dino-dark) 0 6px, transparent 6px 12px); opacity: .35; }
@keyframes crawl { from { transform: translateX(0); } to { transform: translateX(46px); } }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.1); } }
.login-title .pixel-title svg { height: 26px; }
.login-sub { color: var(--ink-2); margin: 10px 0 18px; }
.login-form { display: grid; gap: 12px; text-align: left; }
.login-form input { width: 100%; font-size: 1.05rem; }
.login-foot { margin-top: 16px; }

/* ---------- Breakpoints ---------- */
@media (max-width: 520px) {
  .topbar .pill { padding: 6px; }
  .topbar .pill .pill-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pixel-title svg { height: 15px; }
  .brand-dino svg { width: 40px; }
  .seg button { padding: 6px 9px; }
}
@media (max-width: 459px) {
  .np { grid-template-columns: minmax(0, 1fr); }
  .np-covers { justify-content: center; }
}
@media (min-width: 640px) {
  .card { padding: 20px; }
  .tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cfg .switch-row, .cfg .btn-row { grid-column: 1 / -1; }
  .np-img { width: 120px; height: 120px; }
  .np-dith { width: 84px; height: 84px; }
}
@media (min-width: 960px) {
  body { padding-bottom: 32px; }
  .topbar { padding-top: 22px; }
  .tabs {
    position: sticky; top: 10px; left: auto; right: auto; bottom: auto; margin: 4px auto 18px; width: max-content;
    grid-template-columns: repeat(6, auto); gap: 4px; padding: 5px; border-radius: 18px; box-shadow: var(--shadow);
  }
  .tabs a { flex-direction: row; gap: 8px; padding: 9px 16px; font-size: .9rem; border-radius: 14px; }
  .tabs a svg { width: 19px; height: 19px; }
  .badge { position: static; margin-left: -2px; }
  .toasts { bottom: 28px; }
  main { padding: 0 20px 20px; }
  .grid { gap: 18px; }
  .grid-start { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
  .grid-start .col { display: grid; gap: 18px; min-width: 0; }
  .grid-msg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .grid-msg .card-list { grid-row: span 3; }
  .grid-act { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .grid-light { grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); align-items: start; }
  .grid-light .card-settings { grid-column: 1 / -1; }
  .cfg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-upd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .card-wide { grid-column: 1 / -1; }
  .brand-dino svg { width: 54px; }
  .pixel-title svg { height: 21px; }
  .brand-sub { max-width: none; }
}
@media (min-width: 1200px) {
  .grid-start { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .viz .line { stroke: CanvasText; } .viz .col { fill: CanvasText; } .viz .night { fill: GrayText; opacity: .3; }
}

/* ---------- Besondere Tage (Nachtrag v2) ---------- */
.lbl-long { display: none; }
.tl-icon.pink { background: var(--pink); } .tl-icon.sky { background: var(--ok-bg); }
.live-dot.green { display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: #19b46a; animation: pulse 2s infinite; }
select {
  font: inherit; color: var(--ink); background: var(--card-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 42px;
}
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.sp-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 12px; font-size: .9rem; }
.sp-now.on { background: linear-gradient(120deg, var(--sun), var(--pink)); border-color: transparent; }
.sp-now-icons { font-size: 1.4rem; letter-spacing: 2px; animation: bob 2.4s ease-in-out infinite; }
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sp:last-child { border-bottom: 0; }
.sp .sp-icon { width: 44px; height: 44px; font-size: 1.3rem; }
.sp.is-active .sp-icon { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px #19b46a; animation: bob 2s ease-in-out infinite; }
.sp.is-off { opacity: .6; }
.sp-body { display: grid; gap: 2px; min-width: 0; }
.sp-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.sp-title .chip { margin-left: 0; }
.sp-text { font-size: .88rem; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.switch-row.mini { padding: 4px 0 0; }
.switch-row.compact { padding: 6px 0 0; font-size: .86rem; }
.sp-form { display: grid; gap: 16px; }
.sp-form .field input:not([type]), .sp-form .field > input { width: 100%; }
.sp-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sp-kind { position: relative; cursor: pointer; }
.sp-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sp-kind-card {
  display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2);
  font-size: .78rem; font-weight: 700; color: var(--ink-2); text-align: center; transition: transform .18s cubic-bezier(.3, 1.5, .5, 1), border-color .2s, background .2s;
}
.sp-kind-icon { font-size: 1.5rem; line-height: 1.2; }
.sp-kind:hover .sp-kind-card { transform: translateY(-2px); }
.sp-kind input:checked + .sp-kind-card { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 8px 18px -12px var(--accent); }
.sp-kind input:checked + .sp-kind-card .sp-kind-icon { animation: wiggle .5s ease; }
.sp-kind input:focus-visible + .sp-kind-card { outline: 3px solid var(--focus); outline-offset: 2px; }
.sp-desc { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--accent-softer); font-weight: 500; color: var(--ink-2); font-size: .86rem; }
.sp-desc-icon { font-size: 1.2rem; }
.sp-date { display: grid; grid-template-columns: 34px 72px minmax(0, 1fr) 104px; gap: 8px; align-items: center; }
.sp-date-label { font-weight: 700; color: var(--muted); font-size: .82rem; }
.sp-date input[type=time] { width: 100%; }
.sp-year { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-year input[type=number] { width: 110px; }
.sp-year input:disabled { opacity: .5; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
@media (max-width: 459px) {
  .tabs a { font-size: .62rem; }
  .tabs a svg { width: 21px; height: 21px; }
  .sp-date { grid-template-columns: 30px 64px minmax(0, 1fr); }
  .sp-date input[type=time] { grid-column: 2 / -1; }
  .sp { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
}
@media (min-width: 960px) {
  .lbl-long { display: inline; } .lbl-short { display: none; }
  .tabs { grid-template-columns: repeat(6, auto); }
  .tabs a { padding: 9px 14px; }
  .grid-tage { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.field .muted, .field .small { font-weight: 500; }
.sp-now-icons { white-space: nowrap; }
@media (max-width: 459px) { .sp-actions .btn.small { padding: 0 9px; font-size: .8rem; } }

/* ---------- WLANs (Nachtrag v3) ---------- */
.wifi-intro { margin: -4px 0 12px; }
.wifi-list { list-style: none; margin: 0 0 6px; padding: 0; }
.wifi-item { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); margin-bottom: 6px; }
.wifi-item .chip { margin-left: 0; }
.wifi-item > :last-child { margin-left: auto; }
.wifi-item.is-connected { background: var(--accent-softer); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.wifi-item.is-pending { border-style: dashed; }
.wifi-item.is-error { background: var(--bad-bg); border-color: transparent; }
.wifi-icon { font-size: 1.05rem; }
.wifi-name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.wifi-empty { padding: 8px 2px; font-size: .88rem; }
.wifi-form { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }
.wifi-form h4.sub { margin-top: 10px; margin-bottom: 0; }
.wifi-form input { width: 100%; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--accent-softer); color: var(--ink); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye.on { color: var(--accent-text); }
.pw-eye.on svg path { stroke-dasharray: none; }
.linkbtn.small { font-size: .78rem; }
.field input, .field select, .field textarea { font-weight: 500; }

/* ---------- Vers des Tages (Nachtrag v4) – warmes Gold ---------- */
:root {
  --gold: #f0b429; --gold-ink: #8a5a00; --gold-bg: #fff6dc; --gold-bg-2: #fffaf0; --gold-line: #f3dc9b;
  --bible: #9a5b2c; --bible-dark: #6b3f1d; --bible-hi: #b9773f; --bible-page: #fff3d1;
}
@media (prefers-color-scheme: dark) {
  :root { --gold: #f2c14e; --gold-ink: #f5cf6b; --gold-bg: #2e2716; --gold-bg-2: #262113; --gold-line: #5a4a22; --bible-page: #f3e3b5; }
}
.bible-icon, .verse-head-icon, .verse-box-icon { display: inline-flex; vertical-align: -3px; }
.bible-icon svg, .verse-head-icon svg { display: block; }
.card-verse .card-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.card-verse { background: linear-gradient(180deg, var(--gold-bg-2), var(--card) 55%); border-color: var(--gold-line); }
.card-verse.is-off .verse-box { opacity: .55; filter: saturate(.6); }
.verse-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.verse-row input[type=time] { width: 112px; }
.verse-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin: 0; padding: 14px 16px; border-radius: 18px;
  background: var(--gold-bg); border: 1px solid var(--gold-line); position: relative; }
.verse-box-icon { padding-top: 2px; animation: bob 3.2s steps(2, jump-none) infinite; }
.verse-box.empty-verse { align-items: center; }
.verse-box.empty-verse p { margin: 0; }
.verse-ref { margin: 0 0 4px; font-weight: 800; color: var(--gold-ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.verse-cross { color: var(--gold); font-weight: 900; text-shadow: 0 0 6px color-mix(in srgb, var(--gold) 50%, transparent); }
.verse-when { font-weight: 500; }
.verse-text { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink); quotes: "„" "“"; }
.verse-text::before { content: open-quote; color: var(--gold); font-weight: 800; }
.verse-text::after { content: close-quote; color: var(--gold); font-weight: 800; }
.verse-status { margin: 10px 2px 0; font-size: .84rem; }
.verse-status.ok { color: var(--good-ink); }
.verse-status.err { color: var(--bad-ink); font-weight: 600; }
.btn.gold { background: linear-gradient(180deg, #f6c445, #e9a91c); color: #3a2600; box-shadow: 0 6px 16px -8px #d99a0f; }
.btn.gold:hover:not(:disabled) { filter: brightness(1.05); }
/* Verse im Verlauf */
.verse-bubble { background: var(--gold-bg); border-color: var(--gold-line); border-radius: 18px 18px 18px 6px; }
.msg-verse.is-read .verse-bubble { background: var(--gold-bg-2); }
.verse-bubble .verse-ref { font-size: .86rem; }
