/* ============================================
   Deutsch Lab — mobile-first PWA
   ============================================ */

:root {
  --bg: #0a0a0e;
  --bg-2: #12121a;
  --card: #1a1a26;
  --card-hi: #22222f;
  --border: #2a2a3a;
  --border-hi: #3a3a4a;
  --ink: #e8e8ed;
  --ink-dim: #9a9aa8;
  --ink-mute: #6a6a78;
  --accent: #a78bfa;
  --accent-2: #7c3aed;
  --accent-warm: #fb923c;
  --de: #fde68a;
  --good: #4ade80;
  --warn: #fbbf24;
  --hot: #f87171;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
  --bottom-nav-h: 62px;
  --top-bar-h: 52px;
  --sub-tabs-h: 54px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}
body {
  font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 15% -10%, rgba(124, 58, 237, 0.15), transparent 60%),
    radial-gradient(ellipse 900px 600px at 85% 110%, rgba(251, 146, 60, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================
   ВЕРХНЯЯ ПАНЕЛЬ
   ============================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-bar-h);
  padding: 0 16px;
  padding-top: var(--safe-top);
  height: calc(var(--top-bar-h) + var(--safe-top));
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.icon-btn:active {
  background: var(--card-hi);
  transform: scale(0.95);
}

/* ============================================
   СУБ-ТАБЫ (горизонтальный скролл на мобиле)
   ============================================ */
.sub-tabs-wrap {
  position: sticky;
  top: calc(var(--top-bar-h) + var(--safe-top));
  z-index: 30;
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  scroll-snap-align: center;
  min-width: 72px;
}
.sub-tab-icon { font-size: 18px; line-height: 1; }
.sub-tab.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(167, 139, 250, 0.15));
  color: var(--ink);
  border-color: rgba(167, 139, 250, 0.35);
}
.sub-tab:active { transform: scale(0.96); }

/* ============================================
   КОНТЕНТ
   ============================================ */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  position: relative;
  z-index: 1;
}
.module { display: none; animation: fadeIn 0.35s ease; }
.module.active { display: block; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-header { margin-bottom: 18px; }
.tab-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.tab-header p { color: var(--ink-dim); font-size: 13px; }

/* ============================================
   ПРОГРЕСС
   ============================================ */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}
.progress-track {
  flex: 1;
  min-width: 100px;
  height: 5px;
  background: var(--bg-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}
.progress-text { color: var(--ink-dim); font-weight: 600; }
.progress-text b { color: var(--accent); }

/* ============================================
   СЕКЦИИ ФРАЗ
   ============================================ */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.phrase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
  position: relative;
}
.phrase-card.learned {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.05) 0%, var(--card) 60%);
  border-color: rgba(74, 222, 128, 0.25);
}
.phrase-card.learned::before {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--good);
  font-weight: 700;
  font-size: 16px;
}

.question-ru {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  margin-bottom: 4px;
}
.question-de {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.question-de-text { flex: 1; }

.ru { font-size: 12px; color: var(--ink-dim); margin-bottom: 6px; }
.de {
  font-size: 15px;
  color: var(--de);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.tip {
  font-size: 11px;
  color: var(--ink-mute);
  padding: 7px 10px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid var(--accent-2);
  border-radius: 4px;
  margin-top: 8px;
  line-height: 1.5;
}

.phrase-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.btn-mini {
  background: var(--bg-2);
  color: var(--ink-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}
.btn-mini:active {
  background: var(--card-hi);
  transform: scale(0.96);
}
.btn-mini.speaking {
  background: rgba(124, 58, 237, 0.2);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-mini.done {
  background: rgba(74, 222, 128, 0.15);
  color: var(--good);
  border-color: rgba(74, 222, 128, 0.4);
}

/* ============================================
   ФЛЭШ-КАРТОЧКИ
   ============================================ */
.flash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 8px;
  border-radius: 12px;
  text-align: center;
}
.stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.stat-label {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.stat.new .stat-num { color: var(--accent); }
.stat.learning .stat-num { color: var(--warn); }
.stat.known .stat-num { color: var(--good); }

.flash-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink-dim);
  border: 1px solid var(--border);
  min-height: 34px;
}
.filter-btn.active {
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent);
  border-color: var(--accent-2);
}
.filter-btn:active { transform: scale(0.96); }

.flash-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.flash-nav-btn {
  background: var(--bg-2);
  color: var(--ink-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px;
  height: 40px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flash-nav-btn:disabled { opacity: 0.3; }
.flash-nav-btn:active:not(:disabled) { transform: scale(0.94); }
.flash-counter {
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 600;
}

.flash-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.flash-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.08), transparent 50%);
  pointer-events: none;
}
.flash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}
.flash-cat {
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent);
  padding: 3px 9px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 10px;
}
.flash-word {
  font-size: 30px;
  font-weight: 600;
  color: var(--de);
  letter-spacing: -0.02em;
  margin: 14px 0;
  line-height: 1.15;
  position: relative;
}
.flash-translation {
  font-size: 20px;
  color: var(--ink);
  display: none;
  margin-bottom: 10px;
  font-weight: 500;
}
.flash-example {
  font-size: 13px;
  color: var(--ink-dim);
  font-style: italic;
  max-width: 500px;
  margin: 0 auto 14px;
  display: none;
  line-height: 1.5;
}
.flash-container.revealed .flash-translation,
.flash-container.revealed .flash-example { display: block; }
.flash-hint {
  color: var(--ink-mute);
  font-size: 12px;
  display: block;
}
.flash-container.revealed .flash-hint { display: none; }

.flash-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.flash-btn {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--ink);
  transition: all 0.15s;
  min-width: 84px;
  min-height: 44px;
}
.flash-btn:active { transform: scale(0.95); }
.flash-btn.reveal {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}
.flash-btn.dont-know {
  color: var(--hot);
  border-color: rgba(248, 113, 113, 0.4);
}
.flash-btn.knew-it {
  color: var(--good);
  border-color: rgba(74, 222, 128, 0.4);
}
.flash-btn.speak {
  color: var(--accent);
  border-color: rgba(167, 139, 250, 0.4);
}
.flash-btn.undo {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.4);
}

.flash-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-mute);
}
.flash-empty h3 {
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

/* Swipe индикаторы */
.swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}
.swipe-indicator.left { left: 20px; color: var(--hot); }
.swipe-indicator.right { right: 20px; color: var(--good); }
.flash-container.swipe-left .swipe-indicator.left,
.flash-container.swipe-right .swipe-indicator.right {
  opacity: 1;
}

/* ============================================
   СБОРКА / ПЕРЕВОД
   ============================================ */
.exercise {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.exercise-num {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.exercise-tag {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
}
.exercise-ru {
  font-size: 17px;
  color: var(--ink);
  font-weight: 500;
  margin: 6px 0 16px;
  line-height: 1.4;
}

.chip-slots {
  min-height: 60px;
  background: var(--bg-2);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}
.chip-slots.empty::before {
  content: 'Нажми на слово внизу...';
  color: var(--ink-mute);
  font-size: 12px;
  font-style: italic;
  align-self: center;
  width: 100%;
  text-align: center;
}
.chip-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  margin-bottom: 14px;
  min-height: 46px;
}
.chip {
  background: linear-gradient(135deg, #2a2a3a, #22222f);
  color: var(--de);
  border: 1px solid var(--border);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
  user-select: none;
  min-height: 38px;
}
.chip:active {
  background: linear-gradient(135deg, #3a3a4a, #2a2a3a);
  transform: scale(0.95);
  border-color: var(--accent-2);
}

.translate-input {
  width: 100%;
  min-height: 80px;
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--de);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 10px;
  transition: border 0.2s;
}
.translate-input:focus {
  outline: none;
  border-color: var(--accent-2);
}
.translate-input::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--ink);
  transition: all 0.15s;
  min-height: 40px;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}
.btn.ghost { color: var(--ink-dim); }

.feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  display: none;
  animation: fadeIn 0.3s;
}
.feedback.show { display: block; }
.feedback.correct {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.feedback.wrong {
  background: rgba(248, 113, 113, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.feedback-title {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.feedback.correct .feedback-title { color: var(--good); }
.feedback.wrong .feedback-title { color: var(--hot); }
.feedback-answer {
  color: var(--de);
  font-size: 16px;
  font-weight: 500;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.feedback-your {
  color: var(--ink-mute);
  font-size: 12px;
  font-style: italic;
  margin-bottom: 8px;
}
.feedback-your b { color: var(--hot); font-style: normal; }
.feedback-grammar {
  font-size: 12px;
  color: var(--ink-dim);
  padding: 10px 12px;
  background: rgba(167, 139, 250, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  line-height: 1.5;
}
.feedback-grammar strong { color: var(--accent); }
.self-check {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}
.self-check-label {
  font-size: 11px;
  color: var(--ink-mute);
  align-self: center;
  margin-right: 4px;
}
.btn-self {
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  min-height: 32px;
}
.btn-self.good-btn:active { color: var(--good); border-color: var(--good); }
.btn-self.bad-btn:active { color: var(--hot); border-color: var(--hot); }

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ============================================
   ПРО ГОЛОВУ
   ============================================ */
.mind-block {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.06), rgba(167, 139, 250, 0.04));
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.mind-block h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--accent-warm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mind-block p {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 10px;
}
.mind-block p:last-child { margin-bottom: 0; }
.mind-block strong { color: var(--de); font-weight: 600; }
.mind-block ul { padding-left: 18px; }
.mind-block li {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 6px;
}
.affirmation {
  background: rgba(251, 146, 60, 0.08);
  border-left: 3px solid var(--accent-warm);
  padding: 14px 16px;
  margin: 12px 0;
  border-radius: 6px;
  font-size: 14px;
  color: var(--de);
  font-style: italic;
  font-weight: 500;
}

/* ============================================
   TTS NOTICE
   ============================================ */
.tts-notice {
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--ink-dim);
  margin-bottom: 14px;
  line-height: 1.5;
}
.tts-notice strong { color: var(--accent); }

.reset-btn {
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 500;
  min-height: 34px;
}
.reset-btn:active {
  color: var(--hot);
  border-color: var(--hot);
  transform: scale(0.95);
}

/* ============================================
   НИЖНЯЯ НАВИГАЦИЯ (BOTTOM NAV — как в приложениях)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 6px 8px;
  padding-bottom: calc(6px + var(--safe-bottom));
  background: rgba(10, 10, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s;
  min-height: 50px;
}
.nav-icon { font-size: 20px; line-height: 1; }
.nav-label { font-size: 10px; }
.nav-item.active {
  color: var(--accent);
}
.nav-item.active .nav-icon {
  transform: scale(1.1);
}
.nav-item:active {
  background: rgba(167, 139, 250, 0.08);
}

/* ============================================
   МОДАЛКА BACKUP
   ============================================ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal h3 {
  margin-bottom: 8px;
  font-size: 17px;
}
.modal p {
  color: var(--ink-dim);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: flex-end;
}
.modal textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--ink);
  font-family: "SF Mono", Menlo, Monaco, monospace;
  font-size: 11px;
  resize: vertical;
}

/* ============================================
   МОБИЛЬНЫЕ ТОЧНЫЕ ПРАВКИ
   ============================================ */
@media (max-width: 480px) {
  .wrap { padding: 14px 12px 24px; }
  .exercise-ru { font-size: 16px; }
  .de { font-size: 15px; }
  .chip { font-size: 14px; padding: 8px 12px; }
  .flash-word { font-size: 26px; }
  .flash-btn {
    min-width: 76px;
    padding: 11px 12px;
    font-size: 12px;
  }
  .flash-controls { gap: 6px; }
  .stat-num { font-size: 20px; }
  .btn { padding: 10px 14px; font-size: 12px; }
}

/* ============================================
   Тач-фидбек haptic-like
   ============================================ */
@media (hover: hover) {
  .btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--accent); }
  .flash-btn:hover { transform: translateY(-1px); }
  .icon-btn:hover { color: var(--ink); background: var(--card-hi); }
  .sub-tab:hover:not(.active) { color: var(--ink); background: rgba(255,255,255,0.03); }
  .nav-item:hover:not(.active) { color: var(--ink-dim); }
  .chip:hover { background: linear-gradient(135deg, #3a3a4a, #2a2a3a); transform: translateY(-1px); }
}
