/* Tien – Nederlands elke dag
   Look: warmes Papier, Delfter Blau, ein Hauch Oranje. Fliesen als Leitmotiv. */

:root {
  --paper: #F3EEE3;
  --card: #FBF8F1;
  --ink: #13213A;
  --muted: #5D6577;
  --line: #E0D7C5;
  --blue: #1F4FA0;
  --blue-soft: #DCE4F3;
  --orange: #E8641A;
  --orange-soft: #FBE3D2;
  --good: #2E7D5B;
  --good-soft: #DCEEE4;
  --bad: #B83A2A;
  --bad-soft: #F6DEDA;
  --shadow: 0 1px 0 rgba(19, 33, 58, .04), 0 10px 30px -14px rgba(19, 33, 58, .28);
  --radius: 18px;
  --display: 'Bricolage Grotesque', ui-sans-serif, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --tile-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%231F4FA0' stroke-opacity='.12' stroke-width='1.1'%3E%3Cpath d='M0 7A7 7 0 0 0 7 0M33 0a7 7 0 0 0 7 7M40 33a7 7 0 0 0-7 7M7 40a7 7 0 0 0-7-7'/%3E%3Cpath d='M20 10q4.5 5 0 10q-4.5-5 0-10zM30 20q-5 4.5-10 0q5-4.5 10 0zM20 30q-4.5-5 0-10q4.5 5 0 10zM10 20q5-4.5 10 0q-5 4.5-10 0z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1522;
    --card: #162034;
    --ink: #EEE8DA;
    --muted: #9AA3B6;
    --line: #26324B;
    --blue: #86A9EC;
    --blue-soft: #1D2C4A;
    --orange: #FF8B45;
    --orange-soft: #3A2618;
    --good: #5CC596;
    --good-soft: #163428;
    --bad: #F27B65;
    --bad-soft: #3B1D1A;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 14px 34px -16px rgba(0, 0, 0, .7);
    --tile-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%2386A9EC' stroke-opacity='.09' stroke-width='1.1'%3E%3Cpath d='M0 7A7 7 0 0 0 7 0M33 0a7 7 0 0 0 7 7M40 33a7 7 0 0 0-7 7M7 40a7 7 0 0 0-7-7'/%3E%3Cpath d='M20 10q4.5 5 0 10q-4.5-5 0-10zM30 20q-5 4.5-10 0q5-4.5 10 0zM20 30q-4.5-5 0-10q4.5 5 0 10zM10 20q5-4.5 10 0q-5 4.5-10 0z'/%3E%3C/g%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 2px; border-radius: 8px; }

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 104px);
}

/* ---------- Kopf ---------- */
.top {
  position: relative;
  margin: calc(-1 * (env(safe-area-inset-top) + 18px)) -16px 0;
  padding: calc(env(safe-area-inset-top) + 26px) 20px 30px;
  background: var(--tile-bg) center / 56px 56px;
  border-bottom: 1px solid var(--line);
}
.top::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--paper));
  pointer-events: none;
}
.top > * { position: relative; z-index: 1; }
.date { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.dag {
  font-size: clamp(64px, 20vw, 104px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.045em;
  margin-top: 6px;
  font-variation-settings: 'opsz' 96;
}
.dag em { font-style: normal; color: var(--blue); }
.streak {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 14px; font-weight: 600;
  padding: 6px 12px 6px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
}
.streak i {
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--orange);
  transform: rotate(45deg);
}

.eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.section-title {
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  margin: 34px 4px 12px;
}

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.rise { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.today h2 { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.12; margin-top: 8px; }
.today .sub { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); margin-top: 2px; }

/* Die zehn Fliesen */
.tiles {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin: 20px 0 18px;
}
.tile {
  aspect-ratio: 1;
  border-radius: 5px;
  border: 1.5px solid color-mix(in srgb, var(--blue) 40%, transparent);
  color: color-mix(in srgb, var(--blue) 35%, transparent);
  display: grid; place-items: center;
}
.tile svg { width: 82%; height: 82%; }
.tile.on {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--card);
  animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.review { display: flex; align-items: center; gap: 18px; }
.review .num {
  font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  color: var(--orange); min-width: 64px; text-align: center;
}
.review .num.zero { color: var(--good); }
.review .txt { flex: 1; }
.review .txt b { display: block; font-size: 17px; }
.review .txt span { font-size: 14px; color: var(--muted); }

.stats { display: flex; gap: 10px; margin-top: 16px; }
.stat {
  flex: 1;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.stat b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }

/* Situationen */
.sit-grid { display: grid; gap: 12px; }
.sit {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.sit:active { transform: scale(.985); }
.sit .badge {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  color: var(--card);
  background: var(--c, var(--blue));
}
.sit b { display: block; font-size: 18px; letter-spacing: -.01em; }
.sit span { display: block; font-size: 14px; color: var(--muted); }
.sit .chev { margin-left: auto; color: var(--muted); width: 20px; flex: none; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700; font-size: 17px;
  text-decoration: none;
  transition: transform .12s, background .2s, opacity .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.blue { background: var(--blue); color: var(--card); }
.btn.orange { background: var(--orange); color: #fff; }
.btn.ghost { border: 1.5px solid var(--line); background: var(--card); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--line); }

.say {
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  flex: none;
  transition: transform .12s;
}
.say:active { transform: scale(.92); }
.say svg { width: 55%; height: 55%; }
.say.big { width: 64px; height: 64px; }
.say.sm { width: 38px; height: 38px; }
.say.xs { width: 32px; height: 32px; }
.say.loading { animation: pulse 1s infinite; }
.say.playing { background: var(--blue); color: var(--card); }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; max-width: 140px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none;
  font-size: 11.5px; font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--blue); }

/* ---------- Kopfzeile Unterseiten ---------- */
.head { display: flex; align-items: center; gap: 6px; margin: 0 -8px 8px; }
.head h1 { font-size: 15px; font-weight: 700; color: var(--muted); }
.page-title { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 8px 0 4px; }
.page-sub { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }

/* ---------- Lern-Session ---------- */
.session {
  max-width: 600px; margin: 0 auto;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 16px);
}
.ses-top { display: flex; align-items: center; gap: 10px; margin: 0 -8px; }
.bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.ses-count { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 44px; text-align: right; }
.ses-body { flex: 1; display: flex; flex-direction: column; padding-top: 18px; }
.ses-foot { padding-top: 14px; position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); }

.kicker { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-bottom: 12px; }

.word-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.word-card::before {
  content: '';
  position: absolute; right: -28px; top: -28px;
  width: 140px; height: 140px;
  background: var(--tile-bg) 0 0 / 70px 70px;
  opacity: .9;
  border-radius: 0 0 0 30px;
  pointer-events: none;
}
.word-head { display: flex; align-items: center; gap: 16px; position: relative; }
.w-nl {
  font-size: clamp(34px, 9.5vw, 48px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.w-extra { font-size: 14px; color: var(--muted); margin-top: 10px; }
.w-de { font-family: var(--serif); font-size: 24px; font-style: italic; margin-top: 14px; color: var(--blue); }
.example {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.ex-nl { font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.ex-de { font-family: var(--serif); font-size: 16px; font-style: italic; color: var(--muted); margin-top: 3px; }

/* Nachsprechen */
.speak { margin-top: 18px; }
.mic {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 18px 0 8px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-weight: 700; font-size: 15px;
}
.mic .dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--orange); color: #fff;
}
.mic .dot svg { width: 18px; height: 18px; }
.mic.rec { border-color: var(--orange); color: var(--orange); }
.mic.rec .dot { animation: recpulse 1.1s infinite; }
.mic.busy { opacity: .6; pointer-events: none; }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 15px;
}
.result .score { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.result .score b { font-size: 22px; letter-spacing: -.02em; }
.result.good .score { color: var(--good); }
.result.mid .score { color: var(--orange); }
.result.low .score { color: var(--bad); }
.result .heard { font-family: var(--serif); font-style: italic; color: var(--muted); margin-top: 6px; }
.result .target { font-family: var(--serif); font-size: 18px; margin-top: 6px; line-height: 1.4; }
.target .hit { color: var(--good); }
.target .miss { color: var(--bad); text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Abfrage */
.prompt { text-align: center; padding: 18px 0 8px; }
.prompt .label { font-size: 14px; color: var(--muted); font-weight: 600; }
.prompt .q { font-size: clamp(32px, 9vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin-top: 10px; overflow-wrap: anywhere; }
.prompt .q.serif { font-family: var(--serif); font-weight: 500; font-style: italic; letter-spacing: -.01em; }
.prompt .say { margin: 14px auto 0; }
.prompt .say.huge { width: 96px; height: 96px; margin-top: 18px; }
.options { display: grid; gap: 10px; margin-top: 22px; }
.opt {
  text-align: left;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 17px; font-weight: 600;
  transition: transform .1s, background .2s, border-color .2s;
}
.opt:active { transform: scale(.985); }
.opt.right { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.opt[disabled] { pointer-events: none; }
.typein {
  width: 100%;
  margin-top: 22px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 22px; font-weight: 600;
}
.typein:focus { outline: none; border-color: var(--blue); }
.typein.right { border-color: var(--good); background: var(--good-soft); }
.typein.wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  animation: rise .3s both;
}
.feedback.good { background: var(--good-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback .fb-title { font-weight: 800; font-size: 16px; }
.feedback.good .fb-title { color: var(--good); }
.feedback.bad .fb-title { color: var(--bad); }
.feedback .fb-word { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 20px; font-weight: 750; }
.feedback .fb-ex { font-family: var(--serif); font-size: 16px; margin-top: 8px; }
.feedback .fb-hint { font-size: 14px; margin-top: 6px; color: var(--muted); }

.done { text-align: center; padding-top: 6vh; }
.done .big { font-size: 84px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--blue); }
.done h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 12px; }
.done p { font-family: var(--serif); font-size: 18px; color: var(--muted); margin-top: 8px; }
.done .tiles { max-width: 360px; margin: 26px auto; }

/* ---------- Dialoge ---------- */
.scene-list { display: grid; gap: 10px; margin-top: 12px; }
.scene {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.scene .n {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--c, var(--blue)); color: var(--c, var(--blue));
  font-weight: 800;
}
.scene b { display: block; font-size: 16px; }
.scene span { display: block; font-size: 14px; color: var(--muted); }
.scene .chev { margin-left: auto; width: 18px; color: var(--muted); flex: none; }

.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 4px;
  background: var(--line);
  border-radius: 14px;
  margin: 18px 0 14px;
  position: sticky; top: calc(env(safe-area-inset-top) + 8px); z-index: 5;
}
.tabs a {
  text-align: center; text-decoration: none;
  padding: 10px 4px;
  border-radius: 11px;
  font-weight: 700; font-size: 15px;
  color: var(--muted);
}
.tabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.dialog { display: flex; flex-direction: column; gap: 10px; }
.line {
  max-width: 88%;
  padding: 12px 14px 12px;
  border-radius: 18px 18px 18px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  animation: rise .35s both;
}
.line.you {
  align-self: flex-end;
  border-radius: 18px 18px 6px 18px;
  background: var(--blue-soft);
  border-color: transparent;
}
.line.active { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
.line .who { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.line .nl { font-family: var(--serif); font-size: 18.5px; line-height: 1.35; margin-top: 3px; }
.line .de { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); margin-top: 4px; }
.hide-de .line .de { display: none; }
.controls { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.controls .btn { min-height: 46px; font-size: 15px; padding: 0 16px; }
.toggle-de { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.turn {
  margin-top: 6px;
  background: var(--card);
  border: 2px solid var(--blue);
  border-radius: 20px;
  padding: 18px;
  animation: rise .35s both;
}
.turn .eyebrow { color: var(--blue); }
.turn .hint-de { font-family: var(--serif); font-size: 20px; font-style: italic; margin-top: 8px; line-height: 1.35; }
.turn .solution { font-family: var(--serif); font-size: 19px; margin-top: 10px; display: flex; gap: 10px; align-items: flex-start; }
.turn .btn-row .btn { min-height: 46px; font-size: 15px; }

/* Live */
.live-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 54px; height: 54px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800;
  color: var(--card); background: var(--c, var(--blue));
}
.live-head b { display: block; font-size: 19px; }
.live-head span { font-size: 14px; color: var(--muted); }
.status {
  margin-left: auto;
  font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 99px;
  background: var(--line); color: var(--muted);
  white-space: nowrap;
}
.status.on { background: var(--good-soft); color: var(--good); }
.status.talk { background: var(--orange-soft); color: var(--orange); }
.live-info { font-size: 15px; color: var(--muted); margin-top: 14px; }
.live-info b { color: var(--ink); }
.transcript { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; min-height: 80px; }
.transcript .line { cursor: default; }
.live-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: calc(env(safe-area-inset-bottom) + 92px); }
.live-actions .full { grid-column: 1 / -1; }
.orb {
  width: 120px; height: 120px; margin: 26px auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--c, var(--blue)) 60%, white), var(--c, var(--blue)));
  transition: transform .3s;
}
.orb.talk { animation: breathe 1.2s ease-in-out infinite; }
.orb.listen { transform: scale(.82); opacity: .75; }
@keyframes breathe { 50% { transform: scale(1.08); } }
.notice {
  margin-top: 14px; padding: 14px 16px;
  border-radius: 14px;
  background: var(--orange-soft);
  font-size: 15px;
}

/* ---------- Wörterliste ---------- */
.search {
  width: 100%; min-height: 48px; padding: 0 16px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--card);
  margin-top: 16px; font-size: 16px;
}
.search:focus { outline: none; border-color: var(--blue); }
.wl-day { margin-top: 26px; }
.wl-day h3 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.wl {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.wl .t { flex: 1; min-width: 0; }
.wl b { display: block; font-size: 17px; }
.wl span { display: block; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; }
.lvl { display: flex; gap: 3px; flex: none; }
.lvl i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); }
.lvl i.on { background: var(--blue); }
.lvl.due i.on { background: var(--orange); }
.locked { opacity: .55; }
.locked .wl-theme { padding: 10px 4px; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; font-size: 15px; }

/* ---------- Einstellungen ---------- */
.set-group { margin-top: 26px; }
.set-group h3 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.set {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 8px;
}
.set .t { flex: 1; }
.set .t b { display: block; font-size: 16px; }
.set .t span { display: block; font-size: 14px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.seg button {
  padding: 10px 16px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--card);
  font-weight: 700; font-size: 15px;
}
.seg button.on { background: var(--blue); border-color: var(--blue); color: var(--card); }
.small { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--tile-bg) center / 56px 56px; }
.login form { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 22px; box-shadow: var(--shadow); }
.login h1 { font-size: 56px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.login p { color: var(--muted); margin-top: 6px; }
.login input { width: 100%; min-height: 52px; margin: 22px 0 12px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); font-size: 17px; }
.login .err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 0 0 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0;
  max-width: min(92vw, 520px);
  padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  transition: opacity .25s, transform .25s;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }

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