/* ==========================================================================
   DeutschWeg – styles
   ========================================================================== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e2e5ef;
  --text: #1c2030;
  --muted: #646b82;
  --primary: #3b5bdb;
  --primary-2: #5c7cfa;
  --primary-soft: #e7ecff;
  --ok: #2b9348;
  --ok-soft: #e3f6e8;
  --bad: #d6336c;
  --bad-soft: #fde7ef;
  --warn: #e8890c;
  --warn-soft: #fff3df;
  --der: #1c7ed6;
  --die: #d6336c;
  --das: #2b9348;
  --A2: #20a4a4;
  --B1: #3b5bdb;
  --B2: #7048e8;
  --C1: #c2255c;
  --C2: #e8590c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 4px 16px rgba(20, 24, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-w: 220px;
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141c; --surface: #1b1e29; --surface-2: #242838; --border: #2f3446;
    --text: #e8eaf2; --muted: #9aa1b8; --primary: #748ffc; --primary-2: #91a7ff; --primary-soft: #262d4d;
    --ok: #51cf66; --ok-soft: #1e3326; --bad: #f06595; --bad-soft: #3b1e2a; --warn: #ffa94d; --warn-soft: #3a2c18;
    --der: #4dabf7; --die: #f06595; --das: #51cf66;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141c; --surface: #1b1e29; --surface-2: #242838; --border: #2f3446;
  --text: #e8eaf2; --muted: #9aa1b8; --primary: #748ffc; --primary-2: #91a7ff; --primary-soft: #262d4d;
  --ok: #51cf66; --ok-soft: #1e3326; --bad: #f06595; --bad-soft: #3b1e2a; --warn: #ffa94d; --warn-soft: #3a2c18;
  --der: #4dabf7; --die: #f06595; --das: #51cf66;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
kbd { font-family: ui-monospace, monospace; font-size: .8em; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.flag { display: inline-flex; flex-direction: column; width: 22px; height: 16px; border-radius: 3px; overflow: hidden; }
.flag i { flex: 1; } .flag i:nth-child(1){background:#222} .flag i:nth-child(2){background:#dd0000} .flag i:nth-child(3){background:#ffcc00}
.top-stats { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.goal { position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; }
.goal svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.goal circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .5s; }
.goal b { font-size: .7rem; position: relative; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { background: var(--surface-2); }

.nav {
  position: fixed; top: var(--top-h); left: 0; bottom: 0; width: var(--nav-w); z-index: 20;
  padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 650; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav .ni { font-size: 1.2rem; width: 24px; text-align: center; }
.badge { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; font-style: normal; font-weight: 800; text-align: center; line-height: 20px; }

main { padding: calc(var(--top-h) + 24px) 24px 48px calc(var(--nav-w) + 24px); max-width: calc(var(--nav-w) + 1000px); outline: none; }
body.focus .nav { display: none; }
.app-footer { padding: 0 24px 32px calc(var(--nav-w) + 24px); max-width: calc(var(--nav-w) + 1000px); color: var(--muted); font-size: .8rem; }
.app-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.app-footer a:hover { color: var(--primary); }
body.focus .app-footer { display: none; }
body.focus main { padding-left: 24px; max-width: 760px; margin: 0 auto; }

@media (max-width: 820px) {
  .nav { top: auto; right: 0; width: auto; height: 64px; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); }
  .nav a { flex-direction: column; gap: 0; padding: 4px 6px; font-size: .68rem; flex: 1; text-align: center; }
  .nav .badge { position: absolute; top: 0; right: 18%; margin: 0; font-size: .65rem; line-height: 16px; min-width: 16px; }
  main { padding: calc(var(--top-h) + 16px) 16px 24px 16px; }
  .app-footer { padding: 0 16px 88px; } /* clears the fixed bottom navigation */
  body.focus main { padding: calc(var(--top-h) + 12px) 16px 140px; }
  .brand span:last-child { display: none; }
  h1 { font-size: 1.35rem; }
  .nav a { padding: 4px 2px; min-width: 0; font-size: .62rem; }
  .level-head { flex-wrap: wrap; }
  .level-head > div:last-child { width: 100%; text-align: left !important; }
  .level-head > div:last-child .progress { width: 100%; }
}

/* ---------- Generic components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-weight: 750; letter-spacing: .01em; background: var(--surface-2); color: var(--text);
  transition: transform .06s, background .15s, box-shadow .15s; user-select: none;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.btn.ok { background: var(--ok); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.btn.bad { background: var(--bad); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.small { padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--surface-2); color: var(--muted); }
.lvl { color: #fff !important; }
.lvl-A2 { background: var(--A2); } .lvl-B1 { background: var(--B1); } .lvl-B2 { background: var(--B2); } .lvl-C1 { background: var(--C1); } .lvl-C2 { background: var(--C2); }

.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 999px; transition: width .35s; }
.progress.ok > span { background: var(--ok); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 650; transition: .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

input[type=text], input[type=search], input[type=number], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
label.field { display: block; font-weight: 650; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; }

.speak { border: 0; background: var(--primary-soft); color: var(--primary); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; flex: none; font-size: 1rem; vertical-align: middle; }
.speak:hover { filter: brightness(.95); }
.speak.big { width: 64px; height: 64px; font-size: 1.7rem; }
.say { cursor: pointer; border-bottom: 1px dashed transparent; }
.say:hover { border-bottom-color: var(--primary); }

.g-der { color: var(--der); } .g-die { color: var(--die); } .g-das { color: var(--das); }
.art { font-weight: 800; }

/* ---------- Path ---------- */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(135deg, var(--primary), #7048e8); color: #fff; border: 0;
}
.hero h1, .hero p { color: #fff; } .hero p { opacity: .9; margin: 0; }
.hero .btn { background: #fff; color: var(--primary); }
.hero .kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; opacity: .85; }
@media (max-width: 600px) { .hero { grid-template-columns: 1fr; } }

.level-block { margin-top: 32px; }
.level-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.level-badge { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.2rem; flex: none; }
.level-head h2 { margin: 0; }
.level-head .progress { width: 160px; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.unit-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--border); color: var(--text); cursor: pointer; transition: transform .1s, border-color .15s; text-align: left; }
.unit-card:hover { transform: translateY(-2px); border-color: var(--primary-2); }
.unit-card .num { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.unit-card h3 { margin: 0; font-size: 1.02rem; }
.unit-card .topic { font-size: .88rem; color: var(--muted); }
.unit-card.locked { opacity: .55; }
.unit-card.locked:hover { border-color: var(--border); }
.unit-card.done { border-color: var(--ok); }
.unit-card.current { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.unit-card .state { position: absolute; top: 12px; right: 12px; font-size: 1.1rem; }
.pips { display: flex; gap: 4px; margin-top: auto; }
.pips i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.pips i.on { background: var(--ok); }
.exam-card { border-style: dashed; justify-content: center; align-items: center; text-align: center; }

/* ---------- Unit ---------- */
.unit-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 650; margin-bottom: 12px; }
.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.act { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--border); cursor: pointer; text-align: left; transition: transform .1s, border-color .15s; }
.act:hover { transform: translateY(-2px); border-color: var(--primary-2); }
.act .ai { font-size: 1.8rem; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.act b { display: block; }
.act small { display: block; }
.act.done { border-color: var(--ok); }
.act.done .ai { background: var(--ok-soft); }
.act.next { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---------- Grammar / reading content ---------- */
.prose { font-size: 1.02rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0 18px; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; } .prose li { margin-bottom: .35em; }
.prose em.hl, .hl { font-style: normal; background: var(--warn-soft); color: var(--text); padding: 0 3px; border-radius: 4px; font-weight: 650; }
.examples { display: grid; gap: 8px; margin: 12px 0; }
.example { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.example div { flex: 1; } .example small { display: block; }
.tip { padding: 12px 14px; border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: 0 12px 12px 0; margin: 14px 0; }
.vocab-list { display: grid; gap: 8px; }
.vocab-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.vocab-item .w { font-weight: 750; }
.vocab-item .ex { font-size: .88rem; color: var(--muted); }
.vocab-item > div { flex: 1; min-width: 0; }
.reading-text p { font-size: 1.1rem; line-height: 1.8; }
.reading-text .sent { cursor: pointer; border-radius: 4px; transition: background .15s; }
.reading-text .sent:hover { background: var(--primary-soft); }
.reading-text .sent.playing { background: var(--warn-soft); }
.gloss { border-bottom: 2px dotted var(--primary-2); cursor: help; }

/* ---------- Session / exercises ---------- */
.session-top { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.session-top .progress { flex: 1; height: 14px; }
.session-top .x { font-size: 1.4rem; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 4px 8px; }
.session-top .combo { font-weight: 800; color: var(--warn); min-width: 46px; text-align: right; }
.ex-kind { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.ex-q { font-size: 1.35rem; font-weight: 700; margin-bottom: 18px; line-height: 1.4; }
.ex-q .gap { display: inline-block; min-width: 70px; border-bottom: 3px solid var(--primary); margin: 0 4px; }
.ex-sub { color: var(--muted); margin: -10px 0 18px; }
.choices { display: grid; gap: 10px; }
.choices.cols { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); text-align: left; font-size: 1.05rem; font-weight: 600;
}
.choice:hover { border-color: var(--primary-2); }
.choice .k { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border); display: grid; place-items: center; font-size: .8rem; color: var(--muted); flex: none; }
.choice.sel { border-color: var(--primary); background: var(--primary-soft); }
.choice.right { border-color: var(--ok); background: var(--ok-soft); }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice:disabled { cursor: default; }
.gender-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gender-choices .choice { justify-content: center; font-size: 1.4rem; font-weight: 800; }
.gender-choices .choice[data-g=der] { color: var(--der); } .gender-choices .choice[data-g=die] { color: var(--die); } .gender-choices .choice[data-g=das] { color: var(--das); }
.big-word { font-size: 2rem; font-weight: 800; text-align: center; margin: 10px 0 24px; }

.answer-row { display: flex; gap: 10px; }
.answer-row input { font-size: 1.15rem; }
.answer-row input.right { border-color: var(--ok); background: var(--ok-soft); }
.answer-row input.wrong { border-color: var(--bad); background: var(--bad-soft); }
.umlauts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.umlauts button { width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 1rem; }
.umlauts button:hover { background: var(--surface-2); }

.tiles-answer { min-height: 64px; padding: 10px; border-bottom: 2px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; margin-bottom: 18px; }
.tiles-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 52px; }
.tile { padding: 9px 14px; border-radius: 12px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); cursor: pointer; font-size: 1.05rem; font-weight: 650; }
.tile:hover { border-color: var(--primary-2); }
.tile.used { visibility: hidden; }

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-grid .choice { justify-content: center; text-align: center; font-size: .98rem; min-height: 56px; }
.match-grid .choice.gone { opacity: .25; pointer-events: none; }

.flash { text-align: center; padding: 28px 20px; }
.flash .de { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.flash .en { font-size: 1.2rem; color: var(--muted); margin-bottom: 16px; }
.flash .ex { font-size: 1.05rem; padding: 12px; background: var(--surface-2); border-radius: 12px; display: inline-flex; gap: 10px; align-items: center; }
.new-tag { display: inline-block; background: var(--warn); color: #fff; font-weight: 800; font-size: .72rem; padding: 2px 8px; border-radius: 6px; letter-spacing: .06em; margin-bottom: 12px; }

.listen-box { display: flex; justify-content: center; gap: 14px; margin: 6px 0 22px; }
.mic-btn { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 2rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.mic-btn.rec { background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(214, 51, 108, .2); } }
.heard { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); min-height: 48px; }
.word-ok { color: var(--ok); font-weight: 700; } .word-miss { color: var(--bad); text-decoration: underline wavy; }

.feedback {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 2px solid var(--border); transform: translateY(100%); transition: transform .2s;
}
.feedback.show { transform: translateY(0); }
.feedback .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; }
.feedback .msg { flex: 1; min-width: 0; }
.feedback .msg b { font-size: 1.15rem; display: block; }
.feedback .msg .sol { font-weight: 650; }
.feedback .msg .why { font-size: .92rem; color: var(--muted); margin-top: 4px; }
.feedback.right { background: var(--ok-soft); border-color: var(--ok); } .feedback.right b { color: var(--ok); }
.feedback.wrong { background: var(--bad-soft); border-color: var(--bad); } .feedback.wrong b { color: var(--bad); }
.feedback.typo { background: var(--warn-soft); border-color: var(--warn); } .feedback.typo b { color: var(--warn); }
.feedback .override { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .82rem; padding: 0; margin-top: 4px; }
.check-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.check-bar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
body.focus main { padding-bottom: 140px; }
@media (max-width: 600px) { .feedback .inner { flex-direction: column; align-items: stretch; } }

.result { text-align: center; padding: 30px 16px; }
.result .big { font-size: 4rem; }
.result-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.result-stats div { padding: 14px 20px; border-radius: 14px; border: 2px solid var(--border); min-width: 110px; }
.result-stats b { display: block; font-size: 1.6rem; }

/* ---------- Writing ---------- */
.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: .75rem; flex: none; }
.checklist li.met .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.model { white-space: pre-wrap; background: var(--surface-2); padding: 14px; border-radius: 12px; line-height: 1.7; }

/* ---------- Stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.kpi b { display: block; font-size: 1.7rem; }
.kpi span { color: var(--muted); font-size: .88rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .bar i { width: 100%; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar i.met { background: var(--ok); }
.bars .bar small { font-size: .68rem; }
.skill-row { display: grid; grid-template-columns: 120px 1fr 48px; gap: 10px; align-items: center; margin: 8px 0; }

/* ---------- Library ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
details.acc { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
details.acc > summary { padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none; display: flex; gap: 10px; align-items: center; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
details.acc[open] > summary::after { content: "▴"; }
details.acc > .acc-body { padding: 0 16px 16px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); flex: none; border: 1px solid var(--border); }
.status-dot.learning { background: var(--warn); border-color: var(--warn); }
.status-dot.known { background: var(--ok); border-color: var(--ok); }

/* ---------- Onboarding ---------- */
.onboard { max-width: 640px; margin: 20px auto; text-align: center; }
.onboard .big { font-size: 3.5rem; }
.option-cards { display: grid; gap: 12px; text-align: left; margin: 20px 0; }
.option-cards .choice small { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; }

.empty { text-align: center; padding: 36px 16px; }
.empty .big { font-size: 3rem; }

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

/* ==========================================================================
   Boosters: quick start, bounties, trophies, dashboard
   ========================================================================== */
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.chip.quest { color: var(--text); }
.chip.quest:hover { background: var(--primary-soft); }
.nav a.nav-quick .ni { filter: saturate(1.4); }

/* Quick strip on the home screen */
.quick-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.quick-chip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; min-height: 64px; }
.quick-chip:hover { border-color: var(--primary-2); }
.quick-chip:active { transform: translateY(1px); }
.quick-chip .qi { font-size: 1.5rem; flex: none; }
.quick-chip b { display: block; font-size: .95rem; line-height: 1.2; }
.quick-chip small { display: block; font-size: .78rem; }
.quick-chip.more .qi { color: var(--muted); }
@media (max-width: 700px) {
  .quick-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-chip { padding: 10px; gap: 8px; min-width: 0; }
  .quick-chip .qi { font-size: 1.3rem; }
  .quick-chip b { font-size: .88rem; hyphens: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-4 > .card { padding: 14px; }
  .grid-4 h2 { font-size: 1.1rem; }
}

/* Schnellstart grid: big thumb-friendly tiles */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.quick-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; min-height: 132px; border-radius: var(--radius); border: 2px solid var(--border); border-bottom-width: 4px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.quick-tile:hover { border-color: var(--primary-2); }
.quick-tile:active { transform: translateY(1px); }
.quick-tile:disabled { opacity: .45; cursor: not-allowed; }
.quick-tile .qi { font-size: 1.9rem; margin-bottom: 4px; }
.quick-tile b { font-size: 1.05rem; }
.quick-tile small { color: var(--primary); font-weight: 700; }
.quick-tile .qd { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.quick-tile.hot { background: linear-gradient(135deg, var(--primary), #7048e8); border-color: transparent; color: #fff; }
.quick-tile.hot small, .quick-tile.hot .qd { color: rgba(255,255,255,.88); }
@media (max-width: 520px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick-tile { min-height: 118px; padding: 14px 12px; }
  .quick-tile .qd { display: none; }
}

/* Bounties */
.quest-mini { display: block; color: var(--text); }
.quest-mini:hover { border-color: var(--primary-2); }
.qdots { display: flex; gap: 6px; }
.qdots i { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); }
.qdots i.on { background: var(--ok); }
.quests { display: grid; gap: 10px; margin-top: 12px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.quest .qicon { font-size: 1.5rem; width: 34px; text-align: center; flex: none; }
.quest .qbody { flex: 1; min-width: 0; }
.quest .qbody b { display: block; font-size: .95rem; margin-bottom: 6px; }
.quest .qbody small { font-size: .75rem; }
.quest .progress { height: 8px; background: var(--surface); }
.quest .qrw { font-weight: 800; color: var(--primary); font-size: .85rem; white-space: nowrap; }
.quest.done { background: var(--ok-soft); }
.quest.done .qrw { color: var(--ok); }
.chest { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 2px dashed var(--border); color: var(--muted); font-size: .9rem; }
.chest span:first-child { font-size: 1.4rem; }
.chest.open { border-style: solid; border-color: var(--ok); color: var(--text); background: var(--ok-soft); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); opacity: .5; }
.badge-card .bi { font-size: 2rem; filter: grayscale(1); }
.badge-card b { font-size: .92rem; }
.badge-card small { font-size: .78rem; }
.badge-card.got { opacity: 1; border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.badge-card.got .bi { filter: none; }

.pretest { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-left: 4px solid var(--primary); margin-bottom: 16px; }
@media (max-width: 600px) { .pretest { flex-direction: column; align-items: stretch; } }

/* Timed sessions */
.session-top .timer { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }
.session-top .timer.low { color: var(--bad); }
.session-top .progress.timed > span { transition: width .2s linear; }

/* Dashboard */
.week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.week-grid > div { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.week-grid b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.week-grid span { display: block; color: var(--muted); font-size: .85rem; }
.delta { display: block; font-size: .75rem; margin-top: 2px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

.chart { margin-top: 6px; }
.chart-bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid var(--border); }
.chart-bars.thin { gap: 2px; }
.chart-bars .cb { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.chart-bars .cb i { display: block; width: 100%; min-height: 2px; background: var(--primary); border-radius: 4px 4px 0 0; }
.chart-bars .cb i.met { background: var(--ok); }
.chart-bars .cb:hover i { filter: brightness(1.15); }
.goal-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); opacity: .6; pointer-events: none; }
.goal-line small { position: absolute; right: 0; top: -18px; font-size: .7rem; background: var(--surface); padding: 0 4px; }
.chart-axis { display: flex; gap: 4px; margin-top: 4px; }
.chart-axis small { flex: 1; text-align: center; font-size: .68rem; white-space: nowrap; overflow: visible; }

.heat-wrap { display: flex; gap: 6px; margin-top: 12px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat-days small { font-size: .62rem; line-height: 1; display: flex; align-items: center; }
.heatmap { flex: 1; min-width: 0; display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.heatmap i { min-width: 0; }
.kpi span { hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 600px) { .heatmap, .heat-days { gap: 2px; } .heatmap i { border-radius: 2px; } }
.heatmap i, .heat-legend i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.heatmap .h1, .heat-legend .h1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface-2)); }
.heatmap .h2, .heat-legend .h2 { background: color-mix(in srgb, var(--primary) 55%, var(--surface-2)); }
.heatmap .h3, .heat-legend .h3 { background: color-mix(in srgb, var(--primary) 78%, var(--surface-2)); }
.heatmap .h4, .heat-legend .h4 { background: var(--primary); }
.heatmap .hf { background: transparent; }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.heat-legend i { width: 12px; }

.stack { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.stack i, .legend i { display: block; }
.stack i { min-width: 3px; }
.known { background: var(--ok); } .learning { background: var(--warn); } .leech { background: var(--bad); } .unseen { background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .88rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); }

.risk-list { display: grid; gap: 6px; }
.risk { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.risk > span:first-child { font-weight: 750; }

@media (max-width: 820px) {
  .nav a { font-size: .58rem; }
  .top-stats { gap: 6px; }
  .top-stats .chip { padding: 4px 8px; font-size: .82rem; }
}

/* ==========================================================================
   Häufigste Wörter: Wortnetz, Rangliste, Wortregen
   ========================================================================== */
:root { --wv: #0c8599; --wadj: #e8890c; --wpl: #9c36b5; --sky: #e7f0ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --wv: #3bc9db; --wadj: #ffa94d; --wpl: #da77f2; --sky: #1a2238; }
}
:root[data-theme="dark"] { --wv: #3bc9db; --wadj: #ffa94d; --wpl: #da77f2; --sky: #1a2238; }

.w-der { --c: var(--der); } .w-die { --c: var(--die); } .w-das { --c: var(--das); }
.w-pl { --c: var(--wpl); } .w-v { --c: var(--wv); } .w-adj { --c: var(--wadj); } .w-x { --c: var(--muted); }

/* theme picker */
.theme-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: thin; }
.theme-chip { position: relative; flex: none; padding: 8px 12px 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; font-size: .88rem; cursor: pointer; overflow: hidden; white-space: nowrap; }
.theme-chip:hover { border-color: var(--primary-2); }
.theme-chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.theme-chip i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ok); }

/* word map */
.wn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.wn-layout > .card + .card { margin-top: 0; }
.wn-stage { padding: 10px; overflow-x: auto; }
.wn-stage .wn-legend { position: sticky; left: 0; }
.wn-svg { display: block; width: 100%; height: auto; max-height: 72vh; font-family: var(--font); }
.wn-e { stroke-width: 1.6; transition: opacity .2s, stroke-width .2s; }
.wn-e.e-fam { stroke: var(--primary-2); }
.wn-e.e-opp { stroke: var(--bad); stroke-dasharray: 5 4; }
.wn-node { cursor: pointer; outline: none; transition: opacity .2s; }
.wn-c { fill: color-mix(in srgb, var(--c) 16%, var(--surface)); stroke: var(--c); stroke-width: 2; transition: stroke-width .15s; }
.wn-ring { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; }
.wn-emo, .wn-rank { text-anchor: middle; pointer-events: none; }
.wn-rank { fill: var(--c); font-weight: 750; opacity: .8; }
.wn-l { text-anchor: middle; font-size: 12.5px; font-weight: 650; fill: var(--text); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.wn-node:hover .wn-c, .wn-node:focus-visible .wn-c { stroke-width: 3.5; }
.wn-node:focus-visible .wn-l { text-decoration: underline; }
.wn-node.sel .wn-c { stroke-width: 4; fill: color-mix(in srgb, var(--c) 32%, var(--surface)); }
.wn-node.sel .wn-l { font-weight: 800; }
.wn-svg.focus .wn-node:not(.hl), .wn-svg.focus .wn-e:not(.hl) { opacity: .22; }
.wn-e.hl { stroke-width: 3; }
.wn-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 6px 2px; font-size: .8rem; color: var(--muted); }
.wn-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 2px solid var(--c); }
.lg-line { width: 18px; height: 0; border-top: 2px solid var(--primary-2); }
.lg-line.opp { border-top: 2px dashed var(--bad); }
.lg-ring { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--ok); }

.wn-panel { position: sticky; top: calc(var(--top-h) + 16px); }
.wp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.wp-emo { font-size: 2.6rem; line-height: 1; flex: none; }
.wp-emo.rank { font-size: 1.3rem; font-weight: 800; color: var(--muted); min-width: 52px; text-align: center; }
.wp-de { font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-en { color: var(--muted); }
.wp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wp-meta .chip { font-size: .78rem; font-weight: 650; }
.wp-ex { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-style: italic; }
.speak.small { width: 28px; height: 28px; font-size: .85rem; }
.wp-rel { margin-bottom: 10px; }
.wp-rel .row { gap: 6px; margin-top: 4px; }
.rel-chip { border: 1.5px solid var(--primary-2); background: var(--primary-soft); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: .88rem; cursor: pointer; }
.rel-chip.opp { border-color: var(--bad); border-style: dashed; background: var(--bad-soft); }
.rel-chip:hover { filter: brightness(.96); }
.wp-note { display: block; margin: 12px 0 10px; }
.wp-note textarea { min-height: 60px; margin-top: 4px; font-size: .92rem; }

.fdots { display: inline-flex; gap: 3px; }
.fdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.fdots i.on { background: var(--ok); border-color: var(--ok); }

@media (max-width: 900px) {
  .wn-layout { grid-template-columns: 1fr; }
  .wn-panel { position: static; }
  .wn-svg { max-height: none; }
}

/* frequency ladder */
.ladder .band { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; }
.ladder .band.here { background: var(--primary-soft); }
.band-l b { display: block; font-size: .85rem; }
.band-l small { font-size: .78rem; }
.cells { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 3px; }
.cell { aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; cursor: pointer; background: var(--surface-2); min-width: 0; }
.cell:hover { outline: 2px solid var(--primary-2); outline-offset: 1px; }
.cell.fr { outline: 2px solid var(--primary); outline-offset: 1px; }
.lv0 { background: var(--surface-2); }
.lv1 { background: color-mix(in srgb, var(--bad) 45%, var(--surface-2)); }
.lv2 { background: color-mix(in srgb, var(--warn) 60%, var(--surface-2)); }
.lv3 { background: color-mix(in srgb, var(--ok) 60%, var(--surface-2)); }
.lv4 { background: var(--ok); }
.ladder-key { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.ladder-key span { display: inline-flex; align-items: center; gap: 5px; }
.ladder-key i { width: 11px; height: 11px; border-radius: 3px; border: 1px solid var(--border); }
@media (max-width: 600px) {
  .ladder .band { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px; padding: 4px; }
  .cells { gap: 2px; }
  .cell { border-radius: 2px; }
}

.flist { display: grid; gap: 4px; margin-top: 10px; }
.frow { display: grid; grid-template-columns: 34px 28px minmax(0, 1.2fr) minmax(0, 1.4fr) auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.frow:nth-child(odd) { background: var(--surface-2); }
.fr-rank { color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.fr-emo { text-align: center; }
.fr-de { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.fr-de:hover { text-decoration: underline; }
.fr-en { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .frow { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "r d s" "r e f"; row-gap: 0; }
  .fr-rank { grid-area: r; } .fr-emo { display: none; } .fr-de { grid-area: d; } .fr-en { grid-area: e; } .frow .fdots { grid-area: f; } .frow .speak { grid-area: s; justify-self: end; }
}

/* Wortregen */
.rain-setup .rain-opt-row { margin-top: 14px; }
.rain-setup .rain-opt-row > small { display: block; font-weight: 700; margin-bottom: 6px; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { border: 2px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 7px 12px; font-weight: 650; font-size: .9rem; cursor: pointer; }
.seg:hover { border-color: var(--primary-2); }
.seg.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.rain-wrap { max-width: 760px; margin: 0 auto; }
.rain-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rain-title b { font-size: 1.15rem; }
.rain-hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 1.02rem; }
.rh-lives { letter-spacing: 2px; }
.rh-combo { color: var(--warn); font-weight: 800; }
.rain-field { position: relative; height: min(56vh, 470px); min-height: 300px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--sky), var(--surface) 85%); touch-action: manipulation; user-select: none; }
.rain-field.hit { animation: rain-hit .35s; }
.rain-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--bad) 0 12px, transparent 12px 20px); opacity: .55; }
.rain-drop { position: absolute; left: 0; top: 0; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--border); box-shadow: var(--shadow);
  font-weight: 750; white-space: nowrap; will-change: transform; }
.rain-drop.target { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent), var(--shadow); z-index: 2; }
.rain-drop.pop { animation: rain-pop .35s forwards; border-color: var(--ok); }
.rain-drop.burst { animation: rain-burst .35s forwards; border-color: var(--bad); }
.rain-reveal { position: absolute; left: 0; top: 0; z-index: 3; padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: .92rem; white-space: nowrap; pointer-events: none; animation: rain-fade 2.2s forwards; }
.rain-reveal.ok { background: var(--ok-soft); color: var(--ok); animation-duration: 1.1s; }
.rain-reveal.bad { background: var(--bad-soft); color: var(--bad); border: 1.5px solid var(--bad); }
.rain-reveal .art { font-weight: 800; }
.rain-flash { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 4; font-size: 1.5rem; font-weight: 800; animation: rain-fade 1.3s forwards; }
.rain-pause { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(3px); }
.rain-pause > div { display: grid; gap: 12px; justify-items: center; font-size: 1.3rem; }
.rain-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; min-height: 120px; }
.rain-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 54px; border-radius: 12px; border: 2px solid var(--border); border-bottom-width: 4px;
  background: var(--surface); color: var(--text); font-weight: 650; text-align: left; cursor: pointer; touch-action: manipulation; }
.rain-opt:hover { border-color: var(--primary-2); }
.rain-opt:active { transform: translateY(1px); }
.rain-opt.bad { border-color: var(--bad); background: var(--bad-soft); }
.rain-opt kbd { flex: none; }
@media (max-width: 600px) {
  .rain-field { height: 46vh; min-height: 260px; }
  .rain-opts { gap: 8px; }
  .rain-opt { padding: 10px; font-size: .92rem; }
  .rain-opt kbd { display: none; }
  .rain-drop { padding: 6px 11px; font-size: .95rem; }
}
.rain-over { text-align: center; max-width: 760px; margin: 0 auto; }
.rain-over .kpis { text-align: left; }
.rain-over .flist { text-align: left; }
.rain-over .row { justify-content: center; }
.rain-big { font-size: 3.2rem; }
@keyframes rain-pop { to { transform: var(--t, none) scale(1.3); opacity: 0; } }
@keyframes rain-burst { 40% { opacity: 1; } to { opacity: 0; filter: blur(2px); } }
@keyframes rain-fade { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rain-hit { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@media (max-width: 600px) { .wtabs button { padding: 10px 9px; font-size: .92rem; } }
