/* =====================================================================
   DEUTSCH A1 STUDIO - MODERN DESIGN SYSTEM & STYLESHEET
   Creative Editorial & Bento Interface for German Language Mastery
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root, [data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-subtle: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverted: #ffffff;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;
  
  --accent-gold: #d97706;
  --accent-gold-subtle: #fef3c7;
  --accent-emerald: #059669;
  --accent-emerald-subtle: #ecfdf5;
  --accent-rose: #e11d48;
  --accent-rose-subtle: #ffe4e6;
  --accent-indigo: #4f46e5;
  --accent-indigo-subtle: #eef2ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  --bg-page: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-subtle: #141d2f;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-inverted: #0f172a;
  
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --primary-subtle: #1e293b;
  --primary-border: #2563eb;
  
  --accent-gold: #fbbf24;
  --accent-gold-subtle: #291e05;
  --accent-emerald: #34d399;
  --accent-emerald-subtle: #062b1e;
  --accent-rose: #fb7185;
  --accent-rose-subtle: #380d19;
  --accent-indigo: #818cf8;
  --accent-indigo-subtle: #1e1b4b;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

[data-theme="sepia"] {
  --bg-page: #fbf7ee;
  --bg-surface: #fffdf7;
  --bg-surface-elevated: #f2ead6;
  --bg-surface-subtle: #f8f1de;
  --border-subtle: #e5dabf;
  --border-strong: #d4c49d;
  
  --text-primary: #2d241e;
  --text-secondary: #574637;
  --text-muted: #85705d;
  --text-inverted: #fffdf7;
  
  --primary: #b45309;
  --primary-hover: #92400e;
  --primary-subtle: #fef3c7;
  --primary-border: #fde68a;
  
  --accent-gold: #b45309;
  --accent-gold-subtle: #fef3c7;
  --accent-emerald: #065f46;
  --accent-emerald-subtle: #d1fae5;
  --accent-rose: #9f1239;
  --accent-rose-subtle: #ffe4e6;
  --accent-indigo: #4338ca;
  --accent-indigo-subtle: #e0e7ff;

  --shadow-sm: 0 1px 2px 0 rgb(45 36 30 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(45 36 30 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(45 36 30 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(45 36 30 / 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  height: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* APP SHELL HEADER */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] .app-header {
  background-color: rgba(9, 13, 22, 0.85);
}

[data-theme="sepia"] .app-header {
  background-color: rgba(251, 247, 238, 0.88);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1px solid rgba(217, 119, 6, 0.25);
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Notebook Navigation Bar */
.notebook-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.25rem 0;
}

.notebook-nav-bar::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-tab-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.nav-tab-icon {
  font-size: 1.05rem;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.825rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.search-trigger-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.kbd-shortcut {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 600;
}

.theme-toggle-btn, .sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 1rem;
}

.theme-toggle-btn:hover, .sidebar-toggle-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* MAIN LAYOUT WRAPPER */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  position: relative;
}

/* CURRICULUM SIDEBAR */
.sidebar-drawer {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform 0.25s ease, width 0.25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.filter-btn {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.725rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Table of Contents tree */
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.toc-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.toc-item.active {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
}

.toc-item.level-2 {
  font-weight: 600;
}

.toc-item.level-3 {
  padding-left: 1.25rem;
  font-size: 0.8rem;
}

.toc-practice-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* Sidebar Progress Card */
.progress-card {
  margin-top: auto;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.progress-percentage {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* MAIN CONTENT CANVAS */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2.25rem 2.5rem;
  max-width: 1020px;
  margin: 0 auto;
}

/* NOTEBOOK HERO CARD */
.notebook-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.notebook-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold), var(--accent-emerald));
}

.hero-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 780px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* SECTION CARDS & MARKDOWN BODY */
.section-block {
  margin-bottom: 2.75rem;
  scroll-margin-top: 90px;
}

.section-block h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-block h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 0.85rem;
  color: var(--text-primary);
}

.section-block h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.65rem;
}

.section-block p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.section-block ul, .section-block ol {
  margin: 0.75rem 0 1.25rem 1.75rem;
  color: var(--text-secondary);
}

.section-block li {
  margin-bottom: 0.45rem;
}

.section-block hr {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 2.5rem 0;
}

/* BLOCKQUOTES & CALLOUT CARDS */
.section-block blockquote {
  border-left: 4px solid var(--accent-gold);
  background: var(--accent-gold-subtle);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
  color: var(--text-primary);
}

.section-block blockquote p:last-child {
  margin-bottom: 0;
}

/* SPECIAL GERMAN GRAMMAR TABLES */
.table-responsive-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.table-responsive-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.table-responsive-wrapper th {
  background: var(--bg-surface-elevated);
  font-weight: 700;
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table-responsive-wrapper td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table-responsive-wrapper tr:last-child td {
  border-bottom: none;
}

.table-responsive-wrapper tr:hover td {
  background: var(--bg-surface-subtle);
}

/* GRAMMAR BADGES */
.gender-der {
  color: #2563eb;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.gender-die {
  color: #e11d48;
  font-weight: 700;
  background: rgba(225, 29, 72, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.gender-das {
  color: #059669;
  font-weight: 700;
  background: rgba(5, 150, 105, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.pos2-badge {
  display: inline-block;
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* =====================================================================
   DAILY PRACTICE & STUDIO AUDIO SYSTEM
   ===================================================================== */
.practice-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin: 1.75rem 0 2.5rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.practice-container-card:hover {
  border-color: var(--primary-border);
}

/* Master Audio Studio Player */
.studio-audio-player {
  background: linear-gradient(135deg, var(--bg-surface-elevated), var(--bg-surface));
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
}

.studio-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.audio-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

.audio-status-ready {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.audio-status-placeholder {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.studio-player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-btn-main {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transition: all 0.15s ease;
}

.player-btn-main:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

.player-btn-sub {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
}

.player-btn-sub:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.player-btn-repeat {
  width: auto;
  min-width: 52px;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.8rem;
  font-weight: 700;
  user-select: none;
}

.player-btn-repeat:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.player-btn-repeat.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.player-btn-repeat .repeat-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.player-btn-repeat .repeat-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.player-scrubber-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.player-time {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 36px;
}

.player-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  width: 0%;
  transition: width 0.1s linear;
}

.player-speed-select {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Practice Toolbar */
.practice-toolbar {
  padding: 0.85rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.practice-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-flashcards-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-indigo));
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
  transition: all 0.18s ease;
}

.btn-flashcards-mode:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.repeat-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.repeat-pill {
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.repeat-pill.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Practice Table Rows */
.practice-table {
  width: 100%;
  border-collapse: collapse;
}

.practice-table th {
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface-elevated);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.practice-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  font-size: 0.925rem;
}

.practice-row:last-child td {
  border-bottom: none;
}

.practice-row:hover td {
  background: var(--bg-surface-subtle);
}

.practice-row.is-playing td {
  background: var(--primary-subtle);
}

.row-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 48px;
  text-align: center;
}

.german-cell {
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sentence-text {
  flex: 1;
}

.speak-btn-row {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.speak-btn-row:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: scale(1.08);
}

/* =====================================================================
   LINGOLIA-STYLE SPEAKER BUTTON (AUDIO PRONUNCIATION ICON)
   ===================================================================== */
.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), filter 0.15s ease, background-color 0.15s ease;
  user-select: none;
  padding: 2px 4px;
  margin: 0 5px;
  border-radius: 4px;
  border: none;
  background: transparent;
  vertical-align: middle;
  line-height: 1;
}

.speak-btn:hover {
  transform: scale(1.22);
  background-color: rgba(59, 130, 246, 0.15);
}

.speak-btn:active {
  transform: scale(0.92);
}

.speak-btn.speaker-playing {
  animation: speakerPulse 0.6s infinite alternate;
  background-color: rgba(59, 130, 246, 0.25);
}

@keyframes speakerPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.5)); }
  100% { transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.9)); }
}

.speak-btn img {
  pointer-events: none;
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
}

.english-cell {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.action-cell {
  text-align: right;
  width: 70px;
}

.check-mastered-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.check-mastered-btn.mastered {
  background: var(--accent-emerald-subtle);
  border-color: rgba(5, 150, 105, 0.4);
  color: var(--accent-emerald);
}

/* Equalizer soundwave animation */
.soundwave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.soundwave-bar {
  width: 2.5px;
  height: 100%;
  background: var(--primary);
  border-radius: 1px;
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}

.soundwave-bar:nth-child(2) { animation-delay: 0.2s; }
.soundwave-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* =====================================================================
   SHADOWING & FLASHCARDS MODAL (FULLSCREEN TRAINING)
   ===================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.flashcard-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.flashcard-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flashcard-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.flashcard-body {
  padding: 2.5rem 2rem;
  text-align: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.flashcard-counter {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flashcard-german {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  max-width: 580px;
}

.flashcard-english-wrapper {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flashcard-english {
  font-size: 1.15rem;
  color: var(--text-secondary);
  transition: opacity 0.2s ease;
}

.flashcard-reveal-btn {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.flashcard-reveal-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.flashcard-loop-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  min-height: 20px;
}

.flashcard-footer {
  padding: 1.25rem 1.75rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flashcard-nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-flash-nav {
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-flash-nav:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

/* =====================================================================
   LIVE OMNISEARCH MODAL
   ===================================================================== */
.search-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-input-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-modal-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
}

.search-results-list {
  padding: 0.75rem;
  overflow-y: auto;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: background-color 0.15s ease;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--bg-surface-elevated);
}

.search-res-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-res-german {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.search-res-english {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* FOOTER */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .sidebar-drawer {
    position: fixed;
    top: 65px;
    left: 0;
    bottom: 0;
    z-index: 40;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-drawer.drawer-open {
    transform: translateX(0);
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .notebook-hero {
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 1.65rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0.5rem 1rem;
  }

  .brand-subtitle, .search-trigger-btn span {
    display: none;
  }

  .practice-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .flashcard-german {
    font-size: 1.35rem;
  }
}

/* =====================================================================
   GLOBAL AUDIO MINI-PLAYER (BACKGROUND PLAYBACK CONTROLLER)
   ===================================================================== */
body.has-active-player {
  padding-bottom: 84px !important;
}

.global-mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
  padding: 0.65rem 1.5rem;
}

[data-theme="dark"] .global-mini-player {
  background-color: rgba(15, 23, 42, 0.95);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="sepia"] .global-mini-player {
  background-color: rgba(251, 247, 238, 0.96);
  box-shadow: 0 -8px 30px rgba(45, 36, 30, 0.12);
}

.mini-player-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Left: Track Information */
.mini-player-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 240px;
  max-width: 360px;
}

.mini-player-wave {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
}

.mini-player-wave .soundwave-bar {
  width: 3px;
  height: 6px;
  background: var(--primary);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.global-mini-player.is-playing .mini-player-wave .soundwave-bar {
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}

.global-mini-player.is-playing .mini-player-wave .soundwave-bar:nth-child(2) { animation-delay: 0.2s; }
.global-mini-player.is-playing .mini-player-wave .soundwave-bar:nth-child(3) { animation-delay: 0.4s; }

.mini-player-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.mini-player-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.mini-player-jump-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}

.mini-player-jump-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.mini-player-file-badge {
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Center: Controls & Scrubber */
.mini-player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  max-width: 620px;
}

.mini-player-buttons {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mini-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
  transition: all 0.15s ease;
}

.mini-btn-play:hover {
  background: var(--primary-hover);
  transform: scale(1.06);
}

.mini-btn-sub {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-btn-sub:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.mini-btn-repeat {
  width: auto;
  min-width: 48px;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.75rem;
  font-weight: 700;
  user-select: none;
}

.mini-btn-repeat:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.mini-btn-repeat.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.mini-btn-repeat .repeat-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.mini-btn-repeat .repeat-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mini-player-scrubber-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.mini-player-time {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 34px;
}

.mini-player-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mini-player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-indigo));
  border-radius: 9999px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Right: Secondary Tools */
.mini-player-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 120px;
  justify-content: flex-end;
}

.mini-player-speed {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.mini-btn-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.mini-btn-close:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .mini-player-meta {
    max-width: 170px;
    min-width: 130px;
  }
  .mini-player-inner {
    gap: 0.75rem;
  }
  .mini-player-file-badge {
    display: none;
  }
}

@media (max-width: 520px) {
  .mini-player-buttons {
    gap: 0.5rem;
  }
  .mini-btn-repeat {
    min-width: 42px;
    padding: 0 0.4rem;
  }
}

/* =====================================================================
   DIALOGPRAXIS & SITUATIONAL DIALOGUE CARDS
   ===================================================================== */
.toc-dialog-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-left: auto;
}

.dialogpraxis-section {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-subtle);
}

.dialogpraxis-header {
  margin-bottom: 2rem;
}

.dialogpraxis-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 0.75rem;
}

.dialogpraxis-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dialogpraxis-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 800px;
}

.dialogues-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dialog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  position: relative;
}

.dialog-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.dialog-card.playing {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), var(--shadow-lg);
  background: var(--bg-surface);
}

.dialog-card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dialog-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dialog-pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.dialog-lines-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-play-dialog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.btn-play-dialog:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
}

.btn-play-dialog.playing {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-play-dialog .dlg-icon {
  font-size: 0.85rem;
}

.dialog-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dialog-script {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.dialog-line {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.dialog-speaker-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  min-width: 90px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.dialog-bubble {
  flex: 1;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  border-top-left-radius: 4px;
  padding: 0.75rem 1rem;
  position: relative;
}

.dialog-german-text {
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dialog-german-text strong {
  color: var(--primary);
  font-weight: 700;
}

.dialog-english-text {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.45;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 0.35rem;
}

[data-theme="dark"] .dialog-english-text {
  border-top-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .dialog-card {
    padding: 1.25rem;
  }
  .dialog-line {
    flex-direction: column;
    gap: 0.4rem;
  }
  .dialog-speaker-badge {
    min-width: auto;
    align-self: flex-start;
  }
}


