:root {
  --green:        #24462b;
  --green-2:      #2d5836;
  --green-soft:   #e8eee9;
  --green-line:   rgba(36, 70, 43, 0.10);
  --green-line-2: rgba(36, 70, 43, 0.18);
  --orange:       #f37a09;
  --orange-2:     #d96a05;
  --orange-soft:  #fff1e1;
  --orange-line:  rgba(243, 122, 9, 0.30);
  --bg:           #ffffff;
  --bg-warm:      #faf8f3;
  --surface:      #ffffff;
  --surface-2:    #f6f4ee;
  --surface-3:    #efece4;
  --text:         #24462b;
  --text-strong:  #1a2620;
  --muted:        #6b7869;
  --muted-2:      #9aa39b;
  --danger:       #b8442e;
  --danger-soft:  #fbe9e3;
  --warning:      #c97a0c;
  --warning-soft: #fdf2dc;
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  /* dvh tracks the dynamic viewport (Telegram WebView resizes for keyboard).
     min-height (not height) so content + padding can push body taller and
     the page scrolls naturally. */
  min-height: 100vh;
  min-height: 100dvh;
  /* --nav-h is measured at runtime by syncBottomPad(); fallback covers
     bottom-nav + safe-area on first paint. Buffer is generous so the last
     line clears the tab nav on every device. */
  padding-bottom: calc(var(--nav-h, 80px) + 64px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
input, textarea, button { font-size: inherit; }

/* ─── KEYFRAMES ─── */
@keyframes splashBounce {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashPulse {
  0%,100% { background: var(--surface); }
  40%,80% { background: var(--green-soft); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SPLASH ─── */
#splash {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
}
.splash-mark {
  width: 180px;
  animation: splashBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-mark img { width: 100%; height: auto; display: block; }
.splash-tag {
  font-size: 13px; color: var(--muted); font-weight: 500;
  animation: fadeInUp 0.5s 0.5s both;
}

/* ─── ONBOARDING ─── */
#onboarding {
  position: fixed; inset: 0; z-index: 1500;
  background: var(--bg);
  display: none; flex-direction: column;
  padding: 36px 26px calc(26px + env(safe-area-inset-bottom));
  animation: fadeIn 0.3s both;
  overflow-y: auto;
}
#onboarding.show { display: flex; }
.ob-mark {
  width: 140px;
  margin: 0 auto 26px;
}
.ob-mark img { width: 100%; height: auto; display: block; }
.ob-title {
  font-size: 30px; font-weight: 800; line-height: 1.1;
  letter-spacing: -1px;
  color: var(--green);
  margin-bottom: 12px;
}
.ob-title em { font-style: normal; color: var(--orange); }
.ob-text {
  font-size: 15px; color: var(--muted); line-height: 1.55;
  font-weight: 500; margin-bottom: 26px;
  max-width: 320px;
}
.ob-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: auto; }
.ob-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px; padding: 14px 16px;
}
.ob-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.ob-item-title {
  font-size: 14px; font-weight: 700; color: var(--green);
  margin-bottom: 2px; letter-spacing: -0.2px;
}
.ob-item-text {
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  font-weight: 500;
}
.ob-cta {
  margin-top: 22px;
  width: 100%;
  background: var(--orange); color: #fff;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.2px;
  border-radius: 16px; padding: 17px;
  box-shadow: 0 8px 22px rgba(243,122,9,0.30), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 0.12s;
}
.ob-cta:active { transform: scale(0.97); }
.ob-cta-sub {
  font-size: 12px; color: var(--muted-2);
  text-align: center; margin-top: 10px; font-weight: 500;
}
.ob-step { display: flex; flex-direction: column; flex: 1; width: 100%; animation: fadeIn 0.3s both; }
.ob-step2-eyebrow,
.ob-step-eyebrow {
  font-size: 11px; font-weight: 800; color: var(--orange);
  letter-spacing: 0.7px; text-transform: uppercase; margin-bottom: 10px;
}
.ob-cta:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: not-allowed;
}

/* ─── ONBOARDING: welcome chips + mini-features ─── */
.ob-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.ob-chip {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 100px;
  padding: 7px 12px;
  letter-spacing: -0.1px;
}
.ob-chip-more {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--green-line);
  font-weight: 600;
}
.ob-features-mini {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 8px;
}
.ob-feat-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13.5px; line-height: 1.45;
  color: var(--text);
  font-weight: 500;
}
.ob-feat-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.ob-feat-text { letter-spacing: -0.1px; }

/* ─── ONBOARDING: interactive flashcard demo (uses real .flash markup
   so it visually matches what the user will see during study). The
   wrapper just adds spacing above the card and keeps the srs-zone
   pinned right under it. */
.ob-card-stage {
  margin: 14px 0;
  display: flex; flex-direction: column;
}

/* ─── ONBOARDING: passive mode previews (quiz + type)
   Horizontal snap-scrolling carousel — swipe to see both modes,
   pagination dots indicate which is shown. */
.ob-mode-hint {
  font-size: 13px; color: var(--muted);
  font-weight: 500;
  margin-top: -10px;
  margin-bottom: 16px;
}
.ob-mode-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  margin: 0 -26px;       /* bleed to screen edges so swipes feel native */
  padding-left: 26px;
  padding-right: 26px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ob-mode-scroll::-webkit-scrollbar { display: none; }
.ob-mode-pane {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.ob-mode-label {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 8px; padding-left: 4px;
}
.ob-mode-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 10px;
  margin-bottom: 6px;
}
.ob-mode-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-line);
  transition: background 0.2s, width 0.2s;
}
.ob-mode-dot.active {
  background: var(--orange);
  width: 18px;
  border-radius: 100px;
}

/* Compact static preview of the quiz card. Non-interactive — pointer-events
   off so taps don't accidentally seem like answers. */
.ob-quiz-demo {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 16px 16px 14px;
  text-align: center;
  pointer-events: none;
}
.ob-quiz-tag {
  display: inline-block;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px;
  color: var(--green); text-transform: uppercase;
  background: var(--green-soft);
  border-radius: 100px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.ob-quiz-term {
  font-size: 22px; font-weight: 800;
  color: var(--green-2);
  letter-spacing: -0.6px;
  word-break: break-word;
  line-height: 1.05;
  margin-bottom: 2px;
}
.ob-quiz-ipa {
  font-size: 12px; color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}
.ob-quiz-opts {
  display: flex; flex-direction: column; gap: 6px;
}
.ob-quiz-opt {
  border: 1.5px solid var(--green-line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text);
  text-align: left;
  letter-spacing: -0.1px;
  display: flex; align-items: center; justify-content: space-between;
}
.ob-quiz-opt.correct {
  background: #e6f4e8;
  border-color: #5da66c;
  color: #1f5b2a;
  font-weight: 800;
}
.ob-quiz-opt.correct svg { width: 14px; height: 14px; }

/* Compact static preview of the type-mode card. */
.ob-type-demo {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 16px 16px 14px;
  text-align: center;
  pointer-events: none;
}
.ob-type-tag {
  display: inline-block;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px;
  color: var(--green); text-transform: uppercase;
  background: var(--green-soft);
  border-radius: 100px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.ob-type-trans {
  font-size: 20px; font-weight: 700;
  color: var(--green-2);
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
.ob-type-input {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--green-line);
  border-radius: 12px;
  padding: 11px 14px;
  text-align: left;
}
.ob-type-input.right {
  border-color: #5da66c;
  background: #e6f4e8;
}
.ob-type-value {
  font-size: 16px; font-weight: 700;
  color: var(--green);
  letter-spacing: -0.2px;
}
.ob-type-input svg {
  width: 18px; height: 18px;
  color: #2f7a3c;
  flex-shrink: 0;
}
.ob-pack-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 8px; margin-bottom: auto;
  max-height: 60vh; overflow-y: auto;
  padding-bottom: 4px;
}
.ob-pack-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--green-line);
  border-radius: 14px; padding: 14px 16px;
  text-align: left; cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}
.ob-pack-card:active { transform: scale(0.98); }
.ob-pack-card:hover { border-color: var(--orange); box-shadow: 0 4px 12px rgba(243,122,9,0.10); }
.ob-pack-card.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 6px 14px rgba(243,122,9,0.14);
}
.ob-pack-card.selected .ob-pack-title { color: var(--orange); }
.ob-pack-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
.ob-pack-meta { flex: 1; min-width: 0; }
.ob-pack-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.ob-pack-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ob-pack-count {
  font-size: 11px; font-weight: 800; color: var(--green);
  background: rgba(36,70,43,0.10); padding: 4px 8px; border-radius: 999px;
  flex-shrink: 0;
}
.ob-pack-loading {
  text-align: center; color: var(--muted-2);
  font-size: 13px; padding: 24px 0; font-weight: 500;
}
.ob-skip {
  background: none; border: none;
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 12px; margin-top: 8px;
  cursor: pointer; text-align: center;
}
.ob-skip:active { color: var(--orange); }

/* ─── APP SHELL ─── */
#app { display: none; padding: 14px 18px 0; position: relative; z-index: 1; animation: fadeIn 0.3s both; }
#app.show { display: block; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding-top: 4px;
}
.header.hide { display: none; }
.screen-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px;
  padding-top: 4px;
}
.screen-topbar-del {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--danger);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(184, 68, 46, 0.25);
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
}
.screen-topbar-del svg { width: 16px; height: 16px; }
.screen-topbar-del:active {
  transform: scale(0.93);
  box-shadow: 0 1px 2px rgba(184, 68, 46, 0.18);
}
.screen-topbar.hide { display: none; }
.screen-back {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px 6px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.screen-back svg { width: 16px; height: 16px; }
.screen-back:active { transform: scale(0.96); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 28px; height: 22px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name {
  font-size: 17px; font-weight: 800; color: var(--green);
  letter-spacing: -0.3px;
}
.streak {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--orange); color: #fff;
  border-radius: 100px; padding: 7px 14px 7px 12px;
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.1px;
  box-shadow: 0 6px 14px rgba(243,122,9,0.30);
  transition: transform 0.15s;
}
.streak:active { transform: scale(0.96); }
.streak.zero { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.brand-actions { display: flex; align-items: center; gap: 8px; }
.icon-pill {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-line);
  transition: transform 0.12s;
}
.icon-pill:active { transform: scale(0.92); }
.icon-pill svg { width: 16px; height: 16px; }

/* ─── DASHBOARD ─── */
.dashboard-section { margin-bottom: 22px; }
.dashboard-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 0 4px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.dashboard-section-title .add-link {
  font-size: 12px; color: var(--orange); font-weight: 700;
  letter-spacing: 0.2px; text-transform: none;
}
.today-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  color: #fff;
  border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(36,70,43,0.15);
  margin-bottom: 14px;
}
.today-banner-text { flex: 1; min-width: 0; }
.today-banner-label {
  font-size: 10px; font-weight: 700; opacity: 0.7;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 2px;
}
.today-banner-num {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.4px; line-height: 1.1;
}
.today-banner-num small {
  opacity: 0.55; font-size: 12px; font-weight: 600;
  margin-left: 5px; letter-spacing: -0.1px;
}
.today-cta {
  flex-shrink: 0;
  background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: -0.1px;
  border-radius: 10px; padding: 9px 14px;
  box-shadow: 0 4px 12px rgba(243,122,9,0.30);
  transition: transform 0.12s;
}
.today-cta:active { transform: scale(0.96); }
.today-cta.disabled {
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.65);
  box-shadow: none; pointer-events: none;
}
/* Слово дня — top card on Главная. Single concrete word, taps to reveal,
   reveal counts as a study session for the streak. */
.wotd-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 4px;
  padding: 18px 20px;
  margin-bottom: 16px;
  min-height: 168px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(243,122,9,0.30);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}
.wotd-card:active { transform: scale(0.985); }
.wotd-card.flipped {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--orange);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.wotd-flip-hint {
  display: block;
  margin-top: auto; padding-top: 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  opacity: 0.78;
}
.wotd-card.flipped .wotd-flip-hint { color: var(--orange); opacity: 1; }
.wotd-example {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.2px; line-height: 1.35;
  margin-top: 4px;
}
.wotd-example b { font-weight: 800; color: var(--orange); }
.wotd-example-tr {
  display: block; margin-top: 6px;
  font-size: 13px; font-weight: 500; opacity: 0.82;
}
.wotd-eyebrow {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase;
  opacity: 0.85;
}
.wotd-card.flipped .wotd-eyebrow { color: var(--orange); opacity: 1; }
.wotd-term {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px; line-height: 1.1;
  margin-top: 2px;
}
.wotd-ipa {
  font-size: 13px;
  opacity: 0.78;
  font-style: italic;
}
.wotd-trans {
  font-size: 18px; font-weight: 600;
  margin-top: 8px;
  letter-spacing: -0.2px;
}
.wotd-trans.hidden { display: none; }
.wotd-reveal-btn {
  margin-top: 14px;
  align-self: stretch;
  padding: 11px 16px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 100px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}
.wotd-reveal-btn:active { transform: scale(0.985); background: rgba(255,255,255,0.28); }
.wotd-actions {
  display: flex; gap: 8px;
  margin-top: 14px;
  align-self: stretch;
}
.wotd-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 14px;
  background: var(--orange);
  color: #fff;
  border: none; border-radius: 100px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}
.wotd-btn.ghost {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--green-line);
}
.wotd-btn:active { transform: scale(0.97); }

/* Full-width CTA — single big tap-target replacing the old text+button banner */
.today-cta-full {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: linear-gradient(135deg, var(--orange) 0%, #e06a00 100%);
  color: #fff;
  border: none; border-radius: 16px;
  padding: 16px 48px 16px 18px;
  margin-bottom: 16px;
  text-align: left; cursor: pointer;
  box-shadow: 0 8px 18px rgba(243,122,9,0.28);
  transition: transform 0.12s;
}
.today-cta-full:active { transform: scale(0.985); }
.today-cta-full.disabled {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}
.today-cta-full.ghost {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  box-shadow: 0 8px 18px rgba(36,70,43,0.18);
}
.today-cta-headline {
  font-size: 16px; font-weight: 800; letter-spacing: -0.2px;
  line-height: 1.25;
}
.today-cta-meta {
  font-size: 13px; font-weight: 500; opacity: 0.85;
  line-height: 1.3;
}
.today-cta-arrow {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; opacity: 0.8;
}
.heatmap-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  padding: 12px 12px 10px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--green-line);
  margin-bottom: 8px;
}
.heatmap-day {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.heatmap-bar {
  width: 100%; height: 36px;
  border-radius: 6px;
  background: var(--surface-3);
  position: relative; overflow: hidden;
}
.heatmap-bar.today { box-shadow: 0 0 0 2px var(--orange); }
.heatmap-bar-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--green);
  border-radius: 6px;
  transition: height 0.3s ease;
}
.heatmap-bar.empty .heatmap-bar-fill { background: var(--green-line-2); }
.heatmap-day-label {
  font-size: 10px; font-weight: 600; color: var(--muted-2);
}
.deck-grid {
  display: flex; flex-direction: column; gap: 10px;
}
.deck-card-v2 {
  background: var(--surface);
  border: 1.5px solid var(--green-line);
  border-radius: 16px;
  padding: 14px 14px 14px 16px;
  display: flex; align-items: center; gap: 14px;
  text-align: left; width: 100%;
  transition: transform 0.12s, box-shadow 0.12s;
  animation: fadeInUp 0.25s both;
  box-shadow: 0 4px 14px rgba(36,70,43,0.08);
}
.deck-card-v2:active { transform: scale(0.985); }
.deck-card-v2:hover { box-shadow: 0 6px 18px rgba(36,70,43,0.12); }
.deck-card-chev {
  font-size: 24px; color: var(--muted-2); font-weight: 600;
  flex-shrink: 0; padding: 0 4px;
  align-self: center;
}
.deck-card-v2 .deck-emoji {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.deck-card-v2 .deck-body { flex: 1; min-width: 0; }
.deck-card-v2 .deck-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.deck-progress-row {
  display: flex; align-items: center; gap: 8px;
}
.deck-progress-track {
  position: relative;
  flex: 1; height: 5px;
  border-radius: 5px;
  background: var(--surface-3); overflow: hidden;
}
.deck-progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s, left 0.3s;
}
.deck-progress-fill.mastered { background: var(--green); }
.deck-progress-fill.learning { background: var(--orange); border-radius: 0 5px 5px 0; }
.deck-meta {
  font-size: 12px; color: var(--muted); font-weight: 600;
  flex-shrink: 0; letter-spacing: -0.1px;
}
.deck-due {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  background: var(--orange-soft); color: var(--orange);
  font-size: 11px; font-weight: 800;
  border-radius: 8px; padding: 3px 7px;
  letter-spacing: -0.1px;
}
.deck-card-v2 .deck-arrow {
  font-size: 22px; color: var(--muted-2);
  flex-shrink: 0; line-height: 1; font-weight: 600;
}
.deck-card-v2.complete .deck-progress-fill { background: var(--orange); }
.deck-learn-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  border-radius: 100px;
  background: var(--orange); color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800;
  letter-spacing: -0.1px;
  box-shadow: 0 4px 12px rgba(243,122,9,0.30);
  transition: transform 0.12s;
}
.deck-learn-btn:active { transform: scale(0.95); }
.deck-learn-btn svg { width: 13px; height: 13px; }
.deck-learn-btn.zero {
  background: var(--surface-3); color: var(--muted-2);
  box-shadow: none;
}

/* "All done today" celebratory card on dashboard */
.empty-today-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #f5e9d0 0%, #fef3e1 100%);
  border: 1px solid var(--orange-line);
  border-radius: 20px;
  padding: 24px 18px 22px;
  margin-bottom: 14px;
  box-shadow: 0 10px 22px rgba(243,122,9,0.10);
}
.empty-today-emoji { font-size: 38px; margin-bottom: 8px; line-height: 1; }
.empty-today-title {
  font-size: 18px; font-weight: 800; color: var(--green);
  letter-spacing: -0.4px; margin-bottom: 4px;
}
.empty-today-sub {
  font-size: 13px; color: var(--muted); font-weight: 600;
  line-height: 1.45; max-width: 260px;
}

/* Pack card "+ Добавить" affordance (replaces chevron arrow) */
.pack-add-cta {
  flex-shrink: 0;
  background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 800;
  border-radius: 100px;
  padding: 7px 12px;
  letter-spacing: -0.1px;
  box-shadow: 0 4px 10px rgba(243,122,9,0.28);
  transition: transform 0.12s;
}
.pack-add-cta:active { transform: scale(0.95); }
.pack-add-cta.added {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}
.pack-card.added {
  background: var(--surface-2);
  border-color: var(--green-line, var(--border));
}
.pack-section-title {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin: 14px 4px 8px;
}
.pack-section-title:first-child { margin-top: 0; }
.pack-collapse {
  margin-top: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: transparent;
}
.pack-collapse summary {
  padding: 12px 14px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  cursor: pointer; user-select: none;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.pack-collapse summary::after {
  content: '▾';
  color: var(--muted-2); margin-left: 8px;
  transition: transform 0.18s;
}
.pack-collapse[open] summary::after { transform: rotate(180deg); }
.pack-collapse summary::-webkit-details-marker { display: none; }
.pack-collapse-body {
  padding: 0 10px 10px;
  display: flex; flex-direction: column; gap: 8px;
}

/* ─── PACKS: Pro bundle (light card, brand-orange stroke) ─── */
.pro-bundle-card {
  position: relative;
  width: 100%;
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 20px 20px;
  border: 2px solid var(--orange);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  text-align: left; cursor: pointer;
  box-shadow: 0 8px 22px rgba(243,122,9,0.12);
  transition: transform 0.12s, box-shadow 0.18s;
  overflow: hidden;
}
.pro-bundle-card:hover { box-shadow: 0 10px 28px rgba(243,122,9,0.22); }
.pro-bundle-card:active { transform: scale(0.985); }
.pro-bundle-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.pro-bundle-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  font-size: 11px; font-weight: 900;
  letter-spacing: 1.2px;
  padding: 5px 11px 5px 9px;
  border-radius: 100px;
  box-shadow: 0 3px 10px rgba(243,122,9,0.35);
  flex-shrink: 0;
}
.pro-bundle-badge::before {
  content: '✦'; font-size: 12px; line-height: 1;
}
.pro-bundle-title {
  font-size: 19px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.3px; line-height: 1.2;
}
.pro-bundle-eyebrow {
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
  margin-bottom: 12px;
}
.pro-bundle-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 6px;
}
/* Inside the Pro bundle: row look — locked, light, one tap target. */
.pro-bundle-list .pro-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  pointer-events: none;
}
.pro-row-emoji {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--surface);
  border-radius: 10px;
  flex-shrink: 0;
}
.pro-row-body { flex: 1; min-width: 0; }
.pro-row-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pro-row-desc {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pro-row-lock {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: 8px;
  flex-shrink: 0;
}
.pro-row-lock svg { width: 14px; height: 14px; }
.pro-bundle-more {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 12px;
  font-size: 12px; font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.2px;
  background: var(--orange-soft);
  border: 1px dashed var(--orange-line);
  border-radius: 12px;
}
.pro-bundle-footer {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 16px;
}
.pro-bundle-price {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.pro-bundle-price-num {
  font-size: 18px; font-weight: 900; color: var(--ink);
  letter-spacing: -0.2px;
}
.pro-bundle-price-sub {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.2px;
}
.pro-bundle-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  border-radius: 100px;
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.1px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(243,122,9,0.40);
}

/* Empty-state CTA card on packs screen */
.pack-empty-cta-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  margin-bottom: 14px;
  text-align: center;
}
.pack-empty-cta-btn {
  margin-top: 14px;
  padding: 12px 22px;
  font-size: 14px;
}
.pack-empty {
  text-align: center;
  padding: 26px 18px;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1px dashed var(--green-line-2);
  color: var(--muted);
}
.pack-empty-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  margin-bottom: 4px;
}
.pack-empty-sub { font-size: 12.5px; line-height: 1.45; }

/* Settings sheet */
.settings-card {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.settings-card-label {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 10px;
}

/* ─── SETTINGS: school links footer ─── */
.school-links { padding: 14px 12px; }
.school-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.school-link + .school-link { margin-top: 2px; }
.school-link:active { background: var(--surface); }
.school-link-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft);
  border-radius: 10px;
  font-size: 17px;
  flex-shrink: 0;
}
.school-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.school-link-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.school-link-sub   { font-size: 12px; color: var(--muted); font-weight: 500; }
.school-link-arrow { color: var(--muted-2); font-weight: 700; flex-shrink: 0; }

/* ─── SETTINGS: subscription row ─── */
.subscription-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, rgba(243,122,9,0.10) 0%, rgba(243,122,9,0.04) 100%);
  border: 1.5px solid var(--orange);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer; width: 100%; text-align: left;
  transition: transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(243,122,9,0.10);
}
.subscription-row:active { transform: scale(0.99); }
.subscription-row:hover { box-shadow: 0 6px 16px rgba(243,122,9,0.18); }
.subscription-row.is-pro {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  border: 1.5px solid var(--green);
  box-shadow: 0 6px 18px rgba(36, 70, 43, 0.22);
}
.subscription-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.subscription-row-label { font-size: 11px; font-weight: 800; color: var(--muted-2); letter-spacing: 0.5px; text-transform: uppercase; }
.subscription-row-value { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.2px; display: inline-flex; align-items: center; gap: 6px; }
.subscription-row-sub { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; line-height: 1.3; }
.subscription-row.is-pro .subscription-row-label { color: rgba(255,255,255,0.72); }
.subscription-row.is-pro .subscription-row-value { color: #fff; }
.subscription-row.is-pro .subscription-row-sub { color: rgba(255,255,255,0.88); }
.subscription-row-cta {
  flex-shrink: 0;
  padding: 8px 12px;
  background: var(--orange); color: #fff;
  border-radius: 100px;
  font-size: 12px; font-weight: 800; letter-spacing: -0.1px;
  white-space: nowrap;
}
.subscription-row.is-pro .subscription-row-cta {
  background: rgba(255,255,255,0.18); color: #fff;
  font-size: 12px; font-weight: 800; padding: 8px 12px;
}
.pro-row-crown { font-size: 18px; line-height: 1; }

/* ─── PACKS: pro-deck card when user IS pro (no paywall wrapper) ─── */
.pack-section-title-pro {
  font-size: 13px; font-weight: 800; color: var(--green);
  letter-spacing: 0.3px;
  margin: 18px 4px 8px;
  display: flex; align-items: center; gap: 6px;
}
.pack-card-pro {
  position: relative;
  border-color: var(--green);
}
.pack-card-pro:hover { border-color: var(--green-2); }
.pack-card-pro .pack-card-title { color: var(--green); }
.pack-card-pro .pack-card-content { padding-right: 44px; }
.pack-pro-pill {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--green); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: 0.6px;
  padding: 3px 7px; border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1;
  z-index: 2;
}
.pack-card-added-marker {
  font-size: 11px; font-weight: 600;
  color: var(--green); opacity: 0.75;
  white-space: nowrap;
}

/* ─── DASHBOARD: simplified deck meta (just word count, no progress bar) ─── */
.deck-meta-simple { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ─── ADD-DECK: Вручную / С ИИ segment toggle (on both screens) ─── */
.add-deck-segment {
  display: flex; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 4px;
  margin: 0 0 16px;
}
.segment-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-size: 14px; font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.segment-btn:active { transform: scale(0.985); }
.segment-btn.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 6px rgba(36,70,43,0.08);
}
.segment-pro-pill {
  background: var(--orange); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  padding: 2px 6px; border-radius: 100px;
}

/* ─── AI EXTRACT SCREEN ─── */
.ai-disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(243, 122, 9, 0.08);
  border: 1px solid rgba(243, 122, 9, 0.30);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px; color: var(--text);
  line-height: 1.4;
}
.ai-disclaimer svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; margin-top: 1px; }

.ai-screen-textarea { min-height: 140px; resize: vertical; }

.ai-results-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ai-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.ai-row:hover { border-color: var(--green); }
.ai-row.dup { opacity: 0.55; cursor: default; background: var(--surface-2); }
.ai-row-text { flex: 1; min-width: 0; }
.ai-row-term {
  font-size: 15px; font-weight: 700; color: var(--green);
  display: flex; align-items: center; gap: 6px;
}
.ai-row-trans { font-size: 13px; color: var(--text); margin-top: 2px; }
.ai-row-dup-pill {
  background: var(--surface-3); color: var(--muted);
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  padding: 2px 6px; border-radius: 100px;
  text-transform: uppercase;
}

/* iOS-style toggle for AI candidate rows */
.ios-toggle {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px;
  background: var(--surface-3);
  border-radius: 100px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.18s;
  margin: 0;
}
.ios-toggle::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
  transition: left 0.18s;
}
.ios-toggle:checked { background: var(--green); }
.ios-toggle:checked::before { left: 20px; }
.ios-toggle:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-add-btn { width: 100%; margin-top: 14px; }

/* ─── PACK PREVIEW MODAL ─── */
.pack-preview-modal { max-height: 86vh; display: flex; flex-direction: column; }
.pack-preview-head {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.pack-preview-emoji {
  font-size: 32px; line-height: 1; flex-shrink: 0;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border-radius: 14px;
}
.pack-preview-titles { flex: 1; min-width: 0; }
.pack-preview-title {
  font-size: 18px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.2px; line-height: 1.2;
}
.pack-preview-sub {
  font-size: 13px; color: var(--muted);
  margin-top: 4px; line-height: 1.35;
}
.pack-preview-words {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 4px 0 12px;
  max-height: 50vh;
}
.pack-preview-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 12px;
  background: var(--surface-2); border-radius: 10px;
  font-size: 14px;
}
.pack-preview-row .pp-term { font-weight: 700; color: var(--ink); }
.pack-preview-row .pp-trans { color: var(--muted); font-weight: 500; text-align: right; max-width: 60%; }
.pack-preview-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: var(--bg);
}
.pack-preview-footer .btn {
  width: 100%; padding: 16px;
  font-size: 15px; font-weight: 700;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}
.pack-preview-footer .btn.added {
  background: var(--green) !important;
  color: #fff !important;
  pointer-events: none;
}

/* ─── CREATE DECK: row-based word input ─── */
.word-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.word-row {
  display: grid; grid-template-columns: 1fr 1fr 32px; gap: 6px;
  align-items: center;
  transition: opacity 0.18s, transform 0.22s;
}
.word-row.appearing { opacity: 0; transform: translateY(-6px); }
.word-row .word-row-input {
  width: 100%; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; color: var(--ink);
  font-family: inherit;
}
.word-row .word-row-input:focus { outline: none; border-color: var(--orange); }
.word-row .word-row-input.invalid { border-color: var(--red); }
.word-row-del {
  width: 32px; height: 32px; padding: 0;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted-2); font-size: 18px; line-height: 1;
  border-radius: 8px;
}
.word-row-del:hover { color: var(--red); background: rgba(229,62,62,0.08); }
.word-row-add {
  width: 100%; padding: 10px;
  background: transparent; border: 1px dashed var(--border);
  border-radius: 10px; cursor: pointer;
  color: var(--orange); font-weight: 600; font-size: 13px;
}
.word-row-add:hover { border-color: var(--orange); border-style: solid; }
.word-paste-toggle { margin-top: 12px; }
.word-paste-toggle summary {
  font-size: 13px; color: var(--muted); cursor: pointer;
  padding: 6px 0; user-select: none;
}
.word-paste-toggle summary:hover { color: var(--orange); }
.field-count { font-size: 12px; color: var(--muted-2); font-weight: 500; margin-left: 6px; }

/* ─── DASHBOARD: inline pack suggestions (visually subordinate to my decks) ─── */
.suggest-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.suggest-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left; cursor: pointer;
  width: 100%;
}
.suggest-emoji {
  font-size: 22px; line-height: 1.2;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface-2);
}
.suggest-meta { min-width: 0; padding-top: 1px; }
.suggest-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  line-height: 1.2;
}
.suggest-sub {
  font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.suggest-count {
  font-size: 11px; font-weight: 700; color: var(--orange);
  padding: 4px 9px; border-radius: 999px;
  flex-shrink: 0;
  background: rgba(243,122,9,0.10);
  border: 1px solid rgba(243,122,9,0.25);
  white-space: nowrap;
}
.explore-more-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer;
  margin-top: 4px;
}
.explore-more-btn:hover { border-color: var(--orange); color: var(--orange); }
.dash-search { position: relative; margin-bottom: 14px; }
.dash-search.is-hidden { display: none; }
.icon-pill.is-active { background: var(--orange); color: #fff; }
.dash-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  background: var(--surface-2); border: none;
  border-radius: 50%; cursor: pointer;
  color: var(--muted); font-size: 16px; line-height: 22px;
  padding: 0;
}
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-results-title {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin: 14px 0 6px;
}
.search-result-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left; cursor: pointer; width: 100%;
}
.search-result-row:active { transform: scale(0.985); }
.sr-emoji { font-size: 18px; flex-shrink: 0; }
.sr-body { flex: 1; min-width: 0; }
.sr-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.sr-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.search-empty {
  padding: 20px 16px; text-align: center;
  color: var(--muted-2); font-size: 13px;
}

/* ─── STATS SCREEN (tap-the-flame target, full screen, no Pro promo) ─── */
.screen-title {
  font-size: 22px; font-weight: 800; color: var(--ink);
  margin: 4px 0 18px; letter-spacing: -0.3px;
}
.stats-streak-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.stats-streak-card {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.stats-streak-icon { font-size: 24px; line-height: 1; }
.stats-streak-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stats-streak-num { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.stats-streak-label { font-size: 11px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.4px; }

.stats-week {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.stats-week-title { font-size: 11px; font-weight: 800; color: var(--muted-2); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 12px; }
.stats-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.stats-week-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stats-week-day { font-size: 10px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.3px; text-transform: uppercase; }
.stats-week-square { width: 100%; aspect-ratio: 1; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.stats-week-square.done { background: var(--green); border-color: var(--green); }
.stats-week-square.today { background: var(--orange); border-color: var(--orange); }
.stats-week-square.today.done { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 2px var(--orange) inset; }

/* ─── STATS: month calendar ─── */
.stats-cal-card {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.stats-cal-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.stats-cal-title {
  font-size: 14px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.2px;
  text-transform: capitalize;
}
.stats-cal-sub {
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.stats-cal-dow {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px; margin-bottom: 6px;
}
.cal-dow {
  text-align: center;
  font-size: 9.5px; font-weight: 700; color: var(--muted-2);
  letter-spacing: 0.4px;
}
.stats-cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 4px 0 2px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  min-width: 0; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: -0.2px;
  border: none;
  padding: 0;
}
.cal-cell.empty { visibility: hidden; padding: 0; }
.cal-cell.active { background: var(--green); color: #fff; }
.cal-cell.today {
  background: var(--orange-soft);
  color: var(--orange-2);
  box-shadow: inset 0 0 0 1.5px var(--orange);
}
.cal-cell.active.today {
  background: var(--green);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--orange);
}

/* ─── STATS: streak freezes ─── */
.stats-freeze-card {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 12px 14px 10px;
  margin-bottom: 12px;
  text-align: center;
}
.stats-freeze-pips {
  display: flex; justify-content: center; gap: 14px;
  padding: 2px 0 6px;
}
.stats-freeze-caption {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  line-height: 1.4;
}
.freeze-pip {
  font-size: 18px;
  filter: grayscale(1);
  opacity: 0.35;
  transition: filter 0.2s, opacity 0.2s;
}
.freeze-pip.on {
  filter: none;
  opacity: 1;
}
.stats-freeze-rule {
  font-size: 11px; color: var(--muted-2);
  font-weight: 500; line-height: 1.45;
  border-top: 1px dashed var(--green-line);
  padding-top: 10px;
}

.stats-today-card {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.stats-today-title { font-size: 11px; font-weight: 800; color: var(--muted-2); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 10px; }
.stats-today-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.stats-today-row:last-child { margin-bottom: 0; }
.stats-today-key { color: var(--muted); font-weight: 600; }
.stats-today-val { color: var(--ink); font-weight: 800; }
.stats-today-val.done { color: var(--green); }
.stats-today-val.pending { color: var(--orange); }
.stats-progress { height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.stats-progress-fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width 0.25s; }

.stats-totals { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stats-total-card { background: var(--surface-2); border: 1px solid var(--green-line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.stats-total-num { font-size: 20px; font-weight: 800; color: var(--ink); }
.stats-total-label { font-size: 11px; color: var(--muted-2); margin-top: 2px; font-weight: 600; }

.settings-stepper {
  display: flex; align-items: center; gap: 12px;
}
.stepper-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--green-line);
  color: var(--green);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.stepper-btn:active { transform: scale(0.92); }
.stepper-btn:disabled { opacity: 0.4; pointer-events: none; }
.stepper-val {
  flex: 1; text-align: center;
  font-size: 22px; font-weight: 800; color: var(--green);
  letter-spacing: -0.4px;
}
.stepper-val small {
  display: block; font-size: 11px; color: var(--muted);
  font-weight: 600; letter-spacing: 0;
  margin-top: 2px; text-transform: none;
}
.settings-danger {
  margin-top: 8px;
  text-align: center;
  background: none;
  color: var(--danger);
  font-size: 13px; font-weight: 600;
  padding: 10px;
  opacity: 0.8;
}

/* ─── REVIEW MENU (entry to /cards) ─── */
.review-menu { padding-top: 4px; animation: fadeInUp 0.25s both; }
.review-menu-title {
  font-size: 22px; font-weight: 800; color: var(--green);
  letter-spacing: -0.4px; margin-bottom: 4px;
}
.review-menu-sub {
  font-size: 13px; color: var(--muted); font-weight: 600;
  margin-bottom: 22px;
}
.review-menu-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 10px;
  transition: transform 0.12s;
  animation: fadeInUp 0.25s both;
}
.review-menu-opt:active { transform: scale(0.985); }
.rm-change-deck {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; padding: 4px 0;
  font-size: 13px; color: var(--orange); font-weight: 600;
  cursor: pointer; margin: -8px 0 14px;
}
.rm-change-deck:active { opacity: 0.6; }
/* Step layout for the review-menu screen */
.step-eyebrow {
  font-size: 11px; font-weight: 800; color: var(--orange);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin: 0 0 8px;
}
.review-deck-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--green);
  border-radius: 14px;
  padding: 12px 14px;
}
.rdc-emoji {
  font-size: 26px; line-height: 1; flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface-2);
}
.rdc-body { flex: 1; min-width: 0; }
.rdc-title {
  font-size: 16px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.2px; line-height: 1.2;
}
.rdc-sub {
  font-size: 12px; color: var(--muted);
  margin-top: 3px; line-height: 1.3;
}
.rdc-change {
  flex-shrink: 0;
  background: var(--orange); color: #fff;
  border: none; border-radius: 100px;
  padding: 8px 14px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(243,122,9,0.28);
}
.rdc-change:active { transform: scale(0.96); }
/* Numbered step indicator at the top of the review screens. */
.step-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 16px;
}
.step-dot {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.step-num {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--border);
}
.step-label {
  font-size: 12px; font-weight: 700; color: var(--muted-2);
  letter-spacing: -0.1px;
}
.step-dot.active .step-num {
  background: var(--orange); color: #fff; border-color: var(--orange);
  box-shadow: 0 4px 10px rgba(243,122,9,0.28);
}
.step-dot.active .step-label { color: var(--ink); }
.step-dot.done .step-num {
  background: var(--green); color: #fff; border-color: var(--green);
}
.step-dot.done .step-label { color: var(--green); }
.step-divider {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}
.step-divider.done { background: var(--green); }
.review-deck-chip.done { border-color: var(--green); }
.rdc-mini-eyebrow {
  font-size: 10px; font-weight: 800; color: var(--green);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 2px;
}
/* Combined review screen: deck chip + swap icon → opens picker sheet. */
.review-menu-eyebrow {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.8px; text-transform: uppercase;
  margin: 0 0 8px;
}
.review-deck-chip.switcher {
  width: 100%;
  cursor: pointer;
  text-align: left;
  background: var(--surface);
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.18s;
}
.review-deck-chip.switcher:active { transform: scale(0.99); }
.review-deck-chip.switcher:hover { box-shadow: 0 4px 14px rgba(36,70,43,0.18); }
.rdc-swap {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 10px;
  transition: transform 0.18s, background 0.15s;
}
.rdc-swap svg { width: 18px; height: 18px; }
.review-deck-chip.switcher:hover .rdc-swap {
  background: var(--green);
  color: #fff;
}
.review-deck-chip.switcher:active .rdc-swap { transform: rotate(180deg); }

/* Deck picker bottom-sheet. Reuses .modal-backdrop / .modal layout. */
.deck-picker-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.deck-picker-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  text-align: left; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
}
.deck-picker-row:active { transform: scale(0.99); }
.deck-picker-row.active {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.dpr-emoji {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--surface-2);
  border-radius: 10px;
  flex-shrink: 0;
}
.deck-picker-row.active .dpr-emoji { background: rgba(243,122,9,0.15); }
.dpr-body { flex: 1; min-width: 0; }
.dpr-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dpr-desc {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dpr-check {
  color: var(--orange);
  font-size: 18px; font-weight: 800;
  flex-shrink: 0;
}
.dpr-arrow {
  color: var(--muted-2);
  font-size: 22px; line-height: 1;
  flex-shrink: 0;
}

/* Mode picker (radio-style) + Start button on combined review screen. */
.review-menu-opt.mode-opt {
  border: 1.5px solid var(--border);
  transition: border-color 0.12s, background 0.12s, transform 0.1s;
}
.review-menu-opt.mode-opt.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.review-menu-opt.mode-opt.selected .rm-icon {
  background: var(--orange);
  color: #fff;
}
.review-menu-opt.mode-opt.selected .rm-title { color: var(--ink); }
.rm-radio {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  transition: border-color 0.12s, background 0.12s;
}
.review-menu-opt.mode-opt.selected .rm-radio {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.rm-radio svg {
  width: 14px; height: 14px;
  opacity: 0; transform: scale(0.5);
  transition: opacity 0.18s, transform 0.18s;
}
.review-menu-opt.mode-opt.selected .rm-radio svg {
  opacity: 1; transform: scale(1);
}
.review-menu-opt.mode-opt .rm-icon {
  transition: background 0.18s, color 0.18s;
}
.review-start-btn {
  width: 100%;
  margin-top: 18px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  border: none; border-radius: 16px;
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(243,122,9,0.32);
  transition: transform 0.1s, box-shadow 0.18s;
}
.review-start-btn:active { transform: scale(0.985); }
.review-start-btn:hover { box-shadow: 0 10px 24px rgba(243,122,9,0.42); }
.review-start-btn.disabled {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

/* Preview ("Полистать") prev/next bar. */
.preview-nav {
  display: flex; gap: 10px;
  margin-top: 18px;
}
.preview-nav-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, background 0.12s, border-color 0.12s;
}
.preview-nav-btn:not(:disabled):active { transform: scale(0.98); }
.preview-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.preview-nav-btn:first-child { flex: 0 0 56px; padding: 14px 0; }
.preview-nav-btn.primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(243,122,9,0.32);
}
.preview-nav-btn svg { width: 18px; height: 18px; }
.flash-example {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 10px;
  font-size: 14px; font-style: italic;
  line-height: 1.4;
  text-align: center;
  max-width: 90%;
}
.flash-example.hidden { display: none; }
.rm-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.rm-text { flex: 1; min-width: 0; }
.rm-title {
  font-size: 16px; font-weight: 700; color: var(--green);
  letter-spacing: -0.2px;
  margin-bottom: 3px;
}
.rm-desc {
  font-size: 12.5px; color: var(--muted);
  font-weight: 500; line-height: 1.4;
}
.rm-arrow {
  font-size: 22px; color: var(--muted-2);
  flex-shrink: 0; line-height: 1; font-weight: 600;
}

/* ─── DECK DETAIL HEADER (when words screen is filtered to one deck) ─── */
.deck-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--green-line);
  margin-bottom: 12px;
  animation: fadeInUp 0.2s both;
}
.deck-header-emoji {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.deck-header-body { flex: 1; min-width: 0; }
.deck-header-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  letter-spacing: -0.2px;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.deck-header-stats {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px; color: var(--muted); font-weight: 600;
  letter-spacing: -0.1px;
}
.deck-header-stats-row { display: flex; gap: 0; flex-wrap: wrap; }
.deck-header-stats span { white-space: nowrap; }
.deck-header-stats .sep { opacity: 0.45; padding: 0 5px; }
.deck-header-learn {
  flex-shrink: 0;
  background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700;
  border-radius: 10px; padding: 8px 14px;
  box-shadow: 0 4px 10px rgba(243,122,9,0.30);
  letter-spacing: -0.1px;
  transition: transform 0.12s;
}
.deck-header-learn:active { transform: scale(0.96); }
.deck-header-learn.ghost {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--green-line);
  box-shadow: none;
}
.deck-header-add {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, border-color 0.12s;
  flex-shrink: 0;
  color: var(--orange);
}
.deck-header-add:active { transform: scale(0.92); background: var(--orange-soft); border-color: var(--orange); }
.deck-header-add svg { width: 16px; height: 16px; }
.deck-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.deck-header-del {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--green-line);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, background 0.12s;
}
.deck-header-del:active { transform: scale(0.92); background: var(--danger-soft); }
.deck-header-del svg { width: 16px; height: 16px; }
.deck-header-locked {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--muted-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: help;
}
.deck-header-locked svg { width: 14px; height: 14px; }

/* ─── COMPLETION (celebration) SCREEN ─── */
.complete-card {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 28px 22px 24px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 16px 36px rgba(36,70,43,0.20);
  animation: fadeInUp 0.3s both;
}
.complete-card.perfect {
  background: linear-gradient(135deg, #f37a09 0%, #d96a05 100%);
  box-shadow: 0 16px 36px rgba(243,122,9,0.30);
}
.complete-emoji { font-size: 54px; margin-bottom: 8px; line-height: 1; }
.complete-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.complete-sub {
  font-size: 13px; opacity: 0.85; font-weight: 500;
  margin-bottom: 18px; line-height: 1.45;
}
.complete-stats {
  display: flex; gap: 8px;
  margin-bottom: 18px;
  justify-content: center;
}
.complete-stat {
  background: rgba(255,255,255,0.16);
  border-radius: 10px; padding: 8px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2px; text-transform: uppercase;
  opacity: 0.95;
  min-width: 70px;
}
.complete-stat strong {
  font-size: 18px; font-weight: 800;
  display: block; margin-bottom: 2px; letter-spacing: -0.3px;
}
.complete-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.complete-btn {
  background: rgba(255,255,255,0.95); color: var(--green);
  font-size: 15px; font-weight: 800;
  border-radius: 12px; padding: 14px;
  letter-spacing: -0.2px;
  transition: transform 0.12s;
}
.complete-btn:active { transform: scale(0.97); }
.complete-btn.ghost {
  background: rgba(255,255,255,0.18); color: #fff;
}
.add-deck-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px dashed var(--green-line-2);
  border-radius: 14px;
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.2px;
  margin-top: 8px;
  transition: transform 0.12s;
}
.add-deck-btn:active { transform: scale(0.985); }
/* Two-button row: 📚 Library / + Своя колода */
.add-deck-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.add-deck-row .add-deck-btn { margin-top: 0; }
.add-deck-btn.ghost {
  background: var(--surface);
  border: 1px solid var(--green-line-2);
  border-style: solid;
  color: var(--ink);
}
.dashboard-empty-actions {
  display: flex; flex-direction: column; gap: 8px;
  align-items: stretch;
  max-width: 280px; margin: 0 auto;
}

/* AI shortcut card on the create-deck screen — Pro-locked, full-width
   tap-to-paywall (or to overlay if user is Pro). */
.ai-shortcut-card {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(243,122,9,0.06) 0%, rgba(36,70,43,0.04) 100%);
  border: 1.5px solid var(--orange);
  border-radius: 16px;
  text-align: left; cursor: pointer;
  transition: transform 0.1s, box-shadow 0.18s;
  margin-bottom: 14px;
}
.ai-shortcut-card:active { transform: scale(0.99); }
.ai-shortcut-card:hover { box-shadow: 0 6px 16px rgba(243,122,9,0.18); }
.ai-shortcut-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(243,122,9,0.32);
}
.ai-shortcut-icon svg { width: 20px; height: 20px; }
.ai-shortcut-body { flex: 1; min-width: 0; }
.ai-shortcut-title {
  font-size: 15px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.2px;
}
.ai-shortcut-pro {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  font-size: 9px; font-weight: 900;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 100px;
  margin-left: 4px; vertical-align: 2px;
}
.ai-shortcut-desc {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}
.ai-shortcut-lock {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: 8px;
}
.ai-shortcut-lock svg { width: 14px; height: 14px; }
.ai-or-divider {
  position: relative;
  text-align: center;
  margin: 8px 0 14px;
  color: var(--muted-2);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.ai-or-divider::before, .ai-or-divider::after {
  content: '';
  position: absolute; top: 50%;
  width: calc(50% - 50px);
  height: 1px;
  background: var(--border);
}
.ai-or-divider::before { left: 0; }
.ai-or-divider::after { right: 0; }
.ai-or-divider span { background: var(--bg); padding: 0 8px; }
.dashboard-empty {
  text-align: center; padding: 28px 14px;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1px solid var(--green-line);
  color: var(--muted);
  font-size: 13px; font-weight: 500;
}
.dashboard-empty-title {
  font-size: 16px; font-weight: 700; color: var(--green);
  margin-bottom: 6px;
}
/* Cool empty state for first-time / skipped-onboarding users */
.dashboard-empty-pretty {
  text-align: center;
  padding: 28px 20px 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px dashed var(--border);
  border-radius: 18px;
  margin-bottom: 4px;
}
.dashboard-empty-emoji {
  font-size: 44px; line-height: 1;
  margin-bottom: 10px;
}
.dashboard-empty-pretty .dashboard-empty-title {
  font-size: 18px; font-weight: 800; color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.dashboard-empty-sub {
  font-size: 13px; color: var(--muted); line-height: 1.45;
  max-width: 280px; margin: 0 auto 16px;
}
.dashboard-empty-cta {
  padding: 12px 22px;
  font-size: 14px;
}
.dashboard-footer {
  margin-top: 22px;
  padding: 12px 8px 4px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px;
}
.footer-link {
  font-size: 12px; color: var(--muted); font-weight: 600;
  letter-spacing: -0.1px;
  background: none; padding: 4px 8px;
}
.footer-link:active { opacity: 0.6; }
.footer-link.danger { color: var(--danger); opacity: 0.75; }
.footer-dot { color: var(--muted-2); opacity: 0.5; }

/* ─── REVIEW MODE TABS ─── */
.mode-tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border-radius: 12px; padding: 4px;
  margin-bottom: 16px;
}
.mode-tab {
  flex: 1; padding: 9px 8px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  border-radius: 9px;
  letter-spacing: -0.1px;
  transition: all 0.18s;
}
.mode-tab.active {
  background: var(--surface); color: var(--green);
  box-shadow: 0 2px 6px rgba(36,70,43,0.08);
}

/* ─── QUIZ MODE ─── */
.quiz-prompt {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 14px 30px rgba(36,70,43,0.06);
  /* Locked height — short and long terms share the same prompt area
     so the option buttons below never shift between rounds. */
  height: 180px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.quiz-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; color: var(--green);
  background: var(--green-soft);
  border-radius: 100px;
  padding: 4px 10px;
  letter-spacing: 0.4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.quiz-term {
  font-size: 28px; font-weight: 800; color: var(--green);
  letter-spacing: -0.6px;
  margin-bottom: 4px; word-break: break-word;
}
.quiz-ipa { font-size: 13px; color: var(--muted); font-weight: 500; }
.quiz-pronounce {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.quiz-pronounce:active { transform: scale(0.92); }
.quiz-pronounce svg { width: 18px; height: 18px; }
.quiz-pronounce.speaking { background: var(--orange); color: #fff; animation: pulseGlow 1.2s ease infinite; }
.quiz-options {
  display: flex; flex-direction: column; gap: 10px;
}
.quiz-opt {
  background: var(--surface);
  border: 1.5px solid var(--green-line);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: left;
  font-size: 15px; font-weight: 600; color: var(--text);
  letter-spacing: -0.2px;
  transition: all 0.18s;
  word-break: break-word;
  /* Stable height per option so cards with short/long translations
     don't change the column rhythm between rounds. */
  min-height: 52px;
  display: flex; align-items: center;
}
.quiz-opt:active { transform: scale(0.985); }
.quiz-opt.right { background: #e6f4e8; border-color: #5da66c; color: #1f5b2a; }
.quiz-opt.wrong { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.quiz-opt.disabled { pointer-events: none; }
.quiz-opt.disabled:not(.right):not(.wrong) { opacity: 0.45; }

/* ─── CARD STAGE: shared wrapper that locks vertical space across all
   review modes (flash / quiz / type) so cards don't jump in size when
   the user switches modes or moves between cards. */
.card-stage {
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.card-stage > * { width: 100%; }

/* ─── TYPE MODE ─── */
.type-prompt {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 14px 30px rgba(36,70,43,0.06);
  /* Locked height — short and long Russian words share the same prompt
     area so input + reveal below never shift. */
  height: 160px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.type-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; color: var(--green);
  background: var(--green-soft);
  border-radius: 100px;
  padding: 4px 10px;
  letter-spacing: 0.4px; text-transform: uppercase;
  margin-bottom: 12px;
}
.type-trans {
  font-size: 24px; font-weight: 700; color: var(--green-2);
  letter-spacing: -0.4px;
  word-break: break-word;
}
.type-input-wrap {
  background: var(--surface-2);
  border: 1.5px solid var(--green-line);
  border-radius: 14px;
  padding: 4px 4px 4px 14px;
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 12px;
  transition: border-color 0.18s, background 0.18s;
}
.type-input-wrap.right { border-color: #5da66c; background: #e6f4e8; }
.type-input-wrap.wrong { border-color: var(--danger); background: var(--danger-soft); }
.type-input-wrap.revealed { border-color: var(--accent, #4a8fd6); background: rgba(74,143,214,0.08); }
.type-input-wrap.revealed .type-input { color: var(--accent, #4a8fd6); -webkit-text-fill-color: var(--accent, #4a8fd6); opacity: 1; }
.type-input {
  flex: 1; padding: 12px 0;
  background: none; border: none; outline: none;
  font-size: 17px; font-weight: 600; color: var(--green);
  letter-spacing: -0.2px;
}
.type-input::placeholder { color: var(--muted-2); font-weight: 500; }
.type-input:disabled { opacity: 0.85; }
.type-submit {
  background: var(--orange); color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: 11px; padding: 10px 14px;
  letter-spacing: -0.2px;
  transition: transform 0.12s;
  flex-shrink: 0;
}
.type-submit:active { transform: scale(0.96); }
.type-reveal {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px; font-weight: 600; color: var(--text);
  text-align: center;
  margin-bottom: 14px;
}
.type-reveal strong { color: var(--green); font-weight: 800; }
.type-reveal.soft {
  border-color: rgba(74,143,214,0.35);
  background: rgba(74,143,214,0.08);
  color: var(--text);
}
.type-reveal.soft strong { color: var(--accent, #4a8fd6); }
.type-hint {
  font-size: 12px; color: var(--muted-2);
  text-align: center; padding: 8px 0;
  font-weight: 500;
}
.type-show-answer {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px auto 0; padding: 10px 16px;
  background: rgba(74,143,214,0.08);
  border: 1px solid rgba(74,143,214,0.25);
  border-radius: 14px;
  font-size: 14px; font-weight: 600; color: var(--accent, #4a8fd6);
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
.type-show-answer { display: flex; width: fit-content; }
.type-show-answer .tsa-emoji { font-size: 16px; line-height: 1; }
.type-show-answer:active { transform: scale(0.96); background: rgba(74,143,214,0.14); }

/* ─── SCREENS ─── */
.screen { display: none; animation: fadeInUp 0.25s both; }
.screen.active { display: block; }

/* ─── WORDS LIST ─── */
.words-toolbar {
  display: flex; gap: 8px;
  margin-bottom: 12px;
}
.search-bar {
  flex: 1;
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border-radius: 13px; padding: 11px 14px;
}
.bulk-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-line);
  transition: transform 0.12s;
}
.bulk-btn:active { transform: scale(0.94); }
.search-bar svg { color: var(--muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; font-weight: 500;
}
.search-bar input::placeholder { color: var(--muted-2); }

.chip-bar {
  display: flex; gap: 7px; margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chip-bar::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 100px;
  padding: 7px 13px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  transition: all 0.12s;
}
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.chip strong { font-weight: 700; }

.dual-bar {
  display: flex; gap: 6px;
  margin-bottom: 14px;
}
.dual-bar .chip-bar { flex: 1; margin: 0; }

/* status filter row */
.status-row { display: flex; gap: 6px; margin-bottom: 16px; }
.status-chip {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 12px; padding: 9px;
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  text-align: center;
  letter-spacing: -0.1px;
}
.status-chip.active { background: var(--green-soft); border-color: var(--green-line-2); color: var(--green); }
.status-chip-num { display: block; font-size: 16px; font-weight: 800; margin-bottom: 1px; color: var(--green); }
.status-chip:not(.active) .status-chip-num { color: var(--muted); }

.word-list { display: flex; flex-direction: column; gap: 18px; }

/* Grouped word list (К повторению / Новые / Учу / Выучено). */
.word-group { animation: fadeInUp 0.25s both; }
.word-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px 8px;
}
.word-group-icon { font-size: 14px; line-height: 1; }
.word-group-label {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.word-group-count {
  margin-left: auto;
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  background: var(--surface-2);
  padding: 3px 8px; border-radius: 100px;
}
.word-group-body {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  overflow: hidden;
}
.word-group-body .word-row + .word-row { border-top: 1px solid var(--green-line); }

.word-row {
  position: relative;
  background: var(--surface);
  overflow: hidden;
}
.word-row.v2 { border: none; border-radius: 0; }
.word-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 13px 12px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  position: relative;
  z-index: 2;
}
.word-stripe {
  flex-shrink: 0;
  width: 3px; align-self: stretch;
  border-radius: 100px;
  margin-right: 4px;
}
.word-stripe.status-new      { background: var(--muted-2); opacity: 0.55; }
.word-stripe.status-learning { background: var(--orange); }
.word-stripe.status-mastered { background: var(--green); }
.word-info { flex: 1; min-width: 0; }
.word-term {
  font-size: 15.5px; font-weight: 700; color: var(--text-strong);
  margin-bottom: 2px; letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.word-trans {
  font-size: 13px; color: var(--muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Legacy dot kept in case something still renders it. */
.word-status {
  width: 8px; height: 8px; border-radius: 50%;
}
.status-new      { background: var(--muted-2); }
.status-learning { background: var(--orange); }
.status-mastered { background: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }

mark {
  background: var(--orange-soft);
  color: var(--text-strong);
  padding: 0 2px; border-radius: 3px;
  font-weight: 700;
}

/* Always-visible edit button: rounded-square affordance pinned to the right
   edge of every editable row. Delete lives inside the edit screen. */
.word-fab {
  position: absolute;
  top: 50%; right: 10px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-strong);
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translateY(-50%);
  transition: transform 0.12s, box-shadow 0.12s;
  z-index: 3;
  cursor: pointer;
  padding: 0;
}
.word-fab svg { width: 16px; height: 16px; }
.word-fab:active {
  transform: translateY(-50%) scale(0.94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* Reserve room on the right so long terms ellipsize before reaching the fab. */
.word-row:not(.locked) .word-item { padding-right: 52px; }

/* ─── EMPTY STATE ─── */
.empty {
  text-align: center;
  padding: 56px 22px;
  color: var(--muted);
}
.empty-mark {
  width: 80px;
  margin: 0 auto 16px;
}
.empty-mark img { width: 100%; height: auto; display: block; }
.empty-title {
  font-size: 17px; font-weight: 700; color: var(--text-strong);
  margin-bottom: 6px; letter-spacing: -0.2px;
}
.empty-text {
  font-size: 14px; line-height: 1.5; max-width: 280px;
  margin: 0 auto;
}
.empty-cta {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--orange); color: #fff;
  border-radius: 12px; padding: 11px 20px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(243,122,9,0.22);
}
.empty-cta.secondary {
  background: var(--surface-2); color: var(--green);
  box-shadow: none;
}

/* ─── CARDS / REVIEW ─── */
.mode-tabs {
  display: flex;
  gap: 5px;
  background: var(--surface-2);
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 16px;
}
.mode-tab {
  flex: 1;
  padding: 9px;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  border-radius: 10px;
  letter-spacing: -0.2px;
}
.mode-tab.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 6px rgba(36,70,43,0.06);
}

.progress-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.progress-count {
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.3px; min-width: 40px;
}
.progress-track {
  flex: 1; height: 5px;
  background: var(--green-soft);
  border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-cat {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 8px; border-radius: 6px;
  white-space: nowrap;
}

.flash {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 24px;
  padding: 28px 22px 26px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 14px rgba(36,70,43,0.04);
  cursor: pointer;
  animation: slideUp 0.35s both;
  /* Hard-locked height so cards never shift between rounds — long terms
     and IPA stay inside, short terms stay centered. The card is a fixed
     rectangle regardless of content length. */
  height: 380px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.flash:active { transform: scale(0.99); }
.flash-tag {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: var(--orange-soft);
  border-radius: 6px;
}
.flash-term {
  font-size: 32px; font-weight: 800;
  letter-spacing: -1.2px; line-height: 1.05;
  color: var(--green);
  margin-bottom: 8px;
  word-break: break-word;
}
.flash-ipa {
  font-size: 13px; color: var(--muted);
  font-style: italic;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  font-weight: 500;
}
.flash-trans {
  font-size: 22px; font-weight: 600;
  color: var(--green-2);
  letter-spacing: -0.4px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px dashed var(--green-line-2);
  word-break: break-word;
  transition: opacity 0.18s;
}
/* Keep the translation in the layout even when hidden — only its visibility
   changes. Otherwise the card would shrink before flip and grow after,
   causing the buttons below to jump. */
.flash-trans.hidden {
  visibility: hidden;
  opacity: 0;
  border-top-color: transparent;
}
.flash-hint {
  font-size: 11px; color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  margin-top: 14px;
}
.flash-pronounce {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(36,70,43,0.20);
  transition: transform 0.12s;
  z-index: 3;
}
.flash-pronounce:active { transform: scale(0.92); }
.flash-pronounce svg { width: 16px; height: 16px; }
.flash-pronounce.speaking { background: var(--orange); animation: pulseGlow 0.8s ease-in-out infinite; }
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 4px 12px rgba(243,122,9,0.30); }
  50%     { box-shadow: 0 4px 20px rgba(243,122,9,0.55); }
}

.flash-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px; margin-bottom: 14px;
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.mastery-dots { display: flex; gap: 4px; align-items: center; }
.mdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-line);
}
.mdot.on { background: var(--orange); }
.mdot.done { background: var(--green); }

/* ─── SRS rating zone (Anki-style: tap-to-reveal lives in the same
   vertical strip as the 3 rating buttons, so the finger never moves
   AND the layout doesn't jump when the user flips the card). */
.srs-zone {
  margin-bottom: 4px;
  height: 60px;
}
.srs-reveal {
  width: 100%;
  height: 100%;
  background: var(--orange);
  color: #fff;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.2px;
  padding: 0 18px;
  border-radius: 16px;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(243,122,9,0.30), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 0.12s;
  animation: fadeIn 0.2s both;
}
.srs-reveal:active { transform: scale(0.98); }
.srs-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  height: 100%;
  animation: fadeInUp 0.25s both;
}
.srs-btn {
  padding: 0 6px;
  height: 100%;
  border-radius: 14px;
  border: 1.5px solid;
  font-size: 13px; font-weight: 700;
  letter-spacing: -0.1px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.srs-btn:active { transform: scale(0.96); }
.srs-btn-hard {
  background: var(--bg);
  color: var(--danger);
  border-color: var(--danger-soft);
}
.srs-btn-soft {
  background: var(--bg);
  color: var(--orange);
  border-color: rgba(243,122,9,0.32);
}
.srs-btn-good {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 6px 14px rgba(243,122,9,0.26);
}

/* Legacy 2-button styles kept for any old code paths still using `.act`. */
.actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 4px;
}
.act {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.2px;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: transform 0.12s;
}
.act:active { transform: scale(0.97); }
.act svg { width: 16px; height: 16px; }
.act-no {
  background: var(--bg);
  color: var(--danger);
  border-color: var(--danger-soft);
}
.act-yes {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 6px 14px rgba(243,122,9,0.26);
}
.actions.disabled { opacity: 0.4; pointer-events: none; }

/* QUIZ */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 24px;
  padding: 26px 22px;
  margin-bottom: 16px;
  text-align: center;
  animation: slideUp 0.35s both;
  position: relative;
}
.quiz-pronounce {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.quiz-pronounce svg { width: 16px; height: 16px; }
.quiz-tag {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--orange); text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 10px; background: var(--orange-soft); border-radius: 6px;
}
.quiz-q {
  font-size: 28px; font-weight: 800;
  letter-spacing: -1px; color: var(--green);
  margin-bottom: 6px; word-break: break-word;
}
.quiz-sub { font-size: 13px; color: var(--muted); font-weight: 500; }

.quiz-options { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  background: var(--surface);
  border: 1.5px solid var(--green-line);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  text-align: left;
  letter-spacing: -0.2px;
  transition: all 0.12s;
}
.quiz-opt:active { transform: scale(0.99); }
.quiz-opt.correct {
  background: var(--green-soft);
  border-color: var(--green); color: var(--green);
  font-weight: 700;
  animation: flashPulse 0.6s;
}
.quiz-opt.wrong {
  background: var(--danger-soft);
  border-color: var(--danger); color: var(--danger);
  font-weight: 700;
}
.quiz-opt.disabled { pointer-events: none; }
.quiz-opt.disabled:not(.correct):not(.wrong) { opacity: 0.4; }

/* ─── STATS ─── */
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 16px;
  animation: fadeInUp 0.25s both;
}
.stat-val {
  font-size: 28px; font-weight: 800;
  line-height: 1; letter-spacing: -0.8px;
  color: var(--green); margin-bottom: 4px;
}
.stat-val.orange { color: var(--orange); }
.stat-val.muted { color: var(--muted-2); }
.stat-label {
  font-size: 11px; color: var(--muted);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px;
}

.section-title {
  font-size: 12px; font-weight: 800;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 18px 0 10px;
}

/* bar chart */
.bar-chart {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 16px 14px 12px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.bar-col {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.bar-track {
  width: 100%; height: 90px;
  display: flex; align-items: flex-end; justify-content: center;
  margin-bottom: 6px;
}
.bar {
  width: 60%; max-width: 26px;
  background: var(--orange);
  border-radius: 5px 5px 2px 2px;
}
.bar.is-empty { background: var(--green-line); width: 50%; max-width: 22px; }
.bar-label { font-size: 10px; color: var(--muted); font-weight: 700; }
.bar-val { font-size: 11px; font-weight: 800; color: var(--green); margin-bottom: 4px; min-height: 14px; }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 4px 16px;
}
.detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--green-line);
  font-size: 14px;
}
.detail-row:last-child { border: none; }
.detail-key { color: var(--muted); font-weight: 500; }
.detail-val { font-weight: 700; color: var(--green); }

/* settings buttons */
.settings-row {
  display: flex; gap: 8px;
  margin-top: 16px;
}
.settings-btn {
  flex: 1;
  padding: 12px; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  background: var(--surface-2);
  color: var(--green);
  border: 1px solid var(--green-line);
  letter-spacing: -0.2px;
}
.settings-btn.danger { color: var(--danger); }

/* ─── ADD SCREEN ─── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 18px;
}
.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 11px; font-weight: 800;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.7px;
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px; color: var(--text);
  font-weight: 500;
  outline: none;
  transition: border-color 0.12s;
}
.field-input:focus { border-color: var(--green); background: #fff; }
.field-input::placeholder { color: var(--muted-2); }
.field-textarea {
  min-height: 130px;
  resize: vertical;
  font-family: 'Manrope', monospace;
  font-size: 14px;
  line-height: 1.55;
}

.cat-picker {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px; font-weight: 600;
  color: var(--text);
}
.cat-picker-arrow { color: var(--muted); }

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  margin-bottom: 14px;
  cursor: pointer;
}
.checkbox-row input { display: none; }
.checkbox-box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--green-line-2);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s;
}
.checkbox-row.on .checkbox-box { background: var(--green); border-color: var(--green); }
.checkbox-row.on .checkbox-box::after {
  content: '';
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}
.checkbox-label {
  flex: 1;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.checkbox-sub {
  font-size: 12px; color: var(--muted); font-weight: 500;
  margin-top: 2px;
}

.form-actions { display: flex; gap: 9px; margin-top: 6px; }
.btn {
  flex: 1; padding: 14px; border-radius: 12px;
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.2px;
  transition: transform 0.12s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 14px rgba(243,122,9,0.24);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--green);
  border: 1px solid var(--green-line);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-ghost {
  background: transparent; color: var(--green);
  border: 1px solid var(--green-line);
}

.divider {
  height: 1px;
  background: var(--green-line);
  margin: 18px 0;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 500;
  margin-bottom: 12px;
}
.form-hint code {
  background: var(--surface-3);
  color: var(--green);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Manrope', monospace;
  font-size: 12px;
  font-weight: 600;
}

/* ─── BOTTOM NAV ─── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--bg);
  border-top: 1px solid var(--green-line);
  display: grid; grid-template-columns: repeat(2, 1fr);
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(36,70,43,0.06);
}
.nav.hide { display: none; }
.nav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px;
  color: var(--muted-2);
  transition: color 0.15s;
}
.nav-btn span {
  margin-top: 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: -0.1px;
}
.nav-btn svg { width: 22px; height: 22px; transition: transform 0.2s; }
.nav-btn.active { color: var(--green); }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  background: var(--orange);
  border-radius: 2px;
}

/* ─── MODAL ─── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(36,70,43,0.40);
  backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end; justify-content: center;
  animation: fadeIn 0.25s;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  animation: slideUp 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  max-height: 86vh; overflow-y: auto;
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--green-line-2);
  border-radius: 2px;
  margin: 0 auto 14px;
}
.modal-title {
  font-size: 18px; font-weight: 800;
  color: var(--green);
  margin-bottom: 16px;
  letter-spacing: -0.4px;
}
.cat-list { display: flex; flex-direction: column; gap: 7px; }
.cat-list-item {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px; padding: 13px 16px;
  font-size: 15px; font-weight: 600; color: var(--text);
  text-align: left;
  transition: all 0.12s;
}
.cat-list-item.active { background: var(--green); color: #fff; border-color: var(--green); }
.cat-add { display: flex; gap: 8px; margin-top: 12px; }
.cat-add input {
  flex: 1; background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 10px; padding: 10px 12px;
  font-size: 14px; color: var(--text);
  outline: none; font-weight: 500;
}
.cat-add input:focus { border-color: var(--green); }
.cat-add button {
  background: var(--green); color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700; font-size: 13px;
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 110px; left: 50%;
  transform: translateX(-50%);
  background: var(--green); color: #fff;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.1px;
  z-index: 5000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  max-width: 90vw;
  box-shadow: 0 10px 24px rgba(36,70,43,0.20);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-8px); }
.toast.warn { background: var(--orange); }
.toast.error { background: var(--danger); }

/* ─── BANNER ─── */
.banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px; color: var(--text);
}
.banner svg { color: var(--orange); flex-shrink: 0; }
.banner-content { flex: 1; line-height: 1.4; }
.banner strong { color: var(--orange-2); font-weight: 700; }
.banner.banner-quick {
  background: linear-gradient(135deg, rgba(243,122,9,0.12), rgba(243,122,9,0.04));
  border: 1px solid rgba(243,122,9,0.22);
  color: var(--ink);
}
.banner.banner-quick strong { color: var(--orange); }

/* ─── WORD DETAIL SCREEN ─── */
.detail-hero {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 24px;
  padding: 32px 24px 28px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 14px rgba(36,70,43,0.04);
}
.detail-pronounce {
  position: absolute;
  top: 18px; right: 18px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(36,70,43,0.20);
  transition: transform 0.12s;
}
.detail-pronounce:active { transform: scale(0.94); }
.detail-pronounce svg { width: 18px; height: 18px; }
.detail-pronounce.speaking { background: var(--orange); animation: pulseGlow 0.8s ease-in-out infinite; }
.detail-tag {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--orange); text-transform: uppercase;
  margin-bottom: 16px;
  padding: 4px 10px;
  background: var(--orange-soft);
  border-radius: 6px;
}
.detail-term {
  font-size: 36px; font-weight: 800;
  letter-spacing: -1.4px; line-height: 1.05;
  color: var(--green);
  margin-bottom: 8px;
  word-break: break-word;
}
.detail-ipa {
  font-size: 14px; color: var(--muted);
  font-style: italic;
  letter-spacing: 0.2px;
  margin-bottom: 16px;
  font-weight: 500;
}
.detail-trans {
  font-size: 22px; font-weight: 600;
  color: var(--green-2);
  letter-spacing: -0.4px;
  padding-top: 14px;
  border-top: 1px dashed var(--green-line-2);
  word-break: break-word;
}
.detail-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 14px;
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.detail-status-row .mastery-dots { gap: 5px; }

/* ─── PACKS SCREEN ─── */
.packs-intro {
  font-size: 14px; color: var(--muted); line-height: 1.5;
  font-weight: 500; margin-bottom: 14px;
}
.pack-list { display: flex; flex-direction: column; gap: 10px; }
.pack-card {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  width: 100%;
  transition: all 0.15s;
  animation: fadeInUp 0.25s both;
}
.pack-card:active { transform: scale(0.985); }
.pack-card.imported { opacity: 0.55; }
.pack-card-emoji {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.pack-card-content { flex: 1; min-width: 0; }
.pack-card-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.pack-card-desc {
  font-size: 12.5px; color: var(--muted);
  font-weight: 500; line-height: 1.4;
}
.pack-card-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
}
.pack-card-count {
  font-size: 11px; font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 3px 8px; border-radius: 100px;
  letter-spacing: 0.2px;
}
.pack-card-imported-badge {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--orange);
  background: var(--orange-soft);
  padding: 3px 8px; border-radius: 100px;
}
.pack-card-arrow {
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

/* ─── ACTION SHEET ─── */
.sheet-options { display: flex; flex-direction: column; gap: 8px; }
.sheet-opt {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
  transition: transform 0.12s;
}
.sheet-opt:active { transform: scale(0.985); }
.sheet-opt-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.sheet-opt.primary .sheet-opt-icon { background: var(--orange-soft); color: var(--orange); }
.sheet-opt-icon svg { width: 20px; height: 20px; }
.sheet-opt-content { flex: 1; }
.sheet-opt-title {
  font-size: 15px; font-weight: 700; color: var(--green);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.sheet-opt-desc {
  font-size: 12.5px; color: var(--muted);
  font-weight: 500; line-height: 1.35;
}

/* ─── SUGGEST BUTTON ─── */
.field-with-action {
  position: relative;
}
.field-with-action .field-input {
  padding-right: 110px;
}
.suggest-btn {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-line);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.12s;
}
.suggest-btn:active { transform: translateY(-50%) scale(0.95); }
.suggest-btn.loading { color: var(--muted); pointer-events: none; }
.suggest-btn .spinner-mini {
  width: 12px; height: 12px;
  border: 2px solid var(--green-line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* utility */
.hidden { display: none !important; }

/* preview area for bulk import */
.bulk-preview {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text);
  max-height: 180px;
  overflow-y: auto;
}
.bulk-preview-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--green-line);
}
.bulk-preview-row:last-child { border: none; }
.bulk-preview-row .term { font-weight: 700; color: var(--green); }
.bulk-preview-row .trans { color: var(--muted); }
.bulk-preview-empty { color: var(--muted); text-align: center; padding: 16px; font-style: italic; }

/* ─── PRO SCREEN ─── */
.pro-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 18px 20px 16px;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: 0 14px 30px rgba(36,70,43,0.20);
}
.pro-hero-eyebrow {
  display: inline-block;
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.18);
  padding: 3px 9px; border-radius: 100px;
  margin-bottom: 8px;
}
.pro-hero-title {
  font-size: 20px; font-weight: 800; letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.pro-hero-sub {
  font-size: 13px; opacity: 0.88; line-height: 1.4; font-weight: 500;
}
.pro-tiles {
  display: flex; gap: 8px;
  margin-bottom: 10px;
}
.pro-tile {
  flex: 1; padding: 12px 8px;
  background: var(--surface);
  border: 1.5px solid var(--green-line);
  border-radius: 12px;
  text-align: center;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.pro-tile:active { transform: scale(0.98); }
.pro-tile.active {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.pro-tile-name {
  font-size: 11px; font-weight: 800; color: var(--muted);
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 6px;
}
.pro-tile.active .pro-tile-name { color: var(--orange); }
.pro-tile-price {
  font-size: 18px; font-weight: 800; color: var(--green);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.pro-tile-sub {
  font-size: 10.5px; color: var(--muted); font-weight: 600;
}
.pro-tile.active .pro-tile-sub { color: var(--orange-2); }
.pro-method {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border-radius: 12px; padding: 4px;
  margin-bottom: 14px;
}
.pro-method-tab {
  flex: 1; padding: 10px 8px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  border-radius: 9px;
  letter-spacing: -0.1px;
  transition: all 0.15s;
}
.pro-method-tab.active {
  background: var(--surface); color: var(--green);
  box-shadow: 0 2px 6px rgba(36,70,43,0.08);
}
.pro-pay-btn {
  width: 100%; padding: 14px;
  background: var(--orange); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: -0.2px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(243,122,9,0.30);
  margin-bottom: 8px;
  transition: transform 0.12s;
}
.pro-pay-btn:active { transform: scale(0.97); }
.pro-pay-methods {
  text-align: center;
  margin: 0 0 14px;
}
.pro-pay-methods-line {
  font-size: 11.5px; color: var(--muted); font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.05px;
}
.pro-pay-methods-line.foreign {
  margin-top: 2px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--muted-2);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.pro-features {
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 10px 14px 4px;
}
.pro-features-title {
  font-size: 10.5px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 6px;
}
.pro-feature-row {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px; color: var(--text); font-weight: 500;
  line-height: 1.35;
}
.pro-feature-row svg { flex-shrink: 0; margin-top: 2px; color: var(--green); }
.pro-feature-bullet {
  flex-shrink: 0;
  width: 20px;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  margin-top: -1px;
}
.pro-restore {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 10px;
  text-decoration: underline;
}

/* ─── AI EXTRACT OVERLAY ─── */
.ai-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 950;
  background: rgba(36,70,43,0.45);
  backdrop-filter: blur(6px);
  align-items: flex-end;
}
.ai-overlay.show { display: flex; }
.ai-modal {
  width: 100%;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow-y: auto;
}
.ai-modal-handle {
  width: 36px; height: 4px;
  background: var(--green-line-2);
  border-radius: 4px;
  margin: 0 auto 14px;
}
.ai-title {
  font-size: 18px; font-weight: 800; color: var(--green);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.ai-sub {
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  line-height: 1.45;
  margin-bottom: 14px;
}
.ai-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--green-line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit; font-size: 14px; color: var(--text);
  resize: vertical;
  min-height: 120px;
  outline: none;
}
.ai-textarea:focus { border-color: var(--orange); }
.ai-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.ai-btn {
  flex: 1; padding: 14px;
  border-radius: 12px;
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.1px;
  transition: transform 0.12s;
}
.ai-btn:active { transform: scale(0.97); }
.ai-btn.primary { background: var(--orange); color: #fff; box-shadow: 0 6px 14px rgba(243,122,9,0.30); }
.ai-btn.secondary { background: var(--surface-2); color: var(--green); border: 1px solid var(--green-line); }
.ai-results { margin-top: 14px; }
.ai-result-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 14px;
}
.ai-result-row .term { font-weight: 700; color: var(--green); }
.ai-result-row .arr { color: var(--muted-2); }
.ai-result-row .trans { color: var(--text); }
.ai-result-row .conf {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border-radius: 100px; padding: 2px 8px;
}

/* ─── REMINDER CARD INSIDE SETTINGS SHEET ─── */
.reminder-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.reminder-toggle {
  flex-shrink: 0;
  width: 44px; height: 26px;
  border-radius: 100px;
  background: var(--surface-3);
  position: relative;
  transition: background 0.18s;
}
.reminder-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  transition: transform 0.18s;
}
.reminder-toggle.on { background: var(--orange); }
.reminder-toggle.on::after { transform: translateX(18px); }
.reminder-text { flex: 1; font-size: 14px; font-weight: 600; color: var(--green); }
.reminder-time-input {
  width: 96px;
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px; font-weight: 600; color: var(--green);
  font-family: inherit;
  outline: none;
}
.reminder-time-input:disabled { opacity: 0.45; pointer-events: none; }
.reminder-hint {
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  margin-top: 6px; line-height: 1.4;
}
.reminder-tz {
  font-size: 11px; color: var(--muted-2); font-weight: 600;
  margin-top: 8px; letter-spacing: -0.1px;
}
.reminder-days-label {
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  letter-spacing: 0.4px; text-transform: uppercase;
  margin: 10px 0 8px;
}
.reminder-days-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.reminder-day-chip {
  appearance: none; -webkit-appearance: none;
  padding: 9px 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  font-family: inherit; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.reminder-day-chip.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 4px 10px rgba(243,122,9,0.28);
}
.reminder-day-chip:disabled { opacity: 0.45; pointer-events: none; }
.reminder-day-chip:active { transform: scale(0.94); }
