/* ============================================================
   60-30-10 Color System (Fog Grey / Ocean Teal / Coral)
   Designed for 16–24 youth — bold, tactile, prominent buttons
   ============================================================ */

:root {
  /* 60% Main */
  --bg-main: #EEF1F4;
  --bg-card: #FFFFFF;
  --bg-subtle: #E4E9EE;

  /* 30% Secondary */
  --teal: #0D565E;
  --teal-dark: #083B41;
  --teal-light: #E2F1F3;
  --teal-mid: #16727C;

  /* 10% Accent */
  --coral: #FF6A4D;
  --coral-hover: #F25536;
  --coral-soft: #FFF0EC;
  --coral-border: #FFC4B8;

  /* Functional / Feedback */
  --amber: #F59E0B;
  --amber-soft: #FEF6E4;
  --green: #10B981;
  --green-soft: #E6F8F1;

  /* Text */
  --text-primary: #0F2024;
  --text-secondary: #53666B;
  --text-muted: #7F9297;

  /* Radius & Shadows */
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 16px;
  --r-pill: 999px;

  --shadow-card: 0 6px 20px rgba(13, 86, 94, 0.06);
  --shadow-coral: 0 8px 20px rgba(255, 106, 77, 0.32);
  --shadow-teal: 0 8px 20px rgba(13, 86, 94, 0.24);
  --shadow-nav: 0 12px 32px rgba(8, 59, 65, 0.14);
}

body.dark-mode {
  --bg-main: #0A181B;
  --bg-card: #12262A;
  --bg-subtle: #1B363B;
  --teal-light: #153D42;
  --coral-soft: #2D1B18;
  --coral-border: #6B3228;
  --amber-soft: #2B2415;
  --text-primary: #F0F6F7;
  --text-secondary: #9DB5BA;
  --text-muted: #6C868C;
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-nav: 0 12px 32px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at top left, #081518 0%, #0D2024 100%);
}
body.dark-mode .app-shell {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.06);
}
body.dark-mode .level-card.locked {
  background: #102024;
}
body.dark-mode .level-card.current {
  background: #142B30;
}
body.dark-mode .form-input,
body.dark-mode .ai-input {
  color: var(--text-primary);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #DCE5E8 0%, #EEF1F4 55%, #E7ECEF 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

/* Mobile App Shell */
.app-shell {
  width: 100%;
  max-width: 430px;
  height: min(860px, calc(100vh - 24px));
  background: var(--bg-main);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(8, 59, 65, 0.18), 0 0 0 8px rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  body {
    padding: 0;
    background: var(--bg-main);
  }
  .app-shell {
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Telegram Mini App Fullscreen Mode */
body.tg-webapp {
  padding: 0;
  background: var(--bg-main);
}
body.tg-webapp .app-shell {
  max-width: 100%;
  width: 100%;
  height: 100vh;
  height: var(--tg-viewport-stable-height, 100dvh);
  border-radius: 0;
  box-shadow: none;
}

/* Scrollable Main Viewport */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 140px;
  scroll-behavior: smooth;
}
.app-content::-webkit-scrollbar {
  width: 0;
}

/* Typography */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.greeting-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.greeting-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header Streak Pill */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 2px solid var(--coral-border);
  color: var(--coral);
  font-weight: 800;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 12px rgba(255, 106, 77, 0.14);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.streak-pill:active { transform: scale(0.95); }

/* Prominent Tactile Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  user-select: none;
  min-height: 54px;
  padding: 14px 20px;
}
.btn:active {
  transform: scale(0.97) translateY(1px);
}

.btn-coral {
  background: var(--coral);
  color: #FFFFFF;
  box-shadow: var(--shadow-coral);
  width: 100%;
  font-size: 17px;
  min-height: 58px;
  border-radius: 18px;
}
.btn-coral:hover { background: var(--coral-hover); }

.btn-teal {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: var(--shadow-teal);
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
}
.btn-teal:hover { background: var(--teal-dark); }

.btn-outline {
  background: var(--bg-card);
  color: var(--teal);
  border: 2px solid var(--teal-light);
  min-height: 52px;
}
.btn-outline:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}

/* Hero Card — Ocean Teal (30%) */
.hero-goal-card {
  background: linear-gradient(140deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #FFFFFF;
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-teal);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero-goal-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 106, 77, 0.18);
  top: -40px;
  right: -30px;
  pointer-events: none;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.goal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.goal-edit-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.goal-edit-btn:hover { background: rgba(255, 255, 255, 0.25); }

.goal-numbers {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.goal-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.goal-big span {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.8;
}

.goal-days-box {
  text-align: right;
  background: rgba(255, 106, 77, 0.22);
  border: 1.5px solid rgba(255, 106, 77, 0.55);
  padding: 8px 12px;
  border-radius: 14px;
}
.goal-days-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFD3C9;
  line-height: 1.1;
}
.goal-days-label {
  font-size: 11px;
  opacity: 0.9;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}

.goal-footer-text {
  font-size: 13px;
  opacity: 0.88;
  display: flex;
  justify-content: space-between;
}

/* Primary Action CTA Card */
.cta-review-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.cta-review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cta-review-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}
.cta-review-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.count-chip {
  background: var(--coral-soft);
  color: var(--coral);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 14px;
}

/* Quick 2-Column Big Action Cards */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.quick-action-btn {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--r-lg);
  padding: 18px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s, border-color 0.14s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-action-btn:hover { border-color: var(--teal); }
.quick-action-btn:active { transform: scale(0.97); }
.quick-action-btn.coral-tint {
  background: var(--coral-soft);
  border-color: var(--coral-border);
}

.qa-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--teal-light);
  color: var(--teal);
}
.quick-action-btn.coral-tint .qa-icon {
  background: var(--coral);
  color: #FFFFFF;
}

.qa-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}
.qa-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 7-Day Streak Card */
.streak-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.streak-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.day-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
}
.day-pill.done .day-circle {
  background: var(--coral);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(255, 106, 77, 0.35);
}
.day-pill.today .day-circle {
  border: 2.5px solid var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

/* Books Selector (Essential 4000 Words — 6 Books) */
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.book-card {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
  text-align: left;
  position: relative;
}
.book-card:active { transform: scale(0.97); }
.book-card.active {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: var(--shadow-teal);
}
.book-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--teal-light);
  color: var(--teal);
  margin-bottom: 8px;
}
.book-card.active .book-num {
  background: var(--coral);
  color: #FFFFFF;
}
.book-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.book-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.book-card.active .book-sub { color: rgba(255, 255, 255, 0.8); }

.book-card.locked {
  opacity: 0.62;
  background: #F3F6F7;
  border: 1.5px dashed rgba(13, 86, 94, 0.2);
  box-shadow: none;
  cursor: not-allowed;
}
.book-card.locked .book-num {
  background: rgba(13, 86, 94, 0.1);
  color: var(--text-secondary);
}
.book-card.locked .book-title {
  color: var(--text-secondary);
}

/* Custom Personal Folder Card (Camera + Manual Words) */
.book-card.custom-folder-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px dashed var(--coral-border);
  background: var(--coral-soft);
}
.book-card.custom-folder-card.active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border: 2px solid var(--coral);
  color: #FFFFFF;
}
.book-card.custom-folder-card .book-num {
  background: var(--coral);
  color: #FFFFFF;
  margin-bottom: 6px;
}

.folder-toolbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.folder-tool-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--teal-light);
  color: var(--teal);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 11px 6px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s, border-color 0.12s;
}
.folder-tool-btn:hover { border-color: var(--teal); }
.folder-tool-btn:active { transform: scale(0.96); }
.folder-tool-btn.primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #FFFFFF;
}

.word-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.word-mini-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: var(--bg-main);
  color: var(--teal);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.12s;
}
.word-mini-btn:hover { background: var(--teal-light); }
.word-mini-btn:active { transform: scale(0.92); }
.word-mini-btn.del {
  color: var(--coral-hover);
  background: var(--coral-soft);
}
.word-mini-btn.del:hover {
  background: var(--coral);
  color: #FFFFFF;
}

/* Level List (Step-by-step) */
.levels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid transparent;
}
.level-card.unlocked {
  border-color: var(--teal-light);
}
.level-card.current {
  border-color: var(--coral);
  background: #FFFFFF;
}
.level-card.locked {
  opacity: 0.65;
  background: #F6F8FA;
}

.level-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.level-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--teal-light);
  color: var(--teal);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.level-card.completed .level-badge {
  background: var(--teal);
  color: #FFFFFF;
}
.level-card.current .level-badge {
  background: var(--coral);
  color: #FFFFFF;
}
.level-card.locked .level-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.level-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}
.level-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.level-play-btn {
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  background: var(--coral);
  color: #FFFFFF;
  box-shadow: 0 5px 14px rgba(255, 106, 77, 0.3);
  flex-shrink: 0;
}
.level-card.completed .level-play-btn {
  background: var(--teal-light);
  color: var(--teal);
  box-shadow: none;
}
.level-card.locked .level-play-btn {
  background: var(--bg-subtle);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* ============================================================
   3D Flashcard Screen Overlay
   ============================================================ */
.overlay-screen {
  position: absolute;
  inset: 0;
  background: var(--bg-main);
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: 20px 18px 24px;
  overflow-y: auto;
}
.overlay-screen.open { display: flex; }

.fc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fc-progress-wrap {
  flex: 1;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.fc-progress-bar {
  height: 100%;
  background: var(--coral);
  border-radius: var(--r-pill);
  transition: width 0.3s ease;
}

.fc-counter {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal);
}

/* Compact Centered Stack */
.fc-center-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding-bottom: 16px;
}

/* Stage 1 / Stage 2 Indicator Switcher */
.stage-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 18px;
  border: 1.5px solid rgba(13, 86, 94, 0.1);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.stage-pill {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 8px;
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.stage-pill.active-s1 {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(13, 86, 94, 0.28);
}
.stage-pill.active-s2 {
  background: var(--coral);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255, 106, 77, 0.34);
}
.stage-pill.done-s1 {
  background: var(--teal-light);
  color: var(--teal);
}
.stage-pill.unlocked-s2 {
  color: var(--coral-hover);
  background: var(--coral-soft);
}

/* Compact 3D Flip + 3-Way Swipe Card */
.fc-scene {
  height: 315px;
  perspective: 1200px;
  margin: 0 0 22px;
  touch-action: none;
  user-select: none;
}

.fc-swipe-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: grab;
  will-change: transform, opacity;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.fc-swipe-wrap.dragging {
  cursor: grabbing;
  transition: none;
}

/* Swipe Stamp Badges on Card */
.swipe-stamp {
  position: absolute;
  z-index: 25;
  padding: 8px 16px;
  border-radius: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 3px solid currentColor;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s linear;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}
.stamp-right {
  top: 26px;
  left: 20px;
  color: #0E7C52;
  background: rgba(221, 244, 232, 0.96);
  transform: rotate(-12deg);
}
.stamp-left {
  top: 26px;
  right: 20px;
  color: #C83E22;
  background: rgba(255, 240, 236, 0.96);
  transform: rotate(12deg);
}
.stamp-up {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #FFFFFF;
  background: rgba(13, 86, 94, 0.96);
  border-color: #7CE0E8;
  white-space: nowrap;
}

.fc-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.fc-card.flipped {
  transform: rotateY(180deg);
}

.fc-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 26px;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 10px 28px rgba(13, 86, 94, 0.08);
}

.fc-front {
  background: var(--bg-card);
  border: 1.5px solid rgba(13, 86, 94, 0.14);
}

.fc-back {
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #FFFFFF;
  transform: rotateY(180deg);
}

.fc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.fc-source-pill {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--r-pill);
}
.fc-source-pill.back-pill {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.fc-audio-corner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--coral-soft);
  color: var(--coral-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s, background 0.14s;
}
.fc-audio-corner:hover { background: var(--coral); color: #FFFFFF; }
.fc-audio-corner:active { transform: scale(0.92); }
.fc-audio-corner.back-audio {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.fc-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 6px 0;
}

.fc-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.fc-ipa-row {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.audio-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.audio-btn:hover { background: var(--teal); color: #FFFFFF; }
.audio-btn:active { transform: scale(0.92); }

.fc-tap-hint {
  font-size: 13px;
  font-weight: 700;
  color: #B45309;
  padding: 4px 0;
}
.fc-tap-hint.back-hint {
  color: rgba(255, 255, 255, 0.78);
}

.fc-uz-meaning {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 27px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
  line-height: 1.25;
}

.fc-example-box {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 13px 14px;
  width: 100%;
}
.fc-example-en {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
}
.fc-example-uz {
  font-size: 12.5px;
  opacity: 0.85;
  margin-top: 6px;
  line-height: 1.35;
}

/* 3 Compact Tactile 3D-Border Spaced Repetition Buttons */
.sr-label {
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.sr-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sr-buttons.sr-buttons-2 {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sr-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 12px 10px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, border-bottom-width 0.12s ease;
}
.sr-btn:active {
  transform: translateY(3px);
}

.sr-btn-no {
  background: var(--coral-soft);
  border-bottom: 4px solid #C85035;
  color: #B4371B;
}
.sr-btn-yes {
  background: var(--teal);
  border-bottom: 4px solid var(--teal-dark);
  color: #FFFFFF;
}

/* ============================================================
   Stage 2: Writing Test Card (UZ -> EN)
   ============================================================ */
.wt-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(13, 86, 94, 0.14);
  border-radius: 26px;
  padding: 20px 22px 24px;
  box-shadow: 0 12px 30px rgba(13, 86, 94, 0.09);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wt-hint-btn {
  border: none;
  background: var(--amber-soft);
  color: #B45309;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
}

.wt-prompt-area {
  text-align: center;
  padding: 10px 4px 6px;
}
.wt-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.wt-uz-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 27px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}
.wt-pos {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  margin-top: 6px;
}
.wt-hint-text {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 17px;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: 0.14em;
  margin-top: 8px;
  min-height: 22px;
}

.wt-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 2.5px solid var(--bg-subtle);
  background: var(--bg-main);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.wt-input:focus {
  border-color: var(--teal);
  background: var(--bg-card);
}
.wt-input.correct {
  border-color: var(--green);
  background: var(--green-soft);
  color: #065F46;
}
.wt-input.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: #991B1B;
}

.wt-feedback {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  min-height: 22px;
  margin-top: 8px;
}
.wt-feedback.ok { color: #059669; }
.wt-feedback.err { color: var(--coral-hover); }

/* ============================================================
   Stage 1 Results Summary (Compact 2-Column Modern Grid)
   ============================================================ */
.s1-banner {
  border-radius: 22px;
  padding: 15px 16px;
  margin-bottom: 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.s1-banner.pass {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  box-shadow: var(--shadow-teal);
}
.s1-banner.fail {
  background: linear-gradient(135deg, var(--coral) 0%, #D94B30 100%);
  box-shadow: var(--shadow-coral);
}
.s1-banner-left {
  flex: 1;
  min-width: 0;
}
.s1-banner-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.s1-banner-sub {
  font-size: 12.5px;
  margin-top: 4px;
  opacity: 0.9;
  line-height: 1.35;
}
.s1-mini-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.s1-mini-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}
.s1-score-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 3px solid rgba(255, 255, 255, 0.72);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s1-lists-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.s1-lists-scroll::-webkit-scrollbar {
  display: none;
}

.s1-group-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.s1-group-title.unknown { color: var(--coral-hover); }
.s1-group-title.known { color: var(--teal); }

.s1-word-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.s1-word-tile {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 10px 12px;
  border: 1.5px solid rgba(13, 86, 94, 0.08);
  box-shadow: 0 3px 10px rgba(13, 86, 94, 0.05);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.s1-word-tile.unknown {
  background: var(--coral-soft);
  border-color: var(--coral-border);
}
.s1-word-tile.known {
  background: var(--bg-card);
  border-color: var(--teal-light);
}

.s1-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.s1-tile-en {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s1-tile-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.s1-word-tile.known .s1-tile-dot {
  background: var(--teal-light);
  color: var(--teal);
}
.s1-word-tile.unknown .s1-tile-dot {
  background: var(--coral);
  color: #FFFFFF;
}
.s1-tile-uz {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s1-word-tile.unknown .s1-tile-uz {
  color: #9E341D;
}

.s1-footer-bar {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}
.s1-back-btn {
  min-height: 54px;
  padding: 12px 16px;
  font-size: 14.5px;
  border-radius: 16px;
  flex-shrink: 0;
}
.s1-main-btn {
  flex: 1;
  min-height: 54px;
  font-size: 15.5px;
  border-radius: 16px;
}

.sr-time {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16.5px;
  font-weight: 700;
}
.sr-sub {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.88;
}

/* ============================================================
   Spaced Repetition Vault (Takrorlash bo'limi)
   ============================================================ */
.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.filter-pills::-webkit-scrollbar { height: 0; }

.filter-pill {
  border: 2px solid transparent;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.filter-pill.active {
  background: var(--teal);
  color: #FFFFFF;
}

.word-item-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.word-item-en {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
}
.word-item-uz {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 2px;
}
.word-item-ex {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.bucket-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  margin-top: 8px;
}
.bucket-10m { background: var(--coral-soft); color: var(--coral); }
.bucket-1d { background: var(--amber-soft); color: #B45309; }
.bucket-7d { background: var(--teal-light); color: var(--teal); }

/* ============================================================
   Photo Scanner (OCR) & Personal Words
   ============================================================ */
.scanner-card {
  background: linear-gradient(135deg, var(--coral) 0%, #FF8266 100%);
  color: #FFFFFF;
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-coral);
  margin-bottom: 16px;
}

.scanner-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 6px;
}
.scanner-sub {
  font-size: 13.5px;
  opacity: 0.94;
  margin-bottom: 16px;
  line-height: 1.4;
}

.scanner-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-white {
  background: #FFFFFF;
  color: var(--coral-hover);
  font-weight: 800;
  min-height: 52px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-glass {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  font-weight: 700;
  min-height: 52px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13.5px;
  padding: 10px 12px;
}

.scan-preview-box {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  display: none;
}
.scan-preview-box.active { display: block; }

.scan-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #0F2024;
  max-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-img-wrap img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  opacity: 0.85;
}
.scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--coral);
  box-shadow: 0 0 18px 4px var(--coral);
  animation: scanMove 1.6s infinite ease-in-out;
}
@keyframes scanMove {
  0%, 100% { top: 10%; }
  50% { top: 88%; }
}

.detected-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-main);
  border-radius: 14px;
  margin-bottom: 8px;
}

/* ============================================================
   Floating Bottom Navigation (5 Essential Tabs incl. Aqlvoy)
   ============================================================ */
.bottom-nav {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--bg-card);
  border-radius: 26px;
  padding: 7px 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  box-shadow: var(--shadow-nav);
  z-index: 40;
}

.nav-item {
  border: none;
  background: transparent;
  border-radius: 18px;
  padding: 9px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s, transform 0.14s;
}
.nav-item:active { transform: scale(0.94); }
.nav-item svg {
  width: 22px;
  height: 22px;
}
.nav-item.active {
  background: var(--teal-light);
  color: var(--teal);
}
.nav-aqlvoy-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--coral);
  box-shadow: 0 3px 8px rgba(255, 106, 77, 0.32);
}
.nav-aqlvoy-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.62);
  object-position: 50% 48%;
}
.nav-item[data-tab="aqlvoy"].active {
  background: var(--coral-soft);
  color: var(--coral);
}

/* Header Action Group */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid var(--bg-subtle);
  background: var(--bg-card);
  color: var(--teal);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s, border-color 0.14s;
}
.header-icon-btn:hover { border-color: var(--teal); }
.header-icon-btn:active { transform: scale(0.93); }

/* ============================================================
   AQLVOY Dedicated Lampo-Style 3D Blueprint Studio
   ============================================================ */
.app-content.aqlvoy-mode {
  padding: 0;
  overflow: hidden;
}

#tab-aqlvoy.active {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.aqlvoy-blueprint {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 20px;
  position: relative;
  overflow: hidden;
  background-color: #FCF8EE;
  background-image:
    linear-gradient(rgba(138, 162, 184, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 162, 184, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, #FDF9EE 0%, #FAF5E8 55%, #F5EFE1 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  color: #133138;
}

.aqlvoy-back-pill {
  height: 40px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(19, 49, 56, 0.16);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  color: #0D565E;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(19, 49, 56, 0.08);
  transition: transform 0.14s, background 0.14s;
}
.aqlvoy-back-pill:hover { background: #FFFFFF; }
.aqlvoy-back-pill:active { transform: scale(0.94); }

/* Soft warm sunlight diagonal glow on cream paper */
.aqlvoy-sunbeam {
  position: absolute;
  top: -120px;
  bottom: -120px;
  width: 95px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 192, 0.26), transparent);
  transform: rotate(-30deg);
  pointer-events: none;
  z-index: 0;
}
.aqlvoy-sunbeam.b1 { left: 10%; }
.aqlvoy-sunbeam.b2 { right: 4%; width: 120px; }

.aqlvoy-top-row {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.aqlvoy-glass-btn {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  border: 1.5px solid rgba(19, 49, 56, 0.16);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  color: #0D565E;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(19, 49, 56, 0.08);
  transition: transform 0.14s, background 0.14s;
}
.aqlvoy-glass-btn:hover { background: #FFFFFF; }
.aqlvoy-glass-btn:active { transform: scale(0.93); }

.aqlvoy-brand-center {
  text-align: center;
}
.aqlvoy-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #0D565E;
  letter-spacing: -0.01em;
}
.aqlvoy-brand-sub {
  font-size: 12px;
  color: #546E74;
  font-weight: 600;
}

.aqlvoy-center-stage {
  position: relative;
  z-index: 4;
  text-align: center;
  margin: 2px 0 10px;
  transition: margin 0.22s ease;
}
.aqlvoy-center-stage.compact {
  margin: 0 0 6px;
}
.aqlvoy-center-stage.compact .aqlvoy-3d-stage {
  height: 112px;
  width: 120px;
  margin-bottom: 2px;
}
.aqlvoy-center-stage.compact .aqlvoy-3d-orb,
.aqlvoy-center-stage.compact .aqlvoy-sketch-orb {
  width: 112px;
  height: 112px;
}
.aqlvoy-center-stage.compact .aqlvoy-headline {
  display: none;
}

/* Orbiting Coral Dot (unused on sketch mascot, kept hidden) */
.aqlvoy-orbit-dot {
  display: none;
}

.aqlvoy-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 27px;
  font-weight: 800;
  color: #133138;
  letter-spacing: -0.02em;
  margin-top: 0;
}
.aqlvoy-subline {
  font-size: 13.5px;
  font-style: italic;
  color: #526A70;
  margin-top: 4px;
  font-weight: 600;
}

/* 4 Ruled Notebook Index Cards (2x2 Grid) */
.aqlvoy-cards-grid {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: auto 0 14px;
}

.notebook-card {
  position: relative;
  border: 1.5px solid rgba(19, 49, 56, 0.12);
  border-radius: 12px;
  padding: 12px 12px 14px;
  min-height: 122px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #FFFFFF;
  background-image:
    linear-gradient(180deg, transparent 43px, rgba(242, 128, 128, 0.52) 43px, rgba(242, 128, 128, 0.52) 44.5px, transparent 44.5px),
    repeating-linear-gradient(180deg, transparent 0px, transparent 19px, rgba(145, 175, 212, 0.24) 19px, rgba(145, 175, 212, 0.24) 20px);
  box-shadow: 0 8px 18px rgba(19, 49, 56, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.notebook-card:nth-child(odd) { transform: rotate(-0.8deg); }
.notebook-card:nth-child(even) { transform: rotate(0.8deg); }
.notebook-card:hover {
  transform: translateY(-3px) rotate(0deg);
  border-color: rgba(13, 86, 94, 0.28);
  box-shadow: 0 12px 24px rgba(19, 49, 56, 0.13);
}
.notebook-card:active { transform: scale(0.96); }

.nb-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.nb-blue { background: #DBEAFE; }
.nb-green { background: #DCFCE7; }
.nb-amber { background: #FEF3C7; }
.nb-purple { background: #EDE9FE; }

.nb-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #133138;
  line-height: 1.35;
  margin-top: 12px;
}

/* Live Chat Stream on Sketchbook Screen */
.aqlvoy-live-chat {
  position: relative;
  z-index: 4;
  flex: 1;
  min-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.aqlvoy-live-chat::-webkit-scrollbar { display: none; }
.aqlvoy-live-chat .msg-ai {
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(19, 49, 56, 0.11);
  color: #133138;
  box-shadow: 0 6px 16px rgba(19, 49, 56, 0.07);
}
.aqlvoy-live-chat .msg-user {
  background: #0D565E;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(13, 86, 94, 0.18);
}

/* Warm Sketchbook Paper Composer Bar */
.aqlvoy-composer {
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(19, 49, 56, 0.16);
  border-radius: 24px;
  padding: 12px 14px 10px;
  box-shadow: 0 10px 26px rgba(19, 49, 56, 0.11);
  margin-top: auto;
}

.aqlvoy-composer-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #133138;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  padding: 4px 2px 10px;
}
.aqlvoy-composer-input::placeholder {
  color: #7A8F95;
}

.aqlvoy-composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aqlvoy-composer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.composer-pill {
  border: 1.5px solid rgba(13, 86, 94, 0.16);
  background: rgba(13, 86, 94, 0.06);
  color: #0D565E;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.14s, transform 0.12s, border-color 0.14s;
}
.composer-pill:hover {
  background: rgba(13, 86, 94, 0.13);
  border-color: rgba(13, 86, 94, 0.3);
}
.composer-pill:active { transform: scale(0.95); }

.composer-send-btn {
  width: 44px;
  height: 38px;
  border-radius: 14px;
  border: none;
  background: var(--coral);
  color: #FFFFFF;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 106, 77, 0.38);
  flex-shrink: 0;
  transition: transform 0.12s;
}
.composer-send-btn:active { transform: scale(0.92); }

.aqlvoy-3d-stage {
  position: relative;
  width: 176px;
  height: 164px;
  margin: 0 auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
}

/* Floating energy aura & ground shadow */
.aqlvoy-aura {
  position: absolute;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 77, 0.34) 0%, rgba(22, 114, 124, 0.12) 55%, transparent 72%);
  animation: auraPulse 3s ease-in-out infinite;
  pointer-events: none;
}
.aqlvoy-floor-shadow {
  position: absolute;
  bottom: 2px;
  width: 84px;
  height: 14px;
  border-radius: 50%;
  background: rgba(3, 22, 26, 0.55);
  filter: blur(6px);
  animation: shadowBreathe 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes auraPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.75; }
  50% { transform: scale(1.09); opacity: 1; }
}
@keyframes shadowBreathe {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  50% { transform: scaleX(0.84); opacity: 0.35; }
}

/* Real 3D Glossy Pixar-style Sphere */
.aqlvoy-3d-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  background:
    radial-gradient(circle at 34% 26%, rgba(155, 228, 234, 0.72) 0%, rgba(44, 146, 156, 0.25) 26%, transparent 52%),
    radial-gradient(circle at 78% 82%, rgba(255, 106, 77, 0.65) 0%, transparent 45%),
    radial-gradient(circle at 50% 45%, #167984 0%, #0D565E 52%, #062F35 100%);
  box-shadow:
    0 16px 32px rgba(2, 18, 22, 0.48),
    inset 0 4px 10px rgba(255, 255, 255, 0.42),
    inset -6px -10px 18px rgba(4, 28, 32, 0.75),
    inset 0 -3px 10px rgba(255, 106, 77, 0.72),
    0 0 0 2.5px rgba(255, 106, 77, 0.85);
  animation: orbLiveFloat 3.2s ease-in-out infinite;
  transition: transform 0.14s ease-out, box-shadow 0.25s ease;
}

.aqlvoy-3d-orb.squish {
  animation: orbSquishJump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.aqlvoy-3d-orb.speaking {
  box-shadow:
    0 18px 38px rgba(2, 18, 22, 0.5),
    0 0 34px rgba(255, 106, 77, 0.7),
    inset 0 4px 10px rgba(255, 255, 255, 0.5),
    inset -6px -10px 18px rgba(4, 28, 32, 0.72),
    inset 0 -4px 12px rgba(255, 106, 77, 0.9),
    0 0 0 3.5px #FF6A4D;
}

@keyframes orbLiveFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
@keyframes orbSquishJump {
  0% { transform: scale(1, 1) translateY(0); }
  25% { transform: scale(1.14, 0.86) translateY(4px); }
  55% { transform: scale(0.92, 1.1) translateY(-14px); }
  80% { transform: scale(1.04, 0.96) translateY(-2px); }
  100% { transform: scale(1, 1) translateY(0); }
}

/* Specular Gloss Highlight */
.orb-gloss {
  position: absolute;
  top: 10px;
  left: 20px;
  width: 44px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(-22deg);
  pointer-events: none;
}

/* Face Container (shifts subtly in 3D with gaze) */
.orb-face {
  position: absolute;
  inset: 0;
  transition: transform 0.14s ease-out;
}

/* 3D Glossy Eyes */
.orb-eyes {
  position: absolute;
  top: 41px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.orb-eye {
  width: 28px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #16333B 0%, #07171B 75%, #02080A 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 0, 0, 0.9),
    0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(240, 252, 255, 0.82);
  position: relative;
  overflow: hidden;
  transition: height 0.15s ease, border-radius 0.15s ease;
}

/* Moving Pupil + Bright Catchlights */
.orb-pupil {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 6px;
  left: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, #0C2329 0%, #02080A 100%);
  transition: transform 0.1s ease-out;
}
.orb-pupil::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 4px #FFFFFF;
}
.orb-pupil::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

/* Natural Blinking Eyelids */
.orb-eyelid {
  position: absolute;
  top: -100%;
  left: -2px;
  right: -2px;
  height: 105%;
  background: linear-gradient(180deg, #0D565E 0%, #083B41 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 0 0 50% 50%;
  z-index: 3;
  animation: orbBlink 4.4s infinite;
}
@keyframes orbBlink {
  0%, 92%, 100% { top: -105%; }
  95%, 97% { top: 0%; }
}

/* Happy curved eyes state */
.aqlvoy-3d-orb.happy .orb-eye {
  height: 15px;
  margin-top: 8px;
  border-radius: 20px 20px 6px 6px;
  background: #06282E;
  box-shadow: 0 -2px 0 2.5px #FFFFFF;
}
.aqlvoy-3d-orb.happy .orb-pupil,
.aqlvoy-3d-orb.happy .orb-eyelid {
  opacity: 0;
}

/* Soft 3D Rosy Coral Cheeks */
.orb-cheeks {
  position: absolute;
  top: 69px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}
.orb-cheek {
  width: 22px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 118, 92, 0.95) 0%, rgba(255, 106, 77, 0) 75%);
  filter: blur(1px);
  transition: transform 0.2s;
}
.aqlvoy-3d-orb.happy .orb-cheek {
  transform: scale(1.22);
}

/* 3D Animated Mouth + Cute Tongue */
.orb-mouth {
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 12px;
  border-radius: 4px 4px 16px 16px;
  background: linear-gradient(180deg, #3D0E12 0%, #6D1B22 100%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: width 0.16s ease, height 0.16s ease, border-radius 0.16s ease;
}
.orb-tongue {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FF9680 0%, #FF5D42 100%);
}

/* Talking Mouth Animation */
.aqlvoy-3d-orb.speaking .orb-mouth {
  animation: mouthTalk 0.28s ease-in-out infinite alternate;
}
@keyframes mouthTalk {
  0% { height: 7px; width: 20px; border-radius: 4px 4px 12px 12px; }
  100% { height: 17px; width: 26px; border-radius: 6px 6px 18px 18px; }
}

/* Thinking Mouth */
.aqlvoy-3d-orb.thinking .orb-mouth {
  width: 13px;
  height: 11px;
  border-radius: 50%;
}

/* Happy Big Smile */
.aqlvoy-3d-orb.happy .orb-mouth {
  width: 30px;
  height: 16px;
  border-radius: 5px 5px 20px 20px;
}

/* Angry / Hit / Runaway Reaction */
.aqlvoy-3d-orb.hit-shake {
  animation: orbHitShake 0.36s ease-in-out !important;
  box-shadow:
    0 16px 34px rgba(2, 18, 22, 0.5),
    0 0 36px rgba(255, 70, 50, 0.85),
    inset 0 4px 10px rgba(255, 255, 255, 0.4),
    inset 0 -4px 14px rgba(255, 60, 40, 0.95),
    0 0 0 3.5px #FF3B30;
}
@keyframes orbHitShake {
  0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  20% { transform: translateX(-10px) rotate(-10deg) scale(1.08, 0.9); }
  45% { transform: translateX(10px) rotate(10deg) scale(0.92, 1.08); }
  70% { transform: translateX(-6px) rotate(-6deg) scale(1.04, 0.96); }
}

.orb-brows {
  position: absolute;
  top: 33px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 26px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 4;
}
.orb-brow {
  width: 22px;
  height: 4.5px;
  border-radius: 4px;
  background: #FFD6CE;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.orb-brow.left { transform: rotate(22deg); }
.orb-brow.right { transform: rotate(-22deg); }

.aqlvoy-3d-orb.angry .orb-brows,
.aqlvoy-3d-orb.runaway .orb-brows {
  opacity: 1;
}
.aqlvoy-3d-orb.angry .orb-mouth {
  width: 18px;
  height: 8px;
  border-radius: 14px 14px 4px 4px;
  top: 78px;
}
.aqlvoy-3d-orb.runaway .orb-mouth {
  width: 18px;
  height: 20px;
  border-radius: 50%;
  top: 73px;
}
.aqlvoy-3d-orb.runaway .orb-cheek {
  transform: scale(1.35);
}

/* Floating Sparkle Particles */
.orb-spark {
  position: absolute;
  font-size: 14px;
  pointer-events: none;
  animation: sparkRise 2.8s ease-in-out infinite;
  opacity: 0;
}
.orb-spark.s1 { top: 10px; left: 10px; animation-delay: 0s; }
.orb-spark.s2 { top: 18px; right: 8px; animation-delay: 1.1s; }
.orb-spark.s3 { bottom: 20px; right: 14px; animation-delay: 2s; }
@keyframes sparkRise {
  0%, 100% { transform: translateY(6px) scale(0.7); opacity: 0; }
  45% { transform: translateY(-6px) scale(1.1); opacity: 0.95; }
  85% { transform: translateY(-12px) scale(0.8); opacity: 0; }
}

/* Hand-drawn Colored-Pencil Sketchbook Mascot */
.aqlvoy-3d-stage .aqlvoy-3d-orb.aqlvoy-sketch-orb {
  width: 168px;
  height: 164px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  animation: orbLiveFloat 3.4s ease-in-out infinite;
}

.aqlvoy-sketch-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  mix-blend-mode: multiply;
  filter: contrast(1.04) saturate(1.06);
  -webkit-mask-image: radial-gradient(circle at 52% 48%, #000 48%, rgba(0, 0, 0, 0.92) 60%, transparent 76%);
  mask-image: radial-gradient(circle at 52% 48%, #000 48%, rgba(0, 0, 0, 0.92) 60%, transparent 76%);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}

.aqlvoy-sketch-orb.speaking {
  box-shadow: none;
}
.aqlvoy-sketch-orb.speaking .aqlvoy-sketch-img {
  animation: sketchSpeakPulse 0.48s ease-in-out infinite alternate;
  filter: contrast(1.06) saturate(1.12) drop-shadow(0 6px 14px rgba(255, 106, 77, 0.25));
}
@keyframes sketchSpeakPulse {
  0% { transform: scale(1) rotate(-1deg); }
  100% { transform: scale(1.055) rotate(1.5deg); }
}

.aqlvoy-sketch-orb.thinking .aqlvoy-sketch-img {
  transform: rotate(-4deg) scale(0.97);
}
.aqlvoy-sketch-orb.happy .aqlvoy-sketch-img {
  transform: scale(1.07) translateY(-4px);
}
.aqlvoy-sketch-orb.hit-shake {
  box-shadow: none;
}
.aqlvoy-sketch-orb.angry .aqlvoy-sketch-img,
.aqlvoy-sketch-orb.runaway .aqlvoy-sketch-img {
  filter: contrast(1.1) saturate(1.2) drop-shadow(0 6px 12px rgba(255, 70, 50, 0.3));
}

/* ============================================================
   SOZLAMALAR (Settings) Page
   ============================================================ */
.settings-group {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 6px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-subtle);
}
.settings-row:last-child { border-bottom: none; }

.settings-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-icon.coral {
  background: var(--coral-soft);
  color: var(--coral);
}
.settings-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}
.settings-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 54px;
  height: 32px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 4px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--coral);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.speed-pills {
  display: flex;
  gap: 6px;
}
.speed-pill {
  border: 2px solid var(--bg-subtle);
  background: var(--bg-main);
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.speed-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

/* ============================================================
   Floating Realistic 3D Round AI Mascot (Eyes & Mouth)
   ============================================================ */
.ai-fab {
  position: absolute;
  right: 16px;
  bottom: 94px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 14px 20px rgba(8, 59, 65, 0.36)) drop-shadow(0 4px 10px rgba(255, 106, 77, 0.28));
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: mascotFloat3d 3.4s ease-in-out infinite;
}
.ai-fab:hover {
  transform: scale(1.1) translateY(-3px);
}
.ai-fab:active {
  transform: scale(0.93);
}

.ai-fab-sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(8, 40, 45, 0.45),
    0 0 0 2.5px rgba(255, 106, 77, 0.72);
}

.ai-mascot-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.33);
  display: block;
  pointer-events: none;
}

@keyframes mascotFloat3d {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

.ai-badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 35%, #FF9680, var(--coral));
  border: 2.5px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(255, 106, 77, 0.55);
  animation: pulseDot 2.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.16); }
}

/* AI Chat Drawer */
.ai-drawer {
  position: absolute;
  inset: 0;
  background: rgba(8, 59, 65, 0.48);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: none;
  align-items: flex-end;
}
.ai-drawer.open { display: flex; }

.ai-sheet {
  width: 100%;
  height: 82%;
  background: var(--bg-main);
  border-radius: 30px 30px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.26s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ai-sheet-header {
  background: var(--teal);
  color: #FFFFFF;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar-sm {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal-dark);
  border: 2px solid rgba(255, 106, 77, 0.85);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-bubble {
  max-width: 86%;
  padding: 13px 16px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.45;
}
.msg-ai {
  background: var(--bg-card);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-card);
}
.msg-user {
  background: var(--teal);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.ai-quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.ai-opt-btn {
  background: var(--bg-main);
  border: 2px solid var(--teal-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.14s;
}
.ai-opt-btn:hover { border-color: var(--teal); background: var(--teal-light); }
.ai-opt-btn.correct { background: var(--green-soft); border-color: var(--green); color: #065F46; }
.ai-opt-btn.wrong { background: var(--coral-soft); border-color: var(--coral); color: #991B1B; }

.ai-quick-chips {
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-main);
}
.ai-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--teal-light);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  cursor: pointer;
}
.ai-chip:hover { background: var(--teal-light); }

.ai-input-bar {
  background: var(--bg-card);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--bg-subtle);
}

.ai-input {
  flex: 1;
  background: var(--bg-main);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.ai-input:focus { border-color: var(--teal); background: #FFFFFF; }

.ai-send-btn {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: none;
  background: var(--coral);
  color: #FFFFFF;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal (Goal Editor / Add Word) */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 59, 65, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal-card {
  width: 100%;
  background: var(--bg-card);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(8, 59, 65, 0.28);
}

.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--bg-subtle);
  background: var(--bg-main);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}
.form-input:focus {
  border-color: var(--teal);
  background: #FFFFFF;
}

/* Toast Notification */
.toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--teal-dark);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  z-index: 120;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(8, 59, 65, 0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  color: var(--text-secondary);
}
.empty-state-emoji {
  font-size: 42px;
  margin-bottom: 10px;
}

.tab-view { display: none; }
.tab-view.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
