:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1b2030;
  --muted: #6b7385;
  --border: #e3e7ef;
  --primary: #4f7cff;
  --danger: #e5484d;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --surface: #181c24;
    --text: #e8ebf2;
    --muted: #98a0b3;
    --border: #2a303c;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 0.75rem;
  padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0.75rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { flex: 1; margin: 0; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font-weight: 800; text-decoration: none; color: var(--primary); font-size: 1.1rem; }
.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  text-decoration: none; font-size: 1.1rem;
  background: var(--surface); border: 1px solid var(--border);
}
.container { max-width: 920px; margin: 0 auto; padding: 1.25rem 1rem calc(2rem + env(safe-area-inset-bottom)); }

/* ---------- Kacheln */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

.tile {
  --c: var(--primary);
  aspect-ratio: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.1rem;
  border-radius: var(--radius);
  text-decoration: none; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 82%, #000));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--c) 35%, transparent);
  transition: transform 0.15s ease;
}
.tile:hover { transform: translateY(-3px); }
.tile:active { transform: scale(0.97); }
.tile:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.tile-icon { font-size: clamp(2rem, 9vw, 2.8rem); line-height: 1; }
.tile-title {
  font-weight: 700; font-size: clamp(1rem, 4vw, 1.2rem); line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); overflow-wrap: anywhere;
}
.empty { color: var(--muted); text-align: center; padding: 3rem 1rem; }

/* Lebendigere Kacheln: Farbverlauf mit leicht verschobenem Farbton, Glanzlicht oben links, feiner Rand */
@supports (color: oklch(from red l c h)) {
  .tile {
    background:
      radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.38), transparent 52%),
      radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, 0.22), transparent 60%),
      linear-gradient(140deg,
        oklch(from var(--c) calc(l + 0.1) calc(c * 1.1) calc(h + 22)) 0%,
        var(--c) 48%,
        oklch(from var(--c) calc(l - 0.06) calc(c * 1.15) calc(h - 16)) 100%);
  }
}
.tile { border: 1px solid rgba(255, 255, 255, 0.28); }
.tile-icon .icon-img { width: 1.25em; height: 1.25em; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
.swatch .icon-img { width: 26px; height: 26px; display: block; }

/* ---------- Nachtblau mit sanften Lichtflecken: alle Kachel-Seiten (body.home) und alle Seiten im Bereich „Thomas“ (body.nacht) */
body.home, body.nacht, body.nacht:has(.dash) {
  background-color: #0e1530;
  background-image:
    radial-gradient(60% 60% at 15% 10%, rgba(90, 140, 255, 0.35), transparent 70%),
    radial-gradient(50% 50% at 90% 90%, rgba(140, 90, 255, 0.30), transparent 70%),
    radial-gradient(40% 40% at 85% 15%, rgba(45, 212, 191, 0.12), transparent 70%),
    linear-gradient(160deg, #111a3a 0%, #0b1128 60%, #0e1530 100%);
  background-attachment: fixed;
}
body.home { color-scheme: light; }
body.home #app {
  position: fixed; inset: 0; overflow: auto;
  display: flex; flex-direction: column;
}
body.home .topbar { position: static; background: transparent; border: 0; backdrop-filter: none; color: #fff; }
body.home .topbar h1 { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
body.home .topbar .brand { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
body.home .topbar .icon-btn { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
body.home main.container { flex: 1; display: grid; place-items: center; width: 100%; max-width: none; padding: 1rem 1.25rem 2rem; }
body.home .grid { width: min(900px, 100%); }
body.home .tile { box-shadow: 0 10px 30px rgba(50, 20, 90, 0.35), 0 1px 0 rgba(255, 255, 255, 0.35) inset; }
@media (max-width: 600px) {
  body.home .grid { gap: 0.7rem; }
  body.home .tile { padding: 0.8rem; border-radius: 14px; }
}

/* ---------- Karten, Formulare, Knöpfe */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.card.danger h2 { color: var(--danger); }
.form { display: grid; gap: 0.9rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
input:not([type="checkbox"]):not([type="color"]), select, textarea {
  font: inherit; color: var(--text); width: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.7rem 0.85rem;
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
input[type="color"] {
  width: 100%; height: 46px; padding: 4px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
}
label.check { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 1rem; cursor: pointer; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 600; padding: 0.7rem 1.1rem;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.hint { color: var(--muted); margin: -0.5rem 0 1rem; font-size: 0.9rem; }

/* ---------- Admin */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tabs a {
  padding: 0.5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
}
.tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.list-item {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none;
}
.list-item small { display: block; color: var(--muted); }
.avatar {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
}
.grow { flex: 1; min-width: 0; }
.badge {
  font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary);
}
.chev { color: var(--muted); font-size: 1.4rem; }

.tree { display: grid; gap: 0.15rem; margin-bottom: 1rem; }
.tree-row { padding: 0.45rem 0.25rem 0.45rem calc(0.25rem + var(--d, 0) * 1.5rem); }
.admin-tile { display: flex; align-items: center; gap: 0.75rem; }
.admin-tile a.grow { text-decoration: none; font-weight: 600; }
.admin-tile small { display: block; font-weight: 400; color: var(--muted); }
.admin-tile.off > .swatch, .admin-tile.off > a.grow { opacity: 0.4; }
.admin-tile.off > a.grow::after { content: ' · aus'; font-size: 0.8rem; font-weight: 600; color: var(--danger); }
.admin-hint { margin: 0 0 0.75rem; }
/* Ein/Aus-Schalter */
.switch { position: relative; display: inline-block; flex: none; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background 0.2s; }
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s;
}
.switch input:checked + .switch-track { background: #22c55e; }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.swatch {
  --c: var(--primary);
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 10px; background: var(--c);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-size: 1.25rem; width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg);
}
.preview-wrap { display: flex; justify-content: center; }
.preview-wrap .tile { width: 150px; pointer-events: none; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Login */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.login { width: 100%; max-width: 380px; display: grid; gap: 0.9rem; }
.login h1 { margin: 0; font-size: 1.4rem; }
.login-logo { font-weight: 800; font-size: 2rem; color: var(--primary); }
.error { color: var(--danger); margin: 0; min-height: 1.2em; }

/* ---------- Hinweise */
.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; transition: 0.25s;
  max-width: calc(100% - 2rem);
  background: var(--text); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: 12px; font-weight: 600;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }
/* ---------- Familienkalender */
.cal { padding: 1rem; }
.cal-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.cal-head h2 { flex: 1; margin: 0 0 0 0.25rem; font-size: 1.15rem; }
.cal-head button.icon-btn { cursor: pointer; color: var(--text); font-size: 1.4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 0.25rem 0; }
.cal-day {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 88px; padding: 4px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden;
}
.cal-day:hover { border-color: var(--primary); }
.cal-day.other { opacity: 0.45; }
.cal-day.sel { outline: 2px solid var(--primary); outline-offset: -1px; }
.cal-num { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-size: 0.85rem; font-weight: 600; flex: none; }
.cal-day.today .cal-num { background: var(--primary); color: #fff; }
.cal-evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-ev {
  --c: var(--primary);
  font-size: 0.72rem; line-height: 1.35; padding: 1px 4px; border-radius: 4px;
  background: color-mix(in srgb, var(--c) 20%, transparent); border-left: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-more { font-size: 0.7rem; color: var(--muted); padding-left: 4px; }
@media (max-width: 600px) {
  .cal { padding: 0.6rem; }
  .cal-grid { gap: 2px; }
  .cal-day { min-height: 50px; align-items: center; padding: 3px 0; }
  .cal-evs { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .cal-ev { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--c); font-size: 0; }
  .cal-more { display: none; }
}
.cal-agenda-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.cal-agenda-head h2 { flex: 1; margin: 0; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.cal-item {
  --c: var(--primary);
  width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-left: 5px solid var(--c); border-radius: 12px; background: var(--bg);
}
.cal-time { flex: none; width: 6.2rem; font-weight: 600; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-item small { display: block; color: var(--muted); }
.cal-notes { white-space: pre-line; }
.empty-day { color: var(--muted); margin: 0; }

.dialog {
  border: 0; border-radius: var(--radius); padding: 1.25rem;
  width: min(520px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.dialog::backdrop { background: rgba(15, 18, 24, 0.5); }
.dialog h2 { margin: 0; font-size: 1.15rem; }
.dialog .hint { margin: 0; }
.confirm-dialog { width: min(400px, calc(100% - 2rem)); }
.confirm-text { margin: 0; font-size: 1.05rem; font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.35rem; }
textarea { resize: vertical; }
.color-chip {
  --c: var(--primary);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.color-chip.active { box-shadow: 0 0 0 2px var(--text); }

/* ---------- Dateien */
.files-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; font-weight: 600; min-width: 0; }
.crumbs a { text-decoration: none; padding: 0.2rem 0.45rem; border-radius: 8px; overflow-wrap: anywhere; }
.crumbs a:hover { background: var(--bg); }
.crumbs a:last-child { color: var(--primary); }
.crumb-sep { color: var(--muted); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.file-row { display: flex; align-items: center; gap: 0.25rem; padding-right: 0.4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.file-row:hover { border-color: var(--primary); }
.file-main { display: flex; align-items: center; gap: 0.8rem; flex: 1; min-width: 0; padding: 0.65rem 0.8rem; text-decoration: none; }
.file-main strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-main small { display: block; color: var(--muted); font-size: 0.8rem; }
.file-icon { flex: none; width: 2rem; font-size: 1.6rem; text-align: center; }
.icon-btn.more { cursor: pointer; color: var(--text); font-size: 1.2rem; }
.files.drop { outline: 3px dashed var(--primary); outline-offset: -6px; }
.files-empty { color: var(--muted); text-align: center; padding: 2rem 1rem; margin: 0; }
.files-usage { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 0; }
.menu .btn { width: 100%; }
.upload-list { display: grid; gap: 0.4rem; margin-bottom: 0.75rem; }
.upload-list:empty { display: none; }
.upload-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.8rem; font-size: 0.9rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.upload-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-pct { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.upload-bar { --p: 0%; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--primary); transition: width 0.2s; }
.upload-row.err { border-color: var(--danger); }
.upload-row.err .upload-pct { color: var(--danger); }
.upload-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }

/* ---------- Fotos */
.photos.drop { outline: 3px dashed var(--primary); outline-offset: -6px; }
.photo-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.photo-toolbar h2 { margin: 0; font-size: 1.15rem; }
.photo-hint { margin: 1rem 0 0; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .album-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }
.album {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--bg); text-decoration: none; color: #fff;
  box-shadow: var(--shadow);
}
.album img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.album:hover img { transform: scale(1.04); }
.album-empty { display: grid; place-items: center; height: 100%; font-size: 3rem; background: linear-gradient(150deg, #f472b6, #8b5cf6); }
.album-label { position: absolute; inset: auto 0 0 0; padding: 1.75rem 0.8rem 0.7rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }
.album-label strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-label small { opacity: 0.85; }
.album:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.photo-month { margin: 1.25rem 0 0.5rem; font-size: 0.95rem; color: var(--muted); }
.photo-month:first-of-type { margin-top: 0.25rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; }
@media (max-width: 600px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; } }
.photo {
  position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px;
  overflow: hidden; cursor: pointer; background: var(--border);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.photo:hover img { transform: scale(1.05); }
.photo:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; z-index: 1; }
.photo-ph { display: grid; place-items: center; height: 100%; font-size: 2rem; }
.photo-badge {
  position: absolute; right: 5px; bottom: 5px; padding: 1px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.7rem; font-weight: 600;
}

/* Vollbild-Ansicht */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: #000; color: #fff; overflow: hidden;
}
.viewer::backdrop { background: #000; }
html:has(.viewer[open]) { overflow: hidden; } /* Seite dahinter nicht mitscrollen */
.viewer-wrap { position: absolute; inset: 0; }
.viewer-stage { position: absolute; inset: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.viewer-bar {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; align-items: center; gap: 0.5rem;
  padding: calc(0.6rem + env(safe-area-inset-top)) 0.75rem 1.5rem;
  background: linear-gradient(rgba(0, 0, 0, 0.65), transparent);
}
.viewer-info { flex: 1; min-width: 0; line-height: 1.3; }
.viewer-info strong { display: block; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-info small { opacity: 0.75; }
.viewer-btn {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.05rem; cursor: pointer; text-decoration: none;
}
.viewer-btn:hover { background: rgba(255, 255, 255, 0.26); }
.viewer-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 48px; height: 72px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 2rem;
}
.viewer-nav:hover { background: rgba(255, 255, 255, 0.26); }
.viewer-nav.prev { left: 0.75rem; }
.viewer-nav.next { right: 0.75rem; }
@media (hover: none) { .viewer-nav { display: none; } } /* auf Touch-Geräten wird gewischt */
.viewer-ph { text-align: center; padding: 1rem; }
.viewer-ph p { opacity: 0.8; }
.viewer :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Kontakte */
.contact-toolbar { display: flex; gap: 0.75rem; margin-bottom: 0.5rem; }
.contact-toolbar input { flex: 1; min-width: 0; }
.contact-toolbar .btn { flex: none; }
.contact-letter { margin: 1rem 0 0.4rem; font-size: 0.85rem; color: var(--primary); }
.contact-main { border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.avatar.big { width: 64px; height: 64px; font-size: 1.5rem; }
.contact-head { display: flex; align-items: center; gap: 1rem; }
.contact-head h2 { font-size: 1.3rem; overflow-wrap: anywhere; }
.contact-field { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.contact-field-icon { font-size: 1.25rem; width: 1.75rem; text-align: center; flex: none; }
.contact-field small { display: block; color: var(--muted); font-size: 0.8rem; }
.contact-field a { color: var(--primary); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-value { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Memory-Spiel */
.mem { padding: 1rem; }
.mem-title { text-align: center; font-size: 1.6rem; margin: 0.5rem 0 1.25rem; }
.mem-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.mem-pick {
  --c: var(--primary);
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1.25rem 0.75rem;
  font: inherit; color: inherit; cursor: pointer;
  border: 3px solid transparent; border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  transition: transform 0.15s, border-color 0.15s;
}
.mem-pick:hover, .mem-pick:focus-visible { border-color: var(--c); transform: translateY(-3px); outline: none; }
.mem-pick:active { transform: scale(0.97); }
.mem-avatar { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; font-size: 3rem; background: var(--c); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 40%, transparent); }
.mem-pick strong { font-size: 1.35rem; }
.mem-pick small { color: var(--muted); font-weight: 600; }
.mem-admin { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.mem-manage { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.mem-manage small { display: block; color: var(--muted); }

.mem-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 0.9rem; }
.mem-chip {
  --c: var(--primary);
  font: inherit; font-weight: 800; font-size: 1.05rem; color: #fff; cursor: pointer;
  padding: 0.35rem 0.9rem; border: 0; border-radius: 999px; background: var(--c);
}
.mem-level { font-weight: 700; }
.mem-level small { color: var(--muted); font-weight: 600; }
.mem-progress { font-size: 1.3rem; letter-spacing: 2px; color: var(--border); }
.mem-progress .on { color: #facc15; text-shadow: 0 0 6px rgba(250, 204, 21, 0.6); }
.mem-score { margin-left: auto; font-weight: 800; font-size: 1.1rem; }
.mem-mute { cursor: pointer; color: var(--text); }

.mem-board { --s: 100px; --g: 10px; display: grid; gap: var(--g); justify-content: center; }
.mem-card {
  width: var(--s); height: calc(var(--s) * 1.25); padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 800px; -webkit-tap-highlight-color: transparent;
}
.mem-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 14px; }
.mem-card[aria-disabled="true"] { cursor: default; }
.mem-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform 0.45s; transform-style: preserve-3d; }
.mem-card.open .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mem-back {
  color: rgba(255, 255, 255, 0.9); font-weight: 800; font-size: calc(var(--s) * 0.42);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0 8%, transparent 9%),
    radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.25) 0 10%, transparent 11%),
    linear-gradient(145deg, #a78bfa, #7c3aed 60%, #5b21b6);
  border: 3px solid #ddd6fe;
}
.mem-card:not(.open):not(.done):hover .mem-back { filter: brightness(1.1); }
.mem-front { transform: rotateY(180deg); background: #fff; border: 3px solid #ede9fe; font-size: calc(var(--s) * 0.56); line-height: 1; }
.mem-card.done .mem-front { border-color: #facc15; background: #fffbeb; animation: mem-pop 0.45s ease; }
@keyframes mem-pop { 50% { transform: rotateY(180deg) scale(1.1); } }

.mem-overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1rem;
  background: rgba(15, 12, 40, 0.6); overflow: hidden;
}
.mem-overlay canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mem-win {
  position: relative; z-index: 3; width: 100%; max-width: 380px; text-align: center;
  padding: 1.75rem 1.5rem; border-radius: 26px; background: var(--surface); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  animation: mem-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.mem-win h2 { margin: 0.25rem 0; font-size: 1.6rem; }
.mem-win p { margin: 0.4rem 0; }
.mem-big { font-size: 4rem; line-height: 1.1; }
.mem-points { font-size: 1.2rem; font-weight: 800; color: #d97706; }
.mem-win-actions { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.mem-next { font-size: 1.15rem; padding: 0.9rem; }
@keyframes mem-in { from { transform: scale(0.5); opacity: 0; } }

.fly-star {
  position: absolute; left: 50%; top: 50%; z-index: 4; pointer-events: none; font-size: var(--fs);
  filter: drop-shadow(0 2px 6px rgba(250, 204, 21, 0.6));
  animation: fly-star 1.5s cubic-bezier(0.2, 0.8, 0.3, 1) var(--d) both;
}
@keyframes fly-star {
  0% { transform: translate(-50%, -50%) translate(var(--x0), var(--y0)) scale(0.4) rotate(0deg); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--x1), var(--y1)) scale(1) rotate(360deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .mem-inner { transition: none; }
  .mem-win, .mem-card.done .mem-front { animation: none; }
}

/* ---------- Zahlenspiel (Montessori-Perlen) */
.bead-bar { --b: 30px; position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px; }
.bead-bar::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; border-radius: 2px; background: #9ca3af; transform: translateY(-50%); }
.bead {
  position: relative; z-index: 1; flex: none; width: var(--b); height: var(--b); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.8), var(--bead) 45%, color-mix(in srgb, var(--bead) 72%, #000));
  border: 1px solid rgba(0, 0, 0, 0.22); transition: transform 0.2s, box-shadow 0.2s;
}
.bead.lit { transform: scale(1.25); box-shadow: 0 0 0 3px #facc15; z-index: 2; }
.bead.lit::after {
  content: attr(data-n); position: absolute; left: 50%; top: -1.7em; transform: translateX(-50%) scale(0.8);
  font-weight: 800; font-size: 0.95rem; color: var(--text);
}
.zl-stage .bead-bar { --b: min(38px, calc((100vw - 110px) / 10.5)); }
.zl-plus .bead-bar, .zl-bar-opt .bead-bar { --b: min(28px, calc((100vw - 120px) / 10.5)); }
.zl-legend .bead-bar { --b: 9px; padding: 2px 4px; gap: 1px; }
.zl-legend .bead-bar::before { height: 1px; }

.zl-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; }
.zl-level {
  display: flex; align-items: center; gap: 0.9rem; padding: 1rem; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.zl-level:hover, .zl-level:focus-visible { border-color: #f59e0b; transform: translateY(-2px); outline: none; }
.zl-level-icon { font-size: 2rem; }
.zl-level strong { display: block; font-size: 1.1rem; }
.zl-level small { display: block; color: var(--muted); }
.zl-level-stars { font-weight: 800; white-space: nowrap; }
.zl-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.75rem; margin-top: 1.25rem; opacity: 0.8; }
.zl-legend-item { display: inline-flex; align-items: center; font-size: 0.75rem; }

.zl-dots { display: inline-flex; gap: 5px; }
.zl-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--border); transition: background 0.3s; }
.zl-dots span.on { background: #facc15; box-shadow: 0 0 6px rgba(250, 204, 21, 0.7); }
.zl-task { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 0.5rem 0 0.5rem; }
.zl-prompt { margin: 0; font-size: 1.25rem; font-weight: 700; text-align: center; }
.zl-stage { min-height: 110px; display: grid; place-items: center; padding-top: 1.2rem; }
.zl-big-number { font-size: 5.5rem; font-weight: 800; line-height: 1; color: #d97706; }
.zl-plus { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.zl-op { font-size: 2.2rem; font-weight: 800; color: var(--muted); line-height: 1; }
.zl-options { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.zl-num {
  width: 92px; height: 92px; font: inherit; font-size: 2.8rem; font-weight: 800; cursor: pointer;
  color: var(--text); background: var(--surface); border: 3px solid var(--border); border-radius: 22px;
  box-shadow: 0 4px 0 var(--border); transition: transform 0.1s;
}
.zl-num:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.zl-bars { flex-direction: column; align-items: stretch; width: 100%; max-width: 460px; gap: 0.6rem; }
.zl-bar-opt {
  display: flex; justify-content: flex-start; padding: 0.7rem 0.5rem 0.4rem; cursor: pointer; min-height: 64px; align-items: center;
  background: var(--surface); border: 3px solid var(--border); border-radius: 18px;
}
.zl-num.right, .zl-bar-opt.right { border-color: #22c55e; background: #dcfce7; color: #166534; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25); }
.zl-num.wrong, .zl-bar-opt.wrong { border-color: #fca5a5; opacity: 0.55; animation: zl-shake 0.4s; }
.zl-num:disabled, .zl-bar-opt:disabled { cursor: default; }
@keyframes zl-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.zl-done { text-align: center; padding: 1.5rem 0.5rem; max-width: 380px; margin: 0 auto; }
.zl-done h2 { font-size: 1.6rem; margin: 0.5rem 0 0.25rem; }
.zl-done-star { font-size: 5rem; line-height: 1; animation: mem-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1); filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.6)); }
.zl-collection { font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .zl-done-star, .zl-num.wrong, .zl-bar-opt.wrong { animation: none; } }

/* ---------- Videos (Eltern-PIN) */
.vid-lock, .vid-setpin { text-align: center; max-width: 340px; margin: 0 auto; padding: 0.5rem 0 1rem; display: grid; gap: 0.75rem; justify-items: center; }
.vid-setpin label { width: 100%; text-align: left; }
.vid-lock h2, .vid-setpin h2 { margin: 0; font-size: 1.5rem; }
.vid-lock .hint, .vid-setpin .hint { margin: 0; }
.vid-lock-icon { font-size: 3.5rem; line-height: 1; }
.pin-wrap { display: grid; gap: 1rem; justify-items: center; outline: none; }
.pin-wrap.shake { animation: zl-shake 0.4s; }
.pin-dots { display: flex; gap: 0.8rem; min-height: 20px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); transition: background 0.15s; }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 0.75rem; }
.pin-key {
  height: 76px; border-radius: 50%; font: inherit; font-size: 1.8rem; font-weight: 600; cursor: pointer;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
}
.pin-key:active { background: var(--border); }
.pin-msg { min-height: 1.3em; }

.vid-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.vid-clock { margin-right: auto; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--bg); }
.vid-clock.soon { color: #fff; background: var(--danger); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .vid-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; } }
.vid-card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: none; border: 0;
}
.vid-card img, .vid-card .vid-ph {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: grid; place-items: center;
  background: var(--border); font-size: 2.5rem; transition: transform 0.15s; box-shadow: var(--shadow);
}
.vid-card:hover img, .vid-card:focus-visible img { transform: scale(1.03); }
.vid-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 14px; }
.vid-title { font-weight: 700; font-size: 0.95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.vid-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-now { font-size: 1.1rem; margin: 0.75rem 0 0; }
.vid-manage-title { margin: 0; font-size: 1.15rem; }
.vid-add { margin-bottom: 0.5rem; }
.vid-add h2 { margin: 0; font-size: 1.05rem; }
.vid-add .hint { margin: 0; }
.vid-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.vid-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); min-width: 0; }
.vid-row img, .vid-row .vid-ph.small { width: 80px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--border); }
.vid-row strong { display: block; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vid-row small { display: block; color: var(--muted); font-size: 0.8rem; }
.vid-row .icon-btn:disabled { opacity: 0.3; cursor: default; }
.vid-row img.vid-row-avatar { width: 44px; height: 44px; aspect-ratio: 1; border-radius: 50%; }
.vid-hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.vid-section { margin: 1.25rem 0 0.6rem; font-size: 1rem; color: var(--muted); }
.vid-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.vid-channel {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem; text-align: left; cursor: pointer;
  font: inherit; color: inherit; border-radius: var(--radius); border: 2px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, #ef4444 12%, var(--surface)), var(--surface));
  transition: transform 0.15s, border-color 0.15s;
}
.vid-channel:hover, .vid-channel:focus-visible { border-color: #ef4444; transform: translateY(-2px); outline: none; }
.vid-channel img, .vid-channel-ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--border); font-size: 2rem; }
.vid-channel strong { display: block; font-size: 1.2rem; }
.vid-channel small { display: block; color: var(--muted); font-weight: 600; }
.vid-channel-title { margin-top: 0; }
.vid-all { width: 100%; font-size: 1.05rem; }

/* ---------- Daily Dashboard (immer dunkel) */
body:has(.dash) { background: #070a12; color-scheme: dark; }
body:has(.dash) .topbar { background: rgba(7, 10, 18, 0.85); border-color: #1b2333; color: #e7ecf5; }
body:has(.dash) .topbar .icon-btn { background: #111827; border-color: #1f2a3c; color: #e7ecf5; }
body:has(.dash) .container { max-width: 1240px; }
.dash {
  --d-bg: #070a12; --d-card: #0f1522; --d-card2: #141c2c; --d-border: #1f2a3c; --d-text: #e7ecf5;
  --d-muted: #8a96ad; --d-up: #22c55e; --d-down: #f43f5e; --d-flat: #94a3b8; --d-accent: #60a5fa;
  color: var(--d-text); font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums;
}
.dash .d-muted { color: var(--d-muted); }
.dash a { color: var(--d-accent); }
.d-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0.25rem 0 1.25rem; flex-wrap: wrap; }
.d-header h2 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.d-header p { margin: 0.15rem 0 0; }
.d-header-left { display: flex; align-items: center; gap: 0.75rem; }
.d-header-right { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.d-icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 1.1rem; color: var(--d-text); text-decoration: none;
  background: var(--d-card); border: 1px solid var(--d-border); transition: background 0.15s;
}
.d-icon-btn:hover { background: var(--d-card2); }
.d-icon-btn.small { width: 32px; height: 32px; font-size: 0.9rem; }
.d-icon-btn.spin { animation: d-spin 0.9s linear infinite; }
@keyframes d-spin { to { transform: rotate(360deg); } }

/* Raster: 12 Spalten am großen Bildschirm, 6 am Tablet, 2 am Handy */
.d-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.d-grid > .s3 { grid-column: span 3; }
.d-grid > .s4 { grid-column: span 4; }
.d-grid > .s6 { grid-column: span 6; }
@media (max-width: 1080px) {
  .d-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .d-grid > .s3 { grid-column: span 3; }
  .d-grid > .s4, .d-grid > .s6 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .d-grid > .s3 { grid-column: span 1; }
  .d-grid > .s4, .d-grid > .s6 { grid-column: span 2; }
  .d-header h2 { font-size: 1.3rem; }
}

.d-tile {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; min-height: 150px;
  padding: 1rem 1.1rem; text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: linear-gradient(180deg, var(--d-card2), var(--d-card)); border: 1px solid var(--d-border); border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, transform 0.15s;
}
.d-tile:hover { border-color: #33415c; transform: translateY(-2px); }
.d-tile:focus-visible { outline: 2px solid var(--d-accent); outline-offset: 2px; }
.d-tile-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.d-tile-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-tile-meta { font-size: 0.75rem; color: var(--d-muted); white-space: nowrap; }
.d-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.d-value small { font-size: 0.8rem; font-weight: 600; color: var(--d-muted); letter-spacing: 0; }
.d-value.xl { font-size: 2.6rem; }
@media (max-width: 640px) { .d-value { font-size: 1.35rem; } .d-value.xl { font-size: 2rem; } }
.d-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.d-sub { font-size: 0.8rem; color: var(--d-muted); margin-top: auto; }
.d-caption { font-size: 0.75rem; color: var(--d-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.d-badge { display: inline-flex; align-items: baseline; gap: 0.15rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.d-badge small { font-weight: 600; opacity: 0.85; }
.d-badge.up { color: var(--d-up); background: rgba(34, 197, 94, 0.12); }
.d-badge.down { color: var(--d-down); background: rgba(244, 63, 94, 0.12); }
.d-badge.flat { color: var(--d-flat); background: rgba(148, 163, 184, 0.12); }
.dash .up { color: var(--d-up); }
.dash .down { color: var(--d-down); }
.d-spark { height: 42px; margin: 0 -0.2rem; }
.d-spark svg { width: 100%; height: 100%; display: block; }
.d-spark.up { color: var(--d-up); }
.d-spark.down { color: var(--d-down); }
.d-spark.flat { color: var(--d-flat); }
.d-stale { font-size: 0.8rem; }
.d-future { display: grid; gap: 0.05rem; margin-top: auto; padding-top: 0.5rem; border-top: 1px dashed var(--d-border); font-size: 0.8rem; }
.d-future b { font-size: 1.05rem; }
.d-future small { font-size: 0.72rem; font-weight: 600; }
.d-note { font-size: 0.85rem; margin: 0.8rem 0 !important; }
.d-small { font-size: 0.75rem; }
.d-split { list-style: none; margin: 0.5rem 0 0; padding: 0.45rem 0 0; border-top: 1px solid rgba(255,255,255,0.08); display: grid; gap: 0.2rem; font-size: 0.85rem; }
.d-split li { display: flex; justify-content: space-between; gap: 0.5rem; }
.d-pos-value { text-align: center; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; color: var(--d-up); line-height: 1.15; margin: 0.15rem 0; white-space: nowrap; }
.d-pos-value small { font-size: 1rem; font-weight: 700; }
@media (max-width: 640px) { .d-pos-value { font-size: 1.5rem; } }
.d-tile.d-manage { text-decoration: none; color: inherit; border-style: dashed; background: transparent; box-shadow: none; }
.d-tile.d-manage:hover { border-color: var(--d-accent); }
.d-future b.up { color: var(--d-up); }
.d-future b.down { color: var(--d-down); }
.d-stat.up b { color: var(--d-up); }
.d-stat.down b { color: var(--d-down); }
.d-table tr.d-pick td { color: #fbbf24; font-weight: 700; }
.d-error { color: #fca5a5; font-size: 0.9rem; margin: 0; }
.d-empty { display: grid; place-items: center; gap: 0.3rem; flex: 1; color: var(--d-muted); font-weight: 600; }
.d-empty-icon { font-size: 1.8rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed #33415c; }
.d-skeleton { background: linear-gradient(90deg, var(--d-card) 0%, var(--d-card2) 50%, var(--d-card) 100%); background-size: 200% 100%; animation: d-shimmer 1.4s infinite; cursor: default; }
.d-skeleton.tall { min-height: 260px; border-radius: 16px; border: 1px solid var(--d-border); }
.d-skeleton.chart { height: 300px; border-radius: 12px; }
@keyframes d-shimmer { to { background-position: -200% 0; } }

.d-weather-now { display: flex; align-items: center; gap: 0.8rem; }
.d-weather-icon { font-size: 2.6rem; line-height: 1; }
.d-weather-now.big .d-weather-icon { font-size: 4rem; }
.d-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.25rem; margin-top: auto; text-align: center; font-size: 0.8rem; }
.d-hours div { display: grid; gap: 0.1rem; padding: 0.35rem 0; border-radius: 8px; background: rgba(255, 255, 255, 0.03); }
.d-hours small { color: var(--d-muted); font-size: 0.7rem; }
.d-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.88rem; }
.d-list li { display: flex; gap: 0.6rem; min-width: 0; }
.d-chan { flex: none; width: 4.6rem; color: var(--d-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-chan.big { width: 6.5rem; color: var(--d-text); }
.d-ellip { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.d-news li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.6rem; font-size: 0.9rem; line-height: 1.35; }
.d-news-time { color: var(--d-muted); font-size: 0.75rem; padding-top: 0.15rem; }
.d-news-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Detailansichten */
.d-detail { display: grid; gap: 14px; }
.d-card { background: var(--d-card); border: 1px solid var(--d-border); border-radius: 16px; padding: 1.1rem 1.2rem; min-width: 0; }
.d-card-title { margin: 0 0 0.85rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--d-muted); }
.d-card p { margin: 0 0 0.75rem; }
.d-hero { display: grid; gap: 0.4rem; }
.d-tabs { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; }
.d-tabs.wrap { flex-wrap: wrap; }
.d-tabs button {
  font: inherit; font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
  color: var(--d-muted); background: var(--d-card); border: 1px solid var(--d-border);
}
.d-tabs button.on { color: #0b1220; background: var(--d-text); border-color: var(--d-text); }
.d-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 300px auto; gap: 0.25rem 0.6rem; }
@media (max-width: 640px) { .d-chart { grid-template-rows: 220px auto; } }
.d-axis-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.72rem; color: var(--d-muted); text-align: right; }
.d-axis-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--d-muted); }
.d-plot { position: relative; touch-action: pan-y; cursor: crosshair; }
.d-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-plot.up { color: var(--d-up); }
.d-plot.down { color: var(--d-down); }
.d-plot.flat { color: var(--d-accent); }
.d-plot .d-grid { stroke: #1f2a3c; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 4; }
.d-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(231, 236, 245, 0.35); pointer-events: none; }
.d-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12); pointer-events: none; }
.d-tip {
  position: absolute; top: 6px; transform: translateX(-50%); display: grid; gap: 0.1rem; padding: 0.4rem 0.6rem; pointer-events: none;
  font-size: 0.8rem; text-align: center; white-space: nowrap; color: var(--d-text); background: #1b2436; border: 1px solid #2c3850; border-radius: 8px;
}
.d-tip span { color: var(--d-muted); font-size: 0.72rem; }
.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.d-stat { display: grid; gap: 0.15rem; padding: 0.75rem 0.9rem; background: var(--d-card); border: 1px solid var(--d-border); border-radius: 12px; }
.d-card .d-stat { background: rgba(255, 255, 255, 0.02); }
.d-stat small { color: var(--d-muted); font-size: 0.75rem; }
.d-stat b { font-size: 1.05rem; }
.d-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .d-two { grid-template-columns: 1fr; } }
.d-dax40 { display: grid; gap: 14px; }
.d-scroll { overflow-x: auto; }
.d-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.d-table th { text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--d-muted); padding: 0 0.5rem 0.5rem; }
.d-table td { padding: 0.5rem; border-top: 1px solid var(--d-border); vertical-align: top; }
.d-table .num { text-align: right; white-space: nowrap; }
.d-table.depot td:first-child { min-width: 11rem; }
.d-block { display: block; }
.d-actions { display: flex; gap: 0.3rem; justify-content: flex-end; }
.d-hourly { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; }
.d-hourly div { flex: none; display: grid; gap: 0.15rem; justify-items: center; width: 58px; padding: 0.5rem 0; border-radius: 10px; background: rgba(255, 255, 255, 0.03); font-size: 0.85rem; }
.d-hourly small { color: var(--d-muted); font-size: 0.72rem; }
.d-rain { color: #7dd3fc !important; }
.d-days { display: grid; gap: 0.2rem; }
.d-day { display: grid; grid-template-columns: 7.5rem 2rem 4rem 2.5rem 1fr 2.5rem; align-items: center; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px solid var(--d-border); font-size: 0.92rem; }
.d-day:first-child { border-top: 0; }
.d-day-min { text-align: right; color: var(--d-muted); }
.d-range { position: relative; height: 6px; border-radius: 3px; background: #1b2436; }
.d-range-bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #f59e0b); }
@media (max-width: 640px) { .d-day { grid-template-columns: 5.6rem 1.6rem 1fr 2.2rem 2.2rem; } .d-day-rain { display: none; } .d-range { display: none; } }
.d-articles.with-img li { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: start; }
.d-news-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--d-card2); }
.d-news-img.d-poster-ph { color: var(--d-muted); }
.d-news-body { display: grid; gap: 0.3rem; min-width: 0; }
.d-news-body p { margin: 0; }
.d-credit { font-size: 0.7rem; color: var(--d-muted); opacity: 0.8; }
@media (max-width: 640px) { .d-articles.with-img li { grid-template-columns: 1fr; gap: 0.6rem; } }
.d-films { display: grid; gap: 0.2rem; }
.d-film { display: flex; gap: 1rem; align-items: flex-start; padding: 0.9rem 0; border-top: 1px solid var(--d-border); }
.d-film:first-child { border-top: 0; padding-top: 0.2rem; }
.d-poster {
  flex: none; width: 96px; aspect-ratio: 330 / 466; object-fit: cover; border-radius: 10px;
  background: var(--d-card2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); border: 1px solid var(--d-border);
}
.d-poster-ph { display: grid; place-items: center; font-size: 2rem; }
@media (min-width: 760px) { .d-poster { width: 120px; } }
.d-film-info { display: grid; gap: 0.6rem; min-width: 0; padding-top: 0.2rem; }
.d-film-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.d-film-meta { font-size: 0.8rem; color: var(--d-muted); margin-top: -0.35rem; }
.d-film-teaser { margin: 0 !important; font-size: 0.85rem; color: var(--d-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-film-title a { color: var(--d-text); text-decoration: none; }
.d-times { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.d-times span { padding: 0.25rem 0.6rem; border-radius: 8px; font-weight: 700; font-size: 0.9rem; background: rgba(96, 165, 250, 0.14); color: #bfdbfe; }
.d-times span.past { opacity: 0.4; text-decoration: line-through; }
.d-tv { list-style: none; margin: 0; padding: 0; }
.d-tv li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--d-border); }
.d-tv li:first-child { border-top: 0; }
.d-tv-main { flex: 1; min-width: 0; display: grid; }
.d-tv-main a { color: var(--d-text); font-weight: 700; text-decoration: none; }
.d-tv-main small, .d-tv-time { color: var(--d-muted); font-size: 0.8rem; }
.d-tv-time { white-space: nowrap; }
.d-articles { list-style: none; margin: 0; padding: 0; }
.d-articles li { display: grid; gap: 0.2rem; padding: 0.85rem 0; border-top: 1px solid var(--d-border); }
.d-articles li:first-child { border-top: 0; padding-top: 0; }
.d-articles a { color: var(--d-text); font-weight: 700; font-size: 1.02rem; text-decoration: none; line-height: 1.35; }
.d-articles a:hover { text-decoration: underline; }
.d-articles p { margin: 0; color: var(--d-muted); font-size: 0.9rem; line-height: 1.45; }
.d-link { font-weight: 600; text-decoration: none; }
.d-source { margin: 0; font-size: 0.75rem; color: var(--d-muted); }
.d-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 0.75rem; align-items: end; }
@media (max-width: 760px) { .d-form { grid-template-columns: 1fr 1fr; } }
.dash .d-form label { color: var(--d-muted); }
.dash .d-form input { background: #0b111c; border-color: var(--d-border); color: var(--d-text); }
.dash .d-form select, .dash .sp-search input, .dash .sp-search select { background: #0b111c; border: 1px solid var(--d-border); color: var(--d-text); border-radius: 10px; padding: 0.55rem 0.7rem; font: inherit; }

/* ---------- Spotify im Dashboard */
.sp-tile { --sp: #1db954; }
.sp-now-mini { display: flex; gap: 0.8rem; align-items: center; margin: 0.4rem 0; min-width: 0; }
.sp-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; background: var(--d-card2); }
.sp-cover.lg { width: 72px; height: 72px; border-radius: 8px; }
.sp-cover.xl { width: min(260px, 100%); height: auto; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.sp-cover-empty { display: grid; place-items: center; color: var(--d-muted); font-size: 1.2rem; }
.sp-text { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.sp-text b, .sp-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-text span { font-size: 0.85rem; }
.sp-tabs { margin-bottom: 1rem; flex-wrap: wrap; }
.d-tabs.small { margin: 0 0 0.6rem; flex-wrap: wrap; }
.d-tabs.small button { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.sp-panel { display: grid; gap: 1rem; }
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sp-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--d-border); }
.sp-row:last-child { border-bottom: 0; }
.sp-ranked { counter-reset: sp; }
.sp-ranked .sp-row { grid-template-columns: 1.6rem 44px 1fr auto; }
.sp-ranked .sp-row::before { counter-increment: sp; content: counter(sp); color: var(--d-muted); font-weight: 700; text-align: right; }
.sp-actions { display: flex; gap: 0.3rem; align-items: center; }
.sp-actions.left { margin-top: 0.8rem; }
.sp-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: inherit; font-size: 0.95rem; cursor: pointer;
  color: var(--d-text); background: var(--d-card2); border: 1px solid var(--d-border); text-decoration: none;
}
.sp-btn:hover { border-color: #1db954; }
.sp-heart.on { color: #1db954; border-color: #1db954; }
.sp-now { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 1.5rem; align-items: center; }
.sp-now-info h3 { margin: 0.3rem 0 0.2rem; font-size: 1.6rem; }
.sp-now-info p { margin: 0 0 0.8rem; }
.sp-progress { height: 5px; border-radius: 3px; background: var(--d-border); overflow: hidden; }
.sp-progress span { display: block; height: 100%; background: #1db954; }
.sp-times { display: flex; justify-content: space-between; margin-top: 0.25rem; }
.sp-ctls { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.sp-ctl { width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--d-text); background: var(--d-card2); border: 1px solid var(--d-border); }
.sp-ctl:not(:disabled):hover { border-color: #1db954; }
.sp-ctl:disabled { opacity: 0.4; cursor: not-allowed; }
.sp-tile { cursor: pointer; }
.sp-tile-ctls { justify-content: center; margin-top: auto; padding-top: 0.6rem; }
.sp-tile-ctls .sp-ctl { width: 42px; height: 42px; font-size: 1.05rem; }
.sp-tile-ctls .sp-ctl.main { width: 50px; height: 50px; background: #1db954; border-color: #1db954; color: #04110a; }
.sp-volume { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; max-width: 260px; }
.sp-volume input { flex: 1; accent-color: #1db954; }
.sp-search { display: grid; grid-template-columns: 1fr auto auto; gap: 0.6rem; }
.sp-query.hidden { display: none; }
.sp-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.sp-uri-li { list-style: none; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.sp-uri { background: #0b111c; border: 1px solid var(--d-border); padding: 0.3rem 0.5rem; border-radius: 6px; user-select: all; word-break: break-all; }
.sp-connect { display: inline-block; margin: 0.4rem 0; background: #1db954; border-color: #1db954; color: #04110a; text-decoration: none; }
@media (max-width: 640px) {
  .sp-now { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sp-ctls, .sp-actions.left { justify-content: center; }
  .sp-search { grid-template-columns: 1fr 1fr; }
  .sp-search input { grid-column: 1 / -1; }
}

/* ---------- Buchstaben-Spiel (Montessori: Selbstlaute rot, Mitlaute blau) */
.bs { --vowel: #d32f2f; --cons: #1d4ed8; }
.bs-hint { text-align: center; margin: -0.5rem auto 1rem; max-width: 560px; }
.bs-choose { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 0.5rem; max-width: 640px; margin: 0 auto; }
.bs-pick {
  height: 58px; font: inherit; font-size: 1.7rem; font-weight: 700; cursor: pointer; border-radius: 12px;
  background: var(--surface); border: 2px solid var(--border); color: var(--muted); transition: all 0.12s;
}
.bs-pick.vowel.on { background: var(--vowel); border-color: var(--vowel); color: #fff; }
.bs-pick.cons.on { background: var(--cons); border-color: var(--cons); color: #fff; }
.bs-actions { justify-content: center; align-items: center; margin-top: 1rem; }
.bs-known { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 1.25rem; justify-content: center; }
.bs-letter {
  display: inline-grid; place-items: center; min-width: 48px; height: 52px; padding: 0 0.45rem;
  font: inherit; font-size: 2rem; font-weight: 700; line-height: 1; border-radius: 10px; color: #fff; border: 0; cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}
button.bs-letter:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.bs-letter.vowel { background: var(--vowel); }
.bs-letter.cons { background: var(--cons); }
.bs-letter.small { min-width: 32px; height: 34px; font-size: 1.25rem; cursor: default; box-shadow: none; }
.bs-letter.big { min-width: 96px; height: 110px; font-size: 4rem; border-radius: 16px; }
.bs-letter.right, .bs-picture.right, .bs-box.right { box-shadow: 0 0 0 5px #22c55e; }
.bs-letter.wrong, .bs-picture.wrong, .bs-box.wrong { animation: zl-shake 0.4s; opacity: 0.55; }
.bs-stage { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.bs-options, .bs-pictures { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.bs-picture { width: 110px; height: 110px; font-size: 4rem; border-radius: 20px; cursor: pointer; background: var(--surface); border: 3px solid var(--border); }
.bs-trace-box { width: min(100%, 440px); background: linear-gradient(180deg, #fffdf6, #fdf6e3); border-radius: 18px; border: 1px solid #eadfc2; padding: 0.5rem; }
.bs-trace-box.done { box-shadow: 0 0 0 4px #22c55e; }
.bs-trace { width: 100%; height: auto; max-height: 52vh; display: block; touch-action: none; user-select: none; cursor: pointer; }
.bs-hint-pic { font-size: 4.5rem; line-height: 1; background: none; border: 0; cursor: pointer; padding: 0; }
.bs-guide { stroke: #e3d7b6; stroke-width: 0.6; stroke-dasharray: 2 2; }
.bs-base { stroke: #cdbb8c; stroke-width: 0.9; }
.bs-stroke-bg { fill: none; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; opacity: 0.25; }
.bs-stroke-fg { fill: none; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.bs-stroke-bg.vowel, .bs-stroke-fg.vowel { stroke: var(--vowel); }
.bs-stroke-bg.cons, .bs-stroke-fg.cons { stroke: var(--cons); }
.bs-start { fill: #facc15; stroke: #a16207; stroke-width: 1.5; animation: bs-pulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bs-demo { fill: #16a34a; }
@keyframes bs-pulse { 50% { transform: scale(1.35); } }
.bs-current { display: grid; place-items: center; min-height: 130px; }
.bs-current-pic { font-size: 6rem; line-height: 1; animation: mem-in 0.4s; }
.bs-center { align-self: center; display: block; margin: 0 auto; }
.bs-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.bs-box {
  display: grid; gap: 0.35rem; justify-items: center; padding: 0.75rem 0.5rem 0.9rem; min-height: 150px; cursor: pointer; font: inherit;
  background: #f5ecd7; border: 3px solid #d6c39a; border-radius: 16px;
}
.bs-box-letter { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.bs-box.vowel .bs-box-letter { color: var(--vowel); }
.bs-box.cons .bs-box-letter { color: var(--cons); }
.bs-box-content { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem; font-size: 1.6rem; }
.bs-word-pic { font-size: 5.5rem; line-height: 1; }
.bs-slots { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.bs-slot {
  width: 58px; height: 66px; border-radius: 12px; font: inherit; font-size: 2.3rem; font-weight: 700; cursor: pointer;
  background: var(--surface); border: 3px dashed var(--border); color: #fff;
}
.bs-slot.filled { border-style: solid; }
@media (max-width: 440px) {
  .bs-slots { gap: 0.25rem; }
  .bs-slot { width: 44px; height: 54px; font-size: 1.8rem; border-radius: 10px; }
  .bs-letter.big { min-width: 80px; height: 92px; font-size: 3.3rem; }
}
.bs-slot.filled.vowel { background: var(--vowel); border-color: var(--vowel); }
.bs-slot.filled.cons { background: var(--cons); border-color: var(--cons); }
.bs-slot.ok { box-shadow: 0 0 0 4px #22c55e; }
.bs-slot.off { box-shadow: 0 0 0 4px #f59e0b; }
.bs-control { text-align: center; padding: 0.5rem 1rem; border-radius: 12px; background: #fffbeb; border: 2px solid #fcd34d; }
.bs-control small { display: block; color: #92400e; font-weight: 700; }
.bs-control-word { font-size: 2rem; font-weight: 700; letter-spacing: 0.1em; }
.bs-control-word .vowel { color: var(--vowel); }
.bs-control-word .cons { color: var(--cons); }
.bs-alphabet { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; max-width: 620px; padding: 0.75rem; background: #f5ecd7; border-radius: 16px; }
.zl-level:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Berichte */
.rep-list { display: grid; gap: 0.6rem; }
.rep-card {
  display: grid; gap: 0.25rem; padding: 0.9rem 1.1rem; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.rep-card:hover, .rep-card:focus-visible { border-color: var(--primary); transform: translateY(-1px); outline: none; }
.rep-card.latest { padding: 1.25rem 1.3rem; border: 2px solid #0e7490; background: linear-gradient(135deg, color-mix(in srgb, #0e7490 10%, var(--surface)), var(--surface)); }
.rep-date { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.rep-card.latest .rep-date { color: #0e7490; }
.rep-title { font-size: 1.05rem; }
.rep-card.latest .rep-title { font-size: 1.25rem; }
.rep-summary { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.rep-view { display: grid; gap: 0.6rem; }
.rep-bar { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rep-bar-title { font-weight: 700; min-width: 8rem; }
.rep-frame { width: 100%; height: calc(100dvh - 170px); min-height: 420px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }

.coming-soon { text-align: center; padding: 2.5rem 1.25rem; }
.coming-soon .hint { margin: 0; }
.coming-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.loading { text-align: center; color: var(--muted); padding: 4rem; }

/* ---------- Startseite: Kacheln im Milchglas-Stil (durchscheinend, Symbol in farbigem Feld) */
body.home .tile {
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}
body.home .tile:hover { background: rgba(255, 255, 255, 0.15); }
body.home .tile-icon {
  display: grid; place-items: center;
  width: clamp(2.6rem, 11vw, 3.4rem); aspect-ratio: 1;
  border-radius: 14px;
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 45%, transparent);
}
body.home .tile-icon .icon-img { width: 1.1em; height: 1.1em; }
body.home .tile-title { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
@media (max-width: 600px) {
  body.home .tile-icon { border-radius: 11px; }
}

/* ---------- Kacheln in allen Ordnern immer mittig: auch eine unvollständige letzte Reihe wird zentriert */
body.home .grid { --cols: 4; --gap: 1.25rem; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
body.home .grid > .tile { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
@media (max-width: 719px) { body.home .grid { --cols: 2; --gap: 1rem; } }
@media (max-width: 600px) { body.home .grid { --gap: 0.7rem; } }

/* ---------- Bereich „Thomas“ (Daily Dashboard, Berichte …): dunkle Farben passend zum Nachtblau */
body.nacht {
  --bg: #0e1530; --surface: #161f3d; --text: #e8ebf2; --muted: #9aa3bd; --border: #2a3560; --shadow: none;
  color-scheme: dark;
}
body.nacht .topbar, body.nacht:has(.dash) .topbar { background: rgba(14, 21, 48, 0.6); border-color: rgba(255, 255, 255, 0.08); color: #fff; }
body.nacht .topbar .icon-btn, body.nacht:has(.dash) .topbar .icon-btn { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
body.nacht .rep-card.latest .rep-date { color: #22d3ee; }

/* ---------- Einkaufslisten (Eltern) */
.ek-muted { color: var(--muted); font-size: 0.85rem; }
.ek-label { display: block; font-size: 0.9rem; color: var(--muted); margin: 0.6rem 0 0.35rem; }
.ek-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.ek-card {
  display: flex; flex-direction: column; gap: 0.35rem; min-height: 150px; padding: 1.1rem; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; font: inherit; cursor: pointer; transition: transform 0.15s, border-color 0.15s;
}
.ek-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.ek-card-head { display: flex; justify-content: space-between; align-items: center; }
.ek-card-icon { font-size: 2rem; line-height: 1; }
.ek-card-title { font-size: 1.15rem; }
.ek-count { font-weight: 600; color: #ea580c; }
.ek-count.empty { color: #16a34a; }
.ek-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ek-new { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.ek-new .ek-card-icon { color: var(--primary); }
.ek-shopper-badge { font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px; color: #fff; background: var(--sc); }
.ek-list { max-width: 720px; margin: 0 auto 1rem; }
.ek-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ek-title { margin: 0; font-size: 1.3rem; flex: 1; min-width: 0; }
.ek-head-actions { display: flex; gap: 0.3rem; }
.ek-shopper { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0; }
.ek-shopper .ek-label { margin: 0; }
.ek-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--bg); }
.ek-seg button {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 0.45rem 1.1rem; cursor: pointer;
  background: transparent; color: var(--muted);
}
.ek-seg button.on { background: var(--sc); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.ek-switch { display: flex; justify-content: center; margin: 0 0 1.2rem; }
.ek-seg.big a {
  display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  padding: 0.6rem 1.4rem; border-radius: 999px; color: var(--muted);
}
.ek-seg.big a.on { background: var(--sc); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.ek-seg-count { font-size: 0.75rem; min-width: 1.4rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: #ea580c; color: #fff; text-align: center; }
.ek-seg-me { font-weight: 500; opacity: 0.8; }
.ek-title .ek-shopper-badge { vertical-align: middle; margin-left: 0.3rem; }
.ek-add { display: grid; grid-template-columns: 1fr 7.5rem auto; gap: 0.5rem; margin-bottom: 0.8rem; }
.ek-add .btn { font-size: 1.2rem; padding: 0.5rem 1rem; }
.ek-ul { list-style: none; margin: 0; padding: 0; }
.ek-item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 0.4rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.ek-item:last-child { border-bottom: 0; }
.ek-item-main { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; cursor: pointer; min-width: 0; }
.ek-item-main input[type="checkbox"] { width: 1.6rem; height: 1.6rem; accent-color: #16a34a; }
.ek-item-text { font-size: 1.05rem; overflow-wrap: anywhere; }
.ek-qty { font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.ek-item.done .ek-item-text { text-decoration: line-through; color: var(--muted); }
.ek-item.done .ek-qty { opacity: 0.6; }
.ek-by { white-space: nowrap; }
.ek-icon-btn { font: inherit; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.ek-icon-btn:hover { border-color: var(--border); background: var(--bg); color: var(--text); }
.ek-done-title { margin: 1.2rem 0 0.2rem; font-size: 0.85rem; color: #16a34a; text-transform: uppercase; letter-spacing: 0.04em; }
.ek-footer { display: flex; justify-content: center; margin-top: 1rem; }
.ek-footer:empty { display: none; }
.ek-finish { background: #16a34a; border-color: #16a34a; }
.ek-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.ek-icons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ek-icon { font-size: 1.35rem; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: var(--bg); }
.ek-icon.on { border: 2px solid var(--primary); background: var(--surface); }
@media (max-width: 560px) {
  .ek-add { grid-template-columns: 1fr 5.5rem auto; }
  .ek-title { order: 3; flex-basis: 100%; margin-top: 0.4rem; }
  .ek-head-actions { margin-left: auto; }
  .ek-by { display: none; }
  .ek-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .ek-card { min-height: 130px; padding: 0.9rem; }
}

/* ---------- Leons Spiele: Dino-Ausgrabung */
.dg-museum-btn { display: inline-flex; gap: 0.4rem; align-items: center; }
.dg-count { font-size: 0.75rem; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 0 0.45rem; }
.dg-field {
  position: relative; overflow: hidden; border-radius: 18px; outline-offset: 3px;
  background: radial-gradient(circle at 50% 55%, #7c4a22, #5b3416 70%);
  box-shadow: inset 0 0 0 4px #b98b4f, 0 6px 18px rgba(0,0,0,.15);
}
.dg-soil { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,.07) 1.5px, transparent 2px); background-size: 22px 22px; }
.dg-find { position: absolute; }
.dg-layer { position: absolute; inset: 0; transition: opacity 0.9s, transform 0.9s; }
.dg-layer svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dg-alive { opacity: 0; transform: scale(0.92); }
.dg-find.alive .dg-alive { opacity: 1; transform: none; animation: dg-wiggle 0.6s 0.9s ease-in-out 2; }
.dg-find.alive .dg-bones { opacity: 0; }
.dg-find.egg .dg-bones svg { width: 46%; margin: 0 auto; }
.dg-find.egg { cursor: pointer; }
.dg-find.wobble .dg-bones { animation: dg-wobble 0.5s ease-in-out; }
.dg-find.hatched .dg-bones { opacity: 0; transform: scale(1.3); }
.dg-find.baby .dg-alive { transform: scale(0.62); }
.dg-find.baby.alive .dg-alive { transform: scale(0.62); }
.dg-sand { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity 0.7s; }
.dg-sand.gone { opacity: 0; pointer-events: none; }
.dg-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none;
  background: rgba(255,255,255,.92); color: #78350f; font-weight: 800; font-size: 1.1rem; padding: 0.4rem 1rem; border-radius: 999px; white-space: nowrap;
  animation: dg-pulse 1.6s ease-in-out infinite;
}
@keyframes dg-wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg) translateY(-6px); } 70% { transform: rotate(4deg); } }
@keyframes dg-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes dg-pulse { 50% { transform: translateX(-50%) scale(1.06); } }
.dg-win-pic { width: min(260px, 70vw); margin: 0.3rem auto; }
.dg-win-pic.baby { width: min(170px, 46vw); }
.dg-win-pic svg { width: 100%; height: auto; display: block; }
.dg-m-title { margin: 0; font-size: 1.25rem; }
.dg-m-full { text-align: center; font-weight: 800; color: #b45309; }
.dg-museum { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.dg-m-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.6rem; font: inherit; cursor: pointer;
  border-radius: 16px; border: 2px solid #fde68a; background: linear-gradient(#fffbeb, #fef3c7); color: #1f2937;
}
.dg-m-card.unknown { border-style: dashed; border-color: var(--border); background: var(--bg); color: var(--muted); }
.dg-m-pic { width: 100%; aspect-ratio: 4 / 3; }
.dg-m-pic svg { width: 100%; height: 100%; display: block; }
.dg-m-pic.unknown svg { filter: brightness(0); opacity: 0.18; }
.dg-m-card strong { font-size: 0.95rem; }
.dg-m-card.wiggle .dg-m-pic { animation: dg-wiggle 0.6s ease-in-out 2; }
.dg-m-badges { display: flex; gap: 0.3rem; }
.dg-badge { font-size: 0.75rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; background: #fff; border: 1px solid #fcd34d; }
.dg-badge.baby { border-color: #f9a8d4; }
.dg-m-actions { display: flex; justify-content: center; margin-top: 1rem; }

/* ---------- Leons Spiele: Traktor-Ernte */
.tr-garage { display: inline-flex; gap: 0.3rem; }
.tr-veh { position: relative; width: 52px; height: 40px; padding: 2px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.tr-veh svg { width: 100%; height: 100%; display: block; }
.tr-veh.on { border-color: #16a34a; box-shadow: 0 0 0 2px #bbf7d0; }
.tr-veh.locked svg { filter: grayscale(1) brightness(1.3); opacity: 0.35; }
.tr-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1rem; }
.tr-field {
  position: relative; overflow: hidden; border-radius: 18px; touch-action: none; user-select: none; outline-offset: 3px;
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,.06) 0 26px, rgba(0,0,0,.05) 26px 52px),
    linear-gradient(#86efac, #4ade80 40%, #22c55e);
  box-shadow: inset 0 0 0 4px #15803d, 0 6px 18px rgba(0,0,0,.15);
}
.tr-hud {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  background: rgba(120, 53, 15, .85); border: 3px solid #78350f; border-radius: 14px; padding: 0.35rem 0.6rem; max-width: 86%;
}
.tr-need { display: flex; gap: 0.15rem; flex-wrap: wrap; justify-content: center; }
.tr-slot { width: clamp(24px, 4.2vw, 38px); height: clamp(24px, 4.2vw, 38px); filter: grayscale(1) brightness(1.8); opacity: 0.45; transition: transform 0.3s, opacity 0.3s; }
.tr-slot svg { width: 100%; height: 100%; display: block; }
.tr-slot.full { filter: none; opacity: 1; animation: tr-pop 0.35s ease-out; }
.tr-repeat { position: absolute; top: 10px; right: 10px; z-index: 3; }
.tr-item { position: absolute; left: 0; top: 0; z-index: 1; }
.tr-field.ready .tr-item { transition: transform 0.45s cubic-bezier(.2,.9,.3,1.2), opacity 0.45s; }
.tr-item svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 2px rgba(0,0,0,.25)); }
.tr-item.taken { opacity: 0; transform: translateY(-40px) scale(1.4) !important; transition-duration: 0.4s; }
.tr-item.rolling svg { animation: tr-roll 0.5s ease-out; }
.tr-veh-on-field { position: absolute; left: 0; top: 0; z-index: 2; transition: opacity 0.8s; }
.tr-body { width: 100%; height: 100%; }
.tr-body svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 3px rgba(0,0,0,.3)); }
.tr-veh-on-field.driving .tr-wheel { animation: tr-spin 0.6s linear infinite; }
.tr-veh-on-field.driving .tr-body { animation: tr-bump 0.25s ease-in-out infinite; }
.tr-veh-on-field.parking { opacity: 0; }
/* Räder drehen sich um ihre eigene Mitte (keine Inline-Styles wegen CSP) */
.tr-wheel { transform-box: fill-box; transform-origin: center; }
.tr-barn { position: absolute; right: 2%; bottom: 3%; width: 22%; max-width: 190px; min-width: 100px; aspect-ratio: 1.2; z-index: 1; }
.tr-barn svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.tr-door { position: absolute; bottom: 2%; width: 25%; height: 48%; background: repeating-linear-gradient(90deg, #92400e 0 6px, #78350f 6px 8px); border: 3px solid #f5f5f4; transition: transform 0.8s; }
.tr-door.l { left: 25%; transform-origin: left center; }
.tr-door.r { left: 50%; transform-origin: right center; }
.tr-barn.open .tr-door.l { transform: perspective(300px) rotateY(75deg); }
.tr-barn.open .tr-door.r { transform: perspective(300px) rotateY(-75deg); }
.tr-barn.open::after {
  content: '⬇'; position: absolute; left: 50%; top: -34px; transform: translateX(-50%); font-size: 2rem; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.4); animation: dg-pulse 1s ease-in-out infinite;
}
.tr-new-veh { display: grid; justify-items: center; gap: 0.3rem; margin: 0.4rem 0; }
.tr-new-veh-pic { width: 150px; }
.tr-new-veh-pic svg { width: 100%; display: block; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
@keyframes tr-bump { 50% { transform: translateY(-1.5px); } }
@keyframes tr-pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes tr-roll { 0% { transform: rotate(0); } 100% { transform: rotate(200deg); } }
@media (max-width: 560px) {
  .tr-veh { width: 42px; height: 32px; }
  .dg-museum { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .dg-find.alive .dg-alive, .dg-hint, .tr-veh-on-field.driving .tr-wheel, .tr-veh-on-field.driving .tr-body, .tr-barn.open::after { animation: none; }
}

/* ---------- Sarahs Spiele: Einhorn-Laden */
.ld-dots { display: inline-flex; gap: 0.25rem; }
.ld-dots span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); font-size: 0.95rem; opacity: 0.55; }
.ld-dots .now { opacity: 1; border-color: #db2777; box-shadow: 0 0 0 3px #fbcfe8; }
.ld-dots .on { opacity: 1; background: #22c55e; border-color: #16a34a; color: #fff; font-weight: 800; }
.ld-shop {
  position: relative; height: 150px; border-radius: 18px 18px 0 0; overflow: hidden;
  background: repeating-linear-gradient(90deg, #fce7f3 0 28px, #fbcfe8 28px 56px);
  border: 3px solid #f9a8d4; border-bottom: 0;
}
.ld-shelf { position: absolute; left: 14%; right: 14%; top: 62px; display: flex; justify-content: space-around; font-size: 1.4rem; padding: 0.2rem 0.5rem; border-bottom: 6px solid #a16207; }
.ld-owner { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); font-size: 3rem; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.ld-deco { position: absolute; }
.ld-girlande { top: -2px; left: 0; right: 0; text-align: center; font-size: 1.2rem; letter-spacing: 0.6rem; }
.ld-lichter { top: 22px; left: 0; right: 0; text-align: center; font-size: 0.9rem; letter-spacing: 0.5rem; }
.ld-leuchter { top: 26px; left: 50%; transform: translateX(-50%); font-size: 1.6rem; }
.ld-schild { top: 34px; left: 10px; background: linear-gradient(90deg, #f472b6, #a78bfa, #60a5fa); color: #fff; font-weight: 900; padding: 0.15rem 0.6rem; border-radius: 10px; font-size: 0.85rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.ld-schild.plain { background: #fff; color: #9d174d; }
.ld-blumen { bottom: 8px; font-size: 2rem; }
.ld-blumen.l { left: 2%; }
.ld-blumen.r { right: 2%; }
.ld-kuschel { top: 34px; right: 12px; font-size: 1.7rem; transform: rotate(10deg); }
.ld-stage { border: 3px solid #f9a8d4; border-top: 6px solid #a16207; border-radius: 0 0 18px 18px; padding: 1rem; background: #fff7fb; display: grid; gap: 0.8rem; }
.ld-customer { display: flex; align-items: center; gap: 0.8rem; }
.ld-animal { font-size: 3.4rem; line-height: 1; transition: transform 0.4s; }
.ld-animal.happy { animation: ld-hop 0.5s ease-in-out 3; }
.ld-bubble { position: relative; background: #fff; border: 2px solid #f9a8d4; border-radius: 16px; padding: 0.6rem 0.9rem; font-size: 1.15rem; font-weight: 700; color: #1f2937; }
.ld-bubble::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); border: 8px solid transparent; border-right-color: #f9a8d4; }
.ld-items { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.ld-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.ld-item-icon { font-size: 2.4rem; }
.ld-tag { background: #fef08a; border: 2px dashed #ca8a04; color: #713f12; font-weight: 900; font-size: 1.2rem; padding: 0.1rem 0.6rem; border-radius: 8px; transform: rotate(-4deg); }
.ld-price { font-size: 1.3rem; font-weight: 900; color: #9d174d; margin-left: auto; }
.ld-paid { display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto; font-weight: 700; }
.ld-task { margin: 0; font-weight: 700; font-size: 1.05rem; color: #6b21a8; }
.ld-counter { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ld-col h3 { margin: 0 0 0.4rem; font-size: 0.95rem; color: #6b7280; }
.ld-tray { min-height: 92px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.35rem; padding: 0.5rem; border-radius: 14px; background: #fdf2f8; border: 2px solid #fbcfe8; }
.ld-tray.kasse { background: #f0fdf4; border-color: #bbf7d0; }
.ld-empty { color: var(--muted); font-size: 0.9rem; align-self: center; margin: auto; text-align: center; }
.ld-money { padding: 0; border: 0; background: none; cursor: pointer; transition: transform 0.15s; touch-action: manipulation; }
.ld-money:hover, .ld-money:focus-visible { transform: translateY(-3px) scale(1.05); }
.ld-money svg { display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.ld-money.coin svg { width: 54px; height: 54px; }
.ld-money.note svg { width: 92px; height: 50px; }
.ld-sum { margin-top: 0.4rem; font-weight: 900; font-size: 1.1rem; color: #374151; }
.ld-sum.ok { color: #16a34a; }
.ld-sum.too { color: #dc2626; }
@keyframes ld-hop { 50% { transform: translateY(-14px) rotate(-6deg); } }
@media (max-width: 560px) {
  .ld-counter { grid-template-columns: 1fr; }
  .ld-shelf { font-size: 1.05rem; left: 2%; right: 2%; }
  .ld-money.coin svg { width: 48px; height: 48px; }
  .ld-money.note svg { width: 82px; height: 45px; }
  .ld-animal { font-size: 2.6rem; }
  .ld-bubble { font-size: 1rem; }
}

/* ---------- Sarahs Spiele: Einhorn-Tag (Uhr) */
.uh-progress { display: flex; justify-content: center; gap: 0.4rem; margin-bottom: 0.8rem; }
.uh-dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; background: var(--bg); border: 2px solid var(--border); opacity: 0.45; }
.uh-dot.now { opacity: 1; border-color: #7c3aed; box-shadow: 0 0 0 3px #ddd6fe; }
.uh-dot.done { opacity: 1; background: #ede9fe; border-color: #a78bfa; }
.uh-stage { display: grid; justify-items: center; gap: 0.7rem; text-align: center; }
.uh-scene { display: flex; align-items: center; gap: 0.8rem; text-align: left; background: linear-gradient(90deg, #fdf2f8, #f5f3ff); border-radius: 16px; padding: 0.5rem 1rem; width: 100%; max-width: 560px; }
.uh-scene-pic { font-size: 2.4rem; white-space: nowrap; }
.uh-scene p { margin: 0.1rem 0 0; color: #4b5563; }
.uh-task { margin: 0; font-size: 1.35rem; }
.uh-task mark { background: #fbcfe8; color: #831843; padding: 0 0.35rem; border-radius: 6px; }
.uh-clock { width: min(300px, 72vw); }
.uh-clock svg { width: 100%; height: auto; display: block; touch-action: none; user-select: none; }
.uh-clock svg.drag { cursor: grab; }
.uh-clock .uh-min, .uh-clock .uh-hour { transition: transform 0.15s; }
.uh-clock.wrong { animation: dg-wobble 0.45s ease-in-out; }
.uh-clock.right svg > circle:first-child { stroke: #22c55e; }
.uh-help { margin: 0; color: var(--muted); font-size: 0.9rem; }
.uh-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.uh-check { min-width: 200px; }
.uh-digital {
  font: 800 clamp(3rem, 14vw, 5rem)/1 ui-monospace, Consolas, monospace; letter-spacing: 0.08em; color: #f472b6; background: #1e1b4b;
  padding: 0.4rem 1.2rem; border-radius: 16px; box-shadow: inset 0 0 0 4px #4c1d95, 0 6px 16px rgba(30,27,75,.3);
}
.uh-answers { display: grid; gap: 0.5rem; width: min(340px, 100%); }
.uh-answer { font-size: 1.25rem; padding: 0.8rem; }
.uh-answer.right { background: #22c55e; border-color: #16a34a; color: #fff; }
.uh-answer.wrong { background: #fee2e2; border-color: #fca5a5; color: #991b1b; text-decoration: line-through; }
.uh-story { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; width: 100%; }
.uh-story li { display: grid; justify-items: center; gap: 0.15rem; padding: 0.7rem; border-radius: 14px; background: linear-gradient(#fdf2f8, #ede9fe); }
.uh-story-pic { font-size: 2.2rem; }
.uh-story li span:last-child { font-weight: 800; color: #6d28d9; }
.uh-story-actions { margin-top: 0.4rem; }

/* ---------- Berichte: Unterkacheln */
.rep-tile { position: relative; }
.rep-tile-meta { font-size: 0.75rem; font-weight: 600; opacity: 0.9; text-align: center; padding: 0 0.4rem; }
