[hidden] { display: none !important; }

@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Sans 3";
    src: url("../fonts/source-sans-3-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("../fonts/source-serif-4-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("../fonts/source-serif-4-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("../fonts/source-serif-4-600-italic.woff2") format("woff2");
    font-weight: 600;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #efe6d4;
    --ink: #1c1410;
    --ink-soft: #3f3228;
    --muted: #5c5148;
    --card: #fff8ef;
    --wash: #f0e4d4;
    --track: #e4d4c2;
    --btn: #efe4d4;
    --line: rgba(48, 32, 18, 0.12);
    --line-strong: rgba(48, 32, 18, 0.2);
    --hero: #b83314;
    --hero-2: #d24a22;
    --hero-ink: #fff6ee;
    --gold: #c4921c;
    --gold-soft: #f0e0a4;
    --ok: #2a6a48;
    --ok-soft: #e3f0e8;
    --bad: #9c2c22;
    --bad-soft: #f7e6e2;
    --shadow: 0 1px 0 rgba(255, 248, 239, 0.7) inset, 0 1px 2px rgba(40, 24, 12, 0.05), 0 10px 22px rgba(40, 24, 12, 0.07);
    --radius: 16px;
    --radius-sm: 11px;
    --tap: 48px;
    --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; visibility: visible !important; }
html, body { margin: 0; min-height: 100%; min-height: 100vh; min-height: 100dvh; }
body {
    font-family: var(--font);
    font-weight: 400;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-synthesis: style;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--hero) 22%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--hero); outline-offset: 3px; }
body.mode-hub,
body.mode-bare,
body.mode-kid {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 62%, transparent) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 74%),
        url("../art/wall-phone.webp");
    background-size: cover;
    background-position: center top;
}
body.mode-land {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 58%),
        url("../art/land-wall.webp");
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
}
body.mode-parent { background: var(--bg); }
/* Wiedererkennbarer Hintergrund auch für Eltern (Standard an, abwählbar).
   Bewusst ruhiger als im Kindermodus: kräftigerer Verlauf über dem Motiv,
   damit Karten und Text gut lesbar bleiben. Eltern-Palette bleibt (:root). */
body.mode-parent.has-wall {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 80%, transparent) 0%, color-mix(in srgb, var(--bg) 93%, transparent) 68%),
        url("../art/wall-phone.webp");
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
}
body.mode-parent.has-wall .app-head { background: transparent; }
/* App-Modi scrollen nie horizontal auf Seitenebene (native Anmutung).
   Interne Slider (.switcher, .cal-strip, …) behalten ihr eigenes overflow-x. */
body.mode-hub,
body.mode-parent,
body.mode-kid,
body.mode-bare { overflow-x: clip; }
a { color: var(--hero); }
button, input, select { font: inherit; }
/* Textfelder mindestens 16px, sonst zoomt iOS beim Fokus hinein. */
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
textarea, select { font-size: 16px; }
img { max-width: 100%; display: block; }

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.app-shell > .app {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.app-shell .app-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.app {
    width: min(430px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px 16px calc(76px + env(safe-area-inset-bottom));
}
.app-bare { padding-bottom: 32px; width: min(430px, 100%); }
body.mode-bare {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.mode-bare .app-bare {
    width: min(400px, 100%);
    min-height: 0;
    padding: 0.95rem 1rem 0.9rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.auth-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (min-width: 700px) {
    body.mode-bare:not(.mode-legal) { padding: 0; }
    .auth-stage {
        min-height: 100vh;
        min-height: 100dvh;
        justify-content: center;
        padding: 16px;
    }
    .auth-stage .app-bare { margin: 0; }
}
body.mode-bare.mode-legal { place-items: start center; }
.mode-bare .app-legal {
    width: min(720px, 100%);
    padding: 1.5rem 1.35rem 1.3rem;
}
.legal h2 { font-size: 1.02rem; margin: 1.35rem 0 0.4rem; }
.legal p, .legal li { font-size: 0.95rem; }
.legal ul { margin: 0.35rem 0 0.7rem; padding-left: 1.15rem; }
.legal-nav {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-top: 1.4rem; font-weight: 700; font-size: 0.88rem;
}
.legal-nav a { text-decoration: none; }
.legal-nav span { color: var(--muted); }

/* Rechtliche Unterseiten (Impressum, Datenschutz, Nutzung) im Land-Layout */
.legal-page {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 1.6rem 0 3rem;
}
.legal-head { margin-bottom: 0.4rem; }
.legal-head h1 {
    font-size: clamp(1.85rem, 5vw, 2.5rem);
    line-height: 1.1;
    margin: 0.2rem 0 0.5rem;
}
.legal-lead {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
    max-width: 60ch;
}
.legal-tabs {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin: 1.3rem 0 2rem;
}
.legal-tabs a, .legal-tabs span {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--card);
    transition: border-color 0.15s ease, color 0.15s ease;
}
.legal-tabs a:hover { border-color: var(--hero); color: var(--hero); }
.legal-tabs span { background: var(--hero); color: #fff; border-color: var(--hero); }
.legal-body h2 {
    font-size: 1.18rem;
    margin: 1.9rem 0 0.55rem;
    color: var(--ink);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--ink);
}
.legal-body ul { margin: 0.5rem 0 1.1rem; padding-left: 1.25rem; }
.legal-body li { margin-bottom: 0.35rem; }
.legal-body a { color: var(--hero); }
.legal-body code {
    background: var(--wash);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.9em;
}
.legal-stand {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 2.2rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}
.app-main { min-width: 0; width: 100%; }
.app-body { min-width: 0; width: 100%; }

/* Eltern-App füllt exakt den Viewport. Der Inhalt (.app) dehnt sich per Flex
   auf die volle Höhe und schiebt die Tableiste ans untere Ende — egal wie
   viel Inhalt tatsächlich da ist. Bewusst kein position:fixed/absolute: das
   ließ im Ziel-Webview eine Lücke unter der Leiste. Stattdessen reproduzieren
   wir den früheren „Content drückt die Leiste nach unten"-Effekt künstlich
   über flex:1 auf dem Inhalt. */
body.mode-parent {
    overflow: hidden;
    overscroll-behavior: none;
}
body.mode-parent .app-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
/* Installierte PWA (iOS): 100dvh liefert beim Cold Start falsche Höhen und
   korrigiert sich erst nach einer Rotation. Im Standalone-Modus ist 100vh
   zuverlässig und deckungsgleich mit 100dvh -> Tableiste sitzt am echten
   unteren Rand. (iphone-pwa-guide, Abschnitt 2) */
html.is-standalone body.mode-parent,
html.is-standalone body.mode-parent .app-shell {
    height: 100vh;
}
body.mode-parent .app-shell > .app,
body.mode-parent .app-main {
    min-height: 0;
    overflow: hidden;
}
body.mode-parent .app {
    padding-bottom: 0;
}
body.mode-parent .tabbar {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
}
body.mode-parent .view-scroll {
    padding-bottom: 0.5rem;
}
body.mode-parent .app-head {
    flex: 0 0 auto;
    background: var(--bg);
}
body.mode-parent .app-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.view-pin {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.view-pin > .top,
.view-pin > .task-tools,
.view-pin > .span-nav {
    flex: 0 0 auto;
}
.view-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0.35rem;
}
/* Scrollleisten generell ausblenden — wirkt wie eine native App. Scrollen
   bleibt voll funktionsfähig, nur der Balken ist unsichtbar. Gilt für das
   Dokument und die In-App-Scrollflächen (Elternmodus: .view-scroll,
   Kindermodus auf dem Handy: .app-body). */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { width: 0; height: 0; display: none; }
.view-scroll, .app-body { scrollbar-width: none; -ms-overflow-style: none; }
.view-scroll::-webkit-scrollbar,
.app-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidenav { display: none; }
.hide-phone { display: none; }
.mode-parent .app { width: min(560px, 100%); }

/* Kindermodus (Handy): gleiche Fix-Shell wie beim Elternmodus, damit die
   Tableiste unten klebt und nicht mit dem Scrollen nach oben rutscht. Der
   Inhalt scrollt in .app-body, die Tableiste bleibt als Flex-Kind stehen.
   Nur bis 699px — ab Tablet/Desktop nutzt der Kindermodus Sidenav + Wall. */
@media (max-width: 699px) {
    body.mode-kid {
        overflow: hidden;
        overscroll-behavior: none;
    }
    body.mode-kid .app-shell {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
    html.is-standalone body.mode-kid,
    html.is-standalone body.mode-kid .app-shell {
        height: 100vh;
    }
    body.mode-kid .app-shell > .app,
    body.mode-kid .app-main {
        min-height: 0;
        overflow: hidden;
    }
    body.mode-kid .app {
        padding-bottom: 0;
    }
    body.mode-kid .tabbar {
        position: static;
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
    }
    body.mode-kid .app-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Sanfter Crossfade beim Kind-Wechsel (voller Reload, zweiphasig). */
html.hp-switch-out .app-main { opacity: 0; transition: opacity 0.16s ease; }
html.hp-switch-enter .app-main { opacity: 0; }
html.hp-switch-in .app-main { opacity: 1; transition: opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
    html.hp-switch-out .app-main,
    html.hp-switch-enter .app-main,
    html.hp-switch-in .app-main { opacity: 1; transition: none; }
}

/* Footer nur in der Desktop-Elternansicht (dort, wo die Sidebar erscheint).
   Auf Mobil/PWA bleibt er aus — Rechtliches steht dort in den Einstellungen. */
.app-foot { display: none; }
@media (min-width: 1280px) {
    body.mode-parent .app-foot {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem 1.6rem;
        margin-top: 1.4rem;
        padding-top: 1.1rem;
        padding-bottom: 0.9rem;
        border-top: 1px solid var(--line);
        font-size: 0.8rem;
        line-height: 1.5;
        color: var(--muted);
    }
    .app-foot-links {
        display: flex;
        flex-wrap: wrap;
        gap: 1.1rem;
        font-weight: 600;
    }
    .app-foot-links a { color: var(--muted); text-decoration: none; transition: color 0.12s ease; }
    .app-foot-links a:hover { color: var(--hero); }
    .app-foot-meta { color: var(--muted); }
    .app-foot-meta a { color: var(--ink-soft); font-weight: 600; text-decoration: none; transition: color 0.12s ease; }
    .app-foot-meta a:hover { color: var(--hero); text-decoration: underline; }
    .app-foot-heart { color: #d1442b; font-style: normal; padding: 0 0.05rem; }
    .app-foot-ver { color: var(--muted); opacity: 0.7; margin-left: 0.15rem; }
}

.app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin: 0 0 1.15rem;
    padding: 0.1rem 0 0.85rem;
    min-height: 68px;
    border-bottom: 1px solid var(--line);
}
.app-head-title {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}
.app-head-title h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.85rem, 7vw, 2.35rem);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.03em;
}
.app-head-title h1::after {
    content: "";
    display: block;
    width: 2.4rem;
    height: 3px;
    margin-top: 0.42rem;
    border-radius: 99px;
    background: var(--hero);
}
.app-top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}
.app-top-actions form { margin: 0; }
.app-logout-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    display: grid; place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.08s ease, color 0.12s ease, background 0.12s ease;
}
.app-logout-btn:hover { color: var(--ink); }
.app-logout-btn:active, .app-logout-btn.is-down { transform: scale(0.9); }
.app-logout-btn svg { width: 20px; height: 20px; }
.app-top-kid { color: var(--hero); border-color: rgba(210, 75, 26, 0.22); }
.app-top-kid:hover { color: var(--hero); background: rgba(210, 75, 26, 0.08); }

/* Kompakter Kind-Wechsler im Header (nur Fokus-Views: Übersicht, Statistik).
   Nur einzelne Kinder, kein „Alle". Aktives Kind mit farbigem Ring. */
.head-switch {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 7px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.head-switch::-webkit-scrollbar { display: none; }
.head-switch form { margin: 0; flex: 0 0 auto; }
.head-switch-kid {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0; border: 0; background: transparent;
    border-radius: 999px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.head-switch-kid:not(.is-on):active, .head-switch-kid.is-down { transform: scale(0.92); }
.head-switch-kid .avatar {
    width: 32px; height: 32px; font-size: 0.9rem;
    flex: none;
    opacity: 0.5;
    transition: width 0.14s ease, height 0.14s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}
.head-switch-kid.is-on {
    background: var(--card);
    border: 1px solid var(--line);
    height: 38px;
    padding: 0 4px 0 0.85rem;
    box-shadow: var(--shadow);
    cursor: default;
    overflow: visible;
    /* Pille ein paar Pixel nach links; Kreis bleibt per Gegen-Shift stehen. */
    transform: translateX(-6px);
}
.head-switch-kid.is-on .avatar {
    width: 48px; height: 48px; font-size: 1.15rem;
    opacity: 1;
    box-shadow: 0 0 0 2.5px var(--c);
    transform: translateX(6px);
}
.head-switch-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
    max-width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 1024px) {
    .app-head { min-height: 90px; }
    .head-switch { gap: 0.6rem; max-width: none; padding: 9px 2px; }
    .head-switch-kid .avatar { width: 46px; height: 46px; font-size: 1.25rem; }
    .head-switch-kid.is-on { height: 50px; padding: 0 5px 0 1.05rem; }
    .head-switch-kid.is-on .avatar { width: 62px; height: 62px; font-size: 1.55rem; box-shadow: 0 0 0 3px var(--c); }
    .head-switch-name { font-size: 1.2rem; max-width: none; }
}

/* Pull-to-Refresh — immer über Header, Tabbar und Sheets */
.ptr {
    --ptr-y: 0px;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 50%;
    z-index: 80;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.4rem 0.95rem 0.4rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 10px 28px rgba(40, 24, 12, 0.22);
    transform: translateX(-50%) translateY(var(--ptr-y));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.ptr.is-on { opacity: 1; }
.ptr-spin {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2.5px solid var(--track);
    border-top-color: var(--hero);
}
.ptr-txt { font-weight: 700; font-size: 0.88rem; letter-spacing: -0.01em; white-space: nowrap; }
.ptr.is-ready {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.ptr.is-ready .ptr-spin { border-color: rgba(255, 255, 255, 0.28); border-top-color: #fff; }
.ptr.is-loading .ptr-spin { animation: ptr-rot 0.7s linear infinite; }
@keyframes ptr-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .ptr.is-loading .ptr-spin { animation-duration: 1.4s; }
}

.hp-load {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: env(safe-area-inset-top, 0px) 1.5rem env(safe-area-inset-bottom, 0px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
}
.hp-load.is-on {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.hp-load-mid {
    display: grid;
    justify-items: center;
    gap: 1.15rem;
    transform: scale(0.94);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.32s ease;
}
.hp-load.is-on .hp-load-mid {
    transform: scale(1);
    opacity: 1;
}
.hp-load-mark {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: hp-load-pulse 1.1s ease-in-out infinite;
}
.hp-load-spin {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 3px solid var(--track);
    border-top-color: var(--hero);
    animation: ptr-rot 0.7s linear infinite;
}
@keyframes hp-load-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .hp-load-mark, .hp-load-spin { animation: none; }
    .hp-load-mid { transition: opacity 0.2s ease; transform: none; }
}

.brand {
    margin: 0;
    font-family: var(--display);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--hero);
}
.brand-mark {
    width: 56px; height: 56px; border-radius: 14px;
    margin: 0; box-shadow: var(--shadow);
}

.hp-splash {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: env(safe-area-inset-top, 0px) 1.5rem env(safe-area-inset-bottom, 0px);
    opacity: 1;
    transition: opacity 0.5s ease;
}
.hp-splash-mid {
    display: grid;
    justify-items: center;
    gap: 0.85rem;
}
.hp-splash-mark {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.hp-splash-name {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    color: var(--hero);
}
.hp-splash-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
    margin: 0;
    display: grid;
    gap: 0.2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.hp-splash.is-out {
    opacity: 0;
    pointer-events: none;
}
html.hp-splash-skip .hp-splash { display: none !important; }
@media (prefers-reduced-motion: reduce) {
    .hp-splash { transition: none; }
}
.auth-head {
    display: flex; align-items: center; gap: 0.7rem;
    margin: 0 0 0.75rem;
}
.auth-head h1 { margin: 0.05em 0 0; font-size: 1.32rem; }
.auth-register.is-join h1 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.auth-head .brand { margin: 0; }
.auth-head .brand a { color: inherit; text-decoration: none; }
.auth-head .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
.auth-form { margin: 0; }
.auth-form.stack { gap: 0.55rem; }
.auth-foot { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.88rem; }
.auth-forgot { margin: 0.7rem 0 0; font-size: 0.88rem; }
.auth-forgot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.auth-forgot a:hover { color: var(--hero); text-decoration: underline; }
.auth-more { margin: 0.55rem 0 0; }
.auth-more summary {
    cursor: pointer; font-weight: 700; color: var(--muted); font-size: 0.88rem;
}
.auth-more .how { margin: 0.7rem 0 0; }
.auth-more-hint { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.auth-more-hint strong { color: var(--ink); }
.auth-label-note { font-weight: 400; color: var(--muted); }
.auth-join-code { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.auth-register.is-join .auth-sub { margin-bottom: 0.85rem; }
.auth-form .auth-more label { margin-top: 0.65rem; }
.auth .fine { margin-top: 0.5rem; }
.auth-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    margin: 0 0 0.6rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: var(--wash);
    border: 1px solid var(--line);
    color: var(--ink); text-decoration: none;
    font-weight: 700; font-size: 0.85rem;
    transition: transform 0.15s ease, background 0.15s ease;
}
.auth-back:hover { background: var(--btn); transform: translateX(-2px); }
.auth-back .ar { font-size: 1.1em; line-height: 1; }
.auth-sub { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.auth-perks { list-style: none; margin: 0.5rem 0 0.7rem; padding: 0; display: grid; gap: 0.3rem; }
.auth-perks li { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.92rem; }
.auth-perks li::before {
    content: "✓"; flex: none;
    width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center;
    background: #eef6ee; color: #34a05a; font-weight: 700; font-size: 0.78rem;
}
@media (prefers-reduced-motion: reduce) { .auth-back { transition: none; } }
.sheet > .brand-mark { margin-bottom: 0.7rem; }
h1 {
    font-family: var(--font);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.15em 0 0.28em;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-wrap: balance;
}
.mode-kid .kid-me h1,
.mode-kid .hello h1 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
h2, .h2 { font-size: 1.05rem; margin: 1.45rem 0 0.6rem; letter-spacing: -0.015em; font-weight: 700; }
.h3 { font-size: 0.78rem; margin: 0.9rem 0 0.4rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.stat-card { display: flex; flex-direction: column; gap: 0; }
.stat-card .h3:first-child { margin-top: 0; }
.lead, .muted, .fine { color: var(--muted); margin: 0; }
.lead { margin-bottom: 1rem; line-height: 1.5; }
.fine { font-size: 0.82rem; margin-top: 0.8rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; color: var(--muted); margin: 0 0 0.15rem; font-weight: 700; }
.top { margin-bottom: 1.1rem; }
.mode-parent .top { margin-bottom: 0.85rem; }
.mode-parent .top .lead { margin-bottom: 0; }
.back {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.35rem;
}
.top-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.15rem;
}
.top-title h1 { margin: 0; }
.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.back-btn svg { width: 22px; height: 22px; display: block; }
.back-btn:hover { background: var(--wash); }
.back-btn:active { transform: translateX(-1px); }

.sheet { padding-top: 1.2rem; }
.center { text-align: center; }
.stack { display: grid; gap: 0.8rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.88rem; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=file], input[type=email], select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: var(--tap);
    border: 1px solid var(--line-strong);
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    color: var(--ink);
    box-sizing: border-box;
}
input[type=date] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
input[type=date]::-webkit-datetime-edit,
input[type=date]::-webkit-datetime-edit-fields-wrapper {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
input[type=date]::-webkit-calendar-picker-indicator {
    margin-left: 0;
    flex-shrink: 0;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--hero);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hero) 20%, transparent);
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.05rem 1.1rem;
    margin: 0 0 0.8rem;
}
.card.soft { box-shadow: none; }
.card.slim { padding: 0.8rem 1rem; }
.card.warn { border-color: color-mix(in srgb, var(--hero) 28%, var(--line)); background: color-mix(in srgb, var(--hero) 6%, var(--card)); }
.goal h2 { margin: 0.15rem 0 0.55rem; font-size: 1.15rem; }
.goal p:last-child { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.88rem; }

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: var(--tap);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    background: var(--btn);
    transition: transform 0.08s ease, filter 0.12s ease, background 0.12s ease;
}
.btn-hero {
    background: var(--hero);
    color: var(--hero-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(80, 18, 8, 0.22);
}
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-ghost { background: var(--card); border: 1px solid var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
    .btn-hero:hover, .btn-ok:hover, .btn-bad:hover { filter: brightness(1.06); }
    .btn-ghost:hover, .btn:hover { background: color-mix(in srgb, var(--btn) 70%, var(--card)); }
    .btn-hero:hover { background: var(--hero); }
    .btn-ok:hover { background: var(--ok); }
    .btn-bad:hover { background: var(--bad); }
}
.btn:active, .btn.is-down { transform: scale(0.97); filter: brightness(0.96); transition-duration: 0.05s; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; filter: none; }
.btn[disabled]:active, .btn[disabled].is-down { transform: none; filter: none; }
.btn.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
    .btn:active, .btn.is-down,
    .chip:active, .chip.is-down,
    .tabbar a:active, .tabbar a.is-down,
    .switcher button:active, .switcher button.is-down,
    .who-card:active, .who-card.is-down,
    .quest button:active, .quest button.is-down,
    .keypad button:active, .keypad button.is-down,
    .today-dailies button:active, .today-dailies button.is-down,
    .today-extra button:active, .today-extra button.is-down,
    .kidmode-pick:active, .kidmode-pick.is-down,
    .app-logout-btn:active, .app-logout-btn.is-down,
    .tools-add:active, .tools-add.is-down {
        transform: none; filter: none;
    }
}
button, a, .who-card, .tabbar a { touch-action: manipulation; }
.btn, .chip, .tabbar a, .switcher button, .switcher-hub,
.who-card, .keypad button, .today-dailies button, .today-extra button, .quest button,
.app-logout-btn, .kidmode-pick, button.cal-day, .back-btn, .tools-add {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.chip:active, .chip.is-down,
.switcher button:active, .switcher button.is-down,
.switcher-hub:active, .switcher-hub.is-down,
.today-dailies button:active, .today-dailies button.is-down,
.today-extra button:active, .today-extra button.is-down,
button.cal-day:active, button.cal-day.is-down {
    transform: scale(0.97);
    transition-duration: 0.05s;
}
.row { display: flex; gap: 0.5rem; }
.row.wrap { flex-wrap: wrap; }
.row .btn { flex: 1; }
.linkish { background: none; border: 0; color: var(--hero); font-weight: 700; cursor: pointer; padding: 0.4rem; min-height: auto; }

.flash { border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 0.8rem; font-weight: 600; }
.flash-ok { background: var(--ok-soft); color: #145c3d; }
.flash-error { background: var(--bad-soft); color: #8a1c14; }

/* Undo-Snackbar für versehentliche Eltern-Klicks (Verlauf lädt nativ neu,
   deshalb ein serverseitig gerendertes, sofort sichtbares Banner). Schwebt
   auf Mobil über der Tableiste, auf Desktop unten mittig. */
.undo-bar {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 5rem);
    z-index: 40;
    width: min(440px, calc(100% - 24px));
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.6rem 0.6rem 1rem;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: undo-in 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform: translateX(-50%);
    cursor: pointer;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.undo-bar.is-hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(14px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.undo-text { flex: 1; min-width: 0; font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.undo-form { margin: 0; flex: none; }
.undo-btn {
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.undo-btn:hover { background: rgba(255, 255, 255, 0.26); }
.undo-btn:active, .undo-btn.is-down { transform: scale(0.96); }
@keyframes undo-in {
    from { opacity: 0; transform: translateX(-50%) translateY(18px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .undo-bar { animation: none; } }

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1rem; align-content: start; }
.who > form { display: grid; min-height: 100%; }
.who > form .who-card { height: 100%; }
.who-parent-wrap { min-height: 0; }
.who .who-parent-wrap .who-card { height: auto; }
.who-card {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.15rem 0.7rem 1rem;
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    cursor: pointer;
    color: inherit;
    min-height: 188px;
    transition: transform 0.1s ease, border-color 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
    .who-card:hover { border-color: color-mix(in srgb, var(--c, var(--hero)) 35%, var(--line)); }
}
.who-card:active, .who-card.is-down { transform: scale(0.97); }
.who-emoji, .who-card .avatar {
    width: 96px; height: 96px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--wash);
    font-size: 2.8rem; object-fit: cover;
    box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--c, var(--hero)) 45%, transparent);
}
.who-card .avatar.has-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.who-card .avatar.has-mark img {
    width: 58%; height: 58%;
    object-fit: contain;
    box-shadow: none;
    background: none;
    border-radius: 0;
}
.who-card strong { font-size: 1.05rem; }
.who-card em { font-style: normal; color: var(--muted); font-size: 0.82rem; text-align: center; }
.who-progress { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.who-chip {
    background: var(--wash);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.who-chip-streak { background: var(--gold-soft); }
.who-parent { grid-column: 1 / -1; min-height: 0; grid-template-columns: auto 1fr; grid-auto-flow: column; justify-items: start; align-items: center; text-align: left; padding: 0.9rem 1rem; gap: 0.8rem; }
.who-parent .who-emoji { width: 52px; height: 52px; font-size: 1.5rem; }
.who-emoji.who-art { background: #1d1a16; border-radius: 14px; overflow: hidden; }
.who-card .who-art img { border-radius: 14px; background: #1d1a16; }
.who-parent > span { display: grid; gap: 0.15rem; justify-items: start; text-align: left; }
.who-parent strong, .who-parent em { justify-self: start; }
.who-meta { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.who-parent-wrap { grid-column: 1 / -1; }
.mode-hub .app { padding-bottom: 32px; }

.avatar {
    --c: var(--hero);
    width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--wash);
    font-size: 1.5rem; flex-shrink: 0;
}
.avatar.sm { width: 42px; height: 42px; font-size: 1.2rem; }
.avatar.xs { width: 22px; height: 22px; font-size: 0.72rem; }
.avatar.has-photo { overflow: hidden; padding: 0; background: var(--card); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.has-mark { overflow: hidden; }
.avatar.has-mark img {
    width: 58%; height: 58%;
    object-fit: contain;
    display: block;
}

.hello { display: flex; align-items: center; gap: 0.75rem; }
.hello h1 { margin: 0; }
.streak {
    margin-left: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.ring-wrap { position: relative; width: 200px; height: 200px; margin: 0.4rem auto 0.3rem; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 11; }
.ring-fg { fill: none; stroke: var(--hero); stroke-width: 11; stroke-linecap: round; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 2.7rem; letter-spacing: -0.04em; line-height: 1; }
.ring-label span { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.target-line { text-align: center; color: var(--muted); margin: 0 0 1rem; font-size: 0.92rem; }

/* Fortschritts-Ring als Marken-Element auch in der Eltern-Ansicht (Wunschziel). */
.ring-fg.is-gold { stroke: var(--gold); }
.ring-mini { width: 68px; height: 68px; margin: 0; flex: none; }
.ring-mini .ring-bg, .ring-mini .ring-fg { stroke-width: 12; }
.ring-mini .ring-label strong { font-size: 1.02rem; letter-spacing: -0.02em; }
.kid-wish-ring {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.kid-wish-ring .wish-body { min-width: 0; flex: 1; display: grid; gap: 0.08rem; }
.kid-wish-ring .kid-bal { font-size: 1.5rem; margin-bottom: 0.05rem; }
.kid-wish-ring .kid-bal-lbl { font-size: 0.82rem; }
.kid-wish-ring .kid-wish-name { margin: 0; }
.kid-wish-ring .kid-wish-pts { margin: 0; color: var(--muted); }
.kid-goal-tag {
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: var(--muted);
}
.kid-nogoal { display: grid; gap: 0.2rem; margin: 0 0 0.85rem; }

.bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--hero); }
.bar.gold i { background: var(--gold); }

.quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.quest button {
    width: 100%;
    display: flex; align-items: center; gap: 0.7rem;
    text-align: left; border: 1px solid var(--line); background: var(--card);
    border-radius: var(--radius); padding: 0.85rem 0.9rem; box-shadow: var(--shadow); cursor: pointer; color: inherit;
    min-height: 64px;
    transition: transform 0.08s ease, border-color 0.12s ease;
}
.quest button:active, .quest button.is-down { transform: scale(0.97); }
.q-icon { font-size: 1.4rem; width: 40px; height: 40px; text-align: center; flex-shrink: 0; }
.q-icon img, img.q-icon, img.art-ico, img.task-ico {
    width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: block;
}
img.task-ico { width: 2rem; height: 2rem; border-radius: 8px; }
.art-fallback { display: grid; place-items: center; }
img.art-ico.inline, .art-ico.inline {
    display: inline-block; width: 1.35rem; height: 1.35rem;
    border-radius: 5px; vertical-align: -0.25em;
}
.remind-list img.art-ico, .feed img.art-ico, .today-extra img.art-ico {
    width: 28px; height: 28px; border-radius: 7px;
}
.q-body { flex: 1; display: grid; gap: 0.2rem; min-width: 0; }
.q-body strong { font-size: 0.95rem; }
.pills { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pill {
    font-style: normal; font-size: 0.7rem; font-weight: 700;
    background: var(--wash); color: var(--ink); border-radius: 999px; padding: 0.12rem 0.45rem;
}
.pill.pts { background: var(--ok-soft); color: var(--ok); }
.q-check {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--track); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 0.85rem;
}
.quest.is-done .q-check { background: var(--ok); border-color: var(--ok); }
.quest.is-done .q-body strong { text-decoration: line-through; opacity: 0.55; }
form.js-quest[data-busy] { pointer-events: none; opacity: 0.72; }

/* Extras im Kindermodus: klar von den Heldentaten abgesetzt (goldene, gestrichelte Karten). */
.kid-extras-wrap { margin-top: 1.25rem; }
.kid-extras-h { display: flex; align-items: center; gap: 0.4rem; }
.kid-extras-h::before { content: "⭐"; font-size: 1.1em; }
.kid-extras-lead { margin: -0.25rem 0 0.6rem; color: var(--muted); font-size: 0.82rem; }
.kid-extras { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.kid-extra form { margin: 0; }
.kid-extra button {
    width: 100%;
    display: flex; align-items: center; gap: 0.7rem;
    text-align: left; cursor: pointer; color: inherit;
    border: 2px dashed var(--ok); border-radius: var(--radius);
    background: var(--ok-soft);
    padding: 0.85rem 0.9rem; min-height: 64px;
    transition: transform 0.08s ease, filter 0.12s ease;
}
.kid-extra button:active, .kid-extra button.is-down { transform: scale(0.97); }
.kid-extra button:hover { filter: brightness(1.03); }
.kid-extra-plus {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: var(--ok); color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: 1.2rem; line-height: 1;
}
.kid-extra.is-going { opacity: 0.5; pointer-events: none; }
form.js-extra[data-busy] { pointer-events: none; opacity: 0.72; }
.mode-kid .kid-extra button { min-height: 56px; border-radius: 16px; padding: 0.65rem 0.85rem; }

.shop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.65rem; }
@media (min-width: 400px) { .shop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.shop-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.75rem; box-shadow: var(--shadow); display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.shop-card h3 { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.shop-card p { margin: 0; color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.shop-ico { font-size: 1.6rem; }
.shop-ico img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
/* Kompakte Wunschkarte: Icon links neben Titel + Preis. */
.shop-head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.shop-head .shop-img,
.shop-head .shop-ico { flex: none; width: 50px; height: 50px; }
.shop-head .shop-ico { display: grid; place-items: center; font-size: 1.5rem; }
.shop-head .shop-ico img { width: 50px; height: 50px; border-radius: 12px; }
.shop-head-body { min-width: 0; display: grid; gap: 0.05rem; }
.shop-head-body h3 { margin: 0; }
.shop-head-body .cost { margin: 0; }
.shop-row { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; }
.cost { font-weight: 700; color: var(--hero); }
.shop-card.cant { opacity: 0.72; }
.balance-chip { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem; font-weight: 700; }

/* Sternestand: prägnanter Badge auf allen Kinder-Views */
.kid-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding: 0.35rem 0.95rem 0.35rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(165deg, #e4c15a 0%, var(--gold) 100%);
    color: #3a2a0c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(90, 60, 10, 0.12), 0 8px 16px rgba(140, 96, 16, 0.22);
    line-height: 1;
}
.kid-stars-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(122, 74, 8, 0.1);
}
.kid-stars-star {
    width: 2rem;
    height: 2rem;
    display: block;
}
.kid-stars-n { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; }
.kid-stars-lbl { font-size: 0.88rem; font-weight: 700; opacity: 0.85; }
.kid-streak-line { margin-top: 0.5rem; margin-bottom: 0; font-weight: 600; color: var(--ink); }
@media (min-width: 820px) {
    .kid-stars { margin-top: 0.7rem; padding: 0.42rem 1.15rem 0.42rem 0.55rem; }
    .kid-stars-n { font-size: 2.55rem; }
    .kid-stars-ico { width: 2.9rem; height: 2.9rem; }
    .kid-stars-star { width: 2.35rem; height: 2.35rem; }
}

.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.feed li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0.55rem; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 0.8rem; }
.desk-dash { display: block; width: 100%; }
.desk-rail { display: block; width: 100%; max-width: 100%; margin-top: 1.15rem; }

.feed small { display: block; color: var(--muted); }
.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem;
    margin: 0.7rem 0 0;
    font-size: 0.85rem; font-weight: 700;
}
.pager a { color: var(--hero); text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager-n { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pager-off { color: var(--muted); font-weight: 600; }
.plus { color: var(--ok); }
.minus { color: var(--bad); }

.tabbar {
    position: sticky;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    margin-top: auto;
    flex-shrink: 0;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: color-mix(in srgb, var(--card) 94%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-strong);
    /* Unten dominiert der Home-Indicator-Inset (bleibt laut iOS immer reserviert)
       und wird von der Leisten-Farbe gefüllt, sodass der Streifen wie Teil der
       Tableiste aussieht. Kein zusätzliches Padding daraufstapeln -> Icons sitzen
       direkt über dem Streifen. */
    padding: 0.26rem 0.2rem max(0.14rem, env(safe-area-inset-bottom, 0px));
    z-index: 10;
}
.mode-parent .tabbar { grid-template-columns: repeat(3, 1fr); }
.mode-kid .tabbar { grid-template-columns: repeat(4, 1fr); }
.tabbar a.tab-lock { color: var(--muted); }
.tabbar a, .tabbar .tab-switch {
    text-decoration: none; color: var(--muted); font-size: 0.75rem; font-weight: 700;
    display: grid; justify-items: center; gap: 0.1rem; padding: 0.16rem 0;
    -webkit-tap-highlight-color: transparent;
}
.tabbar .tab-switch {
    appearance: none; -webkit-appearance: none;
    border: 0; background: none; font: inherit; font-size: 0.75rem; font-weight: 700;
    color: var(--muted); cursor: pointer; width: 100%;
}
.tabbar .tab-ico {
    display: grid; place-items: center;
    width: 28px; height: 24px;
}
.tabbar .tab-ico svg {
    width: 22px; height: 22px;
    display: block;
    stroke: currentColor;
    fill: none;
    transition: transform 0.12s ease;
}
/* Falls irgendwo noch ein Bild-Icon in der Tabbar landet: neutral einpassen */
.tabbar img.art-ico {
    width: 22px; height: 22px; border-radius: 7px;
    object-fit: cover; display: block; opacity: 0.7;
}
.tabbar a.is-on { color: var(--hero); }
.tabbar a.is-on .tab-ico {
    background: color-mix(in srgb, var(--hero) 12%, transparent);
    border-radius: 10px;
}
.tabbar a.is-on .tab-ico svg { transform: none; }
.tabbar a:active, .tabbar a.is-down,
.tabbar .tab-switch:active, .tabbar .tab-switch.is-down { transform: scale(0.96); }
.tabbar a:active .tab-ico svg, .tabbar a.is-down .tab-ico svg,
.tabbar .tab-switch:active .tab-ico svg, .tabbar .tab-switch.is-down .tab-ico svg { transform: scale(0.9); }

.kid-cards { display: grid; gap: 0.7rem; grid-template-columns: minmax(0, 1fr); }
.kid-card { margin: 0; min-width: 0; }

/* Mini-Kalender: Tagesverlauf pro Kind */
.cal { margin: 0.85rem 0 0.2rem; }
.cal-cap {
    margin: 0 0 0.5rem;
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--muted);
}
.cal-cap span { font-weight: 600; letter-spacing: 0; text-transform: none; opacity: 0.75; }
.cal-strip {
    display: flex; gap: 6px;
    padding: 2px 2px 6px;
    overscroll-behavior-x: contain;
}
.cal-day {
    flex: 1 1 0;
    min-width: 0;
    display: grid; justify-items: center; gap: 3px;
    padding: 8px 4px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(27, 23, 19, 0.03);
}
.cal-day.cal-pos { background: rgba(42, 106, 72, var(--a, 0.08)); border-color: var(--line); }
.cal-day.cal-neg { background: rgba(156, 44, 34, var(--a, 0.08)); border-color: var(--line); }
.cal-day.cal-mix { background: rgba(196, 146, 28, 0.1); border-color: var(--line); }
.cal-day.cal-pos .cal-net { color: var(--ok); }
.cal-day.cal-neg .cal-net { color: var(--bad); }
.cal-day.is-today { border-color: var(--line-strong); }
.cal-day.is-today .cal-dow { color: var(--ink); }
.cal-day.cal-future { background: transparent; border-style: dashed; opacity: 0.55; }
.cal-day.cal-future .cal-net { color: var(--muted); font-weight: 600; }
.cal-day.cal-more { display: none; }
button.cal-day {
    font: inherit; color: inherit; cursor: pointer;
    appearance: none; -webkit-appearance: none;
}
button.cal-day:hover { filter: brightness(0.97); }
button.cal-day.is-open {
    position: relative;
    z-index: 1;
    background: var(--card);
    border-color: var(--hero);
    box-shadow: 0 0 0 2px var(--hero);
}
.cal-log { margin: 0.75rem 0 0.05rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.cal-log .h3 { margin-top: 0; margin-bottom: 0.5rem; }
.cal-dow {
    font-size: 0.64rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.02em; line-height: 1;
}
.cal-dom { font-size: 0.66rem; font-weight: 600; color: var(--muted); line-height: 1; }
.cal-net { font-size: 0.98rem; font-weight: 700; color: var(--ink); line-height: 1; }
.cal-zero .cal-net { color: var(--muted); font-weight: 600; }
.cal-split {
    display: flex; width: 60%; max-width: 42px; height: 5px;
    border-radius: 999px; overflow: hidden;
    background: rgba(27, 23, 19, 0.08);
}
@media (min-width: 800px) {
    .cal-strip { gap: 8px; }
    .cal-day { padding: 12px 6px; gap: 4px; border-radius: 14px; }
    .cal-day.cal-more { display: grid; }
    .cal-dow { font-size: 0.72rem; }
    .cal-dom { font-size: 0.74rem; }
    .cal-net { font-size: 1.3rem; }
    .cal-split { height: 6px; max-width: 54px; }
}
.cal-split .cal-p { background: var(--ok); }
.cal-split .cal-m { background: var(--bad); }
.star-acts {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 0.6rem;
    margin: 0.35rem 0 0.15rem;
}
.star-act {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 58px;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 800;
    font-size: 1.06rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    color: inherit;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.star-act-ico {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.5rem; font-weight: 800; line-height: 1;
    flex: none;
}
.star-act-plus {
    background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 88%, #fff) 0%, var(--gold) 100%);
    border-color: color-mix(in srgb, var(--gold) 72%, #7a5200);
    color: #4d3405;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 34%, transparent);
}
.star-act-plus .star-act-ico {
    background: rgba(255, 255, 255, 0.92);
    color: color-mix(in srgb, var(--gold) 70%, #4d3405);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.star-act-minus {
    background: var(--card);
    border-color: color-mix(in srgb, var(--bad) 32%, var(--line));
    color: var(--bad);
}
.star-act-minus .star-act-ico {
    background: color-mix(in srgb, var(--bad) 14%, var(--card));
    color: var(--bad);
    border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line));
}
.star-act:active, .star-act.is-down { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
    .star-act-plus:hover {
        background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 94%, #fff) 0%, color-mix(in srgb, var(--gold) 96%, #fff) 100%);
        box-shadow: 0 4px 14px color-mix(in srgb, var(--gold) 42%, transparent);
    }
    .star-act-minus:hover { background: color-mix(in srgb, var(--bad) 8%, var(--card)); }
}

.kid-card header { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.75rem; }
.kid-card header > div { display: grid; min-width: 0; flex: 1; }
.kid-card header strong { font-size: 1.05rem; }
.kid-card header > div span { color: var(--muted); font-size: 0.82rem; }
.kid-bal {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
    color: var(--gold);
    line-height: 1;
}
.kid-bal-n { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.35rem; }
.kid-bal-n .kid-bal-v { font-size: 1.42em; letter-spacing: -0.04em; }
.kid-bal-star {
    width: 1.5em; height: 1.5em;
    flex: none;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(120, 78, 20, 0.22));
}
.kid-bal-lbl {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--muted);
    line-height: 1.2;
}
/* Solo-Übersicht: gleichmäßiger vertikaler Rhythmus zwischen den Abschnitten
   (Ziel-Box, Sterne/Minus, Abzeichen, Verlauf, Tages-Log) statt uneinheitlicher
   Einzelränder — wirkt aufgeräumter. */
.kid-card.is-solo {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.15rem 1.15rem 1.3rem;
}
.kid-card.is-solo > * { margin: 0; }
.kid-card.is-solo header { justify-content: flex-start; margin-bottom: 0.85rem; }
.kid-card.is-solo .kid-bal { font-size: 2.15rem; }
.kid-card.is-solo .kid-bal-lbl { font-size: 1.05rem; }
.kid-card.is-solo .kid-wish-ring { gap: 1rem; }
.kid-card.is-solo .kid-wish-ring .ring-mini { width: 84px; height: 84px; }
.kid-card.is-solo .kid-wish-ring .ring-mini .ring-label strong { font-size: 1.18rem; }
.kid-card.is-solo .kid-wish-ring .kid-bal { font-size: 1.8rem; }
.kid-card.is-solo .kid-wish-ring .kid-bal-lbl { font-size: 0.92rem; }
.kid-wish {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.8rem 0.75rem;
    background: color-mix(in srgb, var(--hero) 6%, var(--card));
    border: 1px solid color-mix(in srgb, var(--hero) 18%, var(--line));
    border-radius: var(--radius-sm);
}
.kid-wish .kicker { margin-bottom: 0.15rem; }
.kid-wish-name {
    margin: 0 0 0.45rem;
    color: var(--ink);
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.kid-wish .bar { margin: 0 0 0.35rem; }
.kid-wish-pts { margin: 0; font-size: 0.85rem; font-weight: 600; }
.kid-wish-empty { margin: 0 0 0.75rem; }

.kid-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.15rem 0 0.55rem;
}
.kid-insights .ki {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 4.2rem;
    padding: 0.4rem 0.55rem;
    border-radius: 14px;
    background: var(--wash);
    border: 1px solid var(--line);
    line-height: 1.1;
}
.kid-insights .ki b { font-size: 1.02rem; font-weight: 700; }
.kid-insights .ki small { font-size: 0.68rem; color: var(--muted); font-weight: 600; }

.panel {
    margin-top: 0.75rem;
    padding: 0.55rem;
    background: #f7f2ea;
    border-radius: 14px;
    display: grid;
    gap: 0.4rem;
}
.pick {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
    border: 0; background: #fff; border-radius: 12px; padding: 0.75rem 0.8rem; cursor: pointer;
    min-height: 48px; text-align: left; color: inherit;
    -webkit-tap-highlight-color: transparent;
}
.pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick b { color: var(--ok); flex-shrink: 0; }
.panel-minus .pick b { color: var(--bad); }

.inline-custom {
    display: grid;
    gap: 0.5rem;
    padding-top: 0.45rem;
    margin-top: 0.35rem;
    flex: 0 0 auto;
}
/* Eigener Grund als klar abgesetzte Karte, damit er sich hart von der weißen
   Aufgaben-/Extra-Liste darüber abhebt. */
.sheet-own {
    display: block;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--wash);
    padding: 0.7rem 0.85rem;
    margin-top: 0.4rem;
}
.sheet-own > summary {
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sheet-own > summary::-webkit-details-marker { display: none; }
.sheet-own > summary::after {
    content: "";
    display: inline-block;
    width: 0.42rem; height: 0.42rem;
    margin-left: 0.4rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-0.12rem);
}
.sheet-own[open] > summary { margin-bottom: 0.75rem; }
.sheet-own[open] > summary::after { transform: rotate(-135deg) translateY(-0.12rem); }
.own-body { display: grid; gap: 0.85rem; }
.own-field { display: grid; gap: 0.45rem; }
.own-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.inline-custom .quick-amts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.inline-custom .quick-amts .amt { min-width: 3.1rem; text-align: center; font-weight: 700; background: var(--card); }
.inline-custom .quick-amts .amt.is-on { background: var(--hero); color: #fff; border-color: var(--hero); }
.own-submit { width: 100%; }
.own-remember { margin-top: 0.1rem; }
.inline-custom .check small { display: block; font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.pending { padding: 0.55rem 0 0; }
.pending + .pending { border-top: 1px solid var(--line); margin-top: 0.55rem; }
.pending p { margin: 0 0 0.5rem; }

.list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.list li { display: flex; align-items: center; gap: 0.3rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.25rem 0.45rem 0.25rem 0.15rem; }
.list a { flex: 1; display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: inherit; padding: 0.5rem; min-width: 0; }
.list a div { min-width: 0; }
.list small { display: block; color: var(--muted); }
.list em { margin-left: auto; color: var(--muted); flex-shrink: 0; }
.dim { opacity: 0.45; }

.menu { display: grid; gap: 0.4rem; margin: 0.4rem 0 1.2rem; }
.menu a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.95rem 1rem; text-decoration: none; color: inherit; font-weight: 700; box-shadow: var(--shadow); }

.emoji-grid, .color-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.emoji-pick { position: relative; }
.emoji-pick input { position: absolute; opacity: 0; }
.emoji-pick span {
    display: grid; place-items: center; width: 44px; height: 44px;
    border-radius: 12px; background: #fff; border: 2px solid transparent; font-size: 1.25rem;
}
.emoji-pick span img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.emoji-pick input:checked + span { border-color: var(--hero); }
.color-pick { width: 32px; height: 32px; border-radius: 50%; background: var(--c); position: relative; }
.color-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.color-pick:has(input:checked) { outline: 3px solid var(--ink); outline-offset: 2px; }

.pin-input {
    text-align: center; font-size: 1.7rem; letter-spacing: 0.35em;
    width: 11rem; margin: 0 auto; display: block;
}
.pin-screen { justify-items: center; }
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 1.15rem;
    margin: 0.5rem 0 1.6rem;
}
.pin-dots span {
    width: 15px; height: 15px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: transparent;
    transition: background-color 0.12s ease, transform 0.12s ease;
}
.pin-dots span.is-filled { background: var(--ink); transform: scale(1.06); }

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 72px);
    justify-content: center;
    gap: 0.9rem 1.1rem;
    margin: 0 auto 0.4rem;
}
.keypad button {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(27, 23, 19, 0.04);
    color: var(--ink);
    font-size: 1.6rem; font-weight: 600;
    cursor: pointer;
    display: grid; place-items: center;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.1s ease, transform 0.06s ease;
}
.keypad button:active, .keypad button.is-down { background: rgba(27, 23, 19, 0.12); transform: scale(0.94); }
.keypad .keypad-del {
    background: none; border: 0; color: var(--muted); font-size: 1.5rem;
}
.keypad .keypad-del:active, .keypad .keypad-del.is-down { background: rgba(27, 23, 19, 0.06); transform: scale(0.94); }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.stat { text-align: center; margin: 0; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: 0.8rem; }
.week-card { margin-top: 0.9rem; }
.week-card .kid-h:first-child, .week-card h2:first-child { margin-top: 0; }
.bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 116px; padding: 0.4rem 0 0; }
.bar-col {
    position: relative;
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end;
    height: 100%; gap: 0.3rem;
}
.bar-col::before {
    content: "";
    position: absolute; z-index: 0;
    left: 50%; transform: translateX(-50%);
    top: 0; bottom: 1.25rem;
    width: 100%; max-width: 30px;
    background: #eadfd2;
    border-radius: 8px;
}
.bar-col i {
    position: relative; z-index: 1;
    width: 100%; max-width: 30px;
    background: var(--hero);
    border-radius: 8px 8px 4px 4px;
    min-height: 5px;
}
.bar-col span { font-size: 0.7rem; color: var(--muted); }

/* Stickeralbum (Kind-Heldenreise): verdiente Abzeichen kleben bunt im Album,
   noch offene sind blasse Platzhalter-Felder. */
.badge-album-card { margin-top: 0.9rem; }
.badge-album-card .album-count {
    font-family: var(--body);
    font-size: 0.8rem; font-weight: 700;
    color: var(--muted);
    margin-left: 0.35rem;
}
.sticker-album {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.6rem;
}
.sticker {
    position: relative;
    display: grid; justify-items: center; text-align: center;
    gap: 0.3rem;
    padding: 0.95rem 0.55rem 0.7rem;
    border-radius: 16px;
    background: var(--wash);
    border: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}
.sticker.on {
    background: var(--card);
    border-style: solid;
    border-color: var(--line);
    box-shadow: var(--shadow);
}
.sticker.off { opacity: 0.72; }
.sticker-ico {
    position: relative;
    width: 58px; height: 58px;
    display: grid; place-items: center;
    font-size: 2rem; line-height: 1;
}
.sticker-ico img.art-ico { width: 58px; height: 58px; border-radius: 12px; }
.sticker.off .sticker-ico { filter: grayscale(1); opacity: 0.5; }
.sticker strong { font-size: 0.84rem; line-height: 1.2; }
.sticker small { font-size: 0.72rem; color: var(--muted); line-height: 1.25; }
/* „Gesammelt"-Stempel auf verdiente Sticker (Ecke, leicht gedreht). */
.sticker-stamp {
    position: absolute;
    top: -0.35rem; right: -0.35rem;
    transform: rotate(9deg);
    font-size: 0.56rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--hero);
    background: color-mix(in srgb, var(--card) 82%, transparent);
    border: 1.5px solid var(--hero);
    border-radius: 6px;
    padding: 0.08rem 0.3rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.badges { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.badges li { display: flex; gap: 0.65rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem; }
.badges .off { opacity: 0.38; filter: grayscale(1); }
.badges span { font-size: 1.4rem; }

/* Kompakter Abzeichen-Streifen für Übersicht und Kinder-Liste. */
.badge-strip { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin: 0.5rem 0 0.1rem; }
.badge-sec .badge-strip { margin: 0; }
.badge-strip-mini { margin: 0.3rem 0 0; }
.badge-strip-list { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.badge-chip {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--wash); border: 1px solid var(--line);
    font-size: 1rem; line-height: 1;
    margin: 0; padding: 0; color: inherit;
    font-family: inherit;
    -webkit-appearance: none; appearance: none;
}
.badge-chip.js-badge { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.badge-chip.js-badge:active { transform: scale(0.92); }
.badge-chip img.art-ico { width: 22px; height: 22px; border-radius: 6px; }
.badge-chip.off { opacity: 0.34; filter: grayscale(1); }
.badge-strip-count { font-size: 0.72rem; font-weight: 700; color: var(--muted); }

/* In der Übersicht (kein Mini-Strip) etwas größere Abzeichen. */
.badge-strip:not(.badge-strip-mini) { gap: 0.5rem; }
.badge-strip:not(.badge-strip-mini) .badge-strip-list { gap: 0.38rem; }
.badge-strip:not(.badge-strip-mini) .badge-chip { width: 42px; height: 42px; border-radius: 12px; }
.badge-strip:not(.badge-strip-mini) .badge-chip img.art-ico { width: 32px; height: 32px; border-radius: 9px; }

/* Tap-Popover: Name + Bedeutung eines Abzeichens (per JS positioniert). */
.badge-pop {
    position: fixed;
    z-index: 60;
    max-width: min(260px, calc(100vw - 24px));
    display: none;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.55rem 0.72rem;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}
.badge-pop.is-open { display: flex; }
.badge-pop-t { font-size: 0.86rem; font-weight: 700; line-height: 1.25; }
.badge-pop-d { font-size: 0.8rem; opacity: 0.85; line-height: 1.32; }
.badge-pop::after {
    content: '';
    position: absolute;
    left: var(--arrow-x, 50%);
    bottom: -5px;
    width: 10px; height: 10px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--ink);
}
.badge-pop.badge-pop-below::after { bottom: auto; top: -5px; }

.empty { color: var(--muted); padding: 0.6rem 0; list-style: none; }
.empty-art { text-align: center; padding: 0.4rem 0 1rem; }
.empty-art img {
    width: min(280px, 80%);
    margin: 0 auto 0.7rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.logout { margin-top: 1.4rem; text-align: center; }

.celebrate {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    padding: 2rem 1.6rem calc(2rem + env(safe-area-inset-bottom, 0px));
    background:
        radial-gradient(130% 100% at 50% 32%, rgba(58, 42, 24, 0.42) 0%, rgba(22, 17, 13, 0.72) 62%, rgba(18, 14, 10, 0.82) 100%);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    text-align: center;
    color: #fff;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}
.celebrate.is-on {
    display: grid;
    pointer-events: auto;
}

/* Feier-Karte: ein zusammenhängendes Belohnungs-Emblem mit dem App-Stern,
   Glow + rotierendem Strahlenkranz, darunter Punkte, Zuruf und Grund. */
.celebrate-card {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    max-width: 22rem;
    transform: scale(0.86);
    opacity: 0;
}
.celebrate.is-on .celebrate-card {
    animation: celebrate-pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25) forwards;
}
@keyframes celebrate-pop {
    to { transform: scale(1); opacity: 1; }
}

.celebrate-emblem {
    position: relative;
    width: 172px; height: 172px;
    display: grid;
    place-items: center;
    margin-bottom: 0.35rem;
}
.celebrate-glow {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 185, 66, 0.6) 0%, rgba(244, 185, 66, 0) 66%);
}
.celebrate.is-on .celebrate-glow {
    animation: celebrate-glow 1.7s ease-in-out infinite;
}
@keyframes celebrate-glow {
    0%, 100% { transform: scale(0.9); opacity: 0.65; }
    50% { transform: scale(1.08); opacity: 1; }
}
.celebrate-rays {
    position: absolute;
    inset: -4%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 224, 160, 0.32) 0deg 5deg, transparent 5deg 17deg);
    -webkit-mask: radial-gradient(circle, #000 40%, transparent 64%);
    mask: radial-gradient(circle, #000 40%, transparent 64%);
    opacity: 0.9;
}
.celebrate.is-on .celebrate-rays {
    animation: celebrate-spin 11s linear infinite;
}
@keyframes celebrate-spin { to { transform: rotate(360deg); } }
.celebrate-star {
    position: relative;
    width: 130px; height: 130px;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}
.celebrate.is-on .celebrate-star {
    animation: celebrate-star 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.05s both;
}
@keyframes celebrate-star {
    0% { transform: scale(0.35) rotate(-16deg); opacity: 0; }
    60% { transform: scale(1.14) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

.celebrate-points {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 3.1rem; font-weight: 700; line-height: 1; margin: 0;
    color: #ffd67e;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}
.celebrate-text {
    font-size: 1rem; font-weight: 600; margin: 0.15rem 0 0;
    color: rgba(255, 255, 255, 0.86);
}
.celebrate-hint {
    font-size: 0.92rem; font-weight: 600; margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    max-width: 18rem;
    line-height: 1.35;
}
.celebrate-hint:empty,
.celebrate-text:empty,
.celebrate-points:empty { display: none; }
.celebrate-ok {
    margin-top: 0.95rem;
    min-width: 12.5rem;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.celebrate-ok:disabled { opacity: 0.72; }
.celebrate-badge {
    position: relative;
    width: 130px; height: 130px;
    object-fit: contain;
    border-radius: 28px;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}
.celebrate.is-on .celebrate-badge {
    animation: celebrate-star 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.05s both;
}
.celebrate-badge-emoji {
    position: relative;
    font-size: 4.6rem;
    line-height: 1;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}
.celebrate.is-badge .celebrate-star { display: none; }
.celebrate:not(.is-badge) .celebrate-badge,
.celebrate:not(.is-badge) .celebrate-badge-emoji { display: none; }

.kid-head { margin-bottom: 0.4rem; }

.how {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    display: grid;
    gap: 0.55rem;
}
.how li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.7rem;
    align-items: start;
}
.how li span {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--hero); color: #fff;
    display: grid; place-items: center; font-weight: 700;
}
.how strong { display: block; }
.how div { color: var(--muted); font-size: 0.92rem; }
.how div strong { color: var(--ink); font-size: 0.98rem; }

.plain { margin: 0.4rem 0 0.8rem; padding-left: 1.1rem; }
.plain li { margin: 0.35rem 0; }
.intro .btn { width: 100%; }
details.card { padding: 0.7rem 1rem; }
details.card summary { font-weight: 700; cursor: pointer; }
details.card[open] summary { margin-bottom: 0.6rem; }

.mode-kid {
    --bg: #f3e4c4;
    --hero: #c53c14;
    --card: #fff7ea;
    --wash: #f4e6cc;
    --btn: #f0ddc0;
}
.kid-switch {
    display: inline-block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}
.kid-h { font-size: 1rem; margin-top: 1rem; }
.kid-hint { color: var(--ink); background: color-mix(in srgb, var(--gold) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; margin: 0 0 1rem; }

/* Kinder-Heute: eine Identität, Sterne einmal, Ziel klar */
.kid-top { margin: 4px 0 0.9rem; }
.kid-me { display: flex; align-items: center; gap: 0.75rem; }
.kid-me-face {
    width: 72px; height: 72px; font-size: 2rem;
    background: var(--wash);
    box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, var(--c) 60%, var(--card));
    flex: none;
}
.kid-me-face.has-photo {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--c) 70%, #fff);
}
.kid-me-txt { min-width: 0; flex: 1; }
.kid-me h1 {
    margin: 0; min-width: 0;
    font-size: 1.28rem; line-height: 1.15; letter-spacing: -0.02em;
    text-wrap: balance;
}
.kid-me-lead { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.35; }
.kid-me-streak { margin: 0.4rem 0 0; font-weight: 700; font-size: 0.88rem; }
.kid-me-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.kid-me-stats .kid-stars { margin-top: 0; }
.kid-streak-chip {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.15rem 0.55rem; border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 16%, var(--card));
    border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line));
    font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.kid-hero {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0.95rem 1rem 1.05rem;
    box-shadow: var(--shadow);
    margin: 0 0 1rem;
    display: grid;
    gap: 0.5rem;
    justify-items: start;
}
.kid-hero-goal { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
.kid-hero-need { margin: 0; color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.kid-hero-need.is-ready { color: var(--hero); }
.kid-hero .btn, .kid-desk-rail .btn { width: 100%; }
.kid-hero-bar { width: 100%; height: 10px; margin-top: 0.15rem; }
.kid-fam-desk { display: none; }
.kid-switch-parent {
    display: flex; align-items: center; gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--wash);
    color: inherit; text-decoration: none;
}
.kid-switch-parent-ico {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--card); font-size: 1.2rem;
    border: 1px solid var(--line);
}
.kid-switch-parent strong { display: block; font-size: 1rem; }
.kid-switch-parent em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.mode-kid .kid-goal-rail { display: none; }
@media (max-width: 699px) {
    .mode-kid .kid-desk-rail:not(.kid-goal-rail) {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 0.95rem 1rem 1.05rem;
        margin-top: 0.35rem;
        box-shadow: var(--shadow);
    }
    .mode-kid .kid-desk-rail .kid-h { margin-top: 0; }
}

/* Info-Bubble mit pädagogischem Tipp (Eltern) */
.info-wrap { display: inline-block; position: relative; }
.info {
    appearance: none; -webkit-appearance: none;
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle;
    width: 18px; height: 18px; margin-left: 0.35rem; padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    font-size: 0.72rem; line-height: 1;
    cursor: help;
}
.info-ico { font-family: var(--display); font-style: italic; font-weight: 600; }
/* Fixed statt absolute: ein fixiertes Tooltip vergrößert die scrollbare
   Fläche nie. Position/Klemmung im Viewport setzt setupInfoTips() in app.js. */
.info-pop {
    position: fixed;
    left: 0; top: 0;
    width: max-content; max-width: min(260px, calc(100vw - 24px));
    background: #2a2320;
    color: #fff;
    text-align: left;
    font-weight: 400;
    font-size: 0.82rem;
    line-height: 1.45;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    opacity: 0; visibility: hidden;
    transition: opacity 0.14s ease;
    z-index: 60;
    pointer-events: none;
}
.info-pop::after {
    content: "";
    position: absolute; top: 100%; left: var(--arrow-x, 50%);
    transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #2a2320;
}
.info-pop.info-below::after {
    top: auto; bottom: 100%;
    border-top-color: transparent; border-bottom-color: #2a2320;
}
.info-pop.info-open { opacity: 1; visibility: visible; }

/* Sanfte pädagogische Hinweise */
.kid-tip {
    display: flex; align-items: flex-start; gap: 0.6rem;
    color: var(--muted);
    background: none;
    border: 0;
    border-left: 3px solid #f0d9a8;
    border-radius: 0 10px 10px 0;
    padding: 0.15rem 0.9rem;
    margin: 0 0 1.2rem;
    font-size: 0.92rem;
    line-height: 1.5;
}
.kid-tip strong { color: var(--ink); }
.kid-tip-ico { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.5; }
.kid-target { font-size: 1.02rem; color: var(--ink); font-weight: 600; }
.kid-target a { display: inline-block; margin-left: 0.25rem; }
.goal-nudge {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    text-align: center;
    padding: 0.6rem 0.2rem 0.2rem;
}
.goal-nudge-ico { font-size: 2.1rem; line-height: 1; }
.goal-nudge p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.goal-nudge strong { color: var(--ink); font-size: 1.05rem; }
.goal-nudge .btn { width: 100%; }
.kid-wow {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    margin: 0.4rem 0 1rem;
    box-shadow: var(--shadow);
}
.mode-kid .quest button { min-height: 56px; border-radius: 16px; padding: 0.65rem 0.85rem; }
.mode-kid .q-icon { font-size: 1.45rem; }
.mode-kid .q-body strong { font-size: 1rem; }
.shop-card.is-target {
    box-shadow: 0 0 0 2px var(--hero), var(--shadow);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--hero) 9%, var(--card)) 0%, var(--card) 46%);
}
.shop-goal-flag {
    position: absolute;
    top: 0.55rem; left: 0.55rem;
    z-index: 1;
    display: inline-flex; align-items: center;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: var(--hero); color: #fff;
    font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.04em; text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.shop-goal-tag {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--hero) 14%, var(--card));
    border: 1px solid color-mix(in srgb, var(--hero) 32%, var(--line));
    color: var(--hero);
    font-weight: 800; font-size: 0.9rem;
    min-height: var(--tap);
}
.shop-goal-ico { width: 1.15rem; height: 1.15rem; flex: none; }
.shop-need { margin: 0; font-weight: 700; color: var(--muted); }
.shop-need.is-ready { color: var(--hero); }
.shop-actions { display: grid; gap: 0.4rem; }
.shop-actions form { margin: 0; }
.shop-actions .btn { width: 100%; }
.shop-actions .pill { justify-self: center; }
.shop-redeem-lock { gap: 0.4rem; }
.shop-lock-ico { width: 1rem; height: 1rem; flex: none; }
.shop-actions .btn:disabled {
    background: var(--wash);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}
.shop-bar { height: 9px; margin: 0.15rem 0 0.05rem; }
.shop-card { position: relative; }
.shop-img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; background: var(--wash); }
.shop-lock { position: absolute; top: 0.7rem; right: 0.7rem; font-size: 1.1rem; }

.switcher {
    display: flex; flex-wrap: nowrap; gap: 0.5rem; align-items: center;
    margin: 0 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher form { margin: 0; flex: 0 0 auto; }
.switcher-all { flex-shrink: 0; }
.switcher button, .switcher-hub {
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 52px; border: 1px solid var(--line); background: var(--card);
    border-radius: 999px; padding: 0.2rem 0.85rem 0.2rem 0.22rem; font-weight: 700;
    cursor: pointer; color: inherit; text-decoration: none; font-size: 0.9rem;
}
.switcher-all button, .switcher-hub {
    min-height: 44px;
    padding: 0.35rem 0.85rem;
}
.switcher .avatar {
    width: 44px; height: 44px; font-size: 1.35rem;
    background: var(--wash);
    box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, var(--c) 55%, var(--card)), 0 1px 3px rgba(40, 24, 12, 0.12);
}
.switcher .avatar.has-photo {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--c) 70%, #fff), 0 3px 10px color-mix(in srgb, var(--c) 28%, transparent);
}
.switcher button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.switcher button.is-on .avatar {
    background: color-mix(in srgb, var(--c) 28%, #3a342c);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c), 0 4px 14px color-mix(in srgb, var(--c) 45%, transparent);
}
.switcher button.is-on .avatar.has-photo { background: var(--card); }
.switcher button.is-on .avatar.has-photo {
    background: #3a342c;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c), 0 6px 18px color-mix(in srgb, var(--c) 50%, transparent);
}
.switcher button em { font-style: normal; font-weight: 600; opacity: 0.75; font-size: 0.78rem; }
@media (max-width: 420px) {
    .switcher button em { display: none; }
}
.mode-parent .switcher {
    align-items: flex-end;
    gap: 0.4rem;
}
.mode-parent .switcher-kid {
    padding: 0.12rem 0.55rem 0.12rem 0.12rem;
    min-height: 0;
    font-size: 0.76rem;
    color: var(--muted);
}
.mode-parent .switcher-kid .avatar {
    width: 34px; height: 34px; font-size: 1.05rem;
}
.mode-parent .switcher-kid em { font-size: 0.68rem; }
.mode-parent .switcher-kid.is-on {
    padding: 0.18rem 0.85rem 0.18rem 0.18rem;
    font-size: 0.98rem;
    color: #fff;
}
.mode-parent .switcher-kid.is-on .avatar {
    width: 58px; height: 58px; font-size: 1.7rem;
}
.mode-parent .switcher-kid.is-on em { font-size: 0.8rem; opacity: 0.85; }
.top-kids { display: grid; gap: 0.7rem; }
.top-kids .switcher { margin: 0; }
.fam-chip {
    display: flex; align-items: center; gap: 0.65rem;
    margin: 0;
    padding: 0.45rem 0.75rem 0.45rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    box-shadow: var(--shadow);
    min-width: 0;
}
.fam-chip-ico {
    flex-shrink: 0;
    width: 1.7rem; height: 1.7rem;
    display: grid; place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hero) 16%, var(--card));
    color: var(--hero);
    font-size: 0.85rem; font-weight: 700;
}
.fam-chip-body {
    display: grid; gap: 0.18rem; min-width: 0; flex: 1;
}
.fam-chip-body strong {
    font-size: 0.82rem;
    line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fam-chip .bar { height: 5px; margin: 0; }
.fam-chip em {
    flex-shrink: 0;
    font-style: normal; font-weight: 700;
    font-size: 0.78rem; color: var(--muted);
}
.switcher-who {
    background: transparent;
    color: var(--muted);
    border-style: dashed;
    order: -1;
}
.switcher-lock {
    background: transparent;
    color: var(--muted);
    border-style: dashed;
    order: 99;
    margin-left: auto;
}
.switcher-lock span { opacity: 0.8; }
.today-extra { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.28rem; }
.today-extra li {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; font-weight: 600;
    background: #f7f2ea; border-radius: 12px;
    padding: 0.5rem 0.6rem; min-height: 44px;
}
.today-extra li:has(.log-row) { display: block; padding: 0; background: none; min-height: 0; }
.today-extra form { margin: 0; }
.today-extra .log-row,
.today-extra button {
    width: 100%;
    display: flex; align-items: center; gap: 0.5rem;
    border: 0; background: #f7f2ea; border-radius: 12px;
    padding: 0.5rem 0.6rem; min-height: 44px;
    text-align: left; color: inherit; font: inherit; font-weight: 600;
}
.today-extra button { cursor: pointer; transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.08s ease; }
.today-extra button:active, .today-extra button.is-down { transform: scale(0.97); }
.today-extra span { flex: 1; min-width: 0; }
.today-extra time {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}
.today-extra b { margin-left: auto; font-size: 0.8rem; }
.log-kind {
    flex: 0 0 auto;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.5;
}
.log-kind.kind-task { background: rgba(63, 143, 74, 0.14); color: #2f6b39; }
.log-kind.kind-extra { background: rgba(198, 148, 30, 0.16); color: #8a600f; }
.log-kind.kind-minus { background: rgba(184, 63, 63, 0.14); color: #9a3232; }
.log-kind.kind-wish { background: rgba(48, 32, 18, 0.08); color: var(--muted); }
.today-extra .log-kind + b { margin-left: 0.35rem; }
.muted.slim { margin: 0.2rem 0 0; font-size: 0.85rem; }
.remind-line { margin: 0.65rem 0 0; font-size: 0.82rem; color: #8a4b12; font-weight: 600; }
.remind-list { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.4rem; }
.remind-list li {
    display: flex; align-items: center; gap: 0.55rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 0.5rem 0.7rem; font-weight: 600; font-size: 0.95rem;
}
.remind-list .remind-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.remind-list .remind-time {
    flex: none; font-style: normal; color: var(--muted);
    font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.remind-list li.is-soon { background: #fff8e8; border-color: #f0d9a8; }
.remind-list li.is-soon .remind-time { color: #9a6b1a; }
.remind-list li.is-late { background: var(--bad-soft); border-color: #f0c2bc; }
.remind-list li.is-late .remind-time { color: var(--bad); }

.sheet-overlay {
    position: fixed; inset: 0; z-index: 30;
    background: rgba(27, 23, 19, 0.45);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0;
    transition: opacity 0.24s ease;
}
.sheet-overlay.is-open { opacity: 1; }
.sheet-card {
    width: min(520px, 100%);
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 22px 22px 0 0;
    padding: 0.4rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
    box-shadow: var(--shadow);
    /* Startet unterhalb des Bildschirms; .is-open fährt es hoch. */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    touch-action: pan-y;
}
.sheet-overlay.is-open .sheet-card { transform: translateY(0); }
/* Während des Ziehens keine Transition, damit die Karte dem Finger folgt. */
.sheet-overlay.is-drag .sheet-card { transition: none; }
/* Greifbalken oben als Affordance fürs Runterwischen. */
.sheet-grip {
    width: 2.4rem; height: 0.28rem;
    border-radius: 999px;
    background: var(--line-strong);
    margin: 0.15rem auto 0.5rem;
    flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
    .sheet-overlay, .sheet-card { transition: none; }
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-x {
    flex: none;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: var(--wash); color: var(--muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.sheet-x:hover { background: var(--track); color: var(--ink); }
.sheet-x:active { transform: scale(0.94); }
.sheet-x svg { width: 20px; height: 20px; }
.span-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.65rem 0; }
.sheet-cats {
    display: flex; gap: 0.35rem; margin: 0.55rem 0;
    overflow-x: auto; padding-bottom: 0.2rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sheet-cats::-webkit-scrollbar { display: none; }
.sheet-cats .chip { flex: 0 0 auto; white-space: nowrap; padding: 0.2rem 0.5rem; font-size: 0.72rem; }
.chip {
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    padding: 0.3rem 0.65rem; font-weight: 700; font-size: 0.78rem;
    cursor: pointer; color: inherit; text-decoration: none;
}
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sheet-hint { margin: 0.15rem 0 0.2rem; color: var(--muted); font-size: 0.85rem; flex-shrink: 0; }
#sheet-q, .sheet-cats { flex-shrink: 0; }
.sheet-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    margin: 0.5rem 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 4.5rem;
    -webkit-overflow-scrolling: touch;
}
/* Formulare/Buttons dürfen nicht breiter werden als die Spalte, sonst
   scrollt das Sheet horizontal bei langen Aufgabentiteln. */
.sheet-list > form { min-width: 0; }
.sheet-empty { margin: 0.6rem 0.15rem; }
.sheet-group {
    margin: 0.35rem 0.15rem 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
}
.sheet-group:first-child { margin-top: 0; }
.pick b.plus { color: var(--ok); }
.pick b.minus { color: var(--bad); }
.sheet-list form.is-done .sheet-check { opacity: 0.62; }
.sheet-list .sheet-check {
    justify-content: flex-start;
    gap: 0.55rem;
    background: var(--card);
    border: 1px solid var(--line);
}
/* Punkte als warmes Sternen-Token (Gold = Plus), nicht als grüne Zahl —
   passt zum warmen Design statt fremd zu wirken. */
.sheet-list .sheet-check b {
    margin-left: auto;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1.35;
}
.sheet-list .sheet-check b.plus { background: var(--gold-soft); color: #6b4e07; }
.sheet-list .sheet-check b.minus { background: var(--bad-soft); color: var(--bad); }
.sheet-list .done-mark {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e0cfc0;
    display: grid; place-items: center; font-size: 0.7rem; flex-shrink: 0; color: #fff;
    font-style: normal; font-weight: 700;
}
.sheet-list form.is-done .done-mark {
    background: var(--gold);
    border-color: color-mix(in srgb, var(--gold) 68%, #4d3405);
    color: #4d3405;
}
/* Sterne geben: Klick auf die Zeile schaltet NICHT — nur der Haken ist aktiv.
   Schützt vor versehentlichem Abhaken/Zurücknehmen. */
.sheet-list .sheet-check { cursor: default; }
.sheet-list .sheet-toggle {
    -webkit-appearance: none; appearance: none;
    margin: 0; padding: 0; font: inherit; box-sizing: border-box;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.08s ease;
}
.sheet-list .sheet-toggle:hover { filter: brightness(1.04); }
.sheet-list .sheet-toggle:active,
.sheet-list .sheet-toggle.is-down { transform: scale(0.9); }

.kidmode-hint { margin: 0.35rem 0 0.9rem; }
.kidmode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.7rem;
}
.kidmode-list form { margin: 0; }
.kidmode-pick {
    width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1rem 0.6rem;
    border: 1px solid var(--line); border-radius: 18px;
    background: #fff; color: var(--ink);
    font-weight: 700; font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
    .kidmode-pick:hover { border-color: var(--hero); box-shadow: 0 6px 18px rgba(27, 23, 19, 0.08); }
}
.kidmode-pick:active, .kidmode-pick.is-down { transform: scale(0.96); }
.kidmode-pick .avatar { width: 88px; height: 88px; font-size: 2.5rem; }
.icon-lib { margin: 0.2rem 0 0.4rem; }
.icon-lib-h { margin: 0.55rem 0 0.25rem; font-size: 0.75rem; color: var(--muted); font-weight: 700; }

.cat-bars { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }
.cat-bars li { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 0.45rem; align-items: center; font-size: 0.82rem; }
.cat-bars .bar { margin: 0; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.task-composer { display: grid; gap: 0.7rem; min-width: 0; max-width: 100%; overflow-x: clip; }
.composer-row {
    display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: flex-end;
}
.pts-wrap { width: 5.2rem; }
.pts-wrap input { text-align: center; }
.type-pills {
    border: 0; margin: 0; padding: 0; display: flex; gap: 0.3rem; flex-wrap: wrap;
}
.type-pills legend { font-size: 0.75rem; color: var(--muted); font-weight: 700; padding: 0; }
.type-pills label {
    display: inline-flex; align-items: center; min-height: 40px;
    padding: 0 0.7rem; border-radius: 999px; background: #fff;
    border: 1px solid var(--line); font-weight: 700; font-size: 0.85rem;
}
.type-pills input { position: absolute; opacity: 0; pointer-events: none; }
.type-pills label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.composer-row .btn { min-width: 7.5rem; }
.composer-more { margin: 0; }
.composer-more summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.composer-extra { display: grid; gap: 0.55rem; margin-top: 0.7rem; }
.composer-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: end;
    min-width: 0;
}
.color-field { min-width: 0; }
.color-field input[type=color] {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--card);
    cursor: pointer;
}
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-field input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }

/* Farb-Auswahl als feste Palette (max. 8 Töne, passend zur Seite). */
.color-field-sw { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.5rem; }
.color-field-sw .color-field-lbl { font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); }
.color-swatches { display: flex; flex-wrap: nowrap; gap: 0.4rem; }
.color-swatch {
    position: relative;
    width: 28px; height: 28px;
    flex: 0 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.color-swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.color-dot {
    display: block;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transition: transform 0.1s ease, box-shadow 0.12s ease;
}
.color-swatch.is-sel .color-dot {
    box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sw), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transform: scale(1.08);
}
.color-swatch input:focus-visible + .color-dot { outline: 2px solid var(--hero); outline-offset: 3px; }
.gender-tog {
    display: flex;
    gap: 0.4rem;
    min-width: 0;
}
.gender-opt {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    min-height: 48px;
    padding: 0.4rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.78rem;
    color: inherit;
}
.gender-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gender-ico { display: grid; place-items: center; }
.gender-ico svg { width: 22px; height: 22px; display: block; }
.gender-opt:has(input:checked) {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.date-field {
    display: grid;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.date-shell {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
}
.date-shell input[type=date] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0.65rem;
    padding-right: 0.45rem;
}
.composer-birth {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    padding: 0.7rem 0.85rem; border-radius: 14px;
    background: #faf5ee; border: 1px solid var(--line);
}
.composer-birth > label { display: grid; gap: 0.2rem; font-weight: 600; min-width: 0; }
.composer-birth .check { align-items: center; font-weight: 400; }
.composer-birth-hint { margin: 0.1rem 0 0; font-size: 0.85rem; }
.task-tools {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0.4rem 0 0.85rem;
    min-width: 0;
}
.task-tools .span-nav {
    margin: 0;
    flex: 0 0 auto;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 2px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
}
.task-tools .span-nav .chip {
    border: 0; background: transparent;
    padding: 0.22rem 0.52rem;
    font-size: 0.72rem;
    min-height: 28px;
    line-height: 1;
    border-radius: 999px;
    white-space: nowrap;
}
.task-tools .span-nav .chip.is-on { background: var(--ink); color: #fff; }
.task-tools #task-who,
.task-tools #reward-who {
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.task-tools #task-who::-webkit-scrollbar,
.task-tools #reward-who::-webkit-scrollbar { display: none; }
.task-tools #task-filter,
.task-tools #reward-filter,
.task-tools #kid-filter { flex: 0 0 auto; }
.tools-add {
    width: 34px; height: 34px;
    margin-left: auto;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    display: grid; place-items: center;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
}
.tools-add svg { width: 18px; height: 18px; display: block; }
.tools-add:hover { color: var(--ink); background: var(--wash); }
.tools-add:active, .tools-add.is-down { transform: scale(0.94); }
.task-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.task-row {
    display: grid;
    grid-template-columns: 1.85rem minmax(0, 1fr) auto auto;
    grid-template-areas: "ico body pts actions";
    gap: 0.2rem 0.5rem;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 0.55rem 0.65rem;
}
.task-ico { grid-area: ico; font-size: 1.25rem; }
.task-ico.face {
    width: 2rem; height: 2rem; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--c, var(--wash));
    overflow: hidden;
    font-size: 1.05rem;
}
.task-ico.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.task-ico.face.has-mark img { width: 58%; height: 58%; object-fit: contain; }
.kid-row {
    grid-template-columns: 3.4rem 1fr auto;
    grid-template-areas: "ico body pts" "ico actions actions";
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    gap: 0.15rem 0.55rem;
}
.kid-row .task-ico.face {
    width: 3.4rem; height: 3.4rem; font-size: 1.55rem;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--c) 55%, #fff);
}
.task-row > div:not(.task-actions) { grid-area: body; min-width: 0; overflow-wrap: anywhere; }
.task-row > em { grid-area: pts; font-style: normal; font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.task-row strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-row small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-actions { grid-area: actions; display: flex; gap: 0.2rem; align-items: center; justify-content: flex-end; }
.task-del { color: var(--bad); }
.row-ico {
    width: 34px; height: 34px;
    border: 0; padding: 0;
    border-radius: 9px;
    background: none;
    color: var(--muted);
    display: grid; place-items: center;
    cursor: pointer;
    flex: none;
}
.row-ico svg { width: 16px; height: 16px; display: block; }
.row-ico:hover { color: var(--ink); background: var(--wash); }
.row-ico.task-del { color: var(--bad); }
.row-ico.task-del:hover { color: var(--bad); background: var(--bad-soft); }

/* An/Aus-Schalter */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch-input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
    width: 40px; height: 24px; border-radius: 999px;
    background: #d7d0c6; border: 1px solid var(--line);
    transition: background 0.18s ease;
    display: inline-flex; align-items: center; padding: 2px;
}
.switch-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(27, 23, 19, 0.25);
    transition: transform 0.18s ease;
}
.switch-input:checked + .switch-track { background: var(--hero); border-color: var(--hero); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); }
.task-actions .switch-track { width: 36px; height: 20px; padding: 1px; }
.task-actions .switch-thumb { width: 16px; height: 16px; }
.task-actions .switch-input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
.switch-input:focus-visible + .switch-track { outline: 3px solid var(--hero); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .switch-track, .switch-thumb { transition: none; }
}
.task-row.is-edit { display: block; overflow-x: clip; max-width: 100%; }
.task-edit { display: grid; gap: 0.45rem; min-width: 0; max-width: 100%; }
.task-edit > input[type=hidden] { display: none; }
.task-edit input[type=text] { width: 100%; }
.kid-edit { grid-template-columns: 1fr; }
.kid-edit > * { min-width: 0; max-width: 100%; }
.kid-edit input,
.kid-edit select { width: 100%; max-width: 100%; }
.kid-edit input[type=date] { min-width: 0; }
.edit-actions {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
    grid-column: 1 / -1;
    padding-top: 0.15rem;
}
.edit-actions .btn { flex: 1 1 8rem; min-width: 0; }
.edit-actions .task-del { flex: 1 1 100%; }
.kid-badge-edit {
    display: grid;
    gap: 0.38rem;
    margin-top: 0.15rem;
    padding: 0.7rem 0.75rem 0.6rem;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.kid-badge-edit-lbl {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
}
.kid-badge-edit .muted {
    margin: 0;
    font-size: 0.8rem;
}
.kid-badge-edit-row {
    display: grid;
    grid-template-columns: 1.85rem minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    background: var(--card);
    border-radius: 12px;
    padding: 0.38rem 0.45rem 0.38rem 0.5rem;
}
.kid-badge-edit-row img.art-ico,
.kid-badge-edit-row .art-fallback {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.kid-badge-edit-row .art-fallback {
    display: grid;
    place-items: center;
    font-size: 1.15rem;
}
.kid-badge-edit-row strong {
    display: block;
    font-size: 0.86rem;
    line-height: 1.25;
}
.kid-badge-edit-row .btn {
    min-height: 36px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
    width: auto;
}
.kid-login {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.28rem;
}
.kid-login strong { font-size: 0.92rem; }
.kid-login small { color: var(--muted); display: block; line-height: 1.4; }
.kid-login .set-actions { margin-top: 0.15rem; margin-left: 0; justify-content: flex-start; }
.kid-login-msg { margin: 0.2rem 0 0; font-size: 0.82rem; }
.kid-login-msg.is-bad { color: var(--bad); }
.tabbar .tab-logout { display: grid; margin: 0; min-width: 0; }
.composer-pills { flex: 1; min-width: 12rem; }

.settings { display: grid; gap: 1.15rem; }
.settings-block .h3 { margin: 0 0 0.45rem; }
.settings > .set-list { grid-column: 1 / -1; }
.set-group { grid-column: 1 / -1; display: grid; gap: 0.4rem; }
.set-group-title {
    margin: 0.35rem 0 0.05rem;
    padding-left: 0.2rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.set-kidmode {
    border-color: color-mix(in srgb, var(--hero) 30%, var(--line));
    background: color-mix(in srgb, var(--hero) 6%, var(--card));
}
.set-kidmode:hover { border-color: color-mix(in srgb, var(--hero) 45%, var(--line)); }
.set-kidmode .set-go-ico { color: var(--hero); }
.set-fold { margin: 0; grid-column: 1 / -1; }
.set-fold > summary {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.7rem;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 0.95rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold > summary::after {
    content: "";
    width: 0.5rem; height: 0.5rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: -0.2rem;
}
.set-fold[open] > summary { margin-bottom: 0.4rem; }
.set-fold[open] > summary::after { transform: rotate(-135deg); margin-top: 0.15rem; }
.set-fold-danger > summary { color: var(--bad); }
.set-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.set-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.7rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
}
.set-row:hover { border-color: var(--line-strong); }
.set-row > div:first-child { min-width: 0; flex: 1 1 11rem; }
.set-row small { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.set-row small b { font-weight: 700; letter-spacing: 0.06em; color: var(--ink); overflow-wrap: anywhere; }
.set-actions {
    display: flex;
    gap: 0.1rem 0.5rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
}
.set-row.is-edit { display: block; }
.set-go {
    text-decoration: none; color: inherit;
    flex-wrap: nowrap;
}
.set-go:hover { border-color: rgba(27, 23, 19, 0.16); }
button.set-go-btn {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
button.set-go-btn:active { transform: scale(0.995); }
.set-go-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; flex: none;
    color: var(--muted);
}
.set-go-ico svg { width: 18px; height: 18px; display: block; }
.set-edit { display: grid; gap: 0.5rem; }
.set-edit .pts-wrap { width: 6.5rem; }
.set-cat { display: grid; gap: 0.35rem; }
.set-cat-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 0.6rem;
}
.set-cat-title { margin: 0; font-weight: 700; }
.set-cat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.set-cat table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.set-cat th, .set-cat td {
    text-align: left;
    padding: 0.32rem 0.4rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.set-cat th { color: var(--muted); font-weight: 700; }
.set-cat td:nth-child(2) { font-weight: 700; white-space: nowrap; }
.span-nav a.chip { text-decoration: none; color: inherit; }
.span-nav a.chip.is-on { color: #fff; }

.celebrate-cheer {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.7rem; font-weight: 700; margin: 0.15rem 0 0;
    color: #fff;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}
.celebrate-bits { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.celebrate-bits i {
    position: absolute; top: -12px;
    width: 9px; height: 15px; border-radius: 2px;
    animation: fall 1.25s cubic-bezier(0.3, 0.2, 0.5, 1) forwards;
}
@keyframes fall {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    to { transform: translateY(112vh) rotate(300deg); opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
    .celebrate.is-on .celebrate-card { animation: none; transform: none; opacity: 1; }
    .celebrate.is-on .celebrate-star,
    .celebrate.is-on .celebrate-badge,
    .celebrate.is-on .celebrate-glow,
    .celebrate.is-on .celebrate-rays { animation: none; }
    .celebrate-bits i { animation-duration: 0.01ms; opacity: 0; }
}

.today-dailies { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.28rem; }
.today-dailies button {
    width: 100%; display: flex; align-items: center; gap: 0.5rem;
    border: 0; background: #f7f2ea; border-radius: 12px;
    padding: 0.5rem 0.6rem; min-height: 44px; cursor: pointer;
    text-align: left; color: inherit; font-weight: 600;
    transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.08s ease;
}
.today-dailies i,
.today-extra .done-mark {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e0cfc0;
    display: grid; place-items: center; font-size: 0.7rem; flex-shrink: 0; color: #fff;
    font-style: normal; font-weight: 700;
}
.today-dailies .is-done i,
.today-extra .is-done .done-mark { background: var(--ok); border-color: var(--ok); }
.today-dailies .is-done button,
.today-extra .is-done .log-row,
.today-extra .is-done button { opacity: 0.62; }
/* Verlauf: Klick auf die Zeile schaltet NICHT um — nur der Haken ist aktiv.
   Schützt vor versehentlichem Zurücknehmen eines Extras/einer Aufgabe. */
.today-extra .log-row { cursor: default; }
.today-extra .log-toggle {
    width: 26px; height: 26px; min-height: 0; padding: 0;
    flex: 0 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.08s ease;
}
.today-extra .log-toggle:hover { filter: brightness(1.06); }
.today-extra .log-toggle:active,
.today-extra .log-toggle.is-down { transform: scale(0.9); }
.mode-kid .today-extra li.is-done { opacity: 0.62; }
.today-dailies em { margin-left: auto; color: var(--ok); font-style: normal; font-weight: 700; font-size: 0.8rem; }
.pending-grid { display: grid; gap: 0.4rem; }

@media (min-width: 700px) {
    body.mode-parent { background: var(--bg); min-height: 100vh; }
    body.mode-hub,
    body.mode-bare,
    body.mode-kid {
        background-color: var(--bg);
        background-image:
            linear-gradient(180deg, color-mix(in srgb, var(--bg) 52%, transparent) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 75%),
            url("../art/wall-wide.webp");
        background-size: cover;
        background-position: center top;
        background-attachment: scroll;
        min-height: 100vh;
    }
    body.mode-parent.has-wall {
        background-image:
            linear-gradient(180deg, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 70%),
            url("../art/wall-wide.webp");
        background-size: cover;
        background-position: center top;
        background-attachment: scroll;
    }
    body.mode-land {
        background-image:
            linear-gradient(180deg, color-mix(in srgb, var(--bg) 62%, transparent) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 60%),
            url("../art/land-wall.webp");
        background-attachment: scroll;
        min-height: 100vh;
    }

    .mode-hub .who { gap: 1rem; }
    .mode-hub .who-card {
        min-height: 220px;
        padding: 1.5rem 1rem 1.2rem;
        border-radius: 24px;
    }
    .mode-hub .who-card .who-emoji,
    .mode-hub .who-card .avatar {
        width: 112px; height: 112px; font-size: 3.2rem;
    }
    .mode-hub .who-card strong { font-size: 1.35rem; }
    .mode-hub .who-card em { font-size: 0.92rem; }
    .mode-hub .who-parent {
        min-height: 104px;
        padding: 1.15rem 1.4rem;
    }
    .mode-hub .who-parent .who-emoji { width: 64px; height: 64px; font-size: 1.85rem; }
    .mode-hub .hub-head h1 { font-size: 2.15rem; }

    .mode-kid .kid-head.top-desk {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.1rem;
    }
    .mode-kid .kid-head.top-desk > :first-child {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }
    .mode-kid .kid-head.top-desk > :last-child {
        grid-column: 1;
        grid-row: 1;
    }
    .mode-kid .hello h1 { font-size: 2.15rem; }
    .mode-kid .avatar { width: 64px; height: 64px; font-size: 1.85rem; }
    .mode-kid .kid-me-face { width: 84px; height: 84px; font-size: 2.35rem; }
    .mode-kid .kid-me h1 { font-size: 2rem; }
    .mode-kid .app-main > .kid-hero { display: none; }
    .mode-kid .kid-goal-rail .kid-fam-desk { display: grid; }
    .mode-kid .kid-goal-rail {
        display: grid;
        justify-items: center;
        text-align: center;
    }
    .mode-kid .kid-goal-rail .kid-stars { display: none; }
    .mode-kid .kid-goal-rail .kid-hero-goal,
    .mode-kid .kid-goal-rail .kid-hero-need { text-align: center; }
    .sidenav-kid .tab-switch {
        width: 100%;
        appearance: none; -webkit-appearance: none;
        font: inherit; text-align: left; cursor: pointer;
    }

    .mode-kid .kid-desk {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
        gap: 1.25rem;
        align-items: start;
    }
    .mode-kid .kid-desk:not(:has(.desk-rail)) { grid-template-columns: minmax(0, 1fr); }
    .mode-kid .kid-desk-main { order: 1; min-width: 0; }
    .mode-kid .kid-desk-rail {
        order: 2;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 1.15rem 1.05rem 1.05rem;
        box-shadow: var(--shadow);
        position: sticky;
        top: 22px;
    }
    .mode-kid .kid-desk-rail .ring-wrap { width: 220px; height: 220px; }
    .mode-kid .kid-desk-rail .target-line { text-align: left; margin-bottom: 0; }
    .mode-kid .kid-h:first-child { margin-top: 0; }
    .mode-kid .shop { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mode-kid .kid-desk > .shop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mode-kid .kid-desk:not(:has(.desk-rail)) > .shop { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mode-kid .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mode-kid .bars { height: 150px; gap: 0.7rem; }
    .mode-kid .bar-col::before,
    .mode-kid .bar-col i { max-width: 46px; }

    .app-head-title h1 { font-size: 2.7rem; }
    .app-head-title h1::after { width: 3rem; height: 4px; margin-top: 0.5rem; }
    .app-head { margin-bottom: 1.4rem; padding-bottom: 1rem; }
    .top-desk {
        display: flex; justify-content: space-between; align-items: center;
        gap: 1rem; flex-wrap: nowrap;
    }
    .top-desk .switcher { margin: 0; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
    .top-desk .switcher .avatar { width: 52px; height: 52px; font-size: 1.5rem; }
    .top-desk .switcher button { min-height: 60px; }
    .mode-parent .top-desk .switcher-kid { min-height: 0; }
    .mode-parent .top-desk .switcher-kid .avatar { width: 40px; height: 40px; font-size: 1.2rem; }
    .mode-parent .top-desk .switcher-kid.is-on .avatar { width: 64px; height: 64px; font-size: 1.85rem; }
    .top-kids .fam-chip { max-width: 28rem; }
    .top-desk h1 { margin-bottom: 0.15rem; }
    .top-desk .lead { margin-bottom: 0; }

    .desk-dash > div { min-width: 0; }
    .kid-cards-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pending-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .shop { grid-template-columns: 1fr 1fr; }

    .composer-extra { grid-template-columns: 1fr 1fr 1fr; }
    .task-row {
        grid-template-columns: 2rem 1fr auto auto;
        grid-template-areas: "ico body pts actions";
        align-items: center;
        padding: 0.65rem 0.75rem;
        border-radius: 14px;
        gap: 0.15rem 0.55rem;
    }
    .task-row strong { font-size: 1rem; white-space: normal; }
    .task-row small { font-size: 0.82rem; white-space: normal; }
    .task-row > em { font-size: 1rem; }
    .task-actions { gap: 0.25rem; }
    .row-ico { width: 36px; height: 36px; }
    .row-ico svg { width: 18px; height: 18px; }
    .task-actions .switch-track { width: 40px; height: 24px; padding: 2px; }
    .task-actions .switch-thumb { width: 18px; height: 18px; }
    .task-actions .switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); }
    .kid-row {
        grid-template-columns: 3.6rem 1fr auto auto;
        grid-template-areas: "ico body pts actions";
    }
    .kid-row .task-ico.face { width: 3.6rem; height: 3.6rem; font-size: 1.65rem; }
    .task-edit {
        grid-template-columns: 1fr 5.5rem 7rem 7rem 7rem auto auto;
        align-items: center;
    }
    .kid-edit { grid-template-columns: 1fr; }
    .reward-edit {
        grid-template-columns: 1fr 5.5rem 1fr 7rem 5.5rem auto auto;
    }
    .reward-edit input[type=file] { grid-column: 1 / -1; }
    .desk-split {
        display: grid;
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
        gap: 1.15rem;
        align-items: start;
    }
    .desk-split > .card { margin: 0; }
    .desk-list { margin: 0; }
    .desk-split .shop { grid-template-columns: 1fr 1fr; }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 0.85rem;
    }
    .stats-grid .card { margin: 0; }
    .settings {
        grid-template-columns: 1fr 1fr;
        gap: 1.15rem 1.4rem;
    }
    .settings-danger { grid-column: 1 / -1; }

    .sheet-overlay { align-items: center; padding: 1.5rem; }
    .sheet-card {
        width: min(480px, 100%);
        border-radius: 20px;
        max-height: 82vh;
        padding: 1.15rem 1.15rem 1.2rem;
    }
}

@media (min-width: 700px) and (max-width: 1279px) {
    .mode-parent .app,
    .mode-hub .app,
    .mode-kid .app {
        width: min(1080px, calc(100% - 28px));
        padding: 20px 8px calc(92px + env(safe-area-inset-bottom));
    }
    body.mode-parent .app { padding-bottom: 0; }
    .mode-hub .app { padding-bottom: 40px; }
    .mode-parent .tabbar,
    .mode-kid .tabbar {
        width: 100%;
        max-width: none;
        padding: 0.32rem 0.6rem calc(0.16rem + env(safe-area-inset-bottom, 0px));
    }
    .mode-kid .tabbar a,
    .mode-kid .tabbar .tab-switch,
    .mode-parent .tabbar a {
        font-size: 0.74rem;
        min-height: 48px;
        padding: 0.2rem 0;
    }
    .mode-kid .tabbar .tab-ico,
    .mode-kid .tabbar img.art-ico,
    .mode-parent .tabbar .tab-ico,
    .mode-parent .tabbar img.art-ico {
        width: 30px; height: 28px; border-radius: 8px;
    }
    .mode-kid .quest button { min-height: 62px; padding: 0.75rem 1rem; }
    .mode-kid .q-check { width: 30px; height: 30px; }
    .mode-kid .q-icon img, .mode-kid img.q-icon {
        width: 42px; height: 42px; border-radius: 11px;
    }
    .mode-kid .kid-desk-rail .ring-wrap { width: 240px; height: 240px; }
    .mode-kid .ring-label strong { font-size: 3rem; }
    .mode-kid .switcher button {
        min-height: 64px;
        padding: 0.22rem 0.95rem 0.22rem 0.22rem;
        font-size: 0.95rem;
    }
    .mode-kid .switcher-hub,
    .mode-kid .switcher-all button {
        min-height: 48px;
        padding: 0.4rem 0.95rem;
    }
    .mode-kid .switcher .avatar { width: 56px; height: 56px; font-size: 1.65rem; }
    .mode-bare .app-bare {
        width: min(420px, calc(100% - 48px));
        padding: 1.35rem 1.2rem 1.1rem;
        border-radius: 22px;
    }
    .auth-head { gap: 0.85rem; margin: 0 0 0.85rem; }
    .auth-head h1 { font-size: 1.45rem; }
    .auth-head .brand-mark { width: 56px; height: 56px; border-radius: 14px; }
    .auth-form.stack { gap: 0.6rem; }
    .auth-back { margin: 0 0 0.9rem; padding: 0.5rem 0.95rem; font-size: 0.9rem; }
    .auth-foot { margin: 0.75rem 0 0; }
    .auth-more { margin: 0.7rem 0 0; }
    .auth .fine { margin-top: 0.55rem; }
    .mode-bare .app-legal { width: min(720px, calc(100% - 48px)); }
}

@media (min-width: 900px) and (max-width: 1279px) {
    .mode-hub .hub-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
        gap: 1.3rem;
        align-items: stretch;
    }
    .mode-hub .hub-side { display: flex; flex-direction: column; gap: 1.3rem; }
    .mode-hub .hub-side > .goal { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}

@media (min-width: 1280px) {
    body.mode-hub,
    body.mode-bare,
    body.mode-kid,
    body.mode-land,
    body.mode-parent.has-wall {
        background-attachment: fixed;
    }
    .hide-desk { display: none !important; }
    .hide-phone { display: block; }
    .settings-grid .hide-phone.card { display: block; }
    .span-nav a.chip { text-decoration: none; }

    .mode-parent .app {
        width: min(1440px, calc(100% - 32px));
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 1.6rem;
        padding: 28px 8px 28px;
        align-items: stretch;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }
    body.mode-parent .app-main {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .mode-hub .app {
        width: min(1280px, calc(100% - 48px));
        padding: 40px 8px 56px;
    }
    .hub-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 1.5rem;
        margin-bottom: 1.6rem;
    }
    .hub-head .lead { margin-bottom: 0; }
    .hub-head h1 { font-size: 2.4rem; }
    .hub-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
        gap: 1.5rem;
        align-items: stretch;
    }
    .hub-side { display: flex; flex-direction: column; gap: 1.5rem; }
    .hub-side > .goal { flex: 1; display: flex; flex-direction: column; justify-content: center; }
    .mode-hub .who { margin-bottom: 0; }
    .mode-hub .who-card {
        min-height: 240px;
        padding: 1.7rem 1.1rem 1.3rem;
    }
    .mode-hub .who-card .who-emoji,
    .mode-hub .who-card .avatar {
        width: 120px; height: 120px; font-size: 3.4rem;
    }
    .mode-hub .who-card strong { font-size: 1.45rem; }

    .mode-bare .app-bare {
        width: min(400px, calc(100% - 48px));
        padding: 1.7rem 1.55rem 1.35rem;
    }
    .mode-bare .app-legal { width: min(720px, calc(100% - 48px)); }
    .mode-parent .tabbar { display: none; }
    body.mode-parent .view-scroll { padding-bottom: 0.35rem; }
    .undo-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 1.3rem); }
    .mode-kid .tabbar { display: none; }
    .switcher-who { display: none; }
    .kid-switch { display: none; }

    .mode-kid .app {
        width: min(1440px, calc(100% - 32px));
        display: grid;
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 1.6rem;
        padding: 28px 8px 40px;
        align-items: start;
    }
    .sidenav-kid { background: var(--card); }
    .sidenav-kid .sidenav-links a.is-on { background: color-mix(in srgb, var(--hero) 14%, var(--card)); }

    .sidenav {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        /* Nur auf Inhaltshöhe, nicht auf volle Spaltenhöhe strecken. Das Grid
           steht auf align-items:stretch, damit .app-main die Höhe füllt; die
           Seitenleiste soll aber kompakt oben kleben. */
        align-self: start;
        position: sticky;
        top: 22px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 1.05rem 0.85rem 0.9rem;
        box-shadow: var(--shadow);
    }
    .sidenav-brand {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        text-decoration: none;
        color: inherit;
    }
    .sidenav-brand .brand { margin: 0; font-size: 1.5rem; }
    .sidenav-mark { width: 40px; height: 40px; border-radius: 11px; flex: none; }
    .sidenav-fam { margin: 0.15rem 0 0.55rem; font-weight: 700; font-size: 0.95rem; }
    .sidenav-kid .sidenav-fam { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
    .sidenav-links { display: grid; gap: 0.15rem; }
    .sidenav-links a,
    .sidenav-links .sidenav-lock {
        text-decoration: none; color: inherit; font-weight: 700;
        padding: 0.55rem 0.7rem; border-radius: 12px; min-height: 44px;
        display: flex; align-items: center;
    }
    .sidenav-links a.is-on { background: var(--wash); color: var(--hero); }
    .sidenav-links button {
        appearance: none; -webkit-appearance: none;
        width: 100%; background: none;
        font: inherit; font-weight: 700; text-align: left;
        cursor: pointer; color: inherit;
    }
    .sidenav-who {
        color: var(--muted);
        margin-bottom: 0.35rem;
        border-bottom: 1px solid var(--line);
        border-radius: 12px 12px 0 0;
        padding-bottom: 0.7rem;
    }
    .sidenav-lock {
        color: var(--muted);
        margin-top: 0.45rem;
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        padding-top: 0.85rem;
        gap: 0.4rem;
    }
    .sidenav-lock:hover { color: var(--ink); }
    .sidenav-links form { margin: 0; display: grid; }
    .sidenav-out { margin-top: 0.7rem; padding: 0 0.7rem; }
}


.land { width: 100%; padding: 0 0 56px; overflow-x: clip; }
.land-wrap { width: min(1080px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }

.land-bar {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 16px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.8rem;
}
.land-brand {
    display: flex; align-items: center; gap: 0.65rem;
    text-decoration: none; color: inherit;
    font-size: 1.42rem;
}
.land-brand img {
    width: 54px; height: 54px; border-radius: 14px;
    box-shadow: 0 4px 12px rgba(27, 23, 19, 0.22);
}
.land-brand-txt { display: flex; align-items: center; gap: 0.6rem; line-height: 1.1; }
.land-brand-name {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--hero);
}
.land-brand-tag {
    padding-left: 0.6rem;
    border-left: 1.5px solid rgba(27, 23, 19, 0.22);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--muted);
}
@media (max-width: 560px) {
    .land-brand-tag { display: none; }
}
.land-bar nav { display: flex; align-items: center; gap: 0.85rem; }
.land-bar nav a:not(.btn) { font-weight: 700; text-decoration: none; color: var(--ink); }
.land-bar .btn { min-height: 40px; padding: 0.4rem 0.9rem; }

.land-steps, .land-split, .land-parent, .land-facts, .land-stage, .land-foot {
    width: min(1080px, calc(100% - 32px));
    margin-left: auto; margin-right: auto;
}

.land h1 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2rem, 5.6vw, 3.05rem);
    margin: 0.14em 0 0;
    letter-spacing: -0.03em;
    line-height: 1.12;
    text-wrap: balance;
}
.land h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    margin: 0.1em 0 0.2rem;
    letter-spacing: -0.025em;
    line-height: 1.18;
    text-wrap: balance;
}
.land p { text-wrap: pretty; }

/* Hero: enthalten (nicht volle Breite), mit dem Wallpaper vom Login.
   Mobil gestapelt (Bild-Banner + Text darunter), ab Desktop als Overlay. */
.land-hero {
    position: relative;
    width: min(1080px, calc(100% - 32px));
    margin: 1rem auto 1.5rem;
    border-radius: 24px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(40, 24, 12, 0.14);
}
.land-hero-bg {
    display: block;
    width: 100%;
    height: min(52vw, 240px);
    object-fit: cover;
    object-position: 28% 68%;
    transform: scaleX(-1);
}
.land-hero::after { content: none; }
.land-hero-inner {
    position: static;
    padding: 1.3rem 1.35rem 1.7rem;
}
.land-hero-card {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: none;
}
.land-hero-sub {
    margin: 0.5rem 0 1.1rem;
    max-width: 30rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--ink);
}
.hero-offer {
    margin: 1.3rem 0 0.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.hero-offer-was {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: line-through;
    text-decoration-color: var(--hero);
    text-decoration-thickness: 2px;
}
.hero-offer-now {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--hero);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}
.hero-access a { font-weight: 800; text-decoration: underline; color: inherit; }

.land-buy {
    width: min(640px, calc(100% - 32px));
    margin: 1.2rem auto 3rem;
}
.land-buy-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.5rem 1.4rem 1.7rem;
    box-shadow: 0 16px 40px rgba(40, 24, 12, 0.1);
}
.land-buy-card h1 { margin-top: 0.1em; font-size: clamp(1.55rem, 3.4vw, 1.95rem); }
.shop-price {
    margin: 1.1rem 0 0.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.shop-price-hint { margin: 0 0 1rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.shop-price-hint.is-happy {
    color: var(--hero);
    font-weight: 800;
    font-size: 0.96rem;
    animation: shop-hint-pop 0.32s ease;
}
@keyframes shop-hint-pop {
    0% { transform: scale(0.94); opacity: 0.4; }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .shop-price-hint.is-happy { animation: none; }
}
.shop-warn {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: var(--wash);
    border: 1px solid var(--line);
    font-weight: 600;
}
.shop-form { margin-top: 0.4rem; }
.shop-form label { display: grid; gap: 0.28rem; font-weight: 700; }
.shop-form input[type="email"],
.shop-form input[type="text"] {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0.45rem 0.8rem;
    font: inherit;
    background: #fff;
}
.shop-code-box {
    display: grid;
    gap: 0.35rem;
    margin: 1rem 0 1.2rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: var(--wash);
    border: 1px dashed var(--line);
}
.shop-code-lab { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.shop-code-box strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
}
.shop-ok .land-cta { margin-top: 0.2rem; }
.land-buy-card .btn-hero { width: 100%; min-height: 48px; }
.land-buy .buy-now {
    font-family: var(--display);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.03em;
}
.land-buy .shop-price { margin: 0.7rem 0 0.15rem; align-items: baseline; }
.shop-code-fold { margin: 0; }
.shop-code-fold summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.88rem;
}
.shop-code-fold[open] summary { margin-bottom: 0.35rem; }
.shop-code-fold input {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0.45rem 0.8rem;
    font: inherit;
    background: #fff;
}

.invite-box { margin: 0.2rem 0 0.4rem; }
.invite-link-row { margin: 0 0 0.85rem; }
.invite-link {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    word-break: break-all;
    color: var(--ink);
}
.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.invite-actions .btn { min-height: 44px; }
.invite-share-msg { margin: 0.55rem 0 0; font-weight: 600; }
.start .invite-box { margin-bottom: 0.2rem; }
.start .shop-code-box { margin-top: 0; }
.land-cta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.land-cta .btn { min-height: 46px; }

/* ===== Kaufseite: vollwertige Verkaufsseite ===== */
.buy-hero {
    width: min(1040px, calc(100% - 32px));
    margin: 1.6rem auto 3rem;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.8rem;
    align-items: start;
}
.buy-hero-text .kicker { margin-bottom: 0.35rem; }
.buy-hero-text h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.75rem, 4.4vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
}
.buy-hero-text .land-hero-sub { max-width: 34rem; }
.buy-badges {
    list-style: none;
    margin: 1.3rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
    max-width: 34rem;
}
.buy-badges li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ink);
}
.buy-badges svg { width: 19px; height: 19px; color: var(--hero); flex: none; }
.buy-anchor { max-width: 34rem; }
.buy-anchor-note { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.buy-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.4rem 1.35rem 1.45rem;
    box-shadow: 0 18px 44px rgba(40, 24, 12, 0.13);
    position: sticky;
    top: 18px;
    scroll-margin-top: 18px;
}
.buy-card-kick {
    display: inline-block;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    color: var(--hero);
}
.buy-card .shop-price { margin: 0.35rem 0 0.15rem; align-items: baseline; gap: 0.6rem; }
.buy-now {
    font-family: var(--display);
    font-weight: 700;
    font-size: 2.7rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.buy-was { font-size: 1.05rem; }
.shop-code-fold {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.15rem 0.7rem;
    background: #fff;
}
.shop-code-fold > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 0.55rem 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.92rem;
}
.shop-code-fold > summary::-webkit-details-marker { display: none; }
.shop-code-fold[open] > summary { color: var(--ink); }
.shop-code-fold input { width: 100%; margin: 0 0 0.6rem; }
.buy-assure {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0.95rem 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.5rem;
}
.buy-assure li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
}
.buy-assure svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.buy-card .hero-access { margin: 0.9rem 0 0; font-size: 0.9rem; }
/* Stripe Elements (inline Checkout) */
.shop-pay { display: grid; gap: 0.55rem; margin: 0 0 0.1rem; }
.shop-pay[hidden] { display: none; }
.shop-express { margin: 0.2rem 0 0.1rem; min-height: 48px; }
.shop-pe { margin: 0.15rem 0 0.1rem; }
.shop-or {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.35rem 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}
.shop-or::before,
.shop-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.shop-email-note { margin: -0.15rem 0 0.1rem; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.shop-optional {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.shop-error {
    margin: 0.1rem 0 0;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bad) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line));
    color: var(--bad);
    font-weight: 600;
    font-size: 0.9rem;
}

.buy-value,
.buy-compare,
.buy-guarantee {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto 3.4rem;
}
.buy-sec-head { text-align: center; margin-bottom: 1.3rem; }
.buy-sec-head .kicker { text-align: center; }
.buy-sec-head h2 { margin: 0.15rem 0 0; }
.buy-value-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.buy-value-grid li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.05rem 1.1rem 1.15rem;
    box-shadow: var(--shadow);
}
.buy-value-grid strong {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}
.buy-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 20%, var(--card));
    color: var(--gold);
}
.buy-ico svg { width: 15px; height: 15px; }
.buy-value-grid span { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.buy-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}
.buy-plan {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.3rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
}
.buy-plan.is-them { background: var(--wash); }
.buy-plan.is-us {
    border-color: color-mix(in srgb, var(--hero) 42%, var(--line));
    box-shadow: 0 14px 34px rgba(184, 51, 20, 0.14);
    position: relative;
}
.buy-plan-tag {
    position: absolute;
    top: -0.7rem;
    left: 1.25rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--hero);
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.buy-plan h3 { margin: 0.2rem 0 0.3rem; font-size: 1.05rem; }
.buy-plan-price {
    margin: 0 0 0.3rem;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.buy-plan-price span { font-family: var(--font); font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.buy-plan ul { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.buy-plan li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.92rem; line-height: 1.35; }
.buy-plan li svg { width: 17px; height: 17px; color: var(--hero); flex: none; margin-top: 0.1rem; }
.buy-plan li.no { color: var(--muted); }
.buy-plan li.no::before {
    content: "\00d7";
    color: var(--muted);
    font-weight: 800;
    width: 17px;
    text-align: center;
    flex: none;
}
.buy-plan .btn { margin-top: 1.05rem; }

.buy-guar-grid {
    list-style: none;
    margin: 0;
    padding: 1.3rem 1.1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.buy-guar-grid li { display: grid; justify-items: center; gap: 0.25rem; }
.buy-guar-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.15rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero) 12%, var(--card));
    color: var(--hero);
}
.buy-guar-ico svg { width: 22px; height: 22px; }
.buy-guar-grid strong { font-size: 0.98rem; }
.buy-guar-grid span { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }

.buy-faq { width: min(760px, calc(100% - 32px)); margin: 0 auto 3.4rem; }

@media (max-width: 860px) {
    .buy-hero { grid-template-columns: 1fr; gap: 1.3rem; margin-top: 1.1rem; }
    .buy-card { position: static; }
    .buy-value-grid { grid-template-columns: 1fr; }
    .buy-compare-grid { grid-template-columns: 1fr; }
    .buy-plan.is-us { margin-top: 0.4rem; }
    .buy-guar-grid { grid-template-columns: 1fr 1fr; padding: 1.1rem 0.9rem; }
}

/* Kaufseite: dezenter Verweis zur Startseite (ersetzt duplizierte Blöcke) */
.buy-more {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto 3.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}
.buy-more p { color: var(--muted); margin: 0; max-width: 46ch; }

/* Ratgeber-Hub */
.guide-hub-hero {
    width: min(760px, calc(100% - 32px));
    margin: 2rem auto 2.4rem;
    text-align: center;
}
.guide-hub-hero .land-hero-sub { margin-left: auto; margin-right: auto; }
.guide-hero-emblem {
    display: inline-grid;
    place-items: center;
    width: 66px; height: 66px;
    margin-bottom: 0.7rem;
    border-radius: 20px;
    color: var(--hero);
    background: color-mix(in srgb, var(--hero) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--hero) 22%, var(--line));
    box-shadow: 0 10px 24px rgba(210, 75, 26, 0.14);
}
.guide-hero-emblem svg { width: 32px; height: 32px; }

.guide-sec-head { text-align: center; max-width: 640px; margin: 0 auto 1.4rem; }
.guide-sec-head .kicker { justify-content: center; }
.guide-sec-sub { color: var(--muted); margin: 0.5rem auto 0; max-width: 56ch; line-height: 1.5; }

/* Pädagogik-Prinzipien */
.guide-principles { width: min(1080px, calc(100% - 32px)); margin: 0 auto 3.4rem; }
.principle-grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.principle-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.35rem 1.4rem 1.4rem;
    box-shadow: var(--shadow);
}
.principle-ico {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    color: var(--hero);
    background: color-mix(in srgb, var(--hero) 12%, var(--card));
}
.principle-ico svg { width: 24px; height: 24px; }
.principle-card strong { font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.02em; }
.principle-lead { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.principle-app {
    margin-top: 0.4rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: var(--wash);
    border: 1px solid var(--line);
    font-size: 0.92rem;
    line-height: 1.5;
}
.principle-app-lab {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 0.4rem;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hero);
}
.principle-src {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}
.principle-app-lab::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--hero);
}

/* Artikel-Karten */
.guide-grid-sec, .guide-cta { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.guide-grid-sec { margin-bottom: 3.2rem; }
.guide-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.guide-card { display: flex; }
.guide-card > a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.3rem 1.4rem;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.guide-card > a::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--hero);
    opacity: 0;
    transition: opacity 0.18s ease;
}
.guide-card > a:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.1);
    border-color: color-mix(in srgb, var(--hero) 40%, var(--line));
}
.guide-card > a:hover::before { opacity: 1; }
.guide-card-top { display: flex; align-items: center; gap: 0.6rem; }
.guide-card-n {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    color: color-mix(in srgb, var(--hero) 60%, var(--muted));
    letter-spacing: -0.02em;
}
.guide-card-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero) 12%, var(--card));
    color: var(--hero);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.guide-card strong { font-family: var(--display); font-weight: 600; font-size: 1.22rem; line-height: 1.2; letter-spacing: -0.02em; }
.guide-card-ex { color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.guide-card-foot {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border-top: 1px solid var(--line);
}
.guide-card-read {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
}
.guide-card-more { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; font-size: 0.9rem; color: var(--hero); }
.guide-card-more svg { width: 17px; height: 17px; transition: transform 0.18s ease; }
.guide-card > a:hover .guide-card-more svg { transform: translateX(3px); }

.guide-cta { margin-bottom: 3.6rem; }
.guide-cta-inner {
    position: relative;
    background: linear-gradient(180deg, var(--card), var(--wash));
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 2.4rem 1.6rem 2.2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.guide-cta-ico {
    display: inline-grid;
    place-items: center;
    width: 60px; height: 60px;
    margin-bottom: 0.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.guide-cta-ico img { width: 100%; height: 100%; object-fit: cover; }
.guide-cta-inner p { color: var(--muted); max-width: 52ch; margin: 0.5rem auto 1.2rem; line-height: 1.5; }
.guide-cta .land-cta { justify-content: center; }

/* Ratgeber-Artikel */
.guide { width: min(720px, calc(100% - 32px)); margin: 1.6rem auto 3.6rem; }
.guide-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}
.guide-crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.guide-crumbs a:hover { color: var(--hero); }
.guide-crumbs [aria-current="page"] { color: var(--ink); }

.guide-head { margin-bottom: 1.8rem; }
.guide-head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.7rem; }
.guide-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero) 12%, var(--card));
    color: var(--hero);
    font-size: 0.78rem;
    font-weight: 700;
}
.guide-read-tag { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.guide-lead { font-size: 1.16rem; line-height: 1.58; color: var(--muted); margin-top: 0.4rem; }

.guide-body { font-size: 1.05rem; line-height: 1.72; }
.guide-body h2 {
    position: relative;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    margin: 2.1rem 0 0.6rem;
    padding-left: 0.9rem;
}
.guide-body h2::before {
    content: "";
    position: absolute;
    left: 0; top: 0.24em; bottom: 0.24em;
    width: 4px;
    border-radius: 999px;
    background: var(--hero);
}
.guide-body p { margin: 0 0 1rem; }
.guide-list { margin: 0 0 1.2rem; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.guide-list li { position: relative; padding-left: 1.7rem; line-height: 1.58; }
.guide-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.45em;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hero) 30%, transparent);
    border: 2px solid var(--hero);
}

/* Prinzip → App: Brückenbox */
.guide-sources {
    margin: 2.4rem 0;
    padding: 1.4rem 1.5rem;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.guide-sources h2 { margin: 0 0 0.9rem; font-size: 1.15rem; }
.guide-src-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.9rem;
}
.guide-src-list li { line-height: 1.45; }
.guide-src-note {
    display: block;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.15rem;
}
.guide-src-ref { display: block; font-size: 0.86rem; color: var(--muted); }
.guide-src-ref a { color: var(--hero); text-decoration: none; }
.guide-src-ref a:hover { text-decoration: underline; }

.guide-bridge {
    margin: 2.4rem 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--hero) 6%, var(--card)), var(--card));
    border: 1px solid color-mix(in srgb, var(--hero) 24%, var(--line));
    border-radius: 22px;
    padding: 1.5rem 1.5rem 1.4rem;
    box-shadow: var(--shadow);
}
.guide-bridge-head { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 1.1rem; }
.guide-bridge-ico {
    flex-shrink: 0;
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.guide-bridge-ico img { width: 100%; height: 100%; object-fit: cover; }
.guide-bridge-kick {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hero);
    margin-bottom: 0.15rem;
}
.guide-bridge-lead { margin: 0; font-weight: 600; font-size: 1.02rem; line-height: 1.45; }
.guide-bridge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.guide-bridge-list li {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.4fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.guide-bridge-principle { font-weight: 700; font-size: 0.94rem; }
.guide-bridge-arrow { display: inline-flex; color: var(--hero); }
.guide-bridge-arrow svg { width: 18px; height: 18px; }
.guide-bridge-app { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.guide-inline-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.2rem 1.4rem;
    margin: 2.2rem 0;
}
.guide-inline-cta strong { display: block; font-size: 1.05rem; }
.guide-inline-cta span { color: var(--muted); font-size: 0.92rem; }
.guide-inline-cta .btn { flex-shrink: 0; }

.guide-related { margin-top: 2.6rem; }
.guide-related h2 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 0.9rem; }
.guide-faq { margin-top: 2.6rem; }

@media (max-width: 720px) {
    .principle-grid { grid-template-columns: 1fr; }
    .guide-grid { grid-template-columns: 1fr; }
    .guide-inline-cta { flex-direction: column; align-items: flex-start; }
    .guide-inline-cta .btn { width: 100%; }
    .guide-bridge-list li { grid-template-columns: 1fr; gap: 0.3rem; text-align: left; }
    .guide-bridge-arrow { transform: rotate(90deg); }
}

/* Steps als Karten */
.land-steps { margin-bottom: 3.6rem; }
.land-steps .kicker { text-align: center; }
.land-steps h2 { text-align: center; margin-bottom: 1.1rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.step {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.15rem 1.15rem 1.05rem;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step-n {
    display: grid; place-items: center;
    width: 40px; height: 40px; margin-bottom: 0.6rem;
    border-radius: 50%;
    background: var(--hero); color: #fff;
    font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
    box-shadow: 0 6px 14px rgba(210, 75, 26, 0.32);
}
.step strong { display: block; font-size: 1.08rem; margin-bottom: 0.2rem; }
.step p { margin: 0; color: var(--muted); }

/* Für dein Kind: Bild + Text */
.land-split {
    display: grid; gap: 1.3rem;
    margin-bottom: 3.6rem;
    align-items: center;
}
.land-split-media { margin: 0; }
.land-split-media img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.land-list { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.land-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.7rem;
    border-top: 1px solid var(--line);
}
.land-list li:first-child { border-top: 0; }
.land-list li::before {
    content: "★";
    position: absolute; left: 0; top: 0.5rem;
    color: var(--hero); font-size: 0.95rem;
}

/* Für euch Eltern: kompakte Karten */
.land-parent { margin-bottom: 3.6rem; }
.land-cards { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.land-cards li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow);
}
.land-cards strong { display: block; margin-bottom: 0.1rem; }
.land-cards span { color: var(--muted); }

/* Der Gedanke dahinter: pädagogischer Abschnitt */
.land-why { width: 100%; margin: 0 0 3.6rem; }
.land-why-inner { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.land-why-lead {
    max-width: 62ch;
    margin: 0.35rem 0 1.2rem;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.55;
}

/* Stimmen aus Familien: volles Band mit Endlos-Slider */
.land-voices {
    width: 100%;
    margin: 0 0 3.6rem;
    padding: 2.6rem 0;
    background: var(--wash);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.land-voices-head {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto 1.4rem;
    text-align: center;
}
.land-voices .kicker { text-align: center; }
.land-voices h2 { text-align: center; margin: 0; }

.voices-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.voices-marquee {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    display: flex;
    width: max-content;
    animation: voices-scroll 64s linear infinite;
}
.voices-viewport:hover .voices-marquee { animation-play-state: paused; }

.voice {
    flex: 0 0 auto;
    width: clamp(240px, 74vw, 320px);
    margin-right: 1.1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.2rem 1.25rem 1.05rem;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
}
.voice p {
    margin: 0 0 0.9rem;
    font-family: var(--display);
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: var(--ink);
    flex: 1;
}
.voice-who { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.voice-face {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 17px;
    background: var(--c, var(--wash));
}

@keyframes voices-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .voices-viewport { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .voices-marquee { animation: none; }
}

/* Vertrauens-Leiste: eine Fläche statt Einzelkarten */
.land-facts {
    margin-bottom: 3.6rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 0.3rem 1.25rem;
}
.land-facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.land-facts li {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-areas: "ico title" "ico text";
    column-gap: 0.85rem; row-gap: 0.1rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}
.land-facts li:first-child { border-top: 0; }
.land-fact-ico {
    grid-area: ico;
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--wash); color: var(--hero);
}
.land-facts strong { grid-area: title; align-self: end; }
.land-facts li > span:last-child { grid-area: text; align-self: start; color: var(--muted); font-size: 0.92rem; }

/* So funktioniert's: App-Ansichten */
.land-demo { width: min(1080px, calc(100% - 32px)); margin: 0 auto 3.6rem; text-align: center; }
.land-demo .kicker { text-align: center; }
.land-demo-sub { max-width: 46ch; margin: 0.3rem auto 1.9rem; color: var(--muted); }
.shots { display: grid; gap: 1.8rem; justify-items: center; }
.shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; width: 100%; }
.shot figcaption { color: var(--ink); font-weight: 600; max-width: 26ch; }

.shot-phone {
    width: 100%; max-width: 290px;
    background: #1d1a16;
    border-radius: 32px;
    padding: 9px;
    box-shadow: 0 22px 54px rgba(27, 23, 19, 0.24);
    border: 1px solid rgba(27, 23, 19, 0.55);
}
.shot-screen {
    position: relative;
    background: #fbf7f0;
    border-radius: 24px;
    padding: 26px 14px 16px;
    min-height: 380px;
    display: flex; flex-direction: column; gap: 12px;
    text-align: left; overflow: hidden;
}
.shot-screen::before {
    content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 5px; border-radius: 3px; background: rgba(27, 23, 19, 0.14);
}

.shot-bar { display: flex; align-items: center; gap: 10px; }
.shot-bar-plain { display: block; }
.shot-face {
    width: 42px; height: 42px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 22px;
    background: var(--c, var(--wash));
}
.shot-face.sm { width: 34px; height: 34px; font-size: 18px; }
.shot-hi { flex: 1; min-width: 0; display: grid; }
.shot-kicker { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
.shot-hi strong, .shot-bar-plain strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.shot-streak { font-weight: 700; font-size: 0.82rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; flex: none; }

.shot-ring { position: relative; width: 132px; height: 132px; margin: 2px auto; }
.shot-ring-big { width: 150px; height: 150px; margin-top: 8px; }
.shot-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.shot-ring-bg { fill: none; stroke: #eadfce; stroke-width: 10; }
.shot-ring-fg { fill: none; stroke: var(--hero); stroke-width: 10; stroke-linecap: round; }
.shot-ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 1px; }
.shot-ring-label strong { font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1; }
.shot-ring-label span { font-size: 0.64rem; color: var(--muted); }
.shot-ring-label.big strong { font-size: 2.1rem; color: var(--hero); }

.shot-quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shot-quests li {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 9px 11px;
}
.shot-q-ico { font-size: 20px; flex: none; }
.shot-q-t { flex: 1; font-weight: 600; font-size: 0.88rem; }
.shot-q-p { font-weight: 700; font-size: 0.78rem; color: var(--hero); flex: none; }
.shot-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; position: relative; }
.shot-quests li.is-done { background: #f1f7ef; border-color: rgba(52, 160, 90, 0.4); }
.shot-quests li.is-done .shot-q-t { color: var(--muted); text-decoration: line-through; }
.shot-quests li.is-done .shot-check { background: #34a05a; border-color: #34a05a; }
.shot-quests li.is-done .shot-check::after {
    content: ""; position: absolute; left: 6px; top: 2px;
    width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.shot-kidcard { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 11px; }
.shot-kidcard-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.shot-kidcard-body strong { font-size: 0.82rem; font-weight: 700; }
.shot-bar-line { height: 8px; border-radius: 999px; background: #eadfce; overflow: hidden; }
.shot-bar-line i { display: block; height: 100%; background: var(--hero); }
.shot-bal { font-weight: 700; font-size: 0.8rem; flex: none; }

.shot-approve { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px; display: grid; gap: 9px; }
.shot-approve p { margin: 0; font-size: 0.88rem; }
.shot-approve-row { display: flex; gap: 8px; }
.shot-btn { border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 0.78rem; }
.shot-btn.ok { background: var(--hero); color: #fff; }
.shot-btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }

.shot-celebrate { align-items: center; justify-content: center; text-align: center; gap: 6px; background: radial-gradient(120% 85% at 50% 0%, #fff3e6 0%, #fbf7f0 62%); }
.shot-reward { font-size: 46px; margin-top: 8px; }
.shot-reward-t { margin: 4px 0 0; font-weight: 700; }
.shot-reward-sub { margin: 0; color: var(--muted); font-size: 0.82rem; }

@media (min-width: 760px) {
    .shots { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: start; }
    .shot-phone { max-width: 300px; }
}

/* Kurz gefragt (FAQ) */
.land-faq { width: min(760px, calc(100% - 32px)); margin: 0 auto 3.6rem; }
.land-faq h2 { margin: 0 0 1.3rem; text-align: center; text-wrap: balance; }
.land-faq-list { display: grid; gap: 0.55rem; }
.land-faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color 0.18s ease;
}
.land-faq details:hover { border-color: rgba(210, 75, 26, 0.35); }
.land-faq details[open] { border-color: rgba(210, 75, 26, 0.45); }
.land-faq summary {
    position: relative;
    display: flex; align-items: center;
    padding: 1rem 3.2rem 1rem 1.15rem;
    font-weight: 700; font-size: 1.02rem; line-height: 1.35;
    cursor: pointer; list-style: none; color: var(--ink);
    transition: background 0.15s ease;
}
.land-faq summary:hover { background: #faf5ee; }
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::before {
    content: "";
    position: absolute; right: 1rem; top: 50%;
    width: 28px; height: 28px; margin-top: -14px;
    border-radius: 50%; background: var(--wash);
    transition: background 0.18s ease;
}
.land-faq summary::after {
    content: "";
    position: absolute; right: 1.55rem; top: 50%;
    width: 8px; height: 8px; margin-top: -7px;
    border-right: 2px solid var(--hero);
    border-bottom: 2px solid var(--hero);
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.18s ease;
}
.land-faq details[open] summary::before { background: var(--hero); }
.land-faq details[open] summary::after { border-color: #fff; margin-top: -3px; transform: rotate(-135deg); }
.land-faq summary:focus-visible { outline: 3px solid var(--hero); outline-offset: 2px; border-radius: 12px; }
.land-faq details p {
    margin: 0 1.15rem;
    padding: 0.85rem 0 1.1rem;
    border-top: 1px solid var(--line);
    color: var(--muted); line-height: 1.55;
    text-wrap: pretty;
}
@media (prefers-reduced-motion: reduce) {
    .land-faq details, .land-faq summary, .land-faq summary::before, .land-faq summary::after { transition: none; }
}

/* Bild-Bühne (Abschluss) */
.land-stage {
    position: relative;
    margin: 0 auto 2rem;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #3a2a1c;
}
.land-stage > img {
    display: block;
    width: 100%;
    height: min(52vw, 460px);
    min-height: 280px;
    object-fit: cover;
    object-position: 50% 45%;
}
.land-plate {
    position: absolute;
    left: 14px; right: 14px; bottom: 14px;
    background: var(--card);
    color: var(--ink);
    border-radius: 18px;
    padding: 1rem 1.05rem;
    box-shadow: 0 10px 28px rgba(27, 23, 19, 0.16);
}
.land-plate h2 { margin: 0 0 0.3rem; }
.land-plate p { margin: 0 0 0.75rem; color: var(--muted); }
.land-plate .btn { min-height: 46px; }

.land-foot {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    gap: 0.6rem 1rem; color: var(--muted); font-size: 0.85rem; font-weight: 600;
    padding-top: 0.4rem;
}
.land-foot nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.land-foot a { font-weight: 700; text-decoration: none; }
.land-made { font-weight: 600; }
.land-made a { color: inherit; text-decoration: underline; }
.land-heart { color: var(--hero); font-weight: 700; }
@media (max-width: 640px) {
    .land-foot {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        margin-top: 0.6rem;
        padding-top: 1.3rem;
        border-top: 1px solid var(--line);
    }
    .land-foot nav {
        order: -1;
        justify-content: center;
        gap: 0.75rem 1.15rem;
    }
    .land-foot nav a { padding: 0.15rem 0; }
    .land-made { font-size: 0.82rem; line-height: 1.5; }
}

/* Dezente Bewegung */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (hover: hover) {
    .step:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27, 23, 19, 0.14); }
    .land-cta .btn-hero:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .step, .land-cta .btn-hero { transition: none; }
}
@media (max-width: 560px) {
    .land-brand { font-size: 1.2rem; gap: 0.5rem; }
    .land-brand img { width: 44px; height: 44px; }
    .land-bar { padding-top: 14px; flex-wrap: wrap; row-gap: 10px; }
    .land-bar nav {
        width: 100%;
        gap: 0.5rem;
        justify-content: space-between;
    }
    .land-bar nav a:not(.btn) { font-size: 0.95rem; padding: 0.3rem 0; }
    .land-bar .btn { padding: 0.4rem 0.85rem; }
}

.pick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}
.pick-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: 0.85rem 0.55rem 0.75rem;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
}
.pick-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pick-card:has(input:checked) { border-color: var(--hero); background: #fff6ef; }
.pick-card strong { font-size: 0.92rem; }
.pick-card em { font-style: normal; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.pick-ico { width: 44px; height: 44px; display: grid; place-items: center; }
.pick-ico img, .pick-card img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.pick-card-btn { padding: 0; border: 0; background: none; }
.pick-card-btn button {
    width: 100%;
    border: 2px solid var(--line);
    background: var(--card);
    border-radius: 16px;
    padding: 0.85rem 0.55rem 0.75rem;
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    cursor: pointer;
    color: inherit;
}
.wish-pick { margin: 0.4rem 0 1.1rem; }
.ring-label span { max-width: 7.2rem; line-height: 1.2; }
.start .lead { margin-bottom: 1rem; }

/* Onboarding: Kopf (Logo + Titel nebeneinander) und Stepper */
.onb-head {
    display: flex; align-items: center; justify-content: center;
    gap: 0.55rem; margin: 0 0 1.1rem;
}
.onb-logo { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow); flex: none; }
.onb-title {
    font-family: var(--display); font-weight: 600; font-size: 1.35rem;
    letter-spacing: -0.02em; color: var(--hero);
}
.onb-steps {
    display: flex; list-style: none; margin: 0 0 1.5rem; padding: 0;
    counter-reset: none;
}
.onb-step {
    position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    text-align: center;
}
.onb-step::before {
    content: ""; position: absolute; top: 13px; left: -50%;
    width: 100%; height: 2px; background: var(--line); z-index: 0;
}
.onb-step:first-child::before { display: none; }
.onb-step.is-done::before, .onb-step.is-current::before { background: var(--hero); }
.onb-step-dot {
    position: relative; z-index: 1;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--card); border: 2px solid var(--line);
    color: var(--muted); font-size: 0.82rem; font-weight: 700;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.onb-step-dot svg { width: 15px; height: 15px; }
.onb-step.is-done .onb-step-dot { background: var(--hero); border-color: var(--hero); color: #fff; }
.onb-step.is-current .onb-step-dot {
    background: #fff; border-color: var(--hero); color: var(--hero);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--hero) 16%, transparent);
}
.onb-step-lab { font-size: 0.68rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.onb-step.is-current .onb-step-lab { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .onb-step-dot { transition: none; } }

/* Onboarding: Kinder anlegen */
.kid-rows { display: grid; gap: 0.9rem; }
.kid-add-row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.5rem;
    align-items: end;
    padding-bottom: 0.9rem;
    border-bottom: 1px dashed var(--line);
}
.kid-add-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kid-add-row label { display: grid; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.kid-add-name { grid-column: 1 / -1; }
.kid-add-btn { justify-self: start; }

/* Onboarding: Vorschläge pro Kind */
.suggest-child {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.9rem 0.9rem 1rem;
    margin-bottom: 0.9rem;
    text-align: left;
}
.suggest-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.suggest-head strong { font-size: 1.1rem; display: block; }
.suggest-age { font-style: normal; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.suggest-label {
    margin: 0.75rem 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.pick-minus em { color: var(--bad); }
.pick-minus:has(input:checked) { border-color: var(--bad); background: #fdf1ee; }

/* Notch über .app, nicht über body — sonst hängt die Tabbar im PWA über dem unteren Rand. */
html.is-standalone .auth-back {
    display: none;
}
html.is-standalone body.mode-bare:not(.mode-legal) {
    place-items: center;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
}
html.is-standalone .app:not(.app-bare) {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
html.is-standalone {
    height: 100%;
    height: 100dvh;
    height: -webkit-fill-available;
}
html.is-standalone body {
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overscroll-behavior: none;
}
html.is-standalone .tabbar {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    padding-bottom: max(0.14rem, env(safe-area-inset-bottom, 0px));
}
html.is-standalone body.mode-parent .tabbar {
    position: static;
}
@media (min-width: 700px) {
    html.is-standalone .mode-parent .app,
    html.is-standalone .mode-kid .app,
    html.is-standalone .mode-hub .app {
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
    }
    html.is-standalone .mode-kid .kid-desk-rail {
        top: calc(16px + env(safe-area-inset-top, 0px));
    }
}

.pwa-sheet {
    position: fixed;
    inset: 0;
    z-index: 36;
    display: grid;
    align-items: end;
    background: rgba(27, 23, 19, 0.32);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
}
.pwa-sheet[hidden] { display: none !important; }
.pwa-card {
    width: min(400px, 100%);
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.25rem 1.2rem 1.1rem;
    box-shadow: var(--shadow);
    text-align: left;
}
.pwa-card-mark {
    width: 52px; height: 52px; border-radius: 14px;
    margin: 0 0 0.75rem; box-shadow: var(--shadow);
}
.pwa-card h2 { margin: 0.1em 0 0.35em; font-size: 1.35rem; }
.pwa-lead { margin: 0 0 1rem; color: var(--muted); }
.pwa-card .btn { width: 100%; }
.pwa-card-actions { margin-top: 0.85rem; text-align: center; }
.pwa-steps {
    list-style: none; padding: 0; margin: 0 0 0.2rem;
    display: grid; gap: 0.55rem;
}
.pwa-steps li {
    display: grid; grid-template-columns: 36px 1fr;
    gap: 0.7rem; align-items: center;
    font-size: 0.95rem;
}
.pwa-step-ico {
    width: 36px; height: 36px; border-radius: 10px;
    background: #efe8de; color: var(--ink);
    display: grid; place-items: center;
}
.pwa-page .pwa-card {
    background: none; border: 0; box-shadow: none;
    padding: 0; width: 100%;
}
html.is-standalone .pwa-sheet { display: none !important; }

@media (min-width: 800px) {
    .pwa-sheet { align-items: center; }
}

@media (min-width: 800px) {
    /* Bild als Hintergrund, Höhe folgt der Karte (min-height als Untergrenze) */
    .land-hero { margin: 1.6rem auto 2.6rem; min-height: min(46vw, 520px); }
    .land-hero-bg {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-position: 28% 72%;
        z-index: 0;
    }
    .land-hero::after {
        content: "";
        position: absolute; inset: 0;
        background: linear-gradient(105deg, rgba(27, 23, 19, 0.36) 0%, rgba(27, 23, 19, 0.12) 44%, rgba(27, 23, 19, 0) 72%);
        pointer-events: none;
        z-index: 1;
    }
    .land-hero-inner {
        position: relative;
        z-index: 2;
        min-height: min(46vw, 520px);
        display: grid; align-items: end; justify-items: start;
        padding: clamp(26px, 3.5vw, 44px);
    }
    .land-hero-card {
        max-width: 32rem;
        background: rgba(255, 253, 249, 0.94);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 1.9rem 2rem 2.1rem;
        box-shadow: 0 14px 40px rgba(27, 23, 19, 0.22);
    }

    .land-steps { margin-bottom: 5.5rem; }
    .land-demo { margin: 0 auto 5.5rem; }
    .land-faq { margin: 0 auto 5.5rem; }

    .steps { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }

    .land-split { grid-template-columns: 1.05fr 0.95fr; gap: 2.6rem; margin-bottom: 5.5rem; }

    .land-parent { margin-bottom: 5.5rem; }
    .land-parent h2 { max-width: 22em; }
    .land-cards { grid-template-columns: 1fr 1fr; gap: 1rem; }

    .land-why { margin-bottom: 5.5rem; }
    .land-why h2 { max-width: 22em; }

    .land-voices { margin: 0 0 5.5rem; padding: 3.6rem 0; }
    .land-voices-head { margin-bottom: 1.8rem; }
    .voice { width: 340px; margin-right: 1.4rem; }

    .land-facts { margin-bottom: 5.5rem; padding: 0.4rem 0.4rem; }
    .land-facts ul { grid-template-columns: repeat(3, 1fr); gap: 0; }
    .land-facts li {
        border-top: 0;
        border-left: 1px solid var(--line);
        padding: 0.9rem 1.5rem;
    }
    .land-facts li:first-child { border-left: 0; }

    .land-stage { margin-bottom: 4rem; }
    .land-stage > img { height: 460px; min-height: 460px; }
    .land-plate {
        left: 28px;
        right: auto;
        bottom: 28px;
        width: min(430px, 48%);
        padding: 1.3rem 1.35rem;
    }
}

.avatar-field {
    display: flex;
    align-items: center;
    gap: 0.6rem 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}
.avatar-pick {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
.avatar-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.avatar-actions[hidden] { display: none !important; }
.avatar-act {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}
.avatar-act:hover { background: #f7efe6; }
.avatar-act:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.avatar-act-ico { width: 1rem; height: 1rem; display: inline-grid; place-items: center; flex-shrink: 0; }
.avatar-act-ico svg { width: 100%; height: 100%; display: block; }
.avatar-act-danger { color: #c0392b; border-color: rgba(192, 57, 43, 0.35); }
.avatar-act-danger:hover { background: #fdecec; }
.avatar-pick-face {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--wash);
    border: 2px dashed var(--line);
    display: grid; place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 0.72rem; font-weight: 700; color: var(--muted);
    letter-spacing: 0.02em;
}
.avatar-pick-face.has-img { border-style: solid; border-color: var(--line); }
.avatar-pick-face.has-mark { border-style: solid; border-color: var(--line); background: var(--wash); }
.avatar-pick-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-pick-face.has-mark img { width: 58%; height: 58%; object-fit: contain; }
.avatar-pick-txt { font-weight: 700; line-height: 1.2; }
.avatar-pick-txt small { display: block; font-weight: 600; color: var(--muted); margin-top: 0.15rem; }

.crop-sheet {
    position: fixed; inset: 0; z-index: 40;
    display: grid; align-items: end;
    background: rgba(27, 23, 19, 0.45);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
}
.crop-sheet[hidden] { display: none !important; }
.crop-card {
    width: min(420px, 100%);
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.1rem 1.1rem 1rem;
    box-shadow: var(--shadow);
}
.crop-stage {
    width: min(280px, 100%);
    aspect-ratio: 1;
    margin: 0.7rem auto 0.9rem;
    border-radius: 50%;
    overflow: hidden;
    background: #1d1a16;
    touch-action: none;
    cursor: grab;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
}
.crop-stage canvas { width: 100%; height: 100%; display: block; }
.crop-zoom {
    display: grid; gap: 0.35rem;
    font-weight: 700; font-size: 0.85rem; color: var(--muted);
}
.crop-zoom input { width: 100%; }
.crop-card .btn { width: 100%; margin-top: 0.9rem; }
@media (min-width: 860px) {
    .crop-sheet { align-items: center; }
}

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }
.admin-body.admin-auth {
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 62%, transparent) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 74%),
        url("../art/wall-phone.webp");
    background-size: cover;
    background-position: center top;
    min-height: 100vh;
    min-height: 100dvh;
}
.admin-wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px env(safe-area-inset-bottom); }
.admin-top {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.6rem;
    padding: 1rem 0; margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.admin-brand img {
    width: 48px; height: 48px; border-radius: 12px;
    box-shadow: 0 3px 10px rgba(27, 23, 19, 0.2);
}
.admin-brand-txt span { color: var(--hero); }
.admin-brand-lg { justify-content: center; font-size: 1.7rem; margin: 0 0 0.3rem; }
.admin-brand-lg img { width: 60px; height: 60px; border-radius: 15px; }
.admin-nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.admin-nav a {
    padding: 0.4rem 0.7rem; border-radius: 999px;
    color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.is-on { background: var(--ink); color: #fff; }
.admin-logout { margin: 0; }
.admin-main { padding: 1rem 0 3rem; }
.admin-main .h1 { margin-top: 0.4rem; }

.admin-body:has(.admin-login) .admin-wrap { padding: 0; max-width: none; }
.admin-body:has(.admin-login) .admin-main { padding: 0; }
.admin-login {
    display: grid;
    justify-items: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.admin-login-card { width: min(400px, 100%); margin: 0; padding: 0.95rem 1rem; }
@media (min-width: 700px) {
    .admin-body:has(.admin-login) {
        display: grid;
        place-items: center;
        min-height: 100dvh;
    }
    .admin-body.admin-auth {
        display: grid;
        place-items: center;
        min-height: 100dvh;
        background-image:
            linear-gradient(180deg, color-mix(in srgb, var(--bg) 52%, transparent) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 75%),
            url("../art/wall-wide.webp");
        background-attachment: scroll;
    }
    .admin-login { padding: 24px 16px; }
    .admin-login-card { padding: 1.05rem 1.1rem; }
}

.admin-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.6rem; margin: 0.8rem 0 1.1rem;
}
.admin-stats > div {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 0.6rem 0.7rem; text-align: center; box-shadow: var(--shadow);
}
.admin-stats b { display: block; font-size: 1.4rem; line-height: 1.1; }
.admin-stats span { font-size: 0.78rem; color: var(--muted); }

.admin-bars {
    display: flex; align-items: flex-end; gap: 0.4rem;
    height: 160px; margin: 0.4rem 0 0.6rem; padding-top: 1.1rem;
}
.admin-bar {
    position: relative; flex: 1 1 0; min-width: 0;
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end;
}
.admin-bar-fill {
    width: 100%; max-width: 34px; border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--hero-2), var(--hero));
    min-height: 3px;
}
.admin-bar-val {
    position: absolute; top: -1.1rem; left: 0; right: 0; text-align: center;
    font-size: 0.72rem; font-weight: 700; color: var(--muted);
}
.admin-bar-lab {
    margin-top: 0.35rem; font-size: 0.66rem; color: var(--muted);
    white-space: nowrap; transform: rotate(-45deg); transform-origin: center;
}

.admin-search { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-search input[type="search"] { flex: 1; min-width: 160px; }

.admin-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 0.55rem 0.7rem; text-align: left; white-space: nowrap; }
.admin-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); border-bottom: 1px solid var(--line); }
.admin-table tbody tr { border-top: 1px solid var(--line); }
.admin-table tbody tr:first-child { border-top: none; }
.admin-table tbody tr.is-off { opacity: 0.55; }
.admin-table code { font-size: 0.85em; background: rgba(27,23,19,0.05); padding: 0.1rem 0.35rem; border-radius: 6px; }
.admin-row-actions { display: flex; gap: 0.7rem; }
.admin-row-actions form { margin: 0; }

.pill { display: inline-block; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }

.admin-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.admin-head .h1 { margin: 0.2rem 0; }
.admin-cols { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.admin-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0 0 1rem; }
.admin-dl dt { color: var(--muted); font-size: 0.85rem; }
.admin-dl dd { margin: 0; }
.admin-inline { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.5rem 0; }
.admin-inline input[type="text"], .admin-inline input[type="email"] { flex: 1; min-width: 160px; }
.admin-check { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.88rem; }
.admin-check input { width: auto; }
.admin-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.35rem; }
.admin-list li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.admin-list li:last-child { border-bottom: none; }
.admin-narrow { max-width: 420px; }
.admin-promo-form { display: grid; gap: 0.7rem; grid-template-columns: 1fr; }
.admin-promo-form .btn { justify-self: start; }
.mode-field { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.88rem; }
.mode-field-lab { color: var(--ink); }
.mode-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 999px;
    width: max-content;
}
.mode-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mode-toggle label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 0.42rem 1rem;
    margin: 0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.mode-toggle input:checked + label {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(27, 23, 19, 0.16);
}
.mode-toggle input#mode-live:checked + label {
    background: var(--bad);
    color: #fff;
    box-shadow: 0 1px 6px rgba(184, 51, 20, 0.35);
}
.mode-toggle input:focus-visible + label {
    outline: 2px solid var(--hero);
    outline-offset: 2px;
}
.admin-danger { border: 1px solid var(--bad-soft); }
.admin-danger .h2 { color: var(--bad); }
.linkish-bad { color: var(--bad); }

@media (min-width: 760px) {
    .admin-cols { grid-template-columns: 1fr 1fr; align-items: start; }
    .admin-promo-form { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
    .admin-promo-form .btn { justify-self: stretch; }
    .admin-shop-form { grid-template-columns: 1.3fr 1fr 0.55fr 0.7fr auto; }
    .admin-price-form { grid-template-columns: 1fr auto auto; align-items: end; }
}
