:root {
  --bg: #F3F4F9;
  --card: #FFFFFF;
  --card-2: #F7F7FC;
  --text: #14152B;
  --muted: #676B83;
  --line: #E3E5EF;
  --primary: #5B4CF5;
  --primary-2: #8B5CF6;
  --primary-soft: #ECEAFE;
  --on-primary: #FFFFFF;
  --good: #15A34A;
  --good-soft: #DDF7E6;
  --bad: #E11D48;
  --bad-soft: #FFE4EA;
  --sun: #D97706;
  --sun-soft: #FEF3C7;
  --fire: #EA580C;
  --fire-soft: #FFEDD5;
  --sky: #0284C7;
  --sky-soft: #E0F2FE;
  --shadow: 0 1px 2px rgba(20, 21, 43, .05), 0 6px 20px rgba(20, 21, 43, .06);
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F1A;
    --card: #191A2B;
    --card-2: #20223A;
    --text: #F2F3FA;
    --muted: #9A9DB5;
    --line: #2B2D45;
    --primary: #7C6CFF;
    --primary-2: #A78BFA;
    --primary-soft: #2A2752;
    --good: #34D399;
    --good-soft: #123528;
    --bad: #FB7185;
    --bad-soft: #3D1825;
    --sun: #FBBF24;
    --sun-soft: #3A2C0E;
    --fire: #FB923C;
    --fire-soft: #3B2213;
    --sky: #38BDF8;
    --sky-soft: #10304A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 28px);
  display: flex;
  flex-direction: column;
}

.loading, .empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
}

/* ---------- Górny pasek ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 14px;
}
.top h1 {
  flex: 1;
  margin: 0;
  font-family: var(--font-round);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-family: var(--font-round); font-weight: 800; font-size: 16px;
}
.icon-btn {
  width: 48px; height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 22px;
  line-height: 0;
  /* flex zamiast grid – Safari na iPhonie źle centruje grid w przyciskach */
  display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none; appearance: none;
  flex: none;
}
.icon-btn:active { transform: scale(.94); }
.offline-chip {
  font-size: 13px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
  background: var(--card-2); color: var(--muted);
}

/* ---------- Kafelki statystyk ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.stat {
  border-radius: 20px;
  padding: 12px 10px 12px 12px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.stat .e { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.stat b {
  font-family: var(--font-round);
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  line-height: 1.1;
}
.stat small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-points { background: var(--sun-soft); }
.stat-points b { color: var(--sun); }
.stat-level { background: var(--sky-soft); }
.stat-level b { color: var(--sky); }
.stat-week { background: var(--fire-soft); }
.stat-week b { color: var(--fire); }
.stat-week.done { background: var(--good-soft); }
.stat-week.done b { color: var(--good); }
.week-dots { display: flex; gap: 3px; margin-top: 7px; }
.week-dots i { flex: 1; height: 6px; border-radius: 3px; background: rgba(127, 127, 160, .22); }
.week-dots i.on { background: var(--good); }
.week-dots i.today:not(.on) { box-shadow: inset 0 0 0 1.5px var(--good); background: transparent; }

/* Koniec dnia, powitanie, odznaki */
.day-done { text-align: center; margin: 4px 0 14px; }
.day-done .dd-title { margin: 0; font-family: var(--font-round); font-size: 21px; font-weight: 800; }
.day-done .dd-text { margin: 4px 0 14px; color: var(--muted); }
.welcome { display: flex; flex-direction: column; gap: 2px; background: var(--primary-soft); box-shadow: none; }
.welcome span { color: var(--muted); font-size: 15px; }
.badges-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  margin: 0 0 22px; padding: 14px 18px;
}
.badges-btn:active { transform: scale(.985); }
.badges-btn .bb-e { font-size: 28px; }
.badges-btn .bb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.badges-btn .bb-t small { color: var(--muted); font-size: 14px; }
.badges-btn .arrow { font-size: 28px; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 14px; display: flex; flex-direction: column; gap: 2px; text-align: center; align-items: center;
  opacity: .55;
}
.badge.got { opacity: 1; }
.badge .be { font-size: 34px; line-height: 1.1; margin-bottom: 4px; }
.badge .be { filter: grayscale(1); }
.badge.got .be { filter: none; }
.badge small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.badge .bd { color: var(--good); font-weight: 700; margin-top: 4px; }
.stat .mini { height: 5px; border-radius: 9px; background: rgba(127, 127, 160, .2); margin-top: 6px; overflow: hidden; }
.stat .mini i { display: block; height: 100%; background: var(--sky); border-radius: inherit; }

/* ---------- Karty ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 12px; font-size: 17px; }

.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-head span { font-weight: 700; }
.goal-head b { font-family: var(--font-round); font-size: 18px; }
.goal-msg { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.goal.done .goal-msg { color: var(--good); font-weight: 700; }

.bar {
  height: 14px;
  border-radius: 99px;
  background: var(--card-2);
  margin-top: 10px;
  overflow: hidden;
}
.bar i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
  min-width: 0;
}
.goal.done .bar i { background: linear-gradient(90deg, #22C55E, #10B981); }
.bar.small { height: 9px; margin-top: 10px; }
.bar.green i { background: linear-gradient(90deg, #22C55E, #10B981); }

/* ---------- Duży przycisk ---------- */
.big-btn {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  padding: 18px 20px;
  min-height: 84px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary);
  box-shadow: 0 10px 24px rgba(91, 76, 245, .32);
  margin: 4px 0 22px;
}
.big-btn:active { transform: scale(.98); }
.big-btn .e { font-size: 32px; }
.big-btn span.t { flex: 1; display: flex; flex-direction: column; }
.big-btn b { font-family: var(--font-round); font-size: 21px; font-weight: 800; }
.big-btn small { opacity: .9; font-size: 15px; font-weight: 600; }
.big-btn .arrow { font-size: 30px; opacity: .8; }
.big-btn.calm {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
.big-btn.calm small { color: var(--muted); opacity: 1; }

.section-title {
  font-family: var(--font-round);
  font-size: 20px; font-weight: 800;
  margin: 0 4px 10px;
}

/* ---------- Lista lekcji ---------- */
.lessons { display: flex; flex-direction: column; gap: 10px; }
.lesson {
  width: 100%;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: block;
}
.lesson:active { transform: scale(.985); }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-top b { font-size: 18px; }
.lesson .meta { color: var(--muted); font-size: 14px; margin-top: 2px; display: block; }
.lesson .pct { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 6px; }
.lesson .pct b { color: var(--text); }
.chip {
  flex: none;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px;
  background: var(--primary-soft); color: var(--primary);
}
.chip.good { background: var(--good-soft); color: var(--good); }

/* ---------- Sesja ---------- */
.session-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 52px; }
.session-top .bar { flex: 1; margin: 0; }
.session-top .count { font-weight: 700; color: var(--muted); font-size: 15px; min-width: 44px; text-align: right; }
.session-gain { font-family: var(--font-round); font-weight: 800; color: var(--sun); min-width: 48px; text-align: right; }

.tag {
  align-self: flex-start;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 12px; border-radius: 99px;
  margin-bottom: 14px;
}

.exercise { display: flex; flex-direction: column; flex: 1; }

.flash {
  width: 100%;
  text-align: center;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 36px 20px 28px;
  min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
}
.flash:not(.revealed) { cursor: pointer; }
.flash:not(.revealed):active { transform: scale(.985); }
.hint { color: var(--muted); font-size: 15px; margin: 18px 0 0; }

.word-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.word {
  margin: 0;
  font-family: var(--font-round);
  font-size: clamp(30px, 9vw, 42px);
  font-weight: 800; letter-spacing: -.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.say {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-soft);
  font-size: 21px;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-appearance: none; appearance: none;
  flex: none;
}
.say.sm { width: 40px; height: 40px; font-size: 18px; }
.say:active { transform: scale(.9); }
.say.speaking { box-shadow: 0 0 0 4px var(--primary); }

.answer { width: 100%; animation: pop .25s ease-out; }
.answer .pl {
  font-size: 24px; font-weight: 700;
  color: var(--primary);
  margin: 6px 0 18px;
}
.sentence {
  background: var(--card-2);
  border-radius: 18px;
  padding: 14px 14px 14px 16px;
  text-align: left;
  display: flex; gap: 10px; align-items: flex-start;
}
.sentence .s { flex: 1; min-width: 0; }
.sentence .en { margin: 0; font-weight: 650; font-size: 17px; }
.sentence .pls { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.answer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn {
  min-height: 60px;
  border-radius: 18px;
  font-weight: 800; font-size: 17px;
  padding: 12px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.97); }
.btn-yes { background: #15A34A; color: #fff; }
.btn-no { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-ghost { background: var(--card); box-shadow: var(--shadow); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger-solid { background: #E11D48; color: #fff; }
.btn.wide { width: 100%; }

/* Quiz */
.q-label { color: var(--muted); font-weight: 600; margin: 0 0 6px; text-align: center; }
.q-head {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px 18px;
  text-align: center;
  margin-bottom: 14px;
}
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  font-size: 18px; font-weight: 650;
  border: 2px solid transparent;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { cursor: default; }
.opt.correct { background: var(--good-soft); border-color: var(--good); color: var(--text); }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.opt.dim { opacity: .5; }
.opt .mark { font-size: 20px; }

.feedback {
  margin-top: 14px;
  border-radius: 20px;
  padding: 14px 16px;
  animation: pop .25s ease-out;
}
.feedback.good { background: var(--good-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback .fb-title { font-family: var(--font-round); font-weight: 800; font-size: 19px; margin: 0 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.feedback .fb-pair { margin: 0 0 10px; font-size: 17px; color: var(--muted); }
.feedback .fb-pair b { color: var(--text); }
.feedback .sentence { background: rgba(255, 255, 255, .6); }
@media (prefers-color-scheme: dark) { .feedback .sentence { background: rgba(0, 0, 0, .2); } }
.next-wrap {
  position: sticky;
  bottom: 0;
  margin: auto -16px calc(-28px - env(safe-area-inset-bottom));
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}
.next-wrap .btn { box-shadow: 0 8px 20px rgba(91, 76, 245, .3); }

/* ---------- Podsumowanie ---------- */
.summary { text-align: center; display: flex; flex-direction: column; gap: 14px; flex: 1; justify-content: center; }
.summary .big-e { font-size: 64px; line-height: 1; }
.summary h1 { font-family: var(--font-round); font-size: 30px; margin: 0; letter-spacing: -.02em; }
.summary p { margin: 0; color: var(--muted); }
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sum-grid .stat b { font-size: 26px; }
.summary .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------- Lekcja: lista słów ---------- */
.lesson-meta { color: var(--muted); margin: -6px 4px 14px; font-size: 15px; }
.words { display: flex; flex-direction: column; }
.wrow {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.wrow:first-child { border-top: 0; padding-top: 0; }
.wrow .w { flex: 1; min-width: 0; }
.wrow .w b { display: block; font-size: 17px; }
.wrow .w small { color: var(--muted); font-size: 14px; }
.boxes { display: flex; gap: 4px; flex: none; }
.boxes i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.boxes i.on { background: var(--primary); }
.boxes.master i.on { background: var(--good); }
.legend { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* ---------- Ustawienia ---------- */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.row + .row { border-top: 1px solid var(--line); }
.row .lbl { font-weight: 600; }
.row .lbl small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.switch {
  width: 58px; height: 34px; border-radius: 99px;
  background: var(--line);
  position: relative; flex: none;
  transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.switch[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"]::after { transform: translateX(24px); }
.seg { display: inline-flex; background: var(--card-2); border-radius: 14px; padding: 4px; gap: 4px; flex: none; }
.seg button { min-height: 40px; padding: 6px 14px; border-radius: 11px; font-weight: 700; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.note { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.version { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- Okienko, dymki, konfetti ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 10, 25, .45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  animation: fade .2s;
}
.modal {
  width: 100%; max-width: 520px;
  background: var(--card);
  border-radius: 26px;
  padding: 22px;
  animation: up .25s cubic-bezier(.2, .8, .2, 1);
}
.modal h2 { margin: 0 0 8px; font-family: var(--font-round); font-size: 22px; }
.modal p { margin: 0 0 18px; color: var(--muted); }
.modal .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.celebrate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(10, 10, 25, .35);
  animation: fade .2s;
}
.celebrate .box {
  background: var(--card);
  border-radius: 28px;
  padding: 28px 24px;
  text-align: center;
  max-width: 340px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.celebrate .big-e { font-size: 60px; line-height: 1; }
.celebrate h2 { font-family: var(--font-round); font-size: 26px; margin: 12px 0 6px; }
.celebrate p { margin: 0 0 18px; color: var(--muted); }

#toasts {
  position: fixed; left: 0; right: 0;
  top: calc(env(safe-area-inset-top) + 16px);
  z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 16px;
  padding: 12px 18px; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  animation: down .25s cubic-bezier(.2, .8, .2, 1);
  max-width: 100%;
}
.toast.out { opacity: 0; transform: translateY(-8px); transition: .3s; }
@keyframes down { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

canvas.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }

@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

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

@media (min-width: 380px) {
  .stat { padding: 14px; }
}

/* ---------- Ikonki rysowane (zawsze na środku) ---------- */
.icon-btn svg { width: 24px; height: 24px; min-width: 24px; display: block; flex: none; color: var(--text); margin: 0; }
.text-input {
  width: 100%; min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card-2); color: var(--text);
  font: inherit; font-size: 17px; font-weight: 600;
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.text-input:focus { border-color: var(--primary); }
.say { color: var(--primary); padding: 0; line-height: 0; }
.say svg { width: 24px; height: 24px; display: block; }
.say.sm svg { width: 20px; height: 20px; }

/* ---------- Etykiety rodzaju karty ---------- */
.tag-quiz { color: var(--sky); background: var(--sky-soft); }
.tag-type { color: var(--fire); background: var(--fire-soft); }
.nw { white-space: nowrap; }

/* Fiszka od polskiego – odpowiedź po angielsku */
.en-answer {
  margin: 6px 0 14px;
  font-family: var(--font-round);
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.flash .q-label { margin-bottom: 4px; }

/* ---------- Wpisywanie ---------- */
.hint-pattern {
  margin: 12px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: .08em;
  color: var(--fire);
  overflow-wrap: anywhere;
}
.type-form { display: flex; flex-direction: column; gap: 10px; }
.type-input {
  width: 100%;
  min-height: 62px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 22px; font-weight: 700;
  text-align: center;
  outline: none;
  box-shadow: var(--shadow);
  -webkit-appearance: none;
  appearance: none;
}
.type-input:focus { border-color: var(--primary); }
.type-input::placeholder { color: var(--muted); font-weight: 500; }
.type-input:disabled { opacity: 1; -webkit-text-fill-color: var(--text); }
.type-input.r-exact, .type-input.r-typo { border-color: var(--good); background: var(--good-soft); }
.type-input.r-wrong { border-color: var(--bad); background: var(--bad-soft); }
.type-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-btns .btn { white-space: nowrap; padding: 12px 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.link-btn {
  align-self: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 15px; font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.feedback s { color: var(--bad); }

/* ---------- Wybór głosu ---------- */
.row.col { flex-direction: column; align-items: stretch; padding: 12px 0 4px; gap: 10px; }
.voices { display: flex; flex-direction: column; gap: 6px; }
.voice-opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 50px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card-2);
  text-align: left;
  font-weight: 600; font-size: 16px;
  border: 2px solid transparent;
}
.voice-opt small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.voice-opt .vt { flex: 1; min-width: 0; }
.voice-opt .dot {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2px solid var(--muted);
}
.voice-opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.voice-opt[aria-pressed="true"] .dot { border: 6px solid var(--primary); }
