/* ---------- тема ---------- */
:root[data-theme="dark"] {
  --bg: #0b0d14;
  --bg-soft: #121525;
  --surface: rgba(255,255,255,.045);
  --surface-2: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.20);
  --text: #eef1f8;
  --text-dim: #9aa3bd;
  --text-mute: #6a7392;
  --accent: #7c8cff;
  --accent-2: #a06bff;
  --ok: #3ddc97;
  --ok-bg: rgba(61,220,151,.12);
  --bad: #ff6b8a;
  --bad-bg: rgba(255,107,138,.12);
  --shadow: 0 24px 60px rgba(0,0,0,.55);
  --glow-1: rgba(124,140,255,.30);
  --glow-2: rgba(160,107,255,.22);
}
:root[data-theme="light"] {
  --bg: #f4f6fc;
  --bg-soft: #ffffff;
  --surface: rgba(255,255,255,.85);
  --surface-2: rgba(20,25,60,.045);
  --border: rgba(20,25,60,.10);
  --border-strong: rgba(20,25,60,.22);
  --text: #171a2b;
  --text-dim: #5b6480;
  --text-mute: #858da8;
  --accent: #4f5bd5;
  --accent-2: #8b46e8;
  --ok: #12a26c;
  --ok-bg: rgba(18,162,108,.12);
  --bad: #d63a5e;
  --bad-bg: rgba(214,58,94,.10);
  --shadow: 0 20px 50px rgba(30,40,90,.13);
  --glow-1: rgba(124,140,255,.28);
  --glow-2: rgba(160,107,255,.20);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 0 20px 60px;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* мягкое свечение на фоне */
.glow { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }
.glow-1 { width: 520px; height: 520px; background: var(--glow-1); top: -220px; left: -120px; }
.glow-2 { width: 460px; height: 460px; background: var(--glow-2); top: 120px; right: -180px; }

/* ---------- шапка ---------- */
.topbar {
  position: relative; z-index: 2;
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 8px 22px rgba(124,140,255,.35);
}
.brand-title { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.brand-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 1px; }
.topbar-right { display: flex; gap: 8px; }

/* ---------- кнопки ---------- */
.ghost-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  padding: 9px 14px; border-radius: 11px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .16s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.ghost-btn.icon-only { padding: 9px 11px; }
.key-hint {
  font-size: 10.5px; padding: 2px 5px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-mute);
}
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: none; padding: 13px 30px; border-radius: 13px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 26px rgba(124,140,255,.32);
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s;
}
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(124,140,255,.42); }
.primary-btn:active:not(:disabled) { transform: translateY(0); }
.primary-btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }

.logout-form { display: inline; }

/* ---------- страница входа ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-wrap { position: relative; z-index: 2; width: min(420px, 100%); }
.auth-brand { justify-content: center; margin-bottom: 20px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 30px 28px 24px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.auth-title { font-size: 22px; font-weight: 650; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-mute); line-height: 1.5; margin-bottom: 18px; }
.auth-error {
  background: var(--bad-bg); border: 1px solid rgba(255,107,138,.35); color: var(--bad);
  border-radius: 11px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px;
}
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 12px; color: var(--text); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.auth-actions { display: flex; gap: 10px; margin-top: 18px; }
.auth-actions .primary-btn { flex: 1; padding: 12px 18px; }
.auth-note { font-size: 11.5px; color: var(--text-mute); line-height: 1.6; margin-top: 16px; }

/* ---------- панель режима слов ---------- */
.wordbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.seg { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.seg-btn {
  background: none; border: none; color: var(--text-dim); font-family: inherit;
  font-size: 13px; font-weight: 550; padding: 7px 14px; border-radius: 9px; cursor: pointer;
  transition: all .15s;
}
.seg-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 11px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; cursor: pointer;
}

/* ---------- карточка слова ---------- */
.word-card { text-align: center; }
.word-meta {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 18px;
  font-size: 11.5px; color: var(--text-mute);
}
.word-meta span { background: var(--surface-2); border-radius: 7px; padding: 3px 9px; }
.word-ask { font-size: 38px; font-weight: 600; letter-spacing: -.5px; margin-bottom: 6px; }
.word-dir { font-size: 12.5px; color: var(--text-mute); margin-bottom: 24px; }
.word-input {
  width: min(440px, 100%); padding: 14px 18px; font-size: 19px; text-align: center;
  font-family: inherit; background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 14px; color: var(--text); outline: none; transition: border-color .15s;
}
.word-input:focus { border-color: var(--accent); }
.word-input.ok { border-color: var(--ok); color: var(--ok); }
.word-input.bad { border-color: var(--bad); color: var(--bad); }
.word-options {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 620px;
}
.word-options .opt { font-size: 16px; padding: 18px 14px; line-height: 1.35; }
.word-card .feedback { text-align: left; }
.w-pos { font-size: 12px; color: var(--text-mute); font-weight: 400; }
.w-exru { color: var(--text-mute); font-style: italic; }
.dots { letter-spacing: 3px; color: var(--ok); }

/* ---------- вкладки ---------- */
.tabs {
  position: relative; z-index: 2;
  max-width: 960px; margin: 0 auto 22px;
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 15px; padding: 10px 14px; cursor: pointer;
  font-family: inherit; color: var(--text-dim); text-align: left;
  transition: all .18s ease;
}
.tab:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tab.active {
  background: linear-gradient(135deg, rgba(124,140,255,.18), rgba(160,107,255,.14));
  border-color: rgba(124,140,255,.55); color: var(--text);
  box-shadow: 0 8px 24px rgba(124,140,255,.18);
}
.tab-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--accent);
}
.tab.active .tab-icon { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.tab-text { display: flex; flex-direction: column; gap: 1px; }
.tab-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tab-sub { font-size: 11px; color: var(--text-mute); white-space: nowrap; }
.tab-count {
  font-size: 11px; color: var(--text-mute); background: var(--surface-2);
  padding: 2px 7px; border-radius: 7px;
}

/* ---------- сцена ---------- */
.stage { position: relative; z-index: 2; max-width: 960px; margin: 0 auto; }

.hud {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.hud-progress { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 12px; }
.hud-bar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hud-bar-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.hud-nums { font-size: 12.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.hud-stats { display: flex; gap: 8px; }
.stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px 13px; min-width: 62px;
}
.stat-val { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 10px; color: var(--text-mute); margin-top: 1px; }
.stat.ok .stat-val { color: var(--ok); }
.stat.bad .stat-val { color: var(--bad); }
.stat.streak .stat-val { color: #ffb648; }

/* ---------- карточка ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 40px 38px 28px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.card { position: relative; }
.card.shake { animation: shake .38s ease; }

/* ---------- точечная подсказка «?» ---------- */
.hint-btn {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 16px; font-weight: 650; font-family: inherit;
  cursor: pointer; transition: all .16s ease;
}
.hint-btn:hover { color: #fff; border-color: transparent; transform: scale(1.08);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.hint-btn.used { border-color: rgba(255,182,72,.5); color: #ffb648; }

.hint-pop {
  max-width: 660px; margin: 0 auto 26px;
  background: var(--bg-soft); border: 1px solid rgba(124,140,255,.35);
  border-radius: 16px; padding: 14px 16px 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.32);
  animation: pop .22s cubic-bezier(.3,0,.2,1);
  text-align: left;
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px); } }
.hint-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 650; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em;
}
.hint-head .ghost-btn { padding: 4px 8px; font-size: 12px; }
.hint-note { font-size: 12px; color: var(--text-mute); margin: 6px 0 12px; }
.hint-body { display: grid; gap: 9px; }
.hint-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 12px; padding: 11px 14px;
}
.hint-k { font-size: 14px; font-weight: 650; margin-bottom: 3px; }
.hint-d { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.hint-e {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-mute); line-height: 1.7;
}
.hint-e b { color: var(--accent); font-weight: 600; }
.hint-e s { opacity: .65; }
@keyframes shake {
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}

.sentence {
  font-size: 27px; line-height: 1.65; font-weight: 450; letter-spacing: -.3px;
  text-align: center; margin-bottom: 32px; min-height: 90px;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
}
.gap {
  display: inline-block; min-width: 92px; margin: 0 6px; padding: 0 10px;
  border-bottom: 2.5px dashed var(--border-strong); color: var(--accent);
  font-weight: 600; text-align: center; transition: all .2s;
}
.gap.filled { border-bottom-style: solid; border-bottom-color: var(--accent); }
.gap.ok { color: var(--ok); border-bottom-color: var(--ok); }
.gap.bad { color: var(--bad); border-bottom-color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }

.options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; max-width: 660px; margin: 0 auto;
}
.opt {
  position: relative;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 16px 12px; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 550; color: var(--text);
  transition: all .15s ease;
}
.opt:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.opt.selected { border-color: var(--accent); background: rgba(124,140,255,.16); }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.opt:disabled { cursor: default; }
.opt-num {
  position: absolute; top: 6px; left: 8px; font-size: 10px; color: var(--text-mute);
}

/* ---------- обратная связь ---------- */
.feedback {
  max-width: 660px; margin: 22px auto 0; padding: 0 18px;
  border-radius: 16px; border: 1px solid transparent;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, padding .3s;
}
.feedback.show { max-height: 420px; opacity: 1; padding: 18px; }
.feedback.good { background: var(--ok-bg); border-color: rgba(61,220,151,.3); }
.feedback.miss { background: var(--bad-bg); border-color: rgba(255,107,138,.3); }
.fb-head { font-size: 14.5px; font-weight: 650; margin-bottom: 8px; }
.feedback.good .fb-head { color: var(--ok); }
.feedback.miss .fb-head { color: var(--bad); }
.fb-full { font-size: 16px; margin-bottom: 10px; line-height: 1.5; }
.fb-full b { color: var(--ok); font-weight: 650; }
.fb-why { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.fb-ru { font-size: 12.5px; color: var(--text-mute); margin-top: 8px; font-style: italic; }

.actions {
  display: flex; align-items: center; gap: 12px; margin-top: 26px;
  padding-top: 22px; border-top: 1px solid var(--border);
}
.actions.center { justify-content: center; border: none; }
.hotkeys { margin-left: auto; font-size: 11.5px; color: var(--text-mute); }

/* ---------- итоги ---------- */
.results { text-align: center; }
.res-ring {
  width: 118px; height: 118px; margin: 6px auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px; font-weight: 700;
  background: conic-gradient(var(--accent) var(--pct, 0%), var(--surface-2) 0);
  position: relative;
}
.res-ring::after {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg);
}
.res-ring span { position: relative; z-index: 1; }
.results h2 { font-size: 22px; font-weight: 650; margin-bottom: 6px; }
.res-line { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.res-mistakes { text-align: left; max-width: 620px; margin: 0 auto 22px; display: grid; gap: 8px; }
.miss-row {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--bad);
  border-radius: 11px; padding: 11px 14px; font-size: 14px; line-height: 1.5;
}
.miss-row b { color: var(--ok); }
.miss-row s { color: var(--bad); opacity: .8; }
.miss-row .mr-why { display: block; font-size: 12.5px; color: var(--text-mute); margin-top: 4px; }

/* ---------- шторка с теорией ---------- */
/* атрибут hidden должен побеждать display:flex ниже */
[hidden] { display: none !important; }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px); z-index: 40; animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  background: var(--bg-soft); border-left: 1px solid var(--border);
  z-index: 41; display: flex; flex-direction: column;
  box-shadow: -30px 0 70px rgba(0,0,0,.4);
  animation: slide .28s cubic-bezier(.3,0,.2,1);
}
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--border);
}
.drawer-title { font-size: 18px; font-weight: 650; }
.drawer-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; }
.drawer-body { overflow-y: auto; padding: 20px 24px 60px; }

.th-section { margin-bottom: 26px; }
.th-h {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); font-weight: 650; margin-bottom: 12px;
}
.th-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 13px 15px; margin-bottom: 9px;
}
.th-k { font-size: 14.5px; font-weight: 650; margin-bottom: 4px; }
.th-d { font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.th-e {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--text-mute); line-height: 1.75;
}
.th-e b { color: var(--accent); font-weight: 600; }
.th-e s { opacity: .65; }
.th-tip {
  background: linear-gradient(135deg, rgba(124,140,255,.14), rgba(160,107,255,.10));
  border: 1px solid rgba(124,140,255,.28); border-radius: 13px;
  padding: 12px 15px; font-size: 13px; line-height: 1.6; color: var(--text-dim);
}
.th-tip b { color: var(--text); }

/* ---------- планшет ---------- */
@media (max-width: 900px) {
  .tab-sub { display: none; }
  .tab { padding: 9px 12px; border-radius: 13px; }
}

/* ---------- телефон ----------
   Главное правило: кнопки действия всегда под пальцем, внизу экрана.
   Всё, что выше, ужимается, чтобы карточка помещалась без прокрутки. */
@media (max-width: 700px) {
  body {
    padding: 0 12px;
    /* место под закреплённую панель действий + вырез снизу у iPhone */
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  /* шапка: только логотип и иконки */
  .topbar { padding: 12px 0 10px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
  .brand-title { font-size: 15px; }
  .topbar-right { gap: 6px; }
  .topbar-right .ghost-btn { padding: 8px 9px; font-size: 12px; }
  .key-hint { display: none; }

  /* вкладки — компактные пилюли в один ряд с прокруткой */
  .tabs { gap: 7px; margin-bottom: 12px; }
  .tab { padding: 8px 11px; gap: 7px; }
  .tab-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
  .tab-title { font-size: 12.5px; }
  .tab-count { display: none; }

  /* панель режимов слов — одна прокручиваемая строка */
  .wordbar {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    gap: 7px; margin-bottom: 10px; padding-bottom: 2px;
  }
  .wordbar::-webkit-scrollbar { display: none; }
  .wordbar > * { flex: 0 0 auto; }
  .seg-btn { padding: 6px 11px; font-size: 12px; }
  .select, .wordbar .ghost-btn { padding: 7px 10px; font-size: 12px; }

  /* прогресс и счётчики — одной невысокой строкой */
  .hud { gap: 10px; margin-bottom: 10px; flex-wrap: nowrap; }
  .hud-progress { min-width: 0; gap: 8px; }
  .hud-nums { font-size: 11.5px; white-space: nowrap; }
  .hud-stats { width: auto; gap: 5px; }
  .stat { padding: 4px 8px; min-width: 44px; border-radius: 10px; }
  .stat-val { font-size: 13px; }
  .stat-lbl { font-size: 9px; }

  /* карточка. backdrop-filter обязательно снимаем: он делает карточку точкой
     отсчёта для position:fixed, и нижняя панель прилипала бы к её краю, а не к экрану */
  .card { padding: 46px 14px 16px; border-radius: 18px; backdrop-filter: none; }
  .word-card { padding-top: 20px; }
  .hint-btn { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 15px; }
  .sentence { font-size: 19px; line-height: 1.8; min-height: 0; margin-bottom: 20px; }
  .gap { min-width: 58px; margin: 0 3px; padding: 0 6px; }
  .options { grid-template-columns: repeat(2, 1fr); gap: 9px; max-width: none; }
  .opt { padding: 14px 10px; font-size: 16px; }
  .word-options { grid-template-columns: 1fr; }
  .word-options .opt { padding: 15px 12px; font-size: 16px; text-align: left; padding-left: 34px; }
  .word-meta { margin-bottom: 12px; }
  .word-ask { font-size: 30px; }
  .word-dir { margin-bottom: 18px; }
  .word-input { font-size: 17px; padding: 12px 14px; width: 100%; }

  .feedback.show { padding: 14px; }
  .fb-full { font-size: 15px; }

  /* --- закреплённая панель действий --- */
  .actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--bg-soft); border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(0,0,0,.28);
    flex-direction: row; gap: 8px;
  }
  .actions.center { justify-content: stretch; }
  /* когда «Проверить» скрыта (режим кнопок), «Не знаю» занимает всю ширину */
  .primary-btn { flex: 2; padding: 15px 20px; font-size: 16px; border-radius: 14px; }
  .actions .ghost-btn { flex: 1; padding: 15px 14px; font-size: 14px; border-radius: 14px;
                        justify-content: center; }
  .hotkeys { display: none; }
  .user-name { display: none; }              /* в шапке остаётся только значок выхода */

  /* подсказка и шторка на всю ширину */
  .hint-pop { margin-bottom: 18px; }
  .drawer { width: 100%; }
  .drawer-body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  .results { padding-top: 24px; }
  .res-ring { width: 96px; height: 96px; font-size: 22px; }
  .res-mistakes { gap: 7px; }
  .miss-row { font-size: 13.5px; padding: 10px 12px; }
}

@media (max-width: 380px) {
  .brand-title { display: none; }
  .word-ask { font-size: 26px; }
  .sentence { font-size: 17.5px; }
}
