/* Paukmich trainer: phone first, light and dark. */
:root {
  --bg: #f6f4ef; --surface: #ffffff; --text: #1d2420; --muted: #5d6762;
  --accent: #2f6b4f; --accent-text: #ffffff; --line: #dcd8cf;
  --ok: #1f7a46; --bad: #b3402e; --star: #c58a00;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --surface: #1e2421; --text: #e9eeeb; --muted: #9aa59f;
    --accent: #5fb88d; --accent-text: #0e1411; --line: #2f3833;
    --ok: #6fd39c; --bad: #ef8a77; --star: #f0c04a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
main { max-width: 520px; margin: 0 auto; padding: 12px 0 32px; display: flex; flex-direction: column; gap: 12px; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.3rem; margin: 8px 0 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.muted { color: var(--muted); }
.nudge { margin: 0; color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.hint { color: var(--star); margin: 0; }

button { font: inherit; border: 0; cursor: pointer; }
.primary, .secondary, .good, .bad-btn {
  width: 100%; min-height: 52px; border-radius: var(--radius); font-weight: 600;
}
.primary { background: var(--accent); color: var(--accent-text); }
.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.good { background: var(--ok); color: #fff; }
.bad-btn { background: var(--bad); color: #fff; }
.choice {
  width: 100%; min-height: 52px; border-radius: var(--radius); text-align: left; padding: 10px 14px;
  background: var(--surface); color: var(--text); border: 2px solid var(--line);
}
.link { background: none; color: var(--accent); text-decoration: underline; padding: 8px; }
.link.danger { color: var(--bad); }
.icon { background: none; color: var(--text); font-size: 1.3rem; min-width: 44px; min-height: 44px; }
.speak.small { font-size: 1rem; min-width: 32px; min-height: 32px; }
.row { display: flex; gap: 12px; align-items: center; }

.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 1.2rem; }
.stat span { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }

.chunk { background: var(--surface); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.chunk.locked { opacity: .55; }
.chunk-head { display: flex; justify-content: space-between; font-weight: 600; }
.chunk small { color: var(--muted); }
.bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.fill { height: 100%; background: var(--accent); }

.dir { margin: 8px 0 0; color: var(--muted); }
.prompt {
  font-size: 1.9rem; font-weight: 700; text-align: center; padding: 22px 8px;
  background: var(--surface); border-radius: var(--radius); overflow-wrap: anywhere;
}
.answer {
  width: 100%; font: inherit; font-size: 1.25rem; padding: 14px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--surface); color: var(--text);
}
.answer:focus { outline: none; border-color: var(--accent); }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card .en { font-size: 1.5rem; font-weight: 700; }
.card .de { font-size: 1.15rem; }
.example { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

.setting { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: var(--radius); padding: 12px; }
.setting.row { flex-direction: row; }
.credit { font-size: .8rem; color: var(--muted); margin: 0; }
.note { font-size: .95rem; color: var(--muted); font-style: italic; }

.links { justify-content: center; flex-wrap: wrap; }
.list-nav { justify-content: space-between; flex-wrap: wrap; }
.word { background: var(--surface); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.word-head { gap: 4px; }
.word .en { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.word .star { margin-left: auto; color: var(--star); }
.small { font-size: .85rem; }
.icon:disabled { opacity: .3; cursor: default; }
textarea.answer { resize: vertical; font-size: 1rem; }
h3 { margin: 12px 0 0; font-size: 1rem; }
.link.on { font-weight: 700; text-decoration: none; }
.word.row { flex-direction: row; }
.report { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .85rem; padding: 6px 10px; border-radius: 14px; background: var(--line); color: var(--text); }
.type { margin-left: 8px; font-size: .78rem; padding: 2px 8px; border-radius: 10px; background: var(--line); color: var(--text); }

.legal-links { text-align: center; }
.legal-links a, .legal a { color: var(--accent); }
.legal h2 { font-size: 1.05rem; margin: 18px 0 4px; }
.legal p { line-height: 1.5; }

.qr-box { background: #fff; border-radius: var(--radius); padding: 12px; display: flex; justify-content: center; }
.qr { width: min(72vw, 280px); height: auto; display: block; }
.qr-url { text-align: center; overflow-wrap: anywhere; font-weight: 600; margin: 0; }
.steps { margin: 0; padding-left: 22px; line-height: 1.5; }
@media print {
  body, #app { background: #fff; color: #000; }
  button, header .icon { display: none; }
  .qr { width: 70mm; }
}

.profile-bar { justify-content: space-between; }
.choice.profile { font-weight: 600; font-size: 1.1rem; }
.small-btn { width: auto; min-height: 44px; padding: 0 14px; white-space: nowrap; }
.bad:empty { display: none; }  /* an error line takes no space until it has a message */
