/* Starlingo – Webseite
   Layout: Nachthimmel-Bänder (wie das App-Menü) wechseln sich mit Papier-Bändern ab;
   Inhalte liegen auf ausgeschnittenen Papierkarten. Farben aus docs/stilbibel.md. */
:root {
  --night: #1c2452;
  --night-2: #2a3670;
  --night-ink: #f8eedb;
  --night-muted: #c9c3d8;
  --honey: #f2c14b;
  --honey-deep: #d99a1e;
  --honey-ink: #3b2a10;
  --page: #f8f0e0;
  --paper: #fffaf0;
  --paper-2: #f3e7cf;
  --ink: #3a2a1c;
  --muted: #76624c;
  --line: rgba(58, 42, 28, .14);
  --sage: #8ba886;
  --sage-soft: #e3ebdc;
  --dove: #7a96b8;
  --dove-soft: #e1e8f1;
  --terra: #c4674a;
  --terra-soft: #f6e0d6;
  --ok: #4f8a5b;
  --danger: #b4483a;
  --shadow: 0 1px 0 rgba(58, 42, 28, .06), 0 10px 30px -14px rgba(58, 42, 28, .35);
  --f-display: "Fredoka", "Baloo 2", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --f-body: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-card: 22px;
  --r-pill: 999px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #141933; --paper: #1f2648; --paper-2: #283158; --ink: #f6ecd8; --muted: #c4b89f;
    --line: rgba(246, 236, 216, .14); --sage-soft: #26372f; --dove-soft: #243250; --terra-soft: #3d2622;
    --ok: #8cc79a; --danger: #f08a7a;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 14px 34px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #141933; --paper: #1f2648; --paper-2: #283158; --ink: #f6ecd8; --muted: #c4b89f;
  --line: rgba(246, 236, 216, .14); --sage-soft: #26372f; --dove-soft: #243250; --terra-soft: #3d2622;
  --ok: #8cc79a; --danger: #f08a7a;
  --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 14px 34px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow { font-family: var(--f-display); font-weight: 500; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--honey-deep); }
.night .eyebrow { color: var(--honey); }
.lead { font-size: 1.2rem; max-width: 34em; color: var(--muted); }
.night .lead { color: var(--night-muted); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--honey); color: var(--honey-ink); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; line-height: 1;
  padding: .95em 1.4em; border-radius: var(--r-pill); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
  background: var(--honey); color: var(--honey-ink); box-shadow: 0 4px 0 var(--honey-deep);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--honey-deep); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn.quiet { background: var(--paper-2); color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn.small { font-size: .95rem; padding: .7em 1.1em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.store {
  display: inline-flex; align-items: center; gap: .7em; padding: .6em 1.15em .6em .95em;
  border-radius: 14px; background: #0f1430; color: #fff; text-decoration: none; border: 1.5px solid rgba(255,255,255,.22);
  font-family: var(--f-body); line-height: 1.15;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .72rem; opacity: .75; }
.store b { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.store[aria-disabled="true"] { cursor: default; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--night); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--night) 92%, transparent); backdrop-filter: blur(10px);
  color: var(--night-ink); border-bottom: 1px solid rgba(255,255,255,.08);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 38px; height: 38px; flex: none; }
.word { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -.01em; line-height: 1; }
.word .s { color: var(--honey); }
.word .l { color: var(--night-ink); }
.top nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.top nav a { white-space: nowrap; text-decoration: none; padding: .5em .8em; border-radius: 10px; font-weight: 700; font-size: .98rem; color: var(--night-muted); }
.top nav a:hover { color: var(--night-ink); background: rgba(255,255,255,.07); }
.top .actions { display: flex; gap: 10px; align-items: center; }
.lang { position: relative; }
.lang select {
  appearance: none; -webkit-appearance: none; font: inherit; font-weight: 700; font-size: .92rem;
  color: var(--night-ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-pill); padding: .45em 2em .45em .9em; cursor: pointer; color-scheme: dark;
}
.lang::after { content: ""; position: absolute; right: .85em; top: 50%; width: 7px; height: 7px; border: solid var(--night-muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.top .btn { font-size: .95rem; padding: .62em 1.05em; box-shadow: 0 3px 0 var(--honey-deep); }
.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-btn svg { width: 28px; height: 28px; }
@media (max-width: 1040px) {
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid rgba(255,255,255,.1); }
  .top nav.open { display: flex; }
  .top nav a { padding: .8em .6em; font-size: 1.05rem; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .top .actions .btn { display: none; }
}

/* ---------- Night bands ---------- */
.night { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; isolation: isolate; }
.night canvas.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.night::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; z-index: -1; background: linear-gradient(to bottom, transparent, rgba(42,54,112,.65)); pointer-events: none; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
.hero h1 { margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--honey); }
.hero .lead { margin-top: 18px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { margin-top: 14px; font-size: .95rem; color: var(--night-muted); }
.hero .note b { color: var(--night-ink); }
.tablet {
  position: relative; border-radius: 28px; padding: 12px; background: #0d1128;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.12) inset, 0 30px 60px -20px rgba(0,0,0,.6), 0 0 90px -10px rgba(242,193,75,.28);
  transform: rotate(-1.2deg);
}
.tablet img { border-radius: 18px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tablet .cam { position: absolute; left: 50%; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: #2b3157; transform: translateX(-50%); }
.hero .tag {
  position: absolute; left: -14px; bottom: -22px; background: var(--paper); color: var(--ink); border-radius: 16px;
  padding: 10px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); transform: rotate(2deg); max-width: 260px;
  font-size: .92rem; line-height: 1.3;
}
.hero .tag img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--honey); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .tag { left: 8px; }
}

/* Fact strip */
.facts { background: var(--night-2); color: var(--night-ink); }
.facts ul { list-style: none; margin-block: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 26px; padding-block: 18px; }
.facts li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .98rem; }
.facts svg { width: 22px; height: 22px; color: var(--honey); flex: none; }

/* ---------- Paper sections ---------- */
section.band { padding-block: clamp(56px, 8vw, 104px); }
.band.alt { background: var(--paper-2); }
.head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.head.center { margin-inline: auto; text-align: center; justify-items: center; }
.card { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); }

/* Steps of an episode */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { padding: 26px; display: grid; gap: 10px; align-content: start; }
.step .n { font-family: var(--f-display); font-weight: 600; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--honey); color: var(--honey-ink); font-size: 1.15rem; }
.step p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.gestures { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: .5em 1em; border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--shadow); font-weight: 700; font-size: .95rem; }
.chip svg { width: 20px; height: 20px; color: var(--honey-deep); }
.chip.off { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); color: var(--muted); }

/* Episodes */
.episodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.ep { overflow: hidden; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; padding: 22px; align-items: center; }
.ep .ring { width: 170px; height: 170px; border-radius: 50%; padding: 7px; background: radial-gradient(circle, var(--honey) 0 68%, #f9e3a3 69% 100%); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--honey); }
.ep .ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ep .no { font-family: var(--f-display); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; color: var(--honey-deep); }
.ep h3 { margin: 4px 0 8px; }
.ep p { color: var(--muted); font-size: 1rem; }
.words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.words span { font-size: .85rem; font-weight: 700; padding: .2em .7em; border-radius: var(--r-pill); background: var(--sage-soft); }
@media (max-width: 980px) { .episodes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ep { grid-template-columns: minmax(0, 1fr); justify-items: start; } .ep .ring { width: 140px; height: 140px; } }

/* Principles */
.nos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.no-item { padding: 22px 22px 24px; display: grid; gap: 8px; align-content: start; }
.no-item h3 { font-size: 1.15rem; display: flex; gap: 10px; align-items: center; }
.no-item h3 svg { width: 26px; height: 26px; flex: none; color: var(--terra); }
.no-item p { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .nos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nos { grid-template-columns: minmax(0, 1fr); } }

/* Families */
.families { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.family { padding: 30px; display: grid; gap: 12px; align-content: start; position: relative; overflow: hidden; }
.family .flag { font-family: var(--f-display); font-weight: 600; font-size: 1rem; display: inline-flex; gap: 8px; align-items: center; padding: .35em .9em; border-radius: var(--r-pill); width: fit-content; }
.family.en .flag { background: var(--dove-soft); }
.family.de .flag { background: var(--terra-soft); }
.family p { color: var(--muted); }
.family ul { margin: 4px 0 0; padding-left: 1.2em; color: var(--muted); }
.family li + li { margin-top: 4px; }
@media (max-width: 820px) { .families { grid-template-columns: minmax(0, 1fr); } }

/* Boxes (Wörterkiste / Spielkiste) */
.boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.box { overflow: hidden; }
.box img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.box .t { padding: 20px 24px 24px; display: grid; gap: 6px; }
.box p { color: var(--muted); font-size: 1rem; }
@media (max-width: 820px) { .boxes { grid-template-columns: minmax(0, 1fr); } }

/* Cast */
.cast { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cast .pic { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.cast .pic img { width: 100%; aspect-ratio: 40 / 17; object-fit: cover; }
.cast dl { margin: 18px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; }
.cast dt { font-family: var(--f-display); font-weight: 600; }
.cast dd { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .cast { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plan { padding: 28px; display: grid; gap: 14px; align-content: start; position: relative; border: 2px solid transparent; }
.plan.best { border-color: var(--honey); }
.plan .badge { position: absolute; top: -14px; left: 24px; background: var(--honey); color: var(--honey-ink); font-family: var(--f-display); font-weight: 600; font-size: .85rem; padding: .3em .9em; border-radius: var(--r-pill); }
.plan .name { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; }
.price { font-family: var(--f-display); font-weight: 600; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--f-body); font-weight: 700; font-size: 1rem; color: var(--muted); }
.plan .sub { color: var(--muted); font-size: .95rem; min-height: 1.6em; }
.ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; }
.ticks svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 3px; }
.plans-note { margin-top: 22px; color: var(--muted); font-size: .95rem; text-align: center; max-width: 52rem; margin-inline: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 52rem; margin-inline: auto; }
.faq details { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--honey-deep); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }

/* Closing night band */
.closing .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.closing .moon { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px rgba(242,193,75,.25), 0 0 80px rgba(242,193,75,.35); }
.closing .moon img { width: 100%; height: 100%; object-fit: cover; }
.closing .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 700px) { .closing .wrap { grid-template-columns: minmax(0, 1fr); } .closing .moon { width: 120px; height: 120px; } }

/* Footer */
footer.foot { background: var(--night); color: var(--night-muted); font-size: .95rem; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px; padding-block: 44px 34px; }
.foot h4 { font-family: var(--f-display); font-weight: 600; color: var(--night-ink); margin: 0 0 10px; font-size: 1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--night-ink); text-decoration: underline; }
.foot .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .88rem; }
@media (max-width: 720px) { .foot .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Preview banner (only until backend is connected) */
.demo-bar { background: var(--terra-soft); color: var(--ink); font-size: .92rem; }
.demo-bar .wrap { display: flex; gap: 10px; align-items: center; padding-block: 9px; }
.demo-bar b { font-family: var(--f-display); font-weight: 600; }

/* ---------- Account pages ---------- */
.auth { min-height: calc(100vh - 68px); }
.auth .wrap { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding-block: clamp(36px, 7vw, 80px); }
.auth-card { width: 100%; max-width: 460px; padding: clamp(24px, 5vw, 38px); display: grid; gap: 18px; color: var(--ink); }
.auth-card h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); }
.auth-card .sub { color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: .95rem; }
.field input[type="email"], .field input[type="text"], .field select {
  font: inherit; font-size: 1.05rem; padding: .8em 1em; border-radius: 14px; border: 2px solid var(--line);
  background: var(--page); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 4px color-mix(in srgb, var(--honey) 30%, transparent); }
.field .hint { font-size: .88rem; color: var(--muted); }
.field .err { font-size: .9rem; color: var(--danger); font-weight: 700; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--honey-deep); flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.sso { display: grid; gap: 10px; }
.sso .btn { width: 100%; }
.btn.apple { background: #111; color: #fff; box-shadow: none; }
.btn.google { background: var(--paper); color: var(--ink); box-shadow: none; border-color: var(--line); }
.auth-card .swap { text-align: center; font-size: .97rem; color: var(--muted); }
.auth-card .swap a, .linkbtn { color: var(--ink); font-weight: 800; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--honey); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.mail-art { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--honey); color: var(--honey-ink); margin-inline: auto; }
.mail-art svg { width: 44px; height: 44px; }

.acct { padding-block: clamp(28px, 5vw, 56px) 80px; }
.acct .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); display: grid; gap: 4px; }
.side .who { display: flex; gap: 12px; align-items: center; padding: 6px 6px 16px; }
.side .who .av { width: 44px; height: 44px; border-radius: 50%; background: var(--honey); display: grid; place-items: center; color: var(--honey-ink); font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; flex: none; }
.side .who small { display: block; color: var(--muted); font-size: .85rem; word-break: break-all; }
.side button.tab { text-align: left; font: inherit; font-weight: 800; font-size: 1rem; color: var(--muted); background: none; border: 0; padding: .7em .9em; border-radius: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.side button.tab svg { width: 20px; height: 20px; flex: none; }
.side button.tab:hover { background: var(--paper-2); color: var(--ink); }
.side button.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.side .out { margin-top: 12px; }
.panel { display: grid; gap: 22px; }
.panel > h1 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); }
.panel .intro { color: var(--muted); margin-top: -10px; }
.pcard { padding: 24px 26px; display: grid; gap: 14px; }
.pcard h2 { font-size: 1.25rem; }
.pcard .row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.pcard .muted { color: var(--muted); font-size: .97rem; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; padding: .25em .8em; border-radius: var(--r-pill); }
.pill.ok { background: var(--sage-soft); color: var(--ok); }
.pill.info { background: var(--dove-soft); }
.pill.warn { background: var(--terra-soft); color: var(--danger); }
.example { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r-pill); padding: .15em .7em; }
.choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; }
.opt label { display: grid; gap: 4px; padding: 18px; border-radius: 16px; border: 2px solid var(--line); cursor: pointer; background: var(--page); }
.opt input:checked + label { border-color: var(--honey); box-shadow: 0 0 0 4px color-mix(in srgb, var(--honey) 25%, transparent); }
.opt input:focus-visible + label { outline: 3px solid var(--honey); outline-offset: 3px; }
.opt .p { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.opt small { color: var(--muted); }
@media (max-width: 560px) { .choose { grid-template-columns: minmax(0, 1fr); } }
.kids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kid { padding: 20px; border-radius: 18px; background: var(--page); border: 1.5px solid var(--line); display: grid; gap: 12px; }
.kid .top-row { display: flex; gap: 12px; align-items: center; }
.kid .disc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.kid .disc svg { width: 28px; height: 28px; color: #fff; }
.kid h3 { font-size: 1.1rem; }
.bar { height: 10px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--honey); border-radius: 6px; }
.kid .stat { display: flex; justify-content: space-between; font-size: .92rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .kids { grid-template-columns: minmax(0, 1fr); } }
.devices { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.devices li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--page); border: 1.5px solid var(--line); flex-wrap: wrap; }
.devices svg { width: 28px; height: 28px; color: var(--dove); flex: none; }
.devices .d { flex: 1; min-width: 160px; }
.devices small { display: block; color: var(--muted); }
.switch { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--paper-2); border: 1.5px solid var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked { background: var(--honey); border-color: var(--honey-deep); }
.switch input:checked::after { transform: translateX(20px); }
.confirm { border: 2px solid var(--danger); border-radius: 16px; padding: 18px; display: grid; gap: 12px; background: var(--terra-soft); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--night); color: var(--night-ink); padding: 12px 20px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .25s, transform .25s; z-index: 40; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) {
  .acct .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .side .who, .side .out { display: none; }
}

/* Legal pages */
.legal .wrap { max-width: 820px; padding-block: clamp(36px, 6vw, 72px) 80px; display: grid; gap: 18px; }
.legal h2 { font-size: 1.5rem; margin-top: 18px; }
.legal p, .legal li { color: var(--muted); }
.legal .ph { background: var(--terra-soft); color: var(--ink); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.legal nav.toc { display: flex; flex-wrap: wrap; gap: 8px; }

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