@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

/* =====================================================================
   Sami Language — Redesign design system
   Токены и компоненты по макетам Claude Design (393×852, Manrope).
   Цвета в OKLCH (поддерживаются TWA/WKWebView на актуальных устройствах).
   ===================================================================== */

:root {
  --red:         oklch(48% 0.17 27);
  --red-strong:  oklch(42% 0.17 27);
  --blue:        oklch(35% 0.11 262);
  --blue-deep:   oklch(30% 0.11 262);
  --yellow:      oklch(78% 0.14 85);
  --green:       oklch(52% 0.12 150);
  --green-deep:  oklch(46% 0.12 150);

  --bg:          oklch(96% 0.018 80);
  --card:        oklch(99% 0.006 80);
  --card-2:      oklch(99% 0.008 80);
  --border:      oklch(90% 0.015 80);
  --border-soft: oklch(88% 0.02 80);
  --border-mute: oklch(85% 0.02 80);

  --text:        oklch(20% 0.02 260);
  --text-2:      oklch(22% 0.02 260);
  --muted:       oklch(30% 0.02 260 / .60);
  --muted-strong:oklch(30% 0.02 260 / .75);
  --muted-soft:  oklch(30% 0.02 260 / .55);
  --chevron:     oklch(40% 0.02 260 / .40);

  --shadow-row:  0 4px 14px oklch(20% 0.02 260 / .08);
  --shadow-row-h:0 6px 18px oklch(20% 0.02 260 / .14);
}

* { box-sizing: border-box; }

/* Убираем серую вспышку при тапах на iOS/Android — ощущается нативнее */
html { -webkit-tap-highlight-color: transparent; }

/* База документа + fade-переход между страницами (класс page-hide тогглит app.bundle.js) */
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  opacity: 1;
  transition: opacity .18s ease-in-out;
}
body.page-hide { opacity: 0; }

/* ---- Экран: колонка на всю высоту вьюпорта webview ---- */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* Кнопка звука, закреплённая в углу экрана (стартовый экран без шапки) */
.mute-abs { position: absolute; top: 26px; right: 18px; z-index: 5; }

/* Скрытый скролл для внутренних областей */
.sami-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.sami-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ---- Орнаментальная лента (верх/низ) ---- */
.ribbon {
  flex: none;
  height: 14px;
  background-color: var(--red);
  background-image: radial-gradient(circle, #fff 2.6px, transparent 2.8px);
  background-size: 20px 100%;
  background-position: 10px center;
}
.ribbon-line { flex: none; height: 3px; background: var(--blue); }

/* ---- Шапка: аватар + надпись + заголовок + mute ---- */
.app-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 4px;
}
.app-header__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--card);
  border: 1.6px solid var(--border-soft);
  box-shadow: 0 3px 8px oklch(20% 0.02 260 / .12);
}
.app-header__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  display: block;
}
.app-header--sm .app-header__avatar { width: 48px; height: 48px; }
.app-header__titles { display: flex; flex-direction: column; gap: 2px; }
.app-header__eyebrow {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--red);
}
.app-header__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--text); }
.app-header--sm .app-header__title { font-size: 19px; }

/* ---- Кнопка звука ---- */
.btn-mute {
  margin-left: auto; flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mute);
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: border-color .15s ease;
}
.btn-mute:hover { border-color: var(--blue); }
.app-header--sm .btn-mute { width: 36px; height: 36px; }

/* ---- Вводный текст под шапкой ---- */
.screen__intro {
  flex: none;
  margin: 6px 22px 18px;
  font-size: 14px; line-height: 1.55;
  color: var(--muted-strong);
}

/* ---- Прокручиваемое тело ---- */
.screen__body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 0 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
}

/* ---- Карточка-строка списка (Меню, Категории) ---- */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-row);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.list-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-row-h); }
.list-row:active { transform: scale(.99); }
.list-row__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.list-row__title { font-size: 16px; font-weight: 700; color: var(--text); }
.list-row__sub { font-size: 12.5px; color: oklch(30% 0.02 260 / .6); }
.list-row__chevron { flex: none; }

/* ---- Цветной чип-буква ---- */
.chip {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: oklch(99% 0.01 80);
  font-size: 19px; font-weight: 800;
}
.chip--blue   { background: var(--blue); }
.chip--red    { background: var(--red); }
.chip--green  { background: var(--green); }
.chip--yellow { background: var(--yellow); color: oklch(30% 0.02 260); }

/* Циклическая палитра (blue → red → yellow → green) для авто-раскраски в циклах */
.chip--c0 { background: var(--blue); }
.chip--c1 { background: var(--red); }
.chip--c2 { background: var(--yellow); color: oklch(30% 0.02 260); }
.chip--c3 { background: var(--green); }

/* ---- Футер с иконочными кнопками ---- */
.app-footer {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  padding: 16px 24px 22px;
}
.app-footer--divided { box-shadow: 0 -8px 16px -12px oklch(20% 0.02 260 / .15); padding: 12px 24px 20px; }

.nav-btn {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--card);
  border: 1.6px solid transparent;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 10px oklch(20% 0.02 260 / .1);
  transition: transform .12s ease, background .12s ease;
}
.nav-btn:active { transform: scale(.96); }
.nav-btn--red  { border-color: oklch(48% 0.17 27 / .5); }
.nav-btn--red:hover  { background: oklch(48% 0.17 27 / .08); }
.nav-btn--blue { border-color: oklch(35% 0.11 262 / .5); }
.nav-btn--blue:hover { background: oklch(35% 0.11 262 / .08); }
.nav-btn--ghost { background: transparent; border-color: oklch(30% 0.02 260 / .18); box-shadow: none; }
.nav-btn--ghost:hover { background: oklch(30% 0.02 260 / .05); }

.nav-btn--primary {
  width: 60px; height: 60px;
  background: var(--blue);
  border: none;
  box-shadow: 0 10px 22px oklch(35% 0.11 262 / .4);
}
.nav-btn--primary:hover { background: var(--blue-deep); }
.nav-btn--primary:disabled,
.nav-btn--primary.is-disabled {
  background: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}

/* =====================================================================
   Стартовый экран
   ===================================================================== */
.start {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 22px 0;
}
.speech {
  width: 100%; max-width: 330px;
  background: var(--card);
  border-radius: 18px;
  padding: 2px;
  box-shadow: 0 10px 24px oklch(20% 0.02 260 / .14);
}
.speech__accent {
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--blue));
}
.speech__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.speech__hi { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); font-weight: 600; }
.speech__row { display: flex; align-items: center; gap: 12px; }
.speech__text { margin: 0; font-size: 14.5px; line-height: 1.5; color: oklch(30% 0.02 260 / .85); font-weight: 500; flex: 1; }
.speech__text p { margin: 0 0 6px; }
.speech__text p:last-child { margin-bottom: 0; }
.speech__text p:first-child { color: var(--text); font-weight: 600; font-size: 15px; }
.speech__pointer {
  width: 16px; height: 16px;
  background: var(--card);
  transform: rotate(45deg);
  margin-top: -9px;
  box-shadow: 3px 3px 6px oklch(20% 0.02 260 / .06);
  z-index: 1;
}
.btn-play {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px oklch(52% 0.12 150 / .4);
  transition: background .12s ease;
}
.btn-play:hover { background: var(--green-deep); }

.hero {
  position: relative;
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 6px;
  width: 100%;
}
.hero__glow {
  position: absolute;
  width: 230px; height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(35% 0.11 262 / .18), oklch(48% 0.17 27 / .1) 60%, transparent 75%);
  animation: pulseGlow 4s ease-in-out infinite;
}
.hero__img {
  position: relative;
  height: 280px; max-width: 88%;
  object-fit: contain;
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(0 14px 18px oklch(20% 0.02 260 / .18));
}
.hero__badge {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: oklch(98% 0.01 80);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 10px oklch(20% 0.02 260 / .2);
}

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulseGlow { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .8; transform: scale(1.06); } }
@keyframes shakeX { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* =====================================================================
   Текстовые страницы (О проекте) и список задач
   ===================================================================== */
.prose { font-size: 15px; line-height: 1.7; color: oklch(28% 0.02 260 / .9); }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose h1, .prose h2 { color: var(--text); }
.prose a { color: oklch(42% 0.13 262); }

/* Защита контента из редактора (raw HTML) от выхода за край экрана:
   картинки/видео масштабируются, таблицы и код скроллятся, длинные слова переносятся */
.prose, .fact-card__text, .card-block { overflow-wrap: break-word; }
.prose img, .prose video, .prose iframe,
.fact-card__text img, .card-block img { max-width: 100%; height: auto; }
.prose table, .fact-card__text table, .card-block table { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { max-width: 100%; overflow-x: auto; }
/* Длинные слова в текстовых строках из БД не растягивают строку за экран */
.list-row__text, .phrase__text, .word-card__text, .nav-card__text { overflow-wrap: break-word; }

/* Нумерованный список (Задачи из richeditor) — цветные квадраты-номера */
.prose ol { list-style: none; counter-reset: t; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.prose ol li { counter-increment: t; position: relative; padding-left: 48px; min-height: 34px; display: flex; align-items: center; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.prose ol li::before {
  content: counter(t);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: oklch(99% 0.01 80); font-weight: 800; font-size: 15px;
}
.prose ol li:nth-child(4n+1)::before { background: var(--blue); }
.prose ol li:nth-child(4n+2)::before { background: var(--red); }
.prose ol li:nth-child(4n+3)::before { background: var(--yellow); color: oklch(30% 0.02 260); }
.prose ol li:nth-child(4n+4)::before { background: var(--green); }

/* =====================================================================
   Меню-оверлей (#mainNav, показывается классом .d-flex из app.bundle.js)
   ===================================================================== */
#mainNav { position: fixed; inset: 0; z-index: 50; display: none; }
#mainNav.d-flex { display: block; }
.menu-close {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mute);
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: border-color .15s ease;
}
.menu-close:hover { border-color: var(--red); }

.tasks { display: flex; flex-direction: column; gap: 14px; }
.task-item { display: flex; gap: 14px; align-items: flex-start; }
.task-num {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: oklch(99% 0.01 80);
  font-weight: 800; font-size: 15px;
}
.task-num--c2 { color: oklch(30% 0.02 260); }
.task-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* =====================================================================
   Word Match (учим слова — выбор варианта)
   ===================================================================== */
.progress { flex: none; margin: 12px 22px 2px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 3px; background: var(--blue); transition: width .35s ease; }
.task-count { flex: none; margin: 8px 22px 0; font-size: 11.5px; color: var(--muted-soft); font-weight: 600; }

.quiz-q { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); text-align: center; }

.stage {
  position: relative;
  width: 100%; height: 230px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px oklch(20% 0.02 260 / .1);
  overflow: hidden;
  flex: none;
  display: flex; align-items: center; justify-content: center;
}
.stage img { width: 100%; height: 100%; object-fit: contain; }
.stage__diamond { position: absolute; width: 9px; height: 9px; transform: rotate(45deg); z-index: 2; }
.stage__diamond--tl { top: 10px; left: 10px; background: var(--red); }
.stage__diamond--tr { top: 10px; right: 10px; background: var(--blue); }
.stage__diamond--bl { bottom: 10px; left: 10px; background: var(--yellow); }
.stage__diamond--br { bottom: 10px; right: 10px; background: var(--green); }

.feedback {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px; font-weight: 700;
}
.feedback--ok  { background: oklch(52% 0.12 150 / .12); color: oklch(40% 0.12 150); }
.feedback--bad { background: oklch(48% 0.17 27 / .1);  color: oklch(42% 0.17 27); }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option {
  padding: 14px 10px;
  border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; text-align: center;
  background: var(--card);
  color: var(--text-2);
  border: 1.5px solid var(--border);
  transition: transform .1s ease, box-shadow .12s ease, background .12s ease;
}
.option:hover { transform: translateY(-1px); }
.option.is-correct {
  background: var(--green); color: oklch(99% 0.01 80);
  border-color: var(--green);
  box-shadow: 0 4px 12px oklch(52% 0.12 150 / .35);
}
.option.is-wrong {
  background: var(--red); color: oklch(99% 0.01 80);
  border-color: var(--red);
  animation: shakeX .35s ease;
}

/* Word Match — режим сборки слова из букв */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.wm-controls { display: flex; justify-content: center; gap: 8px; }
.btn-pill { padding: 8px 16px; border-radius: 999px; border: none; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; color: oklch(99% 0.01 80); }
.btn-pill--green { background: var(--green); }
.btn-pill--blue { background: var(--blue); }
.word-form { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#new-wc { width: 100%; text-align: center; font-size: 22px; font-weight: 800; color: var(--text); border: none; border-bottom: 2px solid var(--border); background: transparent; padding: 6px 0; letter-spacing: 2px; }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.letters .btn {
  min-width: 42px; padding: 10px 12px;
  border-radius: 12px;
  background: var(--card); border: 1.5px solid var(--border);
  color: var(--text); font-size: 18px; font-weight: 800;
  cursor: pointer; box-shadow: var(--shadow-row);
  transition: transform .1s ease;
}
.letters .btn:active { transform: scale(.94); }
.letters .btn.btn-success { background: var(--green); color: oklch(99% 0.01 80); border-color: var(--green); }
.letters .btn.btn-warning { background: var(--red); color: oklch(99% 0.01 80); border-color: var(--red); }
.pulse { animation: shakeX .35s ease; }

/* Баннеры «Верно/Неверно» */
.word-success, .word-danger { display: none; text-align: center; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.word-success { background: oklch(52% 0.12 150 / .12); color: oklch(40% 0.12 150); }
.word-danger { background: oklch(48% 0.17 27 / .1); color: oklch(42% 0.17 27); }

/* =====================================================================
   Лексикон алфавита — карточки-факты с ромбовидным маркером
   ===================================================================== */
.fact-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-row);
}
.fact-card__bullet { flex: none; width: 12px; height: 12px; margin-top: 5px; transform: rotate(45deg); }
.fact-card__bullet--c0 { background: var(--red); }
.fact-card__bullet--c1 { background: var(--blue); }
.fact-card__bullet--c2 { background: var(--yellow); }
.fact-card__bullet--c3 { background: var(--green); }
.fact-card__letter { font-size: 20px; font-weight: 800; color: var(--text); margin-right: 4px; }
.fact-card__text { font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.fact-card__text p { margin: 0 0 8px; }
.fact-card__text p:last-child { margin-bottom: 0; }

/* Простая карточка-блок с произвольным текстом (Грамматика) */
.card-block {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-row);
}

/* Слова на выбранную букву (Учим алфавит) */
.la-group { display: none; flex-direction: column; gap: 8px; }
.la-group.is-shown { display: flex; }
.word-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-row);
}
.word-card__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.word-card__word { font-size: 16px; font-weight: 700; color: var(--text); }
.word-card__tr { font-size: 13px; font-style: italic; color: oklch(42% 0.13 262); }

/* =====================================================================
   Алфавит — сетка букв + хаб
   ===================================================================== */
.letter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.letter-btn {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: oklch(25% 0.02 260);
  font-size: 14px; font-weight: 800;
  white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .12s ease;
}
.letter-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-row); }
.letter-btn:active { transform: scale(.96); }
.letter-btn.is-active {
  background: var(--blue); color: oklch(99% 0.01 80); border-color: var(--blue);
  box-shadow: 0 4px 10px oklch(35% 0.11 262 / .35);
}

/* Утилиты фона для чипов */
.bg-blue   { background: var(--blue);  color: oklch(99% 0.01 80); }
.bg-red    { background: var(--red);   color: oklch(99% 0.01 80); }
.bg-green  { background: var(--green); color: oklch(99% 0.01 80); }
.bg-yellow { background: var(--yellow); color: oklch(30% 0.02 260); }

/* Инструменты в шапке (mute + гамбургер) */
.app-header__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.app-header__tools .btn-mute { margin-left: 0; }
.ham-wrap { position: relative; flex: none; }
.btn-ham {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mute);
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  transition: border-color .15s ease;
}
.btn-ham:hover { border-color: var(--blue); }

/* Выпадающее меню */
.dropdown {
  position: absolute; top: 44px; right: 0;
  width: 230px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 28px oklch(20% 0.02 260 / .2);
  padding: 8px;
  z-index: 21;
  display: none; flex-direction: column; gap: 3px;
}
.ham-wrap.is-open .dropdown { display: flex; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.dropdown a:hover { background: oklch(96% 0.012 80); }
.dropdown__chip { flex: none; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.dropdown__label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.dropdown__divider { height: 1px; background: oklch(92% 0.012 80); margin: 4px 8px; }
.dropdown__policy { padding: 7px 12px; font-size: 11.5px; color: oklch(30% 0.02 260 / .5); text-decoration: none; }

/* Карточка выбранной буквы */
.letter-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 13px 14px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px oklch(20% 0.02 260 / .06);
}
.letter-card__row { display: flex; align-items: center; gap: 11px; }
.letter-card__big { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--blue); color: oklch(99% 0.01 80); font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.letter-card__title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.letter-card__sub { font-size: 12px; color: oklch(30% 0.02 260 / .6); }

/* Малые карточки-подразделы (Лексика / Грамматика / Учим алфавит) */
.nav-card { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-row); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.nav-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-row-h); }
.nav-card__chip { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.nav-card__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nav-card__title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.nav-card__sub { font-size: 11.5px; color: oklch(30% 0.02 260 / .6); }

/* Кнопка звука — размеры */
.btn-play--md { width: 40px; height: 40px; margin-left: auto; }
.btn-play--sm { width: 38px; height: 38px; box-shadow: 0 3px 8px oklch(52% 0.12 150 / .35); }

/* =====================================================================
   Грамматика — падежи и таблицы склонения
   ===================================================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.case-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px; background: var(--card); border: 1px solid var(--border); }
.case-chip__n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: oklch(99% 0.01 80); font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.case-chip__name { font-size: 12px; font-weight: 700; color: var(--text); }
.section-title { margin: 6px 0 0; font-size: 15px; font-weight: 800; color: var(--text); }
.decl { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: 0 4px 14px oklch(20% 0.02 260 / .06); }
.decl__head { padding: 10px 12px; color: oklch(99% 0.01 80); font-size: 12.5px; font-weight: 800; }
.decl__head--blue { background: var(--blue); }
.decl__head--red { background: var(--red); }
.decl__cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; padding: 8px 10px 4px; font-size: 10.5px; font-weight: 800; color: var(--muted-soft); text-transform: uppercase; letter-spacing: .03em; }
.decl__row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; padding: 7px 10px; border-top: 1px solid oklch(93% 0.012 80); font-size: 11.5px; color: var(--text-2); }
.decl__row span:first-child { font-weight: 700; }

/* Диамант-разделитель (О проекте) */
.diamond-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.diamond-row i { width: 7px; height: 7px; transform: rotate(45deg); display: block; }

/* =====================================================================
   Разговорник — список фраз
   ===================================================================== */
.phrase-list {
  flex: 1; min-height: 0; overflow-y: auto;
  margin: 14px 22px 0;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px oklch(20% 0.02 260 / .08);
}
.phrase { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid oklch(92% 0.012 80); }
.phrase:last-child { border-bottom: none; }
.phrase:hover { background: oklch(97% 0.012 80); }
.phrase__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.phrase__ru { font-size: 14.5px; font-weight: 700; color: var(--text); }
.phrase__sami { font-size: 14px; font-weight: 600; color: oklch(42% 0.13 262); font-style: italic; }
