@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600;700&family=Outfit:wght@300;400;600;700&family=Prompt:wght@300;400;600&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-header: rgba(15, 23, 42, 0.88);
  --bg-sidebar: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(51, 65, 85, 0.85);
  --bg-card-sub: rgba(15, 23, 42, 0.65);
  --accent-teal: #14b8a6;
  --accent-teal-glow: rgba(20, 184, 166, 0.35);
  --accent-gold: #fbbf24;
  --accent-indigo: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-active: rgba(20, 184, 166, 0.5);

  --tone-mid: #3b82f6;
  --tone-low: #10b981;
  --tone-falling: #ef4444;
  --tone-high: #f59e0b;
  --tone-rising: #8b5cf6;

  --font-body: 'Outfit', sans-serif;
  --font-thai: 'Kanit', 'Prompt', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(20, 184, 166, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero Banner Container */
.hero-banner-container {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.75);
}

.hero-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.hero-banner-overlay h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-banner-overlay p {
  font-size: 0.9rem;
  color: #2dd4bf;
  margin-top: 4px;
}

/* Infographic Image Styling (Große Infografiken bleiben normal groß) */
.lesson-infographic-box {
  margin: 1.5rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-active);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  position: relative;
}

.lesson-infographic-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  cursor: default;
}

/* Small Vocabulary Thumbnails Mouseover 3x Zoom */
.vocab-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: visible; /* Allow 3x zoom for small thumbnails */
  border: 1px solid var(--border-active);
  flex-shrink: 0;
  position: relative;
}

.vocab-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  position: relative;
  z-index: 1;
}

.vocab-thumb-img:hover {
  transform: scale(3.2);
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  border: 2px solid var(--accent-gold);
}

/* App Header & Navbar */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-domain-main {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 35%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-teal);
  letter-spacing: 0.1px;
}

.brand-icon {
  font-size: 1.8rem;
}

/* Controls & Script Toggle */
.controls-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.script-toggle-container {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  color: var(--text-main);
}

.toggle-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-teal-glow);
}

/* Main Container Layout */
.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar Navigation (Full Height, No Inner Scrollbar) */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: visible;
  height: auto;
  max-height: none !important;
}

.overall-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-indigo));
  width: 0%;
  transition: width 0.4s ease;
}

/* ==========================================================================
   Week Navigation List & Items (Modern 2-Row Stacked Card Layout)
   ========================================================================== */
.month-group-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-teal);
  margin-bottom: 0.6rem;
  margin-top: 0.4rem;
  font-weight: 700;
}

.week-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
}

.week-item {
  padding: 0.7rem 0.9rem !important;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.3rem !important;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.week-item:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.week-item.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.22), rgba(99, 102, 241, 0.2)) !important;
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.25), inset 0 0 0 1px rgba(20, 184, 166, 0.4) !important;
}

.week-item-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 0.4rem;
}

.week-number-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--accent-teal) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  white-space: nowrap !important;
}

.week-item.active .week-number-label {
  color: var(--accent-gold) !important;
}

.week-item-title {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: #e2e8f0 !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
  width: 100% !important;
}

.week-item:hover .week-item-title {
  color: #ffffff !important;
}

.week-item.active .week-item-title {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(20, 184, 166, 0.4);
}

.week-status-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-weight: 600;
  white-space: nowrap;
}

/* Content Area */
.content-area {
  padding: 2rem;
  overflow-y: auto;
}

@media (max-width: 600px) {
  .content-area {
    padding: 1rem;
  }
}

/* Lesson Views & Tabs */
.lesson-header {
  margin-bottom: 1.5rem;
}

.lesson-title-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lesson-main-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}


/* ==========================================================================
   🏛️ 2-Stufiges Strukturiertes Übungs- & Tool-Navigationssystem
   ========================================================================== */

.learning-hub-nav-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.8rem;
  width: 100%;
}

/* Stufe 1: 4 Haupt-Themenbereiche (Pillars) */
.main-category-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  width: 100%;
}

@media (max-width: 1100px) {
  .main-category-pills {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .main-category-pills {
    grid-template-columns: 1fr;
  }
}

.cat-pill-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.cat-pill-btn:hover {
  background: var(--bg-card);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.cat-pill-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(99, 102, 241, 0.25));
  border-color: var(--accent-teal);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.25), inset 0 0 0 1px rgba(20, 184, 166, 0.4);
}

.cat-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.cat-info strong {
  display: block;
  font-size: 0.92rem;
  color: #fff;
  font-weight: 700;
  transition: color 0.2s ease;
}

.cat-pill-btn.active .cat-info strong {
  color: var(--accent-teal);
}

.cat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

/* Stufe 2: Kontextuelle Unter-Werkzeuge (Sub-Pill Bar) */
.sub-tool-pills-bar {
  background: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

.sub-tool-group {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.sub-tool-group.active {
  display: flex;
  animation: fadeInSubTools 0.25s ease-out;
}

@keyframes fadeInSubTools {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-tool-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sub-tool-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.sub-tool-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.35);
}

.sub-tool-btn.highlight-gold.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.sub-tool-btn.highlight-teal.active {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
}



/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grammar Card */
.grammar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  line-height: 1.7;
}

.grammar-card h3 {
  color: var(--accent-teal);
  margin: 1.5rem 0 0.8rem 0;
  font-size: 1.25rem;
}

.grammar-card h3:first-child {
  margin-top: 0;
}

.grammar-card ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.grammar-card li {
  margin-bottom: 0.5rem;
}

.grammar-card code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-gold);
  font-family: var(--font-thai);
  font-size: 1.05rem;
}

/* Inline Audio Play Button */
.audio-btn-inline {
  background: rgba(20, 184, 166, 0.2);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.audio-btn-inline:hover {
  background: var(--accent-teal);
  color: #0f172a;
  transform: scale(1.05);
}

/* Tone Badges */
.tone-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  margin-right: 4px;
}

.tone-mid { background-color: var(--tone-mid); }
.tone-low { background-color: var(--tone-low); }
.tone-falling { background-color: var(--tone-falling); }
.tone-high { background-color: var(--tone-high); }
.tone-rising { background-color: var(--tone-rising); }

/* Vocabulary Grid & Cards */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.vocab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.vocab-card:hover {
  border-color: var(--border-active);
}

/* 7 Dynamic Vocab Green Rating Highlights - Entire Surface (Stufe 1 bis 7) */
.vocab-card.mastered-level-1,
.vocab-list-row.mastered-level-1 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), var(--bg-card)) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.vocab-card.mastered-level-2,
.vocab-list-row.mastered-level-2 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), var(--bg-card)) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.55) !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2) !important;
}

.vocab-card.mastered-level-3,
.vocab-list-row.mastered-level-3 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.40), var(--bg-card)) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.7) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.vocab-card.mastered-level-4,
.vocab-list-row.mastered-level-4 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.52), var(--bg-card)) !important;
  border: 2px solid rgba(16, 185, 129, 0.85) !important;
  box-shadow: 0 5px 18px rgba(16, 185, 129, 0.4) !important;
}

.vocab-card.mastered-level-5,
.vocab-list-row.mastered-level-5 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.65), rgba(15, 23, 42, 0.9)) !important;
  border: 2px solid #10b981 !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5) !important;
}

.vocab-card.mastered-level-6,
.vocab-list-row.mastered-level-6 {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.78), rgba(15, 23, 42, 0.95)) !important;
  border: 2px solid #059669 !important;
  box-shadow: 0 7px 25px rgba(5, 150, 105, 0.6) !important;
}

.vocab-card.mastered-level-7,
.vocab-list-row.mastered-level-7 {
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.92), #064e3b) !important;
  border: 2px solid #34d399 !important;
  box-shadow: 0 8px 30px rgba(52, 211, 153, 0.75) !important;
}

.vocab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.8rem;
}

.vocab-thai {
  font-family: var(--font-thai);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 1.2;
}

.vocab-phonetic {
  font-size: 1.1rem;
  color: #2dd4bf;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.vocab-german {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.vocab-example {
  background: var(--bg-sidebar);
  border-left: 3px solid var(--accent-indigo);
  padding: 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.audio-btn {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.audio-btn:hover {
  background: var(--accent-teal);
  color: #0f172a;
  transform: scale(1.1);
}

/* Script Display Visibility Rules */
.mode-thai-only .thai-text { display: block !important; }
.mode-thai-only .phonetic-text { display: none !important; }

.mode-phonetic-only .thai-text { display: none !important; }
.mode-phonetic-only .phonetic-text { display: block !important; }

.mode-both .thai-text { display: block !important; }
.mode-both .phonetic-text { display: block !important; }

/* Dialogue Panel */
.dialogue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialogue-bubble {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.dialogue-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}

.dialogue-speaker-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  gap: 6px;
}

.dialogue-speaker {
  font-weight: 700;
  color: var(--accent-indigo);
  font-size: 0.85rem;
  text-align: center;
}

.dialogue-content {
  flex: 1;
}

.dialogue-thai {
  font-family: var(--font-thai);
  font-size: 1.4rem;
  color: var(--accent-gold);
  margin-bottom: 0.2rem;
}

.dialogue-phonetic {
  color: var(--accent-teal);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.dialogue-german {
  color: var(--text-main);
  font-size: 0.95rem;
}

/* Exercises Section */
.exercise-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ex-option-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ex-option-card:hover {
  border-color: var(--accent-teal);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.ex-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.ex-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* Flashcards Container */
.flashcard-wrapper {
  perspective: 1000px;
  max-width: 450px;
  margin: 2rem auto;
}

.flashcard {
  width: 100%;
  height: 280px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  background: var(--bg-card);
  border: 2px solid var(--border-active);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--bg-card);
}

.fc-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #0f172a;
  font-weight: 700;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-teal-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Sentence Builder (Word Reorder) */
.builder-area {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.target-drop-zone {
  min-height: 70px;
  background: var(--bg-sidebar);
  border: 2px dashed var(--border-active);
  border-radius: 12px;
  padding: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.word-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.word-chip {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--accent-indigo);
  color: var(--text-main);
  font-family: var(--font-thai);
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.word-chip:hover {
  background: var(--accent-indigo);
  transform: scale(1.05);
}

/* Quiz Option Card */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.quiz-opt-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1rem;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
  border-color: var(--accent-teal);
  background: var(--bg-card-hover);
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.quiz-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

/* Complete / Next Lesson Footer */
.lesson-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Flashcard Adaptive Training Mode */
.flashcard-mode-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.fc-mode-toggle {
  display: flex;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.fc-mode-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-mode-btn:hover {
  color: var(--text-main);
}

.fc-mode-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.4);
}

.fc-stats-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.fc-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-stat-item.mastered strong {
  color: #10b981;
}

.fc-stat-item.remaining strong {
  color: var(--accent-gold);
}

.training-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-review {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  font-size: 0.95rem;
}

.btn-review:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

.btn-mastered {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  font-size: 0.95rem;
}

.btn-mastered:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

.fc-training-nav-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-link-reset {
  color: var(--accent-gold);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
  padding: 0;
  transition: color 0.2s ease;
}

.btn-link-reset:hover {
  color: var(--accent-teal);
}

.fc-celebration-card {
  background: var(--bg-card);
  border: 2px solid #10b981;
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  max-width: 480px;
  margin: 2rem auto;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.2);
}

/* Alphabet & Script Module Styling */
.alphabet-filters-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.alphabet-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.alphabet-filter-group:last-child {
  margin-bottom: 0;
}

.filter-btn {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--accent-teal);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
  font-weight: 700;
}

.freq-legend-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
}

.freq-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-indicator.common { background: #10b981; }
.dot-indicator.normal { background: #3b82f6; }
.dot-indicator.rare { background: #f59e0b; }
.dot-indicator.obsolete { background: #ef4444; }

/* Alphabet Grid */
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.letter-card {
  border-radius: 14px;
  padding: 1rem 0.8rem;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
  border: 2px solid var(--border-light);
  background: var(--bg-card);
}

.letter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.letter-card.freq-common {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.06);
}

.letter-card.freq-normal {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.06);
}

.letter-card.freq-rare {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.06);
}

.letter-card.freq-obsolete {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.08);
  opacity: 0.85;
}

.letter-char {
  font-family: var(--font-thai);
  font-size: 2.4rem;
  color: var(--accent-gold);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.letter-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.letter-phonetic {
  font-size: 0.78rem;
  color: var(--accent-teal);
}

.letter-meaning {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.letter-badges {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.class-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.class-badge.mid { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.class-badge.high { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.class-badge.low { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }

.freq-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.freq-tag.common { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.freq-tag.normal { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.freq-tag.rare { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.freq-tag.obsolete { background: rgba(239, 68, 68, 0.25); color: #f87171; }

/* Script Lessons & Reading Drills */
.script-lesson-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.script-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.script-nav-btn:hover {
  border-color: var(--accent-teal);
  transform: translateY(-1px);
}

.script-nav-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
  font-weight: 700;
}

.letter-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.letter-mini-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.letter-mini-card span {
  font-family: var(--font-thai);
  font-size: 1.6rem;
  color: var(--accent-gold);
}

/* Global Vocabulary List Tab & Table Styling */
.global-vocab-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.8rem;
}

.vocab-list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.vocab-select-input, .vocab-search-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  min-width: 200px;
}

.vocab-select-input:focus, .vocab-search-input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px var(--accent-teal-glow);
}

.vocab-stats-legend {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.legend-item {
  padding: 4px 10px;
  border-radius: 6px;
}

.legend-unlearned {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.legend-mastered {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.vocab-table-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.vocab-list-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  transition: all 0.25s ease;
  position: relative;
}

@media (max-width: 768px) {
  .vocab-list-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.vocab-col-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 1.2rem;
}

@media (max-width: 768px) {
  .vocab-col-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 1rem;
  }
}

.vocab-col-right {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.vocab-row-thai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.vocab-row-german-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}

.vocab-week-badge {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.vocab-action-btns {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

.vocab-check-btn {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vocab-check-btn.btn-wrong {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.vocab-check-btn.btn-wrong:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.vocab-check-btn.btn-right {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.vocab-check-btn.btn-right:hover {
  background: #10b981;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.reading-drill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.reading-word-chip {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.reading-thai-large {
  font-family: var(--font-thai);
  font-size: 1.8rem;
  color: var(--accent-gold);
  line-height: 1.2;
}

.tone-rules-box {
  background: var(--bg-sidebar);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}

/* Top Header Global Vocab Group */
.header-vocab-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-vocab-btn {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--accent-indigo);
  color: #c7d2fe;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-vocab-btn:hover {
  background: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.header-vocab-select {
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.header-vocab-select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px var(--accent-teal-glow);
}

/* Diashow Launch Banner Box in Week 3 */
.diashow-launch-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--accent-gold);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.15);
  border-radius: 16px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.diashow-banner-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.diashow-banner-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.diashow-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-diashow-main {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #0f172a;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
  transition: all 0.25s ease;
}

.btn-diashow-main:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.5);
}

.diashow-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.diashow-pill-btn {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diashow-pill-btn:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.1);
}/* Fullscreen Diashow Modal - Full Viewport Immersive Mode */
.number-diashow-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-diashow-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 9, 20, 0.98);
  backdrop-filter: blur(20px);
}

.number-diashow-container {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.95), rgba(10, 15, 30, 0.98));
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header Bar */
.diashow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 2rem;
  background: rgba(10, 15, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 10;
}

.diashow-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.diashow-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.diashow-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.diashow-sub-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 2px;
}

.diashow-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.diashow-hdr-btn {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diashow-hdr-btn:hover {
  background: var(--accent-indigo);
  color: #ffffff;
}

.diashow-close-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diashow-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Top Progress Line */
.diashow-top-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.diashow-top-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-gold));
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Keyboard Shortcuts Hint Bar */
.diashow-shortcuts-bar {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 0.76rem;
  color: var(--text-dim);
  background: var(--bg-sidebar);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 5;
}

.diashow-shortcuts-bar kbd {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-gold);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 700;
  font-family: inherit;
  margin: 0 0.15rem;
}

/* Manual Reveal Interactive Button */
.btn-reveal-manual {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0f172a;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-reveal-manual:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

/* Starred Button Active State */
.diashow-hdr-btn.starred-btn-active {
  background: rgba(245, 158, 11, 0.25);
  color: #fce7f3;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Active Repeat Loop Button Pulse Glow */
.diashow-ctrl-btn.repeat-loop-active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.5)) !important;
  color: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
  animation: pulse-repeat-glow 1.5s infinite alternate;
}

@keyframes pulse-repeat-glow {
  0% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

/* Tone Contour SVG Pitch Contour Line */
.tone-contour-svg {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 0 8px currentColor);
  transition: all 0.3s ease;
}

/* Collapsible Settings Drawer */
.diashow-settings-drawer {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.diashow-settings-drawer.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

.diashow-hdr-btn.active {
  background: rgba(234, 179, 8, 0.2);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* Grouped Settings Grid & Cards */
.diashow-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(10, 15, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  max-height: 450px;
}

.diashow-settings-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.diashow-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-gold);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.3px;
}

.diashow-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.diashow-sublabel {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* Range Multi-Select Toolbar */
.diashow-range-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 2rem;
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.diashow-range-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
}

.diashow-range-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.diashow-range-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.diashow-range-btn.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.35));
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.diashow-range-btn:hover {
  transform: translateY(-1px);
}

.diashow-quick-select-btns {
  display: flex;
  gap: 0.4rem;
}

.diashow-sm-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.diashow-sm-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Audio & Pause Customization Bar */
.diashow-settings-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 2rem;
  background: rgba(10, 15, 30, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.diashow-setting-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.diashow-setting-item select {
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  color: var(--accent-teal);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.diashow-setting-item select:focus {
  border-color: var(--accent-teal);
}

.diashow-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  color: #e2e8f0;
}

.diashow-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-teal);
  cursor: pointer;
}

/* Center Stage Area */
.diashow-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.diashow-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  animation: diashowFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.diashow-card-content.fade-out {
  animation: diashowFadeOut 0.4s ease forwards;
}

@keyframes diashowFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes diashowFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.92) translateY(-10px);
  }
}

.diashow-thinking-badge {
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1.05;
  text-shadow: 0 0 45px rgba(234, 179, 8, 0.6);
  letter-spacing: 2px;
}

.diashow-hidden-placeholder {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-teal);
  margin-top: 1.5rem;
  padding: 0.6rem 1.6rem;
  background: rgba(45, 212, 191, 0.1);
  border: 1px dashed var(--accent-teal);
  border-radius: 30px;
  animation: pulseDot 1.5s infinite ease-in-out;
}

.diashow-thai-numeral {
  font-family: var(--font-thai);
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  font-weight: bold;
  color: var(--accent-gold);
  line-height: 1.05;
  text-shadow: 0 0 45px rgba(234, 179, 8, 0.5);
}

.diashow-thai-text {
  font-family: var(--font-thai);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.5rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.diashow-phonetic-text {
  font-family: var(--font-phonetic);
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: #2dd4bf;
  margin-top: 1.2rem;
  font-weight: 700;
  text-shadow: 0 0 25px rgba(45, 212, 191, 0.4);
}

.diashow-german-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.diashow-western-badge {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 6px 22px;
  border-radius: 30px;
  margin-top: 1rem;
}

/* Bottom Bar */
.diashow-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background: rgba(10, 15, 30, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.diashow-status-indicator {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-teal);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 1.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 10px var(--accent-teal); }
}

.diashow-control-btns {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.diashow-ctrl-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diashow-ctrl-btn:hover {
  background: rgba(234, 179, 8, 0.2);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.diashow-ctrl-btn.main-play-btn {
  background: var(--accent-teal);
  color: #0f172a;
  border: none;
  min-width: 100px;
}

.diashow-ctrl-btn.main-play-btn:hover {
  background: #2dd4bf;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

.diashow-progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 100px;
  text-align: right;
}



/* ==========================================================================
   Slow-Mo Audio Toggle & Timer Bar
   ========================================================================== */
.btn-slow-mo {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--accent-gold);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-slow-mo:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-slow-mo.active-slow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.diashow-timer-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.diashow-timer-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-gold));
  transition: width 0.1s linear;
}

/* ==========================================================================
   Tone Trainer & Hearing Quiz
   ========================================================================== */
.tone-trainer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.tone-trainer-mode-switch {
  display: flex;
  gap: 0.5rem;
}

.tab-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-pill-btn.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  font-weight: 700;
}

.tone-quiz-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tone-quiz-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.quiz-streak-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #f59e0b;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.quiz-score-badge {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
}

.tone-quiz-audio-center {
  text-align: center;
  margin-bottom: 2rem;
}

.btn-play-tone-quiz {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #0f172a;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.35);
  transition: all 0.2s ease;
}

.btn-play-tone-quiz:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 25px rgba(20, 184, 166, 0.5);
}

.tone-quiz-prompt-text {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
}

.tone-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.8rem;
}

.tone-pick-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem 0.5rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.tone-pick-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.tone-line-preview {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.tone-pick-mid .tone-line-preview { color: #2dd4bf; }
.tone-pick-low .tone-line-preview { color: #10b981; }
.tone-pick-falling .tone-line-preview { color: #ef4444; }
.tone-pick-high .tone-line-preview { color: #ec4899; }
.tone-pick-rising .tone-line-preview { color: #f59e0b; }

.tone-feedback-msg {
  min-height: 2.2rem;
  margin-top: 1.2rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

.tone-feedback-correct {
  color: #10b981;
  animation: bounceIn 0.3s ease;
}

.tone-feedback-wrong {
  color: #ef4444;
  animation: shake 0.3s ease;
}

.btn-next-tone {
  background: var(--accent-gold);
  color: #0f172a;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-next-tone:hover {
  transform: scale(1.05);
}

.tone-pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.tone-pair-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.2rem;
}

/* ==========================================================================
   Sentence Lab (Satz-Baukasten)
   ========================================================================== */
.sentence-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.btn-clear-sentence {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-sentence:hover {
  background: #ef4444;
  color: #ffffff;
}

.sentence-stage-card {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 2px solid rgba(20, 184, 166, 0.4);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sentence-stage-thai {
  font-family: var(--font-thai);
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.sentence-stage-phonetics {
  margin-top: 0.8rem;
  min-height: 2.5rem;
}

.sentence-stage-german {
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 0.8rem;
  min-height: 1.8rem;
}

.sentence-stage-actions {
  margin-top: 1.2rem;
}

.btn-speak-assembled {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #0f172a;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.7rem 1.8rem;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
  transition: all 0.2s ease;
}

.btn-speak-assembled:hover {
  transform: scale(1.04);
}

.tray-group {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
}

.tray-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.tray-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.token-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.token-pill:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.token-pill.active {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
  font-weight: 700;
}

/* ==========================================================================
   Statistics & SRS Dashboard
   ========================================================================== */
.stats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  transition: all 0.2s ease;
}

.metric-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.custom-vocab-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.custom-input {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: #ffffff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  flex: 1 1 140px;
}

.custom-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.btn-add-custom-vocab {
  background: var(--accent-teal);
  color: #0f172a;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-custom-vocab:hover {
  background: #2dd4bf;
}

/* ==========================================================================
   SRS Rating Buttons on Diashow Stage
   ========================================================================== */
.diashow-srs-row {
  display: inline-flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn-srs-rate {
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-srs-again {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.btn-srs-again:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-srs-good {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.btn-srs-good:hover {
  background: #f59e0b;
  color: #0f172a;
}

.btn-srs-easy {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.btn-srs-easy:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-voice-record {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-voice-record.recording {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  animation: pulseRecording 1s infinite ease-in-out;
}

@keyframes pulseRecording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   📱 Mobile & Smartphone Optimizations (Responsive Design)
   ========================================================================== */
@media (max-width: 768px) {
  /* Header Nav */
  .header-nav {
    padding: 0.45rem 1rem !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 48px !important;
    gap: 0.5rem !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand-title {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .btn-mobile-header-settings {
    display: inline-flex !important;
    margin-left: auto !important;
    align-self: center !important;
  }

  .header-vocab-group, .controls-group {
    width: 100%;
    justify-content: space-between;
  }

  .script-toggle-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .script-toggle-container .toggle-btn {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
    text-align: center;
  }

  /* Navigation Tabs (Smooth Horizontal Scroll on Mobile) */
  .tab-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.8rem;
    gap: 0.4rem;
    scrollbar-width: none;
  }

  .tab-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }

  /* Diashow Modals Mobile */
  .number-diashow-container {
    border-radius: 0;
    max-height: 100vh;
    width: 100vw;
  }

  .diashow-header {
    padding: 0.8rem 1rem;
  }

  .diashow-main-title {
    font-size: 1.1rem;
  }

  .diashow-thai-text {
    font-size: clamp(2.5rem, 10vw, 4.2rem) !important;
  }

  .diashow-bottom-bar {
    padding: 0.8rem 1rem;
    flex-direction: column;
    gap: 0.8rem;
  }

  .diashow-control-btns {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .diashow-ctrl-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }

  .diashow-status-indicator, .diashow-progress-text {
    text-align: center;
    min-width: unset;
  }

  /* Sentence Lab on Mobile */
  .sentence-stage-card {
    padding: 1.2rem 0.8rem;
  }

  .sentence-stage-thai {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    min-height: 3rem;
  }

  .sentence-stage-german {
    font-size: 1rem;
  }

  .tray-pills {
    gap: 0.4rem;
  }

  .token-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  /* Tone Trainer on Mobile */
  .tone-quiz-card {
    padding: 1.2rem 1rem;
  }

  .tone-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-play-tone-quiz {
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
  }

  /* Statistics on Mobile */
  .stats-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   🎙️ KI-Dialog Studio & ElevenLabs Audio Styles
   ========================================================================== */

/* Sidebar Bottom Dock */
.sidebar-top-studio-section {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
  width: 100% !important;
}

.sidebar-studio-btn-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
}

.sidebar-bottom-section {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-studio-btn {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-studio-btn:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(99, 102, 241, 0.4));
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25);
}

.sidebar-studio-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.45), rgba(99, 102, 241, 0.55));
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.studio-btn-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.studio-btn-text strong {
  display: block;
  font-size: 0.88rem;
  color: #fff;
}

.studio-btn-sub {
  font-size: 0.72rem;
  color: var(--accent-teal);
  display: block;
}

.sidebar-settings-gear-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-settings-gear-btn:hover {
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: rotate(45deg);
}

/* Studio Header Banner */
.ds-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ds-banner-title {
  font-size: 1.6rem;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.ds-banner-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.45;
}

.ds-banner-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
}

.ds-top-btns {
  display: flex;
  gap: 0.5rem;
}

/* Credit Pill Badge */
.ds-credit-pill {
  background: var(--bg-sidebar);
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ds-credit-pill:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card);
}

.ds-credit-pill.unconfigured {
  border-color: #ef4444;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  animation: pulseRecording 2s infinite ease-in-out;
}

.ds-credit-bar-mini {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.ds-credit-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b);
}

/* Gallery Grid */
.ds-dialogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.ds-dialogue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ds-dialogue-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 184, 166, 0.2);
}

.ds-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.ds-level-badge {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.ds-date-badge {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.ds-card-title {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.ds-card-topic {
  font-size: 0.85rem;
  color: var(--accent-teal);
  margin-bottom: 0.8rem;
}

.ds-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.8rem;
}

.ds-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ds-card-btn {
  flex: 1;
  margin-right: 0.5rem;
}

/* Creator Form */
.ds-creator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.8rem;
  max-width: 900px;
  margin: 0 auto;
}

.ds-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ds-form-group.full-width {
  grid-column: span 2;
}

.ds-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-teal);
  margin-bottom: 0.4rem;
}

.ds-input, .ds-select {
  width: 100%;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.ds-input:focus, .ds-select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.3);
}

.ds-speakers-config {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ds-speaker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-sidebar);
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ds-speaker-num {
  width: 24px;
  height: 24px;
  background: var(--accent-teal);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ds-creator-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Dialogue Editor & Lines */
.ds-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-sidebar);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.ds-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ds-doc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.ds-doc-level {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Master Player Sticky Bar */
.ds-master-player-bar {
  position: sticky;
  top: 70px;
  z-index: 50;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid var(--accent-gold);
  border-radius: 14px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.ds-ctrl-main-btn {
  background: var(--accent-gold);
  color: #0f172a;
  border: none;
  font-weight: 800;
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.ds-ctrl-main-btn:hover {
  background: #fde047;
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.btn-download-full {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-download-full:hover {
  background: #10b981;
  color: #fff;
}

/* Line Cards */
.ds-line-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.ds-line-thai-section {
  margin-bottom: 1rem;
}

.ds-speaker-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.ds-speaker-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.ds-thai-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ds-edit-thai {
  font-family: var(--font-thai);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--bg-sidebar);
  border: 1px solid transparent;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

.ds-edit-thai:focus {
  border-color: var(--accent-gold);
  background: var(--bg-sidebar);
}

.ds-edit-phonetic {
  font-size: 1rem;
  color: var(--accent-teal);
  background: var(--bg-sidebar);
  border: 1px solid transparent;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.ds-edit-german {
  font-size: 0.95rem;
  color: #f8fafc;
  background: var(--bg-sidebar);
  border: 1px solid transparent;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.ds-line-audio-ctrls, .ds-narrator-audio-ctrls {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
}

.btn-play-line {
  background: rgba(45, 212, 191, 0.2);
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal);
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-synth-line {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid #a5b4fc;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* Off-Voice Narrator Box */
.ds-line-narrator-section, .ds-intro-card, .ds-grammar-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.8rem;
}

.ds-narrator-header, .ds-intro-header, .ds-grammar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.ds-edit-narrator, .ds-edit-intro, .ds-edit-grammar {
  width: 100%;
  background: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
}

/* Playback Highlights */
.ds-playing-highlight-thai {
  border-color: var(--accent-gold) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.ds-playing-highlight-narrator {
  border-color: var(--accent-teal) !important;
  background: rgba(45, 212, 191, 0.15) !important;
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.3);
}

.ds-playing-highlight {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Settings & Pronunciation Modal Overlays */
.ds-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#pronunciationModal {
  z-index: 99999999 !important;
}

.ds-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.ds-modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ds-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.ds-modal-body {
  padding: 1.5rem;
}

.ds-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

/* ==========================================================================
   🎧 ElevenLabs Voice Browser & Speaker Management Styles
   ========================================================================== */

/* Speaker Management Card in Editor */
.ds-speaker-mgmt-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ds-speaker-mgmt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ds-speaker-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.ds-spk-mgmt-item {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ds-spk-mgmt-item.narrator-item {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.ds-spk-mgmt-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ds-spk-voice-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.btn-open-vbrowser {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-open-vbrowser:hover {
  background: rgba(99, 102, 241, 0.4);
  color: #fff;
  border-color: #a5b4fc;
}

.btn-preview-mini {
  background: rgba(45, 212, 191, 0.2);
  color: var(--accent-teal);
  border: 1px solid rgba(45, 212, 191, 0.4);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-preview-mini:hover {
  background: var(--accent-teal);
  color: #0f172a;
}

/* Voice Browser Modal */
.ds-voice-modal-card {
  max-width: 860px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.ds-voice-filter-bar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ds-voice-category-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ds-vcat-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ds-vcat-btn:hover {
  border-color: var(--accent-teal);
  color: #fff;
}

.ds-vcat-btn.active {
  background: rgba(20, 184, 166, 0.25);
  border-color: var(--accent-teal);
  color: #fff;
  font-weight: 700;
}

.ds-voice-grid-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
}

.ds-voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.9rem;
}

.ds-voice-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  transition: all 0.2s ease;
}

.ds-voice-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.ds-voice-card.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.08);
}

.ds-voice-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ds-vcard-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.ds-vcard-gender {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.ds-vcard-gender.female {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.ds-vcard-gender.male {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.ds-vcard-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.ds-vcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ds-vtag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.ds-voice-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.ds-btn-listen {
  flex: 1;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  padding: 0.4rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.ds-btn-listen:hover {
  background: var(--accent-teal);
  color: #0f172a;
}

.ds-btn-select-v {
  flex: 1;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid #a5b4fc;
  color: #a5b4fc;
  padding: 0.4rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ds-btn-select-v:hover {
  background: #6366f1;
  color: #fff;
}

/* Studio Mode Overrides - Guarantees NO lesson headers, banners or footers appear */
body.studio-mode .hero-banner-container,
body.studio-mode .lesson-header,
body.studio-mode .tab-nav,
body.studio-mode .learning-hub-nav-wrapper,
body.studio-mode .lesson-footer,
body.studio-mode footer.lesson-footer,
body.audio-hub-mode .hero-banner-container,
body.audio-hub-mode .lesson-header,
body.audio-hub-mode .tab-nav,
body.audio-hub-mode .learning-hub-nav-wrapper,
body.audio-hub-mode .lesson-footer,
body.audio-hub-mode footer.lesson-footer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Synthesis Progress Bar Box */
.ds-synth-progress-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(45, 212, 191, 0.15);
  animation: fadeIn 0.25s ease-out;
}

.ds-synth-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ds-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  margin: 0.6rem 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.ds-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #6366f1, #ec4899);
  background-size: 200% 100%;
  border-radius: 8px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Custom Voice ID Direct Input */
.ds-custom-voice-id-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  flex-wrap: wrap;
}

.ds-input-sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  flex: 1;
  min-width: 140px;
}

/* Gallery Icon Actions Toolbar */
.ds-gallery-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-gallery-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-sidebar);
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.btn-gallery-icon:hover {
  transform: translateY(-2px);
  border-color: var(--accent-teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Play Button */
.btn-play-gallery {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(99, 102, 241, 0.25));
  border-color: rgba(45, 212, 191, 0.5);
  color: var(--accent-teal);
  flex: 1.2;
}

.btn-play-gallery:hover {
  background: var(--accent-teal);
  color: #0f172a;
  border-color: var(--accent-teal);
}

.btn-play-gallery.playing {
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  color: #fff;
  border-color: #a5b4fc;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.6);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

/* Loop / Repeat Button */
.btn-loop-gallery {
  background: var(--bg-card);
  color: var(--text-muted);
}

.btn-loop-gallery:hover {
  border-color: var(--accent-gold);
  color: #fff;
}

.btn-loop-gallery.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Download Button */
.btn-download-gallery {
  background: var(--bg-card);
  color: #60a5fa;
}

.btn-download-gallery:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #60a5fa;
  color: #fff;
}

/* Edit & Delete Buttons */
.btn-edit-gallery {
  background: var(--bg-card);
  color: #a5b4fc;
}

.btn-edit-gallery:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #a5b4fc;
  color: #fff;
}

.btn-delete-gallery {
  background: var(--bg-card);
  color: #f87171;
}

.btn-delete-gallery:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #f87171;
  color: #fff;
}

/* Flow Mode Highlighting */
.ds-playing-highlight-flow {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35) !important;
  transform: scale(1.01);
  transition: all 0.25s ease;
}

/* Podcast & Audiobook Feed Banner */
.ds-podcast-feed-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ds-podcast-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.ds-podcast-title-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ds-podcast-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.ds-podcast-url-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  flex-wrap: wrap;
}

.ds-podcast-url-text {
  font-family: monospace;
  font-size: 0.85rem;
  color: #38bdf8;
  flex: 1;
  min-width: 240px;
  user-select: all;
  word-break: break-all;
}

.ds-podcast-badges-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ds-podcast-app-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 16px;
  color: var(--text-dim);
}

.ds-podcast-app-pill.active {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Repeat Highlight Styling */
.ds-playing-highlight-repeat {
  border-color: var(--accent-gold) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4) !important;
  transform: scale(1.01);
  transition: all 0.25s ease;
}

/* ==========================================================================
   🎧 Audio- & Podcast-Hub Styles
   ========================================================================== */
.audio-hub-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.audio-hub-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 1.5rem 1.8rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.audio-hub-hero-info {
  flex: 1;
  min-width: 280px;
}

.audio-hub-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.audio-hub-hero-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.audio-hub-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.audio-hub-feeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.2rem;
}

.audio-hub-feed-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s, border-color 0.2s;
}

.audio-hub-feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.audio-hub-feed-card.feed-dialogues {
  border-left: 4px solid var(--accent-teal);
}

.audio-hub-feed-card.feed-vocab {
  border-left: 4px solid var(--accent-gold);
}

.audio-hub-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.audio-hub-feed-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-hub-feed-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.audio-hub-lessons-section {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
}

.audio-hub-lessons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.audio-hub-lessons-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-hub-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.audio-hub-row {
  background: var(--bg-card);
  border-radius: 10px;
  transition: background 0.2s, transform 0.15s;
}

.audio-hub-row:hover {
  background: rgba(51, 65, 85, 0.85);
  transform: translateX(3px);
}

.audio-hub-row.is-playing {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.audio-hub-cell {
  padding: 0.8rem 1rem;
  vertical-align: middle;
  font-size: 0.88rem;
}

.audio-hub-cell:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.audio-hub-cell:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.audio-hub-week-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}

.audio-hub-action-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.audio-hub-feed-qr-box {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-sidebar);
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-hub-qr-img {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.audio-hub-feed-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.audio-hub-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--accent-teal);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}


/* ==========================================================================
   🃏 Interaktiver Vokabel-Tisch (Desk Sorting Game)
   ========================================================================== */

.vocab-desk-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

/* Desk Control Toolbar */
.desk-toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.desk-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.desk-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.desk-select {
  background: #1e293b;
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.desk-select:hover, .desk-select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.2);
}

.btn-direction-toggle {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid var(--accent-teal);
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.btn-direction-toggle:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(99, 102, 241, 0.4));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3);
}

/* Desk Live Stats Bar */
.desk-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  width: 100%;
}

.desk-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desk-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.desk-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.desk-stat-unlearned .desk-stat-val { color: #f87171; }
.desk-stat-table .desk-stat-val { color: var(--accent-gold); }
.desk-stat-learned .desk-stat-val { color: #4ade80; }

/* 3-Zone Desk Table Surface */
.desk-arena {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 1.2rem;
  min-height: 580px;
  width: 100%;
}

@media (max-width: 1024px) {
  .desk-arena {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
}

/* Common Zone Container */
.desk-zone {
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  box-sizing: border-box;
}

.desk-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.desk-zone-title {
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.desk-zone-counter {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

/* Zone Left: Ungelernt */
.zone-unlearned {
  background: rgba(239, 68, 68, 0.05);
  border: 2px dashed rgba(239, 68, 68, 0.25);
}

.zone-unlearned.drag-over {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3), inset 0 0 15px rgba(239, 68, 68, 0.15);
  transform: scale(1.01);
}

.zone-unlearned .desk-zone-title { color: #f87171; }
.zone-unlearned .desk-zone-counter { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Zone Right: Gelernt */
.zone-learned {
  background: rgba(34, 197, 94, 0.05);
  border: 2px dashed rgba(34, 197, 94, 0.25);
}

.zone-learned.drag-over {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3), inset 0 0 15px rgba(34, 197, 94, 0.15);
  transform: scale(1.01);
}

.zone-learned .desk-zone-title { color: #4ade80; }
.zone-learned .desk-zone-counter { background: rgba(34, 197, 94, 0.2); color: #4ade80; }

/* Zone Center: Virtual Felt Table Surface */
.zone-table {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(45, 212, 191, 0.3);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(0, 0, 0, 0.35);
}

.zone-table.drag-over {
  border-color: var(--accent-gold);
  box-shadow: inset 0 0 30px rgba(245, 158, 11, 0.15), 0 0 20px rgba(245, 158, 11, 0.2);
}

.zone-table .desk-zone-title { color: var(--accent-gold); }
.zone-table .desk-zone-counter { background: rgba(245, 158, 11, 0.2); color: var(--accent-gold); }

/* Drop Target Zones Body */
.desk-drop-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 560px;
  padding: 0.4rem;
  box-sizing: border-box;
}

.desk-empty-hint {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
}

.desk-empty-hint span.hint-icon {
  font-size: 2rem;
  opacity: 0.7;
}

/* Center Cards Container (Grid / Pile) */
.desk-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 0.6rem;
  overflow-y: auto;
  max-height: 560px;
}

/* ==========================================================================
   🎴 3D Interactive Flashcard Element
   ========================================================================== */

.desk-card {
  perspective: 1000px;
  height: 180px;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  position: relative;
}

.desk-card:active {
  cursor: grabbing;
}

.desk-card.dragging {
  opacity: 0.4;
  transform: scale(0.95) !important;
}

.desk-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.desk-card.flipped .desk-card-inner {
  transform: rotateY(180deg);
}

/* Front & Back Faces */
.desk-card-front, .desk-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.desk-card-front {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #fff;
}

.desk-card-back {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: rotateY(180deg);
}

/* Top Meta Row */
.desk-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.desk-tone-pill {
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(20, 184, 166, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.desk-tone-Mid { color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.1); }
.desk-tone-Low { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.1); }
.desk-tone-Falling { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.1); }
.desk-tone-High { color: #f87171; border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.1); }
.desk-tone-Rising { color: #c084fc; border-color: rgba(192, 132, 252, 0.3); background: rgba(192, 132, 252, 0.1); }

/* Main Word Content */
.desk-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.2rem 0;
}

.desk-card-thai {
  font-family: var(--font-thai);
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.desk-card-phonetic {
  font-size: 0.86rem;
  color: var(--accent-teal);
  font-weight: 600;
  margin-top: 0.2rem;
}

.desk-card-german {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.desk-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Card Bottom Action Bar */
.desk-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.btn-card-left:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-card-right:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
  color: #86efac;
}

/* Mini Sorted Item in Side Zones */
.desk-sorted-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: grab;
}

.desk-sorted-item:hover {
  border-color: var(--border-light);
  transform: translateX(2px);
}

.desk-sorted-unlearned {
  border-left: 3px solid #ef4444;
}

.desk-sorted-learned {
  border-left: 3px solid #22c55e;
}

.desk-sorted-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.desk-sorted-thai {
  font-family: var(--font-thai);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.desk-sorted-german {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.desk-sorted-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.desk-sorted-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Completed Overlay Card */
.desk-completed-overlay {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid var(--accent-teal);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}


/* ==========================================================================
   DEEP INTERACTIVE GRAMMAR & NUMBERS LAB STYLING
   ========================================================================== */

.grammar-deep-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0.5rem 0;
}

.grammar-section-header {
  margin-bottom: 0.8rem;
}

.grammar-step-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.grammar-section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.grammar-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Interactive Number Grid (0-10) */
.num-interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.num-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.num-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.2);
  background: var(--bg-card);
}

.num-card:active {
  transform: translateY(-1px) scale(0.98);
}

.num-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.4rem;
}

.num-digit {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.num-thai-digit {
  font-family: var(--font-thai);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.num-tone-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.tone-rising-badge { background: rgba(192, 132, 252, 0.2); color: #c084fc; }
.tone-low-badge { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.tone-falling-badge { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.tone-high-badge { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.tone-mid-badge { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.num-thai-text {
  font-family: var(--font-thai);
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0.2rem 0;
}

.num-phonetic {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 0.2rem;
}

.num-german {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-card-audio {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.num-card:hover .btn-card-audio {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
}

/* Rule detail cards */
.grammar-rule-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 0.5rem;
}

@media (max-width: 820px) {
  .grammar-rule-card-grid {
    grid-template-columns: 1fr;
  }
}

.rule-detail-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rule-detail-card.highlight-rule {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.05), rgba(15, 23, 42, 0.8));
}

.rule-card-badge {
  align-self: flex-start;
  padding: 0.32rem 0.85rem;
  background: rgba(245, 158, 11, 0.25);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
  text-transform: uppercase;
}

.rule-detail-card h3 {
  font-size: 1.42rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.rule-detail-card p {
  font-size: 1.08rem;
  color: #cbd5e1;
  line-height: 1.62;
  margin: 0;
}

.grammar-section-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.grammar-lead {
  font-size: 1.15rem;
  line-height: 1.68;
  color: #cbd5e1;
}

.rule-example-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sub);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-size: 1.02rem;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.6rem;
}

.rule-example-row:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateX(4px);
}

.ex-calc {
  font-weight: 800;
  color: var(--accent-teal);
  min-width: 60px;
  font-size: 0.96rem;
}

.ex-thai {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
}

.ex-de {
  font-size: 1.02rem;
  color: #e2e8f0;
}

.rule-examples-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.rule-example-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sub);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.18s ease;
  gap: 0.5rem;
}

.rule-example-row:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(3px);
}

.ex-calc {
  font-weight: 700;
  color: var(--accent-teal);
  min-width: 50px;
}

.ex-thai {
  font-family: var(--font-thai);
  font-weight: 700;
  color: #fff;
  flex: 1;
}

.ex-de {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: right;
  margin-right: 0.4rem;
}

.btn-mini-audio {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.rule-example-row:hover .btn-mini-audio,
.btn-mini-audio:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Units scale table & Zeiten-Baukasten */
.units-scale-table {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
  width: 100%;
}

.unit-row {
  display: grid;
  grid-template-columns: 145px minmax(180px, 240px) 1.2fr 1fr 44px;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unit-row:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateX(4px);
}

.unit-row.highlight-unit {
  border-left: 4px solid var(--accent-gold);
}

.unit-num {
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 0.95rem;
  white-space: nowrap;
}

.unit-thai {
  font-family: var(--font-thai);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.unit-sample {
  font-family: var(--font-thai);
  color: #38bdf8;
  font-weight: 600;
  font-size: 1.1rem;
}

.unit-de {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Breakdown Cards */
.breakdown-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.breakdown-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.breakdown-card:hover {
  background: var(--bg-card);
  border-color: var(--accent-teal);
  transform: translateY(-2px);
}

.breakdown-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.breakdown-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-teal);
}

.breakdown-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.breakdown-math {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.math-part {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.math-res {
  font-family: var(--font-thai);
  color: var(--accent-gold);
  font-size: 0.95rem;
}

/* Banknotes Grid */
.banknotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.banknote-card {
  border-radius: 12px;
  padding: 0.85rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card);
}

.banknote-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.banknote-card.note-20 { border-top: 4px solid #22c55e; }
.banknote-card.note-50 { border-top: 4px solid #38bdf8; }
.banknote-card.note-100 { border-top: 4px solid #ef4444; }
.banknote-card.note-500 { border-top: 4px solid #a855f7; }
.banknote-card.note-1000 { border-top: 4px solid #b45309; }

.note-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.note-color-badge {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.note-thai {
  font-family: var(--font-thai);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.note-pho {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Market Phrases List */
.market-phrases-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.market-phrase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-phrase-item:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.4);
  transform: translateX(4px);
}

.phrase-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.phrase-thai {
  font-family: var(--font-thai);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.phrase-pho {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-teal);
}

.phrase-de {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .unit-row {
    grid-template-columns: 130px 160px 1fr 40px;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }
  .unit-de {
    display: none;
  }
}

@media (max-width: 650px) {
  .unit-row {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
  }
  .unit-thai, .unit-sample {
    white-space: normal;
  }
}


/* 5-Column Number Grid */
.num-grid-5cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .num-grid-5cols {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* Zero Card Row */
.zero-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  margin-top: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zero-card-row:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.zero-card-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Side by Side Grid for Rules 1 & 2 */
.rules-side-by-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 0.5rem;
}

@media (max-width: 850px) {
  .rules-side-by-side-grid {
    grid-template-columns: 1fr;
  }
}

/* Tens Fullwidth Grid */
.tens-fullwidth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

/* ==========================================================================
   🃏 Vokabel-Tisch (Vocab Desk) - Fullscreen, Free Physics, Trays & Pictograms
   ========================================================================== */

.vocab-desk-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  scrollbar-width: none;
}

.vocab-desk-wrapper::-webkit-scrollbar {
  display: none;
}

/* Fullscreen Mode */
.vocab-desk-wrapper.fullscreen-mode {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
  padding: 0.8rem 1.2rem;
  box-sizing: border-box;
  overflow: hidden;
}

.vocab-desk-wrapper.fullscreen-mode .desk-arena {
  flex: 1;
  height: calc(100vh - 125px);
  min-height: 0;
}

/* Desk Control Toolbar */
.desk-toolbar-card {
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.75rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.desk-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.desk-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.desk-select {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.btn-direction-toggle {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(99, 102, 241, 0.3));
  border: 1px solid var(--accent-teal);
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-direction-toggle:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.4), rgba(99, 102, 241, 0.5));
  transform: translateY(-1px);
}

.btn-fullscreen-toggle {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border: none;
  font-weight: 800;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.btn-fullscreen-toggle:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-fullscreen-toggle.active {
  background: #334155;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Desk Live Stats Bar */
.desk-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  width: 100%;
}

.desk-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desk-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.desk-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.desk-stat-unlearned .desk-stat-val { color: #f87171; }
.desk-stat-table .desk-stat-val { color: var(--accent-gold); }
.desk-stat-learned .desk-stat-val { color: #4ade80; }

/* ==========================================================================
   Arena Felt Playfield with Underlying Trays (Z-Index: 5)
   ========================================================================== */

.desk-arena {
  position: relative;
  width: 100%;
  height: 620px;
  background: radial-gradient(circle at 50% 40%, rgba(30, 41, 59, 0.95) 0%, rgba(11, 17, 32, 0.98) 100%);
  border: 2px solid rgba(45, 212, 191, 0.35);
  border-radius: 18px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 10px 35px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  scrollbar-width: none;
}

.desk-arena::-webkit-scrollbar {
  display: none;
}

/* Underlying Trays on Left and Right */
.desk-side-tray {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 230px;
  z-index: 5;
  border-radius: 14px;
  padding: 0.8rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  pointer-events: auto;
}

.tray-unlearned {
  left: 12px;
  background: rgba(239, 68, 68, 0.07);
  border: 2px dashed rgba(239, 68, 68, 0.35);
}

.tray-unlearned.drag-over {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.25);
}

.tray-learned {
  right: 12px;
  background: rgba(34, 197, 94, 0.07);
  border: 2px dashed rgba(34, 197, 94, 0.35);
}

.tray-learned.drag-over {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.5), inset 0 0 20px rgba(34, 197, 94, 0.25);
}

.tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tray-title {
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tray-unlearned .tray-title { color: #f87171; }
.tray-learned .tray-title { color: #4ade80; }

.tray-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.tray-unlearned .tray-badge { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.tray-learned .tray-badge { background: rgba(34, 197, 94, 0.25); color: #4ade80; }

.tray-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.2rem;
}

.tray-list::-webkit-scrollbar {
  display: none;
}

/* Sorted Items inside Trays */
.tray-item {
  background: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.tray-item:hover {
  transform: translateX(2px);
}

.tray-item.item-unlearned { border-left: 3px solid #ef4444; }
.tray-item.item-learned { border-left: 3px solid #22c55e; }

.tray-item-info {
  flex: 1;
  min-width: 0;
}

.tray-item-thai {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tray-item-german {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tray-item-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tray-item-btn:hover {
  background: rgba(20, 184, 166, 0.3);
  border-color: var(--accent-teal);
}

.tray-empty-hint {
  text-align: center;
  padding: 3rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   🎴 Floating Cards (Z-Index: 10 to 99999 - Always ABOVE Trays!)
   ========================================================================== */

.desk-card.free-card {
  position: absolute;
  width: 215px;
  height: 142px;
  perspective: 1000px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

.desk-card.free-card:active,
.desk-card.free-card.is-dragging {
  cursor: grabbing !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(20, 184, 166, 0.6) !important;
}

.desk-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.desk-card.flipped .desk-card-inner {
  transform: rotateY(180deg);
}

.desk-card-front, .desk-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 14px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(45, 212, 191, 0.4);
  color: #fff;
}

.desk-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #1e1b4b 0%, #0f172a 100%);
  border-color: rgba(99, 102, 241, 0.45);
}

.desk-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.desk-pic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--accent-teal);
}

.desk-card-thai {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.desk-card-phonetic {
  font-size: 0.82rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.desk-card-german {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.desk-card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.desk-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-card-left {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-card-left:hover {
  background: rgba(239, 68, 68, 0.4);
}

.btn-card-right {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.btn-card-right:hover {
  background: rgba(34, 197, 94, 0.4);
}

.desk-completed-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  gap: 0.8rem;
  z-index: 1000;
}


/* Clean Minimalist Card Elements for Vocab Desk */
.desk-card-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.desk-card-body-clean {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.3rem 0.2rem;
}

.desk-pic-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.desk-audio-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(99, 102, 241, 0.35));
  border: 1.5px solid rgba(45, 212, 191, 0.5);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.desk-audio-play-btn:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.55), rgba(99, 102, 241, 0.65));
  transform: scale(1.15);
  border-color: var(--accent-gold);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.6);
}

.desk-audio-play-btn:active {
  transform: scale(0.92);
}


.desk-card.free-card {
  transform-origin: center center;
  will-change: transform, left, top;
}


/* AI Image Button & Thumbnail for Vocab Desk Cards */
.desk-ai-pic-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.desk-ai-pic-btn:hover {
  background: rgba(245, 158, 11, 0.45);
  border-color: var(--accent-gold);
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.desk-ai-pic-btn.loading {
  animation: spin 1s infinite linear;
  opacity: 0.8;
  cursor: wait;
}

.desk-card-image-wrap {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0;
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.desk-card-custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   🃏 Vocab Desk Card Layout with 3:4 Portrait Image & Bottom-Left Toggle
   ========================================================================== */

.desk-card.free-card {
  position: absolute;
  width: 275px;
  height: 160px;
  perspective: 1000px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  transform-origin: center center;
  will-change: transform, left, top;
  transition: box-shadow 0.2s ease;
}

.desk-card-front, .desk-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(45, 212, 191, 0.4);
  color: #fff;
}

.desk-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #1e1b4b 0%, #0f172a 100%);
  border-color: rgba(99, 102, 241, 0.45);
}

.desk-card-flex-layout {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0.65rem;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
}

.desk-card-right-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* 3:4 Portrait Left Image Box with Auto Scaling & Exact Edge-to-Edge Fitting */
.desk-card-left-img-box {
  width: 95px !important;
  height: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 3 / 4 !important;
  flex-shrink: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.desk-card-side-img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 11px !important;
  background: transparent !important;
  transform: scale(1.18) !important;
  transform-origin: center center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* Hide / Show Toggle Button at Bottom Left of Image */
.desk-img-toggle-bottom-btn {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-sidebar);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.75;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.desk-card-left-img-box:hover .desk-img-toggle-bottom-btn {
  opacity: 1;
}

.desk-img-toggle-bottom-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.12);
}

/* Restore Hidden Image Button at Bottom Left of Card */
.desk-card-footer-clean {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.desk-restore-img-btn {
  background: rgba(20, 184, 166, 0.15);
  border: 1px dashed rgba(20, 184, 166, 0.4);
  color: var(--accent-teal);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.desk-restore-img-btn:hover {
  background: rgba(20, 184, 166, 0.35);
  border-style: solid;
  color: #fff;
  transform: translateY(-1px);
}

.desk-card-right-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Clean Header without Overflows */
.desk-card-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 0.3rem;
  margin-bottom: 2px;
}

.desk-tone-pill-clean {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.7rem;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--accent-teal);
  white-space: nowrap;
  letter-spacing: 0.02em;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.desk-tone-pill-clean.tone-german {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

.desk-audio-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(99, 102, 241, 0.35));
  border: 1.5px solid rgba(45, 212, 191, 0.5);
  color: #fff;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.desk-audio-play-btn:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.55), rgba(99, 102, 241, 0.65));
  transform: scale(1.12);
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.6);
}

.desk-audio-play-btn:active {
  transform: scale(0.92);
}

.desk-ai-pic-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.desk-ai-pic-btn:hover {
  background: rgba(245, 158, 11, 0.45);
  border-color: var(--accent-gold);
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}


/* Refined Card Sizing & Zoomed 3:4 Image (No Empty Padding) */
.desk-card.free-card {
  position: absolute;
  width: 290px !important;
  height: 165px !important;
  perspective: 1000px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  transform-origin: center center;
  will-change: transform, left, top;
  transition: box-shadow 0.2s ease;
}




/* Unobtrusive Bottom-Left Toast Notifications */
.desk-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.desk-toast-msg {
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #f8fafc;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 320px;
}

.desk-toast-msg.toast-show {
  transform: translateY(0);
  opacity: 1;
}

.desk-toast-msg.toast-hide {
  transform: translateY(12px);
  opacity: 0;
}

.desk-toast-warning {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(239, 68, 68, 0.18));
}


/* ==========================================================================
   🎯 Dedicated Matching Arena Game Board & Target Slots
   ========================================================================== */

.desk-arena.matching-board-active .desk-side-tray {
  display: none !important;
}

.matching-board-grid {
  position: absolute;
  inset: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  box-sizing: border-box;
  z-index: 6;
  pointer-events: none;
}

.matching-col-left, .matching-col-right {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  scrollbar-width: none;
}

.matching-col-left::-webkit-scrollbar,
.matching-col-right::-webkit-scrollbar {
  display: none;
}

.matching-target-slot {
  background: var(--bg-card);
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  box-sizing: border-box;
  transition: all 0.25s ease;
  pointer-events: auto;
}

.matching-target-slot.slot-drag-over {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
  transform: scale(1.02);
}

.matching-target-slot.slot-solved {
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.matching-slot-german {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.matching-slot-thai-filled {
  font-size: 1.15rem;
  font-weight: 800;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Matching Mode Header Bar */
.matching-header-bar {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(20, 184, 166, 0.25));
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.2);
}

.matching-title-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matching-counter-badge {
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid #22c55e;
  color: #4ade80;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}


/* ==========================================================================
   🎯 Scattered Matching Slots (+10% Card Size = 320px x 182px)
   ========================================================================== */

.matching-scattered-slot {
  position: absolute;
  width: 320px !important;
  height: 182px !important;
  border-radius: 20px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border: 2.5px dashed rgba(245, 158, 11, 0.45);
  box-sizing: border-box;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  pointer-events: auto;
}

.matching-scattered-slot.slot-drag-over {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.6);
  transform: scale(1.04);
}

.matching-scattered-slot.slot-solved {
  background: rgba(20, 83, 45, 0.45);
  border: 2.5px solid #22c55e;
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.4);
}

.matching-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.35rem;
}

.matching-slot-badge-open {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.12rem 0.45rem;
  border-radius: 12px;
}

.matching-slot-badge-solved {
  font-size: 0.7rem;
  font-weight: 800;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 0.12rem 0.45rem;
  border-radius: 12px;
}

.matching-slot-german {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0.3rem 0;
  line-height: 1.25;
}

.matching-slot-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  text-align: center;
}

.matching-slot-thai {
  font-size: 1.3rem;
  font-weight: 800;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


/* ==========================================================================
   🎯 8-10 Matching Slots & Centered 60s Challenge Drop Zone
   ========================================================================== */

/* Centered Glowing 60s Target Drop Zone */
.desk-challenge-target-zone {
  position: absolute;
  top: 14px;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 480px;
  max-width: 92%;
  min-height: 110px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.99) 100%) !important;
  border: 2.5px dashed #f59e0b !important;
  border-radius: 20px;
  padding: 0.85rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.7) !important;
  z-index: 100 !important;
  pointer-events: auto;
  box-sizing: border-box;
}

.challenge-target-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.challenge-target-german {
  font-size: 1.65rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.challenge-target-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 3px;
}

/* 8 to 10 Matching Target Slots (+10% Card Size = 310px x 175px) */
.matching-scattered-slot {
  position: absolute;
  width: 300px !important;
  height: 170px !important;
  border-radius: 18px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border: 2.5px dashed rgba(245, 158, 11, 0.45);
  box-sizing: border-box;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
  z-index: 5;
  pointer-events: auto;
}

.matching-scattered-slot.slot-solved {
  background: rgba(20, 83, 45, 0.55) !important;
  border: 2.5px solid #22c55e !important;
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.45) !important;
}

/* Inline In-Table Matching Completion Banner */
.matching-completed-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 1rem;
  border-radius: 18px;
  animation: fadeIn 0.3s ease-out;
}


/* ==========================================================================
   ✨ AI Prompt Editor Modal Dialog
   ========================================================================== */

.ai-prompt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.86);
  backdrop-filter: blur(14px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.ai-prompt-modal-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
  border: 2px solid rgba(245, 158, 11, 0.55);
  border-radius: 22px;
  padding: 1.8rem 2.2rem;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(245, 158, 11, 0.25);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-sizing: border-box;
}

.ai-prompt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-prompt-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ai-prompt-vocab-pill {
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.35);
  padding: 0.45rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2dd4bf;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.ai-prompt-textarea {
  width: 100%;
  min-height: 115px;
  background: var(--bg-sidebar);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  color: #ffffff;
  font-size: 0.94rem;
  font-family: inherit;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-prompt-textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.ai-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
}


/* ==========================================================================
   ⏱️ 60s Speed Challenge: Sleek Top Bar, Centered Target Zone, Centered Victory Modal
   ========================================================================== */

/* Prominent Horizontal Challenge Top Panel */
.desk-challenge-top-panel {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  border-radius: 16px !important;
  padding: 0.65rem 1.4rem !important;
  margin-bottom: 0.8rem !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
  gap: 1.2rem !important;
  box-sizing: border-box !important;
}

.challenge-stat-pill {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 12px !important;
}

.challenge-stat-icon {
  font-size: 1.2rem !important;
}

.challenge-stat-value {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums !important;
}

.challenge-stat-value.gold {
  color: #fbbf24 !important;
}

.challenge-stat-value.orange {
  color: #f97316 !important;
}

.challenge-progress-bar-wrap {
  flex: 1 !important;
  height: 10px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.challenge-progress-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b, #22c55e) !important;
  border-radius: 6px !important;
  transition: width 1s linear !important;
}

/* Centered Target Drop Zone on Felt Arena */
.desk-challenge-target-zone {
  position: absolute !important;
  top: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 480px !important;
  max-width: 90% !important;
  min-height: 105px !important;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.99) 100%) !important;
  border: 2.5px dashed #f59e0b !important;
  border-radius: 20px !important;
  padding: 0.8rem 1.6rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.7) !important;
  z-index: 30 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
}

.desk-challenge-target-zone.zone-drag-over {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: #fbbf24 !important;
  transform: translateX(-50%) scale(1.04) !important;
}

/* Centered Fullscreen Victory Modal (Fixed on viewport, always perfectly centered) */
.desk-stats-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(11, 17, 32, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  z-index: 10000000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
  animation: fadeIn 0.25s ease-out !important;
}

.stats-modal-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99)) !important;
  border: 2px solid var(--accent-gold) !important;
  border-radius: 24px !important;
  padding: 2.2rem 2.8rem !important;
  max-width: 500px !important;
  width: 100% !important;
  text-align: center !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(245, 158, 11, 0.35) !important;
  box-sizing: border-box !important;
}


/* Gemini 3.7 Flash Action Button in Prompt Modal */
.btn-gemini-prompt {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
  padding: 0.35rem 0.85rem !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}

.btn-gemini-prompt:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55) !important;
}

.btn-gemini-prompt:active {
  transform: translateY(1px) !important;
}

.btn-gemini-prompt.loading {
  opacity: 0.7 !important;
  pointer-events: none !important;
}


/* Prevent native browser ghost-dragging of images on desk cards */
.desk-card-side-img,
.desk-card img {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

.desk-card-left-img-box {
  pointer-events: auto !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}


/* Prominent, brilliant golden-amber phonetic pronunciation on desk cards */
.desk-card-phonetic {
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  line-height: 1.25 !important;
  margin-top: 4px !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.45), 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.desk-card-right-main .desk-card-phonetic {
  font-size: 1.16rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
}

.desk-card-sub {
  color: #fbbf24 !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin-top: 4px !important;
  letter-spacing: 0.01em !important;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4), 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.desk-card-thai {
  font-weight: 800 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

.desk-card-german {
  font-weight: 800 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}


/* ==========================================================================
   📋 Copy Prompt Button & 📥 Image Paste / Drop Zone in AI Prompt Modal
   ========================================================================== */

.btn-copy-prompt {
  background: rgba(30, 41, 59, 0.95) !important;
  color: var(--accent-teal) !important;
  border: 1.5px solid rgba(45, 212, 191, 0.45) !important;
  border-radius: 10px !important;
  padding: 0.35rem 0.85rem !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.btn-copy-prompt:hover {
  background: rgba(45, 212, 191, 0.2) !important;
  border-color: #2dd4bf !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(45, 212, 191, 0.3) !important;
}

.btn-copy-prompt:active {
  transform: translateY(1px) !important;
}

/* Image Drop & Paste Zone */
.ai-prompt-dropzone {
  background: var(--bg-sidebar);
  border: 2px dashed rgba(45, 212, 191, 0.45);
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  color: var(--text-muted);
  box-sizing: border-box;
  margin-top: 0.4rem;
}

.ai-prompt-dropzone:hover,
.ai-prompt-dropzone.drag-active {
  background: rgba(45, 212, 191, 0.16);
  border-color: #2dd4bf;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(45, 212, 191, 0.35);
  transform: scale(1.01);
}

.ai-prompt-dropzone .dropzone-icon {
  font-size: 1.6rem;
  color: var(--accent-teal);
}

.ai-prompt-dropzone .dropzone-text {
  font-size: 0.82rem;
  line-height: 1.35;
}

.ai-prompt-dropzone .dropzone-text strong {
  color: #2dd4bf;
  display: block;
  font-size: 0.88rem;
}


/* Batch AI Prompts Top Button */
.btn-batch-prompts {
  background: linear-gradient(135deg, #4f46e5, #9333ea) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4) !important;
}

.btn-batch-prompts:hover {
  background: linear-gradient(135deg, #4338ca, #7e22ce) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.55) !important;
}

.btn-batch-prompts.loading {
  opacity: 0.75 !important;
  pointer-events: none !important;
}

/* Batch Prompts Overview Modal */
.batch-prompts-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(10, 15, 29, 0.88) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 10000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  pointer-events: auto !important;
}

.batch-prompts-modal-card {
  background: #0f172a;
  border: 1px solid rgba(147, 51, 234, 0.4);
  border-radius: 20px;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(147, 51, 234, 0.25);
  overflow: hidden;
}

.batch-prompts-modal-header {
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-prompts-modal-body {
  padding: 1.2rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.batch-prompt-row {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.batch-prompt-row:hover {
  background: var(--bg-card);
  border-color: rgba(147, 51, 234, 0.4);
}

.batch-prompt-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-prompt-thai {
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}

.batch-prompt-german {
  color: var(--accent-gold);
  font-size: 0.92rem;
  font-weight: 700;
}

.batch-prompt-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  background: var(--bg-sidebar);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  user-select: all;
}

.btn-copy-single-prompt {
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-single-prompt:hover {
  background: #2dd4bf;
  color: #0f172a;
}


/* ==========================================================================
   📑 Prompt-List & Bulk Export Modal
   ========================================================================== */

.prompt-list-tab-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-list-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-list-tab-btn.active {
  background: rgba(45, 212, 191, 0.15);
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--accent-teal);
}

.prompt-list-textarea {
  width: 100%;
  height: 340px;
  background: rgba(10, 15, 29, 0.9);
  color: #f1f5f9;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}

.prompt-list-textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 15px rgba(45, 212, 191, 0.25);
}





/* ==========================================================================
   ✂️ Master Image Cropper & Sprite Sheet Tool
   ========================================================================== */

.btn-cropper-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1.5px dashed rgba(45, 212, 191, 0.45);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.5rem;
}

.btn-cropper-trigger:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(99, 102, 241, 0.2));
  border-color: var(--accent-teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(45, 212, 191, 0.25);
}

.cropper-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.cropper-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.cropper-modal-header {
  padding: 1rem 1.4rem;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cropper-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.cropper-workspace-wrap {
  flex: 1;
  min-height: 380px;
  max-height: 58vh;
  background: #070b14;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  padding: 1rem;
}

.cropper-stage {
  position: relative;
  display: inline-block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.cropper-stage img {
  display: block;
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.cropper-overlay-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cropper-box {
  position: absolute;
  border: 2px solid var(--accent-teal);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62), 0 0 15px rgba(45, 212, 191, 0.4);
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
}

.cropper-grid-line-h, .cropper-grid-line-v {
  position: absolute;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.cropper-grid-line-h { width: 100%; height: 1px; left: 0; }
.cropper-grid-line-h.h1 { top: 33.33%; }
.cropper-grid-line.h2 { top: 66.66%; }
.cropper-grid-line-v { height: 100%; width: 1px; top: 0; }
.cropper-grid-line-v.v1 { left: 33.33%; }
.cropper-grid-line-v.v2 { left: 66.66%; }

.cropper-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent-teal);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  z-index: 10;
}
.cropper-handle.nw { top: -7px; left: -7px; cursor: nwse-resize; }
.cropper-handle.ne { top: -7px; right: -7px; cursor: nesw-resize; }
.cropper-handle.sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.cropper-handle.se { bottom: -7px; right: -7px; cursor: nwse-resize; }

.cropper-footer {
  padding: 0.9rem 1.4rem;
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}


/* ==========================================================================
   🎴 Silky Smooth Gliding Animation on Layout Switch (Raster, Ausbreiten, etc.)
   ========================================================================== */
.desk-card.free-card.auto-sliding {
  transition: left 0.52s cubic-bezier(0.25, 1, 0.33, 1),
              top 0.52s cubic-bezier(0.25, 1, 0.33, 1),
              transform 0.52s cubic-bezier(0.25, 1, 0.33, 1),
              box-shadow 0.3s ease !important;
  will-change: left, top, transform;
  pointer-events: none !important;
}


/* ==========================================================================
   🔲 Interactive Grid & Tile Slicing Overlay
   ========================================================================== */

.cropper-grid-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: auto;
  z-index: 15;
  box-sizing: border-box;
}

.cropper-grid-cell {
  border: 1.5px dashed rgba(45, 212, 191, 0.45);
  background: var(--bg-sidebar);
  position: relative;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.cropper-grid-cell:hover {
  background: rgba(45, 212, 191, 0.25);
  border: 2px solid var(--accent-teal);
  box-shadow: inset 0 0 25px rgba(45, 212, 191, 0.4);
  transform: scale(0.98);
}

.cropper-grid-cell.active-tile {
  background: rgba(245, 158, 11, 0.28);
  border: 2.5px solid var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.cropper-grid-cell-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--bg-sidebar);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.cropper-grid-cell-hint {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-sidebar);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--accent-teal);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.18s ease;
  pointer-events: none;
}

.cropper-grid-cell:hover .cropper-grid-cell-hint {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   ✂️ Bottom-Trim Zone Indicator for Grid Slicing
   ========================================================================== */
.cropper-cell-bottom-trim {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(239, 68, 68, 0.28),
    rgba(239, 68, 68, 0.28) 6px,
    rgba(15, 23, 42, 0.75) 6px,
    rgba(15, 23, 42, 0.75) 12px
  );
  border-top: 1.5px dashed #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #fca5a5;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}


/* ==========================================================================
   ✂️ Cropper Trim Range Slider Styling
   ========================================================================== */
.cropper-trim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cropper-trim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease;
  border: 1.5px solid #ffffff;
}

.cropper-trim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.cropper-trim-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
  cursor: pointer;
  border: 1.5px solid #ffffff;
}


/* ==========================================================================
   ✂️ Top-Trim Zone Indicator for Grid Slicing
   ========================================================================== */
.cropper-cell-top-trim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(56, 189, 248, 0.28),
    rgba(56, 189, 248, 0.28) 6px,
    rgba(15, 23, 42, 0.75) 6px,
    rgba(15, 23, 42, 0.75) 12px
  );
  border-bottom: 1.5px dashed #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #bae6fd;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 5;
}


/* ==========================================================================
   📂 Collapsible Month Headers (Einklappbare Monate)
   ========================================================================== */

.month-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-top: 0.75rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.month-group-header:hover {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
}

.month-group-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.month-collapse-icon {
  font-size: 0.7rem;
  color: var(--accent-teal);
  transition: transform 0.2s ease;
  min-width: 14px;
}

.month-group-title-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.month-group-badge {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-sidebar);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.06);
}


/* ==========================================================================
   🎛️ Cropper Grid Dimension Sliders
   ========================================================================== */
.cropper-slider-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cropper-val-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
  min-width: 32px;
  background: rgba(45, 212, 191, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-align: center;
}


/* ==========================================================================
   ↔️ ↕️ Draggable Grid Column & Row Divider Handles
   ========================================================================== */
.cropper-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  z-index: 10;
}

.cropper-grid-cell {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  user-select: none;
  overflow: hidden;
  z-index: 5;
}

.cropper-grid-cell:hover {
  background: rgba(45, 212, 191, 0.25);
  border: 2px solid var(--accent-teal);
  z-index: 8;
}

.cropper-grid-col-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  margin-left: -12px;
  cursor: col-resize;
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

.cropper-grid-divider-line-v {
  width: 2px;
  height: 100%;
  background: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 5px rgba(56, 189, 248, 0.9);
  transition: all 0.15s ease;
}

.cropper-grid-col-handle:hover .cropper-grid-divider-line-v,
.cropper-grid-col-handle.dragging .cropper-grid-divider-line-v {
  width: 4px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.cropper-grid-row-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  margin-top: -12px;
  cursor: row-resize;
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

.cropper-grid-divider-line-h {
  height: 2px;
  width: 100%;
  background: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 5px rgba(56, 189, 248, 0.9);
  transition: all 0.15s ease;
}

.cropper-grid-row-handle:hover .cropper-grid-divider-line-h,
.cropper-grid-row-handle.dragging .cropper-grid-divider-line-h {
  height: 4px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.cropper-grid-divider-handle-pill {
  position: absolute;
  background: #0284c7;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cropper-grid-col-handle:hover .cropper-grid-divider-handle-pill,
.cropper-grid-row-handle:hover .cropper-grid-divider-handle-pill {
  opacity: 1;
  transform: scale(1.1);
}


/* ==========================================================================
   🔄 Tray Header Action Buttons & Enhanced Layouts
   ========================================================================== */
.tray-return-all-btn {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tray-unlearned .tray-return-all-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  color: #fca5a5;
}

.tray-learned .tray-return-all-btn:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: #4ade80;
  color: #86efac;
}

.batch-prompt-actions-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-batch-mini-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 6px;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-batch-mini-action:hover {
  background: rgba(45, 212, 191, 0.25);
  border-color: var(--accent-teal);
  color: #fff;
}


/* ==========================================================================
   🎛️ Live Physics Tuner Floating Panel
   ========================================================================== */
.desk-physics-tuner-panel {
  position: absolute;
  top: 15px;
  right: 20px;
  background: var(--bg-sidebar);
  border: 1.5px solid var(--accent-teal);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  z-index: 999999;
  width: 320px;
  backdrop-filter: blur(12px);
  animation: fadeInDown 0.2s ease;
}

.physics-tuner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.physics-tuner-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.physics-slider-row {
  display: grid;
  grid-template-columns: 95px 1fr 45px;
  align-items: center;
  gap: 0.5rem;
}

.physics-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
}

.physics-val {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-teal);
  text-align: right;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.physics-tuner-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   📥 Drag & Drop Mode & 🔍 Card Name Filter Styling
   ========================================================================== */

.btn-dragdrop-active {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5) !important;
  animation: pulseGreenGlow 2s infinite ease-in-out;
}

@keyframes pulseGreenGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 22px rgba(52, 211, 153, 0.8); }
}

/* Desk Card Glowing Target when hovering external dragged image */
.desk-drop-target-active {
  border: 3px dashed #2dd4bf !important;
  box-shadow: 0 0 35px rgba(45, 212, 191, 0.8), 0 0 15px #38bdf8 !important;
  transform: scale(1.09) !important;
  z-index: 999999 !important;
  transition: all 0.15s ease !important;
}

.desk-drop-target-active::after {
  content: '📥 Bild hier ablegen';
  position: absolute;
  inset: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(4px);
  color: #2dd4bf;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  z-index: 50;
  pointer-events: none;
}

/* 🔍 Search / Filter Input in Desk Toolbar */
.desk-filter-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  transition: all 0.2s ease;
}

.desk-filter-container:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.35);
  background: var(--bg-sidebar);
}

.desk-filter-icon {
  font-size: 0.85rem;
  opacity: 0.75;
}

.desk-filter-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  width: 140px;
  transition: width 0.25s ease;
}

.desk-filter-input:focus {
  width: 180px;
}

.desk-filter-input::placeholder {
  color: #94a3b8;
  font-size: 0.78rem;
}

.desk-filter-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.desk-filter-clear:hover {
  color: #ef4444;
}

/* Filtered-out cards fade and shrink smoothly */
.desk-card.desk-card-filtered-out {
  opacity: 0.04 !important;
  filter: grayscale(100%) blur(2px) !important;
  pointer-events: none !important;
  transform: scale(0.65) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  visibility: hidden !important;
}

/* ==========================================================================
   🔍 Desk Table Zoom Canvas & Zoom Badge
   ========================================================================== */

.desk-cards-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.desk-cards-canvas .desk-card {
  pointer-events: auto;
}

.desk-table-zoom-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-sidebar);
  border: 1px solid var(--accent-teal);
  color: #2dd4bf;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.95rem;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 15px rgba(45, 212, 191, 0.35);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.desk-table-zoom-badge.badge-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 📋 Copy Prompt Button on Card (Visible in Drag & Drop mode) */
.desk-copy-prompt-btn {
  display: none;
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid #10b981;
  color: #34d399;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.desk-copy-prompt-btn:hover {
  background: #10b981;
  color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

/* When Drag & Drop mode is active, display copy prompt button on all cards */
.dragdrop-mode-active .desk-copy-prompt-btn {
  display: inline-flex !important;
  animation: pulseCopyBtn 2s infinite ease-in-out;
}

@keyframes pulseCopyBtn {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(52, 211, 153, 0.8); }
}

/* Selected card outline for Paste target (Strg+V) - Applied to rotating inner card */
.desk-card.card-selected {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.desk-card.card-selected .desk-card-inner {
  border-radius: 16px !important;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.6), 0 12px 30px rgba(0, 0, 0, 0.7) !important;
}

.desk-card.card-selected .desk-card-front,
.desk-card.card-selected .desk-card-back {
  border: 2px solid var(--accent-teal) !important;
}

/* ==========================================================================
   🖐️ Desk Table Grab & Panning Cursor
   ========================================================================== */

.desk-arena {
  cursor: grab !important;
  user-select: none;
  -webkit-user-select: none;
}

.desk-arena.is-panning-table {
  cursor: grabbing !important;
}

.desk-arena .desk-card {
  cursor: grab;
}

.desk-arena .desk-card.is-dragging {
  cursor: grabbing !important;
}

.desk-arena button,
.desk-arena input,
.desk-arena select,
.desk-side-tray {
  cursor: default;
}

.desk-arena button {
  cursor: pointer !important;
}




/* ==========================================================================
   🎨 10 DYNAMIC HARMONIZED COLOR THEMES (Global Across Sidebar, Header, Cards)
   ========================================================================== */
body.theme-cyber-midnight {
  --bg-dark: #0f172a;
  --bg-header: rgba(15, 23, 42, 0.92);
  --bg-sidebar: rgba(15, 23, 42, 0.82);
  --bg-card: rgba(30, 41, 59, 0.78);
  --bg-card-hover: rgba(51, 65, 85, 0.88);
  --bg-card-sub: rgba(15, 23, 42, 0.7);
  --accent-teal: #14b8a6;
  --accent-teal-glow: rgba(20, 184, 166, 0.35);
  --accent-gold: #fbbf24;
  --accent-indigo: #6366f1;
}

body.theme-andaman-emerald {
  --bg-dark: #042020;
  --bg-header: rgba(4, 32, 32, 0.92);
  --bg-sidebar: rgba(4, 32, 32, 0.85);
  --bg-card: rgba(8, 52, 52, 0.85);
  --bg-card-hover: rgba(14, 82, 82, 0.9);
  --bg-card-sub: rgba(4, 28, 28, 0.75);
  --accent-teal: #2dd4bf;
  --accent-teal-glow: rgba(45, 212, 191, 0.4);
  --accent-gold: #fde047;
  --accent-indigo: #0d9488;
}

body.theme-royal-siam {
  --bg-dark: #1b1005;
  --bg-header: rgba(27, 16, 5, 0.94);
  --bg-sidebar: rgba(27, 16, 5, 0.88);
  --bg-card: rgba(50, 30, 10, 0.88);
  --bg-card-hover: rgba(80, 48, 15, 0.92);
  --bg-card-sub: rgba(25, 14, 4, 0.8);
  --accent-teal: #f59e0b;
  --accent-teal-glow: rgba(245, 158, 11, 0.4);
  --accent-gold: #fde047;
  --accent-indigo: #e11d48;
}

body.theme-chiangmai-blossom {
  --bg-dark: #1c081a;
  --bg-header: rgba(28, 8, 26, 0.94);
  --bg-sidebar: rgba(28, 8, 26, 0.88);
  --bg-card: rgba(52, 18, 48, 0.86);
  --bg-card-hover: rgba(82, 28, 76, 0.92);
  --bg-card-sub: rgba(24, 6, 22, 0.8);
  --accent-teal: #f43f5e;
  --accent-teal-glow: rgba(244, 63, 94, 0.4);
  --accent-gold: #fb7185;
  --accent-indigo: #c084fc;
}

body.theme-bangkok-cyberpunk {
  --bg-dark: #0b051d;
  --bg-header: rgba(11, 5, 29, 0.94);
  --bg-sidebar: rgba(11, 5, 29, 0.88);
  --bg-card: rgba(30, 16, 70, 0.88);
  --bg-card-hover: rgba(52, 28, 122, 0.92);
  --bg-card-sub: rgba(10, 4, 26, 0.8);
  --accent-teal: #06b6d4;
  --accent-teal-glow: rgba(6, 182, 212, 0.45);
  --accent-gold: #f43f5e;
  --accent-indigo: #8b5cf6;
}

body.theme-samui-jungle {
  --bg-dark: #06170d;
  --bg-header: rgba(6, 23, 13, 0.94);
  --bg-sidebar: rgba(6, 23, 13, 0.88);
  --bg-card: rgba(15, 48, 28, 0.86);
  --bg-card-hover: rgba(24, 76, 45, 0.9);
  --bg-card-sub: rgba(5, 18, 10, 0.8);
  --accent-teal: #10b981;
  --accent-teal-glow: rgba(16, 185, 129, 0.4);
  --accent-gold: #84cc16;
  --accent-indigo: #059669;
}

body.theme-phuket-sunset {
  --bg-dark: #1f0b03;
  --bg-header: rgba(31, 11, 3, 0.94);
  --bg-sidebar: rgba(31, 11, 3, 0.88);
  --bg-card: rgba(58, 21, 8, 0.88);
  --bg-card-hover: rgba(94, 34, 12, 0.92);
  --bg-card-sub: rgba(28, 9, 2, 0.8);
  --accent-teal: #f97316;
  --accent-teal-glow: rgba(249, 115, 22, 0.45);
  --accent-gold: #fbbf24;
  --accent-indigo: #ea580c;
}

body.theme-deep-ocean {
  --bg-dark: #031022;
  --bg-header: rgba(3, 16, 34, 0.94);
  --bg-sidebar: rgba(3, 16, 34, 0.88);
  --bg-card: rgba(12, 36, 72, 0.88);
  --bg-card-hover: rgba(20, 58, 115, 0.92);
  --bg-card-sub: rgba(3, 13, 28, 0.8);
  --accent-teal: #38bdf8;
  --accent-teal-glow: rgba(56, 189, 248, 0.45);
  --accent-gold: #60a5fa;
  --accent-indigo: #2563eb;
}

body.theme-thai-tea {
  --bg-dark: #180e07;
  --bg-header: rgba(24, 14, 7, 0.94);
  --bg-sidebar: rgba(24, 14, 7, 0.88);
  --bg-card: rgba(48, 29, 17, 0.88);
  --bg-card-hover: rgba(80, 48, 28, 0.92);
  --bg-card-sub: rgba(20, 11, 5, 0.8);
  --accent-teal: #ea580c;
  --accent-teal-glow: rgba(234, 88, 12, 0.45);
  --accent-gold: #d97706;
  --accent-indigo: #b45309;
}

body.theme-obsidian-black {
  --bg-dark: #000000;
  --bg-header: rgba(12, 12, 12, 0.98);
  --bg-sidebar: rgba(12, 12, 12, 0.95);
  --bg-card: rgba(24, 24, 24, 0.95);
  --bg-card-hover: rgba(45, 45, 45, 0.98);
  --bg-card-sub: rgba(8, 8, 8, 0.9);
  --accent-teal: #38bdf8;
  --accent-teal-glow: rgba(56, 189, 248, 0.5);
  --accent-gold: #facc15;
  --accent-indigo: #a855f7;
}


.btn-icon-scope-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.btn-icon-scope-nav:hover {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-teal-glow);
  transform: scale(1.08);
}

.btn-icon-scope-nav:active {
  transform: scale(0.94);
}




/* ==========================================================================
   🛸 VOCAB DESK FLOATING SHOWCASE MODE (Center Focal Stage & Fluid 60fps Flight)
   ========================================================================== */
.desk-card.desk-card-floating-showcase {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  transform: translate(-50%, -50%) scale(2.35) translateZ(120px) !important;
  z-index: 999999 !important;
  pointer-events: auto;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 16px !important;
  transition: 
    left 0.7s cubic-bezier(0.2, 0.9, 0.2, 1),
    top 0.7s cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
}

.desk-card.desk-card-floating-showcase .desk-card-inner {
  border-radius: 16px !important;
  box-shadow: 
    0 40px 90px -15px rgba(0, 0, 0, 0.96),
    0 0 45px rgba(245, 158, 11, 0.7),
    0 0 25px rgba(20, 184, 166, 0.5) !important;
}

.desk-card.desk-card-floating-showcase .desk-card-front,
.desk-card.desk-card-floating-showcase .desk-card-back {
  border: 2px solid var(--accent-gold) !important;
}

@keyframes deskCenterLevitate {
  0% {
    transform: translate(-50%, -50%) scale(2.35) translateY(0px) translateZ(120px);
    box-shadow: 0 40px 90px -15px rgba(0, 0, 0, 0.96), 0 0 45px rgba(245, 158, 11, 0.7);
  }
  100% {
    transform: translate(-50%, -50%) scale(2.38) translateY(-10px) translateZ(120px);
    box-shadow: 0 50px 110px -10px rgba(0, 0, 0, 0.99), 0 0 60px rgba(245, 158, 11, 0.9);
  }
}

/* 3D Anti-Bleed & Clean Anti-Aliased Card Flipping */
.desk-card.free-card {
  border-radius: 16px !important;
  perspective: 1200px !important;
  -webkit-perspective: 1200px !important;
}

.desk-card-inner {
  border-radius: 16px !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.desk-card-front, .desk-card-back {
  border-radius: 16px !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  -webkit-transform-style: flat !important;
  transform-style: flat !important;
  overflow: hidden !important;
}

.desk-card-front {
  transform: rotateY(0deg) translateZ(1px) !important;
  -webkit-transform: rotateY(0deg) translateZ(1px) !important;
}

.desk-card-back {
  transform: rotateY(180deg) translateZ(1px) !important;
  -webkit-transform: rotateY(180deg) translateZ(1px) !important;
}

.desk-card-left-img-box {
  border-top-left-radius: 14px !important;
  border-bottom-left-radius: 14px !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  overflow: hidden !important;
}


.btn-float-showcase-active {
  background: linear-gradient(135deg, var(--accent-gold), #f59e0b) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6) !important;
  animation: floatBtnGlow 1.5s infinite alternate;
}

@keyframes floatBtnGlow {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 18px rgba(245, 158, 11, 0.8); }
}


.desk-card.desk-card-returning {
  transition: 
    left 0.82s cubic-bezier(0.2, 0.9, 0.2, 1),
    top 0.82s cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 0.82s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
  z-index: 99998 !important;
}

.desk-card.desk-card-returning .desk-card-inner {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
  transition: box-shadow 0.82s ease !important;
}


/* ==========================================================================
   🎙️ PRONUNCIATION CHECKER & MIC BUTTONS
   ========================================================================== */
.pronunciation-modal-card {
  max-width: 520px !important;
  width: 92% !important;
  background: var(--bg-card) !important;
  border: 1.5px solid var(--accent-gold) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px var(--accent-teal-glow) !important;
  backdrop-filter: blur(16px);
}

.pronunciation-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pronunciation-icon {
  font-size: 1.6rem;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 0.35rem 0.6rem;
}

.pronunciation-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--accent-teal);
  font-weight: 600;
}

.pronunciation-modal-body {
  padding: 1.4rem !important;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.pronunciation-target-card {
  background: var(--bg-card-sub);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

.target-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.8px;
}

.target-thai {
  font-family: var(--font-thai);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.target-phonetic {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--accent-teal);
}

.target-german {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.target-audio-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

/* Big Interactive Record Button */
.pronunciation-record-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
}

.record-mic-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-record-mic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.45);
  position: relative;
  z-index: 2;
}

.btn-record-mic:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.65);
}

.btn-record-mic.is-recording {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.8) !important;
  animation: pulseRecording 1.4s infinite;
}

@keyframes pulseRecording {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.15); }
}

.mic-wave-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(234, 88, 12, 0.4);
  opacity: 0;
  pointer-events: none;
}

.btn-record-mic.is-recording ~ .mic-wave-ring.ring-1 {
  animation: ringWave 1.8s infinite ease-out;
}

.btn-record-mic.is-recording ~ .mic-wave-ring.ring-2 {
  animation: ringWave 1.8s infinite ease-out 0.6s;
}

@keyframes ringWave {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.record-instruction {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.live-transcript {
  font-size: 0.95rem;
  color: #fde047;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Result Box */
.pronunciation-result-box {
  background: var(--bg-card-sub);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeInResult 0.3s ease;
}

@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.score-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.score-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), rgba(15, 23, 42, 0.9));
  border: 2.5px solid #10b981;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.score-circle.score-yellow {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.9));
}

.score-circle.score-red {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25), rgba(15, 23, 42, 0.9));
}

.score-number {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.score-feedback-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.score-verdict {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
}

.score-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.score-heard-box {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.heard-text {
  color: #fde047;
  font-family: var(--font-thai);
  font-size: 1.05rem;
}

.ab-compare-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mini Mic Buttons */
.btn-mini-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 88, 12, 0.15);
  border: 1px solid rgba(234, 88, 12, 0.35);
  color: #fb923c;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-left: 3px;
}

.btn-mini-mic:hover {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.5);
  transform: scale(1.1);
}

.desk-mic-btn {
  background: rgba(234, 88, 12, 0.15);
  border: 1px solid rgba(234, 88, 12, 0.35);
  color: #fb923c;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.desk-mic-btn:hover {
  background: #ea580c;
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}


/* ==========================================================================
   🌊 WAVEFORM COMPARISON CANVAS (Original vs User Voice)
   ========================================================================== */
.waveform-comparison-box {
  background: rgba(10, 15, 30, 0.85);
  border: 1.5px solid rgba(45, 212, 191, 0.25);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.waveform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.waveform-legend.legend-native {
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.waveform-legend.legend-user {
  color: #2dd4bf;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pronunciation-waveform-canvas {
  width: 100%;
  height: 125px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 50%, #0d1527 0%, #060913 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.btn-play-own {
  background: linear-gradient(135deg, #0d9488, #14b8a6) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.5) !important;
}

.btn-play-own:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(20, 184, 166, 0.75) !important;
}


/* ==========================================================================
   🎙️ LIVE MIC SELECTOR & VU VOLUME METER
   ========================================================================== */
.pm-mic-device-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 380px;
  margin-bottom: 0.4rem;
}

.pm-mic-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.pm-mic-select {
  flex: 1;
  background: var(--bg-card-sub);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  outline: none;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-mic-select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.4);
}

.live-vu-meter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.vu-label {
  font-size: 0.72rem;
  color: var(--accent-teal);
  font-weight: 800;
  text-transform: uppercase;
}

.live-vu-meter {
  flex: 1;
  height: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.live-vu-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  border-radius: 6px;
  transition: width 0.05s ease-out;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

/* ==========================================================================
   📖 BIDIRECTIONAL DICTIONARY & VOCAB TABLE IMAGE STYLES
   ========================================================================== */
.vocab-thumb-box {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: #080c18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.vocab-thumb-box:hover {
  transform: scale(1.08);
}

.vocab-thumb-box.has-custom-img {
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.vocab-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dictionary-header-hero {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dict-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.dict-hero-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
  max-width: 620px;
}

.dict-count-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.dictionary-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dict-direction-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.dict-dir-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dict-direction-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dict-dir-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.38rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dict-dir-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dict-dir-btn.active {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  border-color: var(--accent-teal);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.35);
}

.dict-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.dict-search-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.dict-search-field {
  width: 100%;
  padding: 0.75rem 2.8rem 0.75rem 2.8rem !important;
  font-size: 1.05rem !important;
  background: rgba(10, 15, 30, 0.9) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  color: #fff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.dict-search-field:focus {
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.3) !important;
  outline: none;
}

.dict-clear-btn {
  position: absolute;
  right: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dict-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.dict-secondary-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.dict-secondary-filters .filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dict-secondary-filters label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}

.dict-secondary-filters select {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
}


/* ==========================================================================
   📖 MODERN DICTIONARY & VOCAB CARD LAYOUT (HIGH-CONTRAST & SINGLE TOGGLE)
   ========================================================================== */
.vocab-list-row {
  display: grid !important;
  grid-template-columns: 76px 1fr auto !important;
  gap: 1.4rem !important;
  align-items: center !important;
  background: #0d1527 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 1.1rem 1.4rem !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  position: relative;
}

.vocab-list-row:hover {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55) !important;
  transform: translateY(-2px);
}

/* Mastered / Gekonnt Style (Subtle emerald glow, perfectly readable) */
.vocab-list-row.is-mastered {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), #0a1322) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.22) !important;
}

.vocab-list-row.is-mastered:hover {
  border-color: #10b981 !important;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35) !important;
}

/* Unlearned / In Training Style (High-contrast slate with gold accent) */
.vocab-list-row.is-unlearned {
  background: #0d1527 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.25) !important;
}

.dict-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.dict-status-pill.status-mastered {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.dict-status-pill.status-unlearned {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Single Mastered Toggle Button */
.dict-toggle-mastered-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dict-toggle-mastered-btn.active-mastered {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.dict-toggle-mastered-btn.active-mastered:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #f87171;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.dict-toggle-mastered-btn.active-mastered:hover .btn-label-text::after {
  content: " ➔ Zurücksetzen";
}

.dict-toggle-mastered-btn.unmastered {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}

.dict-toggle-mastered-btn.unmastered:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.dict-card-img-box {
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-radius: 12px;
  overflow: hidden;
  background: #080c18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.dict-card-img-box.has-custom-img {
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.dict-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dict-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.dict-card-terms {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.dict-thai-term-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dict-thai-word {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.dict-phonetic-word {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2dd4bf;
}

.dict-german-term-wrap {
  display: inline-flex;
  align-items: center;
}

.dict-german-word {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  padding-left: 1.1rem;
}

.dict-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dict-cat-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dict-week-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-teal);
  background: rgba(20, 184, 166, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dict-week-pill:hover {
  background: rgba(20, 184, 166, 0.25);
  border-color: var(--accent-teal);
  transform: scale(1.04);
}

.dict-example-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  margin-top: 0.2rem;
}

.dict-example-thai-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dict-ex-thai {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
}

.dict-ex-phon {
  font-size: 0.92rem;
  color: #fbbf24;
}

.dict-ex-de {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.dict-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.dict-audio-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dict-audio-btn {
  width: 38px !important;
  height: 38px !important;
  font-size: 1.05rem !important;
  border-radius: 10px !important;
  background: rgba(20, 184, 166, 0.2) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
}

.dict-audio-btn:hover {
  background: rgba(20, 184, 166, 0.4) !important;
}

.dict-mic-btn {
  width: 38px !important;
  height: 38px !important;
  font-size: 1.05rem !important;
  border-radius: 10px !important;
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.dict-mic-btn:hover {
  background: rgba(245, 158, 11, 0.4) !important;
}

@media (max-width: 900px) {
  .vocab-list-row {
    grid-template-columns: 64px 1fr !important;
    gap: 1rem !important;
  }
  
  .dict-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.8rem;
    margin-top: 0.4rem;
  }

  .dict-german-word {
    border-left: none;
    padding-left: 0;
  }
}


.vocab-card.is-mastered {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), #0d1527) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.2) !important;
}

.vocab-card.is-unlearned {
  background: #0d1527 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

.vocab-thumb-box.has-custom-img {
  border: 1.5px solid var(--accent-gold) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35) !important;
}


/* ==========================================================================
   📚 UNIFIED VOCABULARY & DICTIONARY HUB (LIST, GRID & AUDIO MODES)
   ========================================================================== */
.vocab-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
}

.vocab-hub-title-area {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vocab-hub-top-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.vocab-scope-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scope-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vocab-scope-select {
  background: #0f172a;
  color: var(--accent-gold);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.vocab-scope-select:hover,
.vocab-scope-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.vocab-view-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.vocab-view-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.vocab-view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.vocab-view-btn.active {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0f172a;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35);
}

/* Audio Player Hero */
.vocab-audio-player-hero {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(20, 184, 166, 0.4);
  border-radius: 18px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 24px rgba(20, 184, 166, 0.25);
  animation: fadeIn 0.3s ease;
}

.audio-now-playing-info {
  text-align: center;
  margin-bottom: 1rem;
}

.audio-playing-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-teal);
  background: rgba(20, 184, 166, 0.15);
  padding: 0.25rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  margin-bottom: 0.5rem;
}

.audio-now-thai {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.audio-now-phonetic {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2dd4bf;
  margin-bottom: 0.3rem;
}

.audio-now-german {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}

.audio-player-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-audio-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-audio-control:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.btn-audio-play-main {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #fff;
  border: 1px solid #2dd4bf;
  padding: 0.65rem 1.6rem;
  border-radius: 30px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-audio-play-main:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.55);
}

.btn-audio-play-main.playing {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #f87171;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.audio-settings-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.audio-mini-select {
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.audio-loop-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  color: #fff;
}

/* Viewport Containers */
.unified-vocab-viewport.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.unified-vocab-viewport.view-list,
.unified-vocab-viewport.view-audio {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Highlighting Active Audio Item */
.vocab-list-row.is-audio-playing,
.vocab-card.is-audio-playing {
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 24px rgba(20, 184, 166, 0.5) !important;
  animation: pulseAudioGlow 1.5s infinite alternate;
}

@keyframes pulseAudioGlow {
  0% { transform: scale(1); }
  100% { transform: scale(1.015); }
}

@media (max-width: 900px) {
  .vocab-hub-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .vocab-hub-top-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .vocab-view-switcher {
    width: 100%;
    display: flex;
  }
  .vocab-view-btn {
    flex: 1;
    justify-content: center;
  }
}


/* ==========================================================================
   💬 AUTHENTIC THAI DIALOGUE SCENE HERO & AUDIO PLAYER
   ========================================================================== */
.dialogue-scene-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
}

.dialogue-scene-img-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.dialogue-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.88);
  transition: transform 0.4s ease;
}

.dialogue-scene-hero:hover .dialogue-scene-img {
  transform: scale(1.02);
}

.dialogue-scene-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.8rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.65) 60%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.dialogue-scene-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dialogue-scene-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  width: fit-content;
}

.dialogue-scene-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.dialogue-scene-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin: 0;
}

.btn-dialogue-play-all {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #ffffff;
  border: 1px solid #2dd4bf;
  padding: 0.65rem 1.4rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(20, 184, 166, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-dialogue-play-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(20, 184, 166, 0.6);
}

.btn-dialogue-play-all.playing {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #f87171;
}

.dialogue-bubble.is-speaking {
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.45) !important;
  background: rgba(20, 184, 166, 0.12) !important;
}


/* ==========================================================================
   🎬 GRUNDZAHLEN GROSSBILD-TRAINER (1-9 + 0 FULLSCREEN SHOWCASE)
   ========================================================================== */
.btn-fullscreen-numbers {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.6);
  padding: 0.65rem 1.3rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-fullscreen-numbers:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
}

.basic-numbers-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: bnFadeIn 0.3s ease;
}

.basic-numbers-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(5, 9, 20, 0.98) 100%);
  backdrop-filter: blur(16px);
}

.basic-numbers-dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.15);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bn-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.bn-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bn-badge {
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.bn-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.bn-step-counter {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.bn-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bn-hdr-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bn-hdr-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.bn-close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 0.45rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bn-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Center Stage */
.bn-center-stage {
  text-align: center;
  padding: 2.2rem 1.5rem;
  background: rgba(10, 15, 29, 0.6);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.bn-center-stage.animate-step {
  animation: bnZoomFade 0.4s ease-out;
}

.bn-digit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.bn-arabic-digit {
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.35);
}

.bn-thai-digit-badge {
  font-family: var(--font-thai);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  padding: 0.2rem 0.9rem;
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.bn-thai-word {
  font-size: 4.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.bn-phonetic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.bn-phonetic {
  font-size: 1.85rem;
  font-weight: 700;
  color: #2dd4bf;
}

.bn-german-meaning {
  font-size: 1.7rem;
  font-weight: 700;
  color: #fbbf24;
  margin-top: 0.3rem;
}

/* Bottom Bar */
.bn-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.bn-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bn-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bn-control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.bn-speak-btn {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  border-color: #2dd4bf;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
}

.bn-speak-btn:hover {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.bn-settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bn-setting-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.bn-select {
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}

@keyframes bnFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bnZoomFade {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 650px) {
  .basic-numbers-dialog {
    padding: 1.2rem;
  }
  .bn-arabic-digit {
    font-size: 4.5rem;
  }
  .bn-thai-word {
    font-size: 3rem;
  }
  .bn-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .bn-nav-buttons {
    justify-content: center;
  }
  .bn-settings-row {
    justify-content: center;
  }
}


/* ==========================================================================
   🧭 KURSCURRICULUM & LEKTIONS-ÜBERSICHT (33 LESSONS HUB)
   ========================================================================== */
.curriculum-sidebar-btn {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(30, 41, 59, 0.95)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2) !important;
}

.curriculum-sidebar-btn:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(30, 41, 59, 0.95)) !important;
  border-color: #38bdf8 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35) !important;
}

.curriculum-sidebar-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border-color: #7dd3fc !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45) !important;
}

.curriculum-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.5rem 0 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.3s ease;
}

.curriculum-hero-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 24px;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(14, 165, 233, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.curriculum-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 750px;
}

.curriculum-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  width: fit-content;
}

.curriculum-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.curriculum-hero-sub {
  font-size: 0.98rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.curriculum-search-box {
  position: relative;
  min-width: 300px;
}

.curriculum-search-input {
  width: 100%;
  background: #0f172a;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.curriculum-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.curriculum-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.7;
}

/* Month Groups */
.curriculum-month-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.curriculum-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.curriculum-month-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.curriculum-month-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.8rem;
  border-radius: 12px;
}

.curriculum-lessons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

@media (max-width: 860px) {
  .curriculum-lessons-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}


/* Curriculum Card Thumbnail Layout */
.curriculum-lesson-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.curriculum-card-layout {
  display: flex;
  gap: 1.3rem;
  align-items: stretch;
  width: 100%;
}

.curriculum-card-thumb-wrap {
  position: relative;
  width: 135px;
  min-width: 135px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  background: #0f172a;
}

.curriculum-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
  display: block;
}

.curriculum-lesson-card:hover .curriculum-card-thumb {
  transform: scale(1.08);
}

.curriculum-thumb-week-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  backdrop-filter: blur(6px);
}

.curriculum-card-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .curriculum-card-layout {
    flex-direction: column;
    gap: 1rem;
  }
  .curriculum-card-thumb-wrap {
    width: 100%;
    height: 140px;
  }
}

.curriculum-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.curriculum-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.curriculum-week-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 10px;
}

.curriculum-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
}

.curriculum-status-pill.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.curriculum-status-pill.open {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.curriculum-lesson-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
}

.curriculum-lesson-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0;
}

.curriculum-card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.curriculum-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.curriculum-card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.9rem;
}

.btn-curriculum-jump {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #ffffff;
  border: 1px solid #2dd4bf;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-curriculum-jump:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.45);
}

.btn-curriculum-sub {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-curriculum-sub:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}


/* ==========================================================================
   🏯 LANDESKUNDE, KULTUR & ALLTAGSKNIGGE (CULTURE & TRIVIA HUB)
   ========================================================================== */
.culture-hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  animation: fadeIn 0.3s ease;
}

.culture-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  padding: 2rem 2.4rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 30px rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.culture-hero-icon {
  font-size: 3.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25);
}

.culture-hero-text {
  flex: 1;
  min-width: 280px;
}

.culture-hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.2rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.culture-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
}

.culture-hero-sub {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.culture-grid-2cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 850px) {
  .culture-grid-2cols {
    grid-template-columns: 1fr;
  }
}

.culture-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.8));
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.culture-card.card-dos {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.25), rgba(15, 23, 42, 0.9));
}

.culture-card.card-donts {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.25), rgba(15, 23, 42, 0.9));
}

.culture-card.card-trivia {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.25), rgba(15, 23, 42, 0.9));
}

.culture-card.card-philosophy {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.25), rgba(15, 23, 42, 0.9));
}

.culture-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.culture-card-icon {
  font-size: 1.5rem;
}

.culture-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.culture-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.culture-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.culture-item-bullet {
  font-size: 1.1rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.culture-quote-box {
  background: rgba(0, 0, 0, 0.35);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 14px 14px 0;
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.culture-thai-term {
  font-family: var(--font-thai);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.culture-thai-phon {
  font-size: 0.95rem;
  color: #2dd4bf;
  font-weight: 700;
}

.culture-thai-trans {
  font-size: 0.85rem;
  color: #94a3b8;
}


/* ==========================================================================
   🔥 TOP 2.500 HÄUFIGKEITS-WORTSCHATZ & FREQUENZ-TRAINER (FREQUENCY HUB)
   ========================================================================== */
.frequency-sidebar-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(30, 41, 59, 0.95)) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2) !important;
}

.frequency-sidebar-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(30, 41, 59, 0.95)) !important;
  border-color: #f59e0b !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35) !important;
}

.frequency-sidebar-btn.active {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  border-color: #fde68a !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

.frequency-hub-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.5rem 0 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  animation: fadeIn 0.3s ease;
}

.frequency-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  padding: 2rem 2.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(245, 158, 11, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.frequency-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 760px;
}

.frequency-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  width: fit-content;
}

.frequency-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.frequency-hero-sub {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

/* Tier Pills Bar */
.frequency-controls-bar {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.frequency-tier-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.freq-tier-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.freq-tier-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.freq-tier-pill.active {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0f172a;
  border-color: #fbbf24;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.frequency-search-wrap {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 400px;
}

.frequency-search-input {
  width: 100%;
  background: #0f172a;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.frequency-search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.frequency-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.7;
}

/* Frequency Cards Grid */
.frequency-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

.frequency-word-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.8));
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8rem;
  transition: all 0.25s ease;
  position: relative;
}

.frequency-word-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
}

.frequency-word-card.is-mastered {
  border-left: 4px solid #10b981;
}

.frequency-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.freq-rank-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.2));
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.freq-tier-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.freq-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.freq-word-thai {
  font-family: var(--font-thai);
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.freq-word-phon {
  font-size: 1.05rem;
  color: #2dd4bf;
  font-weight: 700;
  margin-top: 0.2rem;
}

.freq-word-meaning {
  font-size: 0.95rem;
  color: #fbbf24;
  margin-top: 0.3rem;
  line-height: 1.4;
}

.freq-example-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.freq-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
}

.freq-example-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.freq-example-audio-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  height: auto;
  width: auto;
}

.freq-example-audio-btn:hover {
  background: rgba(245, 158, 11, 0.35);
  border-color: var(--accent-gold);
}

.freq-example-thai {
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  font-family: var(--font-thai);
}

.freq-example-de {
  font-size: 0.84rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.35;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 0.35rem;
  margin-top: 0.1rem;
}

.freq-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.7rem;
  gap: 0.5rem;
}

/* Frequency badge for regular dictionary */
.dict-freq-tag {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.2));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
}


/* ==========================================================================
   🔒 PASSWORTSCHUTZ & LOGIN GATE OVERLAY
   ========================================================================== */
.header-logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.4rem 0.85rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.login-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.98) 0%, rgba(5, 9, 20, 1) 100%);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.login-gate-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 28px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(245, 158, 11, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  position: relative;
}

.login-gate-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.login-gate-thai-flag {
  font-size: 3.8rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.login-gate-lock-badge {
  position: absolute;
  bottom: -4px;
  right: -8px;
  font-size: 1.5rem;
  background: #0f172a;
  border: 1.5px solid var(--accent-gold);
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.login-gate-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.login-gate-sub {
  font-size: 0.9rem;
  color: var(--accent-teal);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.login-gate-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.login-gate-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

.login-gate-input {
  width: 100%;
  background: #0f172a;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.login-gate-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  animation: shake 0.3s ease;
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.6);
  padding: 0.85rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  margin-top: 0.3rem;
}

.login-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
}

.login-gate-footer-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  margin-top: 0.5rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}


html.is-authenticated #loginGateOverlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* ==========================================================================
   🎴 MOBILE FLASHCARD TRAINER & QUICK DICTIONARY
   ========================================================================== */
.flashcard-trainer-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 3rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  user-select: none;
}

/* Mobile Quick Controls Bar */
.fc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.45rem 0.6rem;
  backdrop-filter: blur(12px);
  width: 100%;
  box-sizing: border-box;
}

.fc-deck-selector-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(30, 41, 59, 0.9));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.fc-deck-selector-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.3);
}

.fc-view-toggle-wrap {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fc-view-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-view-toggle-btn.active {
  background: var(--accent-teal);
  color: #0f172a;
}

/* Progress & Stats */
.fc-progress-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
}

.fc-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.fc-progress-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.fc-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, var(--accent-teal));
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* 3D Flip Card Container */
.fc-card-stage {
  perspective: 1200px;
  width: 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fc-card-flipper {
  width: 100%;
  height: 100%;
  min-height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0.2, 0.2, 1);
  cursor: pointer;
  touch-action: pan-y;
}

.fc-card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.fc-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 26px;
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fc-card-front {
  transform: rotateY(0deg);
}

.fc-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.98), rgba(15, 23, 42, 0.95));
}

.fc-card-top-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.fc-thai-main {
  font-family: var(--font-thai);
  font-size: 3.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 1.2rem 0 0.5rem 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.fc-phonetic-sub {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.2px;
}

.fc-german-main {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.3;
  margin: 1.2rem 0 0.5rem 0;
}

.fc-example-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3.5px solid var(--accent-teal);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  width: 100%;
  text-align: left;
  margin-top: 0.4rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.fc-example-box:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(45, 212, 191, 0.3);
}

.fc-example-box:active {
  background: rgba(45, 212, 191, 0.25);
  transform: scale(0.98);
}

.fc-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.1rem;
}

.fc-example-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fc-example-audio-btn {
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fc-example-audio-btn:hover {
  background: rgba(45, 212, 191, 0.35);
  transform: scale(1.08);
}

.fc-example-thai-text {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.35;
  font-family: var(--font-thai);
}

.fc-example-phon-text {
  font-size: 0.8rem;
  color: var(--accent-teal);
  font-weight: 500;
  margin-left: 0.4rem;
  font-family: var(--font-main, sans-serif);
}

.fc-example-de-text {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.3;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 0.25rem;
  margin-top: 0.15rem;
}

.fc-flip-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Action Controls */
.fc-action-bar {
  display: flex;
  gap: 0.8rem;
  width: 100%;
}

.btn-fc-repeat {
  flex: 1;
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  padding: 0.95rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-fc-repeat:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
  transform: translateY(-2px);
}

.btn-fc-flip {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.95rem 1.2rem;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-fc-master {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1.5px solid rgba(52, 211, 153, 0.5);
  color: #ffffff;
  padding: 0.95rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-fc-master:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Completed Celebration Card */
.fc-completed-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 2px solid var(--accent-gold);
  border-radius: 26px;
  padding: 2.5rem 1.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 35px rgba(245, 158, 11, 0.25);
  animation: fadeIn 0.3s ease;
}

/* Mobile Bottom Sheet Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(5, 9, 20, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.mobile-drawer-overlay.active {
  display: flex;
}

.mobile-drawer-card {
  width: 100%;
  max-width: 600px;
  max-height: 82vh;
  background: #0f172a;
  border-top: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 28px 28px 0 0;
  padding: 1.2rem 1.4rem 2.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.7);
  animation: slideUp 0.25s ease;
}

.mobile-drawer-handle {
  width: 48px;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin: 0 auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-drawer-title {
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.mobile-drawer-sub {
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}

.mobile-drawer-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 4px;
}

.drawer-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.4rem;
}

.drawer-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.drawer-item-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.7rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.drawer-item-btn:hover, .drawer-item-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(30, 41, 59, 0.95));
  border-color: var(--accent-gold);
  color: #fff;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}


/* ==========================================================================
   🌅 CURRICULUM MONTH HERO BANNERS & CINEMATIC LESSON HEADER
   ========================================================================== */

/* 1. Curriculum Month Hero Banners */
.curriculum-month-banner {
  width: 100%;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: 22px;
  margin-bottom: 1.2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.curriculum-month-banner:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.2);
}

.curriculum-month-banner-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
  width: fit-content;
  max-width: 90%;
  align-self: flex-start;
  background: radial-gradient(circle at center left, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.12) 75%, rgba(15, 23, 42, 0.01) 100%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.04) 100%);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding: 0.85rem 1.4rem 0.95rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.curriculum-month-pill {
  background: rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  width: fit-content;
  backdrop-filter: blur(8px);
}

.curriculum-month-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.curriculum-month-subtitle {
  font-size: 0.88rem;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
}

/* 2. Compact Cinematic Lesson Header */
.cinematic-lesson-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.2rem;
  transition: all 0.3s ease;
  min-height: 220px;
  background: #0f172a;
}

.lesson-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.95) saturate(1.1);
  transition: transform 0.4s ease, filter 0.3s ease;
  z-index: 1;
}

.cinematic-lesson-hero:hover .lesson-hero-backdrop {
  transform: scale(1.02);
}

.lesson-hero-overlay {
  position: relative;
  z-index: 2;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  box-sizing: border-box;
  gap: 0.6rem;
  background: transparent;
}

.lesson-hero-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-right: 105px;
}

.btn-hero-toggle {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #cbd5e1;
  padding: 0.28rem 0.75rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-hero-toggle:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  color: #fff;
}

.lesson-hero-titles-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: fit-content;
  max-width: 90%;
  align-self: flex-start;
  background: radial-gradient(circle at center left, rgba(15, 23, 42, 0.38) 0%, rgba(15, 23, 42, 0.22) 75%, rgba(15, 23, 42, 0.02) 100%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.32) 0%, rgba(15, 23, 42, 0.08) 100%);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  padding: 0.85rem 1.4rem 0.95rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.lesson-hero-titles {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lesson-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.lesson-thai-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lesson-thai-title .thai-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.lesson-thai-title .phonetic-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.lesson-short-desc {
  font-size: 0.95rem;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.45;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95);
}

/* Compact Mode for Hero Header */
.cinematic-lesson-hero.is-compact {
  min-height: auto;
}

.cinematic-lesson-hero.is-compact .lesson-hero-overlay {
  padding: 0.5rem 1rem;
  min-height: auto;
  gap: 0.3rem;
}

.cinematic-lesson-hero.is-compact .lesson-hero-titles-wrap {
  padding: 0.4rem 0.8rem;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.cinematic-lesson-hero.is-compact .lesson-main-title {
  font-size: 1.2rem;
}

.cinematic-lesson-hero.is-compact .lesson-thai-title {
  font-size: 0.9rem;
}

.cinematic-lesson-hero.is-compact .lesson-short-desc {
  display: none;
}


/* ==========================================================================
   🌅 CURRICULUM WELCOME HERO BANNER
   ========================================================================== */
.curriculum-welcome-hero {
  width: 100%;
  min-height: 250px;
  background-size: cover;
  background-position: center 30%;
  border-radius: 26px;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: flex-end;
  padding: 1.8rem 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.curriculum-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: fit-content;
  max-width: 90%;
  align-self: flex-start;
  z-index: 2;
  background: radial-gradient(circle at center left, rgba(15, 23, 42, 0.38) 0%, rgba(15, 23, 42, 0.22) 75%, rgba(15, 23, 42, 0.02) 100%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.32) 0%, rgba(15, 23, 42, 0.08) 100%);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  padding: 1rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.curriculum-welcome-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.curriculum-welcome-sub {
  font-size: 1rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

@media (max-width: 600px) {
  .curriculum-welcome-hero {
    padding: 1.6rem 1.4rem;
    min-height: 210px;
  }
  .curriculum-welcome-title {
    font-size: 1.6rem;
  }
  .curriculum-welcome-sub {
    font-size: 0.88rem;
  }
}


/* ==========================================================================
   📐 ADMIN BANNER REPOSITION TOOL
   ========================================================================== */
.btn-banner-reposition {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  color: var(--accent-gold);
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  opacity: 0.7;
}

.btn-banner-reposition:hover {
  opacity: 1;
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #fff;
  transform: translateY(-1px);
}

.banner-repo-card {
  max-width: 580px;
}

.banner-repo-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
}

.banner-repo-target {
  font-size: 0.8rem;
  color: var(--accent-gold);
  display: block;
}

.banner-repo-body {
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Banner Reposition Mode Switch (Ausgeklappt vs Eingeklappt) */
.banner-repo-mode-switch {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.3rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.8rem;
}

.btn-repo-mode {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-repo-mode:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-repo-mode.active {
  background: rgba(245, 158, 11, 0.25);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.banner-repo-preview-wrap {
  width: 100%;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: height 0.3s ease;
}

.banner-repo-preview-wrap.is-compact-preview {
  height: 100px;
}

.banner-repo-preview {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 50%;
  transition: background-position 0.1s ease;
}

.banner-repo-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.banner-repo-slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
}

.banner-repo-slider {
  width: 100%;
  accent-color: var(--accent-gold);
  height: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.banner-repo-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-preset-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-pill:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  color: #fff;
}


/* ==========================================================================
   ✨ SINGLE-ROW SPACE-SAVING HEADER NAVIGATION
   ========================================================================== */
.header-nav {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  padding: 0.45rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-height: 52px;
  box-sizing: border-box;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.brand-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  line-height: 1.2;
}

.brand-domain-main {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 35%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-teal);
  letter-spacing: 0.1px;
  white-space: nowrap;
  opacity: 0.85;
}

.brand-icon {
  font-size: 1.6rem;
}

.header-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.header-select-compact {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 0.32rem 0.55rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  height: 32px;
  outline: none;
  transition: all 0.2s ease;
  max-width: 175px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-select-compact:hover, .header-select-compact:focus {
  border-color: var(--accent-gold);
  color: #fff;
}

.btn-slow-mo-compact {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  padding: 0.32rem 0.55rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-slow-mo-compact:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.header-logout-btn-compact {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.32rem 0.55rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.header-logout-btn-compact:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

@media (max-width: 1200px) {
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-nav {
    overflow-x: auto;
    padding: 0.4rem 0.7rem;
  }
}

/* ==========================================================================
   📱 IMMERSIVE FULLSCREEN MOBILE FLASHCARDS
   ========================================================================== */
.fc-top-right-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-close-fullscreen-btn {
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fc-close-fullscreen-btn:hover, .fc-close-fullscreen-btn:active {
  background: rgba(239, 68, 68, 0.45);
  color: #fff;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #tab-flashcards.active,
  #tab-frequency-hub.active,
  #tab-audio-hub.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    background: var(--bg-main, #0b0f19) !important;
    overflow-y: auto !important;
    padding: calc(env(safe-area-inset-top, 0px) + 0.6rem) 0.8rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem) 0.8rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #tab-flashcards.active .flashcard-trainer-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    min-height: 100%;
    gap: 0.8rem;
  }

  #tab-flashcards.active .fc-card-scene {
    min-height: 260px;
    height: 38vh;
    max-height: 360px;
  }

  #tab-flashcards.active .fc-thumb-actions-bar {
    padding-bottom: 0.5rem;
  }
}

/* Flashcard Touch & Swipe Enhancements */
.fc-card-stage {
  touch-action: pan-y;
  cursor: pointer;
}

.fc-nav-mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-nav-mini-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  color: #fff;
}

.fc-nav-mini-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.fc-swipe-hint-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-dim);
  padding: 0 0.5rem;
}

/* ==========================================================================
   📱 3-MODE MOBILE LESSON SWITCHER (KARTEN | REGELN | LANDESKUNDE)
   ========================================================================== */
.mobile-lesson-segment-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 2px;
  gap: 2px;
  align-items: center;
  flex-shrink: 1;
}

.mob-segment-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mob-segment-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mob-segment-btn.active {
  background: var(--accent-gold);
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.fc-close-fullscreen-btn {
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-content-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1rem 0.9rem 2.8rem 0.9rem;
  backdrop-filter: blur(16px);
  color: #e2e8f0;
  line-height: 1.55;
  font-size: 0.78rem;
  overflow-y: auto;
  flex: 1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mobile-content-card h2, .mobile-content-card h3 {
  color: var(--accent-gold);
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-content-card h4 {
  color: #38bdf8;
  margin-top: 0.8rem;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.mobile-content-card p, .mobile-content-card li {
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
}

.mobile-content-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 1rem 0;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

.mobile-content-card th, .mobile-content-card td {
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.mobile-content-card th {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.74rem;
}

.mobile-content-card .thai-text {
  font-size: 0.94rem;
  color: #fff;
}

.mobile-content-card .phonetic-text {
  font-size: 0.76rem;
  color: var(--accent-teal);
}

.mobile-content-card .grammar-rule-card, 
.mobile-content-card .grammar-card,
.mobile-content-card .culture-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

/* ==========================================================================
   📱 CLEAN MOBILE HOME & HEADER OPTIMIZATIONS (KONZEPT A)
   ========================================================================== */

/* Mobile Header Settings Button */
.btn-mobile-header-settings {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-mobile-header-settings:hover, .btn-mobile-header-settings:active {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

/* Mobile Settings Modal Card */
.mobile-settings-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 1.2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
}

.mobile-settings-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mob-setting-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mob-setting-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
}

.mob-setting-select {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  width: 100%;
}

.mob-setting-btn-toggle {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.mob-setting-logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  transition: all 0.2s ease;
}

/* Responsive Overrides for Mobile (<= 768px) */
@media (max-width: 768px) {
  /* Clean Header */
  .desktop-header-controls {
    display: none !important;
  }

  .btn-mobile-header-settings {
    display: inline-flex !important;
  }

  .header-nav {
    padding: 0.45rem 1rem !important;
    min-height: 48px !important;
    justify-content: space-between !important;
    overflow-x: visible !important;
  }

  /* 2-Column Action Tiles on Mobile */
  .sidebar-top-studio-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.6rem !important;
  }

  /* Hide redundant Curriculum & KI-Studio on Mobile */
  .sidebar-top-studio-section .curriculum-sidebar-btn,
  .sidebar-top-studio-section .sidebar-studio-btn-row {
    display: none !important;
  }

  /* Compact 2-Tile Design for Top 2500 & Audio */
  .sidebar-top-studio-section .sidebar-studio-btn {
    padding: 0.5rem 0.65rem !important;
    border-radius: 12px !important;
    gap: 0.45rem !important;
    min-height: 56px !important;
    align-items: center !important;
  }

  .sidebar-top-studio-section .studio-btn-icon {
    font-size: 1.25rem !important;
  }

  .sidebar-top-studio-section .studio-btn-text strong {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
  }

  .sidebar-top-studio-section .studio-btn-sub {
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* ==========================================================================
   📱 MOBILE AUDIO HUB CARDS (SPACIOUS & THUMB-FRIENDLY)
   ========================================================================== */
@media (max-width: 768px) {
  .audio-hub-table,
  .audio-hub-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .audio-hub-row {
    display: flex !important;
    flex-direction: column !important;
    padding: 0.9rem !important;
    border-radius: 16px !important;
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 0.45rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .audio-hub-row:hover {
    transform: none !important;
  }

  .audio-hub-cell {
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
    text-align: left !important;
  }

  .audio-hub-cell:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0.2rem !important;
  }

  .audio-hub-week-badge {
    padding: 0.25rem 0.65rem !important;
    font-size: 0.76rem !important;
  }

  .audio-hub-cell strong {
    font-size: 1.05rem !important;
    color: #fff !important;
    display: block !important;
    line-height: 1.35 !important;
  }

  .audio-hub-cell div {
    font-size: 0.8rem !important;
    color: var(--text-dim) !important;
    margin-top: 0.25rem !important;
  }

  .audio-hub-action-btns {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-top: 0.4rem !important;
    padding-top: 0.55rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .audio-hub-action-btns .btn-gallery-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.15rem !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .audio-hub-action-btns .btn-primary,
  .audio-hub-action-btns .btn-secondary {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    height: 40px !important;
    box-sizing: border-box !important;
  }

  .audio-hub-feeds-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }

  .audio-hub-feed-card {
    padding: 0.95rem !important;
  }

  .audio-hub-feed-qr-box {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
}
