/* ==========================================================================
   OmniArticle Stylesheet - Universal Reader & Multi-Language Translator
   Typography: Space Grotesk (Primary Display & Interface)
   Full Mobile, Tablet, & Desktop Responsiveness
   ========================================================================== */

:root {
  /* Typography - Space Grotesk primary */
  --font-space: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Merriweather', Georgia, Cambria, 'Times New Roman', serif;
  --font-dyslexic: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;

  /* Color Palette - Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.88);
  --bg-surface-hover: #f1f5f9;
  --bg-surface-secondary: #f1f5f9;
  --bg-sidebar: #f8fafc;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-accent: #ffffff;

  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-border: #bfdbfe;
  --accent-glow: rgba(37, 99, 235, 0.25);

  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%);
  --brand-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 50%, #7c3aed 100%);
  --tag-bg: #e0f2fe;
  --tag-text: #0369a1;

  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 6px 12px -2px rgba(0, 0, 0, 0.04);
  --shadow-floating: 0 24px 38px -6px rgba(0, 0, 0, 0.14), 0 12px 18px -4px rgba(0, 0, 0, 0.06);

  --reader-font-size: 18px;
  --reader-line-height: 1.85;

  --header-height: 68px;
  --mobile-bottom-height: 62px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #07090e;
  --bg-surface: #0f141f;
  --bg-surface-glass: rgba(15, 20, 31, 0.88);
  --bg-surface-hover: #1a2234;
  --bg-surface-secondary: #141c2c;
  --bg-sidebar: #0b0f19;
  --border-color: #1e293b;
  --border-hover: #334155;
  --border-focus: #60a5fa;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: #172554;
  --accent-border: #1e40af;
  --accent-glow: rgba(59, 130, 246, 0.35);

  --tag-bg: #1e293b;
  --tag-text: #38bdf8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-floating: 0 24px 38px -6px rgba(0, 0, 0, 0.7);
}

/* Sepia Paper Theme */
[data-theme="sepia"] {
  --bg-primary: #fcf4e4;
  --bg-surface: #f6ecdc;
  --bg-surface-glass: rgba(246, 236, 220, 0.9);
  --bg-surface-hover: #ece0cd;
  --bg-surface-secondary: #ede3d1;
  --bg-sidebar: #f8efe0;
  --border-color: #dfd2bc;
  --border-hover: #cca882;
  --border-focus: #b45309;

  --text-primary: #2d241e;
  --text-secondary: #574c43;
  --text-muted: #8c7e72;

  --accent-color: #b45309;
  --accent-hover: #92400e;
  --accent-light: #fef3c7;
  --accent-border: #fde68a;
  --accent-glow: rgba(180, 83, 9, 0.25);

  --tag-bg: #fde68a;
  --tag-text: #78350f;
}

/* Dynamic Article Reader Typography System */
:root {
  --reader-font-family: var(--font-space);
  --reader-font-size: 18px;
  --reader-line-height: 1.85;
}

/* Force reader elements to instantly follow user font selection */
.article-card,
.article-headline,
.article-body,
.article-body p,
.article-p,
.article-h2,
.article-h3,
.article-quote,
.inline-translated-box,
.inline-translated-box p,
.dual-container,
.dual-col-left,
.dual-col-right,
.dual-paragraph-match,
.dual-paragraph-match p {
  font-family: var(--reader-font-family) !important;
}

.article-body,
.article-body p,
.article-p,
.article-quote,
.inline-translated-box p,
.dual-paragraph-match p {
  font-size: var(--reader-font-size) !important;
  line-height: var(--reader-line-height) !important;
}

/* Ensure mobile & touch text selection is fully enabled */
.reader-section,
.article-section,
.article-card,
.article-body,
.article-body *,
.article-p,
.article-h2,
.article-h3,
.article-quote,
.dual-container,
.dual-paragraph-match p {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

::selection {
  background: rgba(59, 130, 246, 0.3);
  color: inherit;
}

::-moz-selection {
  background: rgba(59, 130, 246, 0.3);
  color: inherit;
}

/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-space);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--brand-gradient);
  z-index: 1000;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.1s ease-out;
}

/* Header & Glassmorphism */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* Brand SVG Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-logo-svg-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px var(--accent-glow));
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-svg-wrapper {
  transform: scale(1.05) rotate(-3deg);
}

.brand-svg-img {
  width: 100%;
  height: 100%;
  display: block;
}

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

.brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  line-height: 1.1;
}

.accent-text {
  color: var(--accent-color);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

/* URL Input Bar */
.header-center {
  flex: 1;
  max-width: 720px;
}

.url-input-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
  transition: all var(--transition-fast);
}

.url-input-container:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: var(--bg-surface);
}

.url-icon {
  color: var(--text-muted);
  margin-right: 8px;
  font-size: 13px;
}

.url-input-container input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  min-width: 0;
}

.input-clear-btn, .input-paste-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.input-clear-btn:hover, .input-paste-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.fetch-btn {
  background: var(--brand-gradient);
  color: var(--text-on-accent);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.fetch-btn:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
}

.fetch-btn:active {
  transform: scale(0.98);
}

.fetch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 10px;
  transition: border-color var(--transition-fast);
}

.select-container:hover {
  border-color: var(--border-hover);
}

.select-icon {
  color: var(--accent-color);
  margin-right: 6px;
  font-size: 13px;
}

.select-container select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 4px 8px 0;
  outline: none;
  cursor: pointer;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.header-btn.toggle-btn.active {
  background: var(--accent-light);
  color: var(--accent-color);
  border-color: var(--accent-border);
}

.icon-only-btn {
  padding: 8px 10px;
}

.vocab-btn {
  position: relative;
}

.vocab-badge {
  background: var(--accent-color);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 2px;
}

/* Pulse Dot for Mobile Sidebar */
.sidebar-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-color);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Dropdown Menus */
.dropdown-wrapper {
  position: relative;
}

.dropdown-arrow {
  font-size: 10px;
  opacity: 0.6;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  z-index: 200;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-header {
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dropdown-item i {
  color: var(--accent-color);
  font-size: 15px;
  width: 18px;
  text-align: center;
}

.dropdown-item small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.dropdown-item:hover {
  background: var(--bg-surface-hover);
}

/* Settings Popover Panel */
.settings-panel {
  min-width: 290px;
  padding: 16px;
}

.settings-group {
  margin-bottom: 14px;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.theme-buttons, .font-buttons, .spacing-buttons {
  display: flex;
  gap: 6px;
}

.theme-opt, .font-opt, .spacing-opt {
  flex: 1;
  padding: 7px 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-opt.active, .font-opt.active, .spacing-opt.active {
  background: var(--accent-light);
  color: var(--accent-color);
  border-color: var(--accent-border);
}

.font-size-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.size-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
  font-family: inherit;
}

#fontSizeDisplay {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Main Container Layout */
.main-container {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  position: relative;
}

/* Left Pane: Article Reader Section */
.reader-section {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 40px 52px;
  background-color: var(--bg-surface);
  transition: all var(--transition-normal);
  position: relative;
  -webkit-user-select: text;
  user-select: text;
}

/* Welcome Card */
.welcome-card {
  max-width: 860px;
  margin: 20px auto;
  user-select: none;
}

.welcome-hero {
  text-align: center;
  padding: 44px 24px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-logo-badge {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 12px 24px var(--accent-glow));
  transition: transform 0.3s ease;
}

.welcome-hero:hover .welcome-logo-badge {
  transform: scale(1.06) rotate(-2deg);
}

.welcome-svg-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.welcome-hero h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.9px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.welcome-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto 24px;
}

.welcome-quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.quick-pill-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.pill-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--accent-glow);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-item {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-fast);
}

.feature-item:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 14px;
}

.feature-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.feature-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Loading & Error States */
.reader-loading, .reader-error {
  max-width: 580px;
  margin: 80px auto;
  text-align: center;
  padding: 44px 28px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.loading-subtext {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.error-icon {
  font-size: 44px;
  color: var(--danger-color);
  margin-bottom: 16px;
}

.reader-error h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.reader-error p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Article Card Styles */
.article-card {
  max-width: 860px;
  margin: 0 auto 60px;
  animation: fadeIn 0.3s ease-out;
}

.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 22px;
}

.article-source-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.source-badge {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.2px;
}

.meta-item {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.article-headline {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.9px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.author-info {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.meta-sep {
  color: var(--text-muted);
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

.action-btn.primary {
  background: var(--accent-light);
  color: var(--accent-color);
  border-color: var(--accent-border);
}

.action-btn.primary:hover {
  background: var(--accent-color);
  color: white;
}

/* Audio Playing Waves Animation */
.audio-waves {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
  margin-left: 4px;
}

.audio-waves span {
  display: block;
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  animation: audioWave 1s ease-in-out infinite;
}

.audio-waves span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.audio-waves span:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.audio-waves span:nth-child(3) { height: 8px; animation-delay: 0.2s; }

@keyframes audioWave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* Translation Progress Banner */
.translation-progress-banner {
  margin-top: 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  animation: fadeIn 0.2s ease-out;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
}

/* Article Hero Image */
.article-hero-figure {
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-hero-figure img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Article Body Typography */
.article-body {
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  color: var(--text-primary);
}

.article-block-wrapper {
  position: relative;
  margin-bottom: 22px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.article-block-wrapper:hover .block-actions {
  opacity: 1;
  pointer-events: auto;
}

.article-p {
  color: var(--text-primary);
  margin-bottom: 0;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.article-block-wrapper.active-paragraph {
  background: var(--accent-light);
}

.article-h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text-primary);
  letter-spacing: -0.6px;
}

.article-h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.article-quote {
  border-left: 4px solid var(--accent-color);
  padding: 10px 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-secondary);
  background: var(--bg-surface-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Inline Block Actions Hover Tool */
.block-actions {
  position: absolute;
  right: 8px;
  top: -14px;
  opacity: 0;
  pointer-events: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 6px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: opacity var(--transition-fast);
}

.block-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.block-action-btn:hover {
  background: var(--accent-light);
  color: var(--accent-color);
}

/* Inline Translated Box */
.inline-translated-box {
  margin-top: 8px;
  padding: 12px 18px;
  background-color: var(--bg-surface-secondary);
  border-left: 3px solid var(--accent-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
  font-size: 0.95em;
  line-height: var(--reader-line-height);
  animation: slideDown 0.2s ease-out;
}

.inline-translated-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 4px;
}

/* Side-by-Side Dual View */
body.dual-view-active .main-container {
  overflow: hidden;
}

body.dual-view-active .reader-section {
  flex: 1.3;
  border-right: 1px solid var(--border-color);
}

.dual-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.dual-col-left, .dual-col-right {
  display: flex;
  flex-direction: column;
}

.dual-col-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.dual-paragraph-match {
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  transition: background 0.15s ease;
}

.dual-paragraph-match:hover, .dual-paragraph-match.highlighted {
  background: var(--accent-light);
}

/* Right Pane: Intelligence Sidebar */
.sidebar-section {
  width: 440px;
  height: 100%;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  padding: 24px 20px;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.02);
  transition: width var(--transition-normal), transform var(--transition-normal);
  z-index: 90;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-title i {
  color: var(--accent-color);
}

.sidebar-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-lang-container {
  padding: 3px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
}

.sidebar-lang-container select {
  max-width: 160px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.settings-lang-container {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.settings-lang-container select {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.close-sidebar-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* Sidebar Cards */
.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.sidebar-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}

.card-title i {
  color: var(--accent-color);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  color: var(--accent-color);
  background: var(--accent-light);
}

.selected-text-box, .translation-text-box {
  min-height: 48px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
}

.translation-text-box {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-color);
}

.placeholder-tip, .placeholder-muted {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Dictionary Card */
.phonetic-badge {
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
}

.definitions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.def-item {
  font-size: 13px;
  line-height: 1.5;
}

.def-pos {
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  font-size: 10px;
  background: var(--accent-light);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.def-example {
  display: block;
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
  margin-top: 2px;
}

.tags-section {
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.tags-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.synonym-chip, .antonym-chip {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.synonym-chip:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-1px);
}

.antonym-chip {
  background: #fee2e2;
  color: #b91c1c;
}

.antonym-chip:hover {
  background: #b91c1c;
  color: white;
}

/* Tips Card */
.tips-card {
  background: var(--bg-surface-secondary);
  border-style: dashed;
}

.tips-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tips-list {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Floating Tooltip Bubble - Fixed Viewport Positioning for Mobile & Desktop */
.floating-tooltip {
  position: fixed !important;
  z-index: 9999 !important;
  background: var(--text-primary);
  color: var(--bg-surface);
  border-radius: var(--radius-full);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: popIn 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  touch-action: manipulation;
  pointer-events: auto;
}

.floating-tooltip button {
  background: none;
  border: none;
  color: var(--bg-surface);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.floating-tooltip button:hover,
.floating-tooltip button:active {
  background: rgba(255, 255, 255, 0.22);
}

/* Modals & Overlays */
.modal-overlay, .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-floating);
  overflow: hidden;
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header, .drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title, .drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

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

.modal-body {
  padding: 20px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-surface-secondary);
}

/* Buttons */
.btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  border: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 2px 6px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

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

.btn-danger-outline {
  background: transparent;
  border: 1px solid #fca5a5;
  color: #ef4444;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* Vocabulary Bank Drawer */
.drawer-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-floating);
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface-secondary);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper i {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.vocab-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vocab-item-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all var(--transition-fast);
}

.vocab-item-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.vocab-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.vocab-word-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.vocab-item-actions {
  display: flex;
  gap: 6px;
}

.vocab-item-trans {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.vocab-item-def {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.vocab-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.vocab-empty i {
  font-size: 38px;
  margin-bottom: 12px;
}

/* Flashcard Study Mode */
.flashcard-section {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flashcard-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.flashcard-card {
  width: 100%;
  height: 220px;
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 20px;
}

.flashcard-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;
}

.flashcard-card.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.flashcard-front {
  background: var(--bg-surface);
}

.flashcard-back {
  background: var(--accent-light);
  transform: rotateY(180deg);
}

.card-prompt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-word {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.card-phonetic {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: monospace;
}

.card-translation {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.card-definition {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.flashcard-nav {
  display: flex;
  gap: 12px;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-bottom-height);
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 700;
  padding-bottom: env(safe-area-inset-bottom);
}

.mob-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.mob-nav-btn i {
  font-size: 17px;
}

.mob-nav-btn.active {
  color: var(--accent-color);
}

.mob-badge-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-color);
}

.mob-badge-count {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--accent-color);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: var(--radius-full);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease-out;
}

.toast.toast-success i { color: #34d399; }
.toast.toast-error i { color: #f87171; }

/* Responsive Visibility Helpers */
.show-mobile { display: none !important; }
.show-mobile-tablet { display: none !important; }

/* Keyframe Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   RESPONSIVENESS: Tablets (768px - 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .app-header {
    padding: 0 16px;
  }

  .header-center {
    max-width: 480px;
  }

  .sidebar-section {
    width: 360px;
    padding: 20px 16px;
  }

  .reader-section {
    padding: 32px 28px;
  }

  .article-headline {
    font-size: 30px;
  }

  .hide-tablet {
    display: none !important;
  }

  .show-mobile-tablet {
    display: inline-flex !important;
  }
}

/* ==========================================================================
   RESPONSIVENESS: Mobile Devices (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    height: 100vh;
    overflow: hidden;
  }

  .app-header {
    padding: 0 12px;
    height: 60px;
    gap: 8px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-logo-svg-wrapper {
    width: 32px;
    height: 32px;
  }

  .brand-title {
    font-size: 17px;
  }

  .header-center {
    max-width: none;
    flex: 1;
  }

  .url-input-container {
    padding: 2px 4px 2px 10px;
  }

  .url-icon {
    margin-right: 4px;
    font-size: 12px;
  }

  .url-input-container input {
    font-size: 13px;
  }

  .fetch-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .fetch-btn .btn-text {
    display: none;
  }

  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: inline !important;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .header-tool.language-selector-wrapper {
    display: flex;
    align-items: center;
  }

  .select-container {
    padding: 0 4px;
    max-width: 95px;
  }

  .select-container select {
    font-size: 11px;
    padding: 5px 2px;
    max-width: 70px;
  }

  .sidebar-lang-container {
    padding: 4px 8px;
    max-width: 180px;
  }

  .sidebar-lang-container select {
    max-width: 145px;
    font-size: 13px;
  }


  /* Main Container Layout on Mobile */
  .main-container {
    height: calc(100vh - 60px - var(--mobile-bottom-height));
    position: relative;
    overflow: hidden;
  }

  .reader-section {
    width: 100%;
    padding: 20px 16px 40px;
  }

  /* Sidebar as Mobile Full-Screen Assistant Drawer */
  .sidebar-section {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: var(--mobile-bottom-height);
    width: 100%;
    background-color: var(--bg-surface);
    z-index: 600;
    transform: translateX(100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 20px 16px;
  }

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

  /* Mobile Bottom Navigation Bar Visible */
  .mobile-bottom-bar {
    display: flex;
  }

  /* Article Typography on Mobile */
  .article-headline {
    font-size: 26px;
    letter-spacing: -0.5px;
  }

  .welcome-hero {
    padding: 28px 16px;
  }

  .welcome-hero h1 {
    font-size: 24px;
  }

  .welcome-lead {
    font-size: 14px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .article-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
  }

  .toast-container {
    bottom: calc(var(--mobile-bottom-height) + 16px);
    right: 16px;
    left: 16px;
  }

  .drawer-container {
    width: 100%;
  }

  /* Floating Tooltip Touch Friendly */
  .floating-tooltip {
    padding: 6px 8px;
  }

  .floating-tooltip button {
    padding: 8px 14px;
    font-size: 13px;
  }
}
