/* 每日對話練習 - 活潑童趣且親切的主題樣式表 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
  --primary: #f59e0b;        /* 陽光暖黃 */
  --primary-hover: #d97706;
  --primary-light: #fef3c7;
  --secondary: #10b981;      /* 活潑薄荷綠 */
  --secondary-light: #d1fae5;
  --accent-blue: #0ea5e9;    /* 晴空藍 */
  --accent-pink: #f43f5e;    /* 活力粉 */
  --accent-purple: #8b5cf6;  /* 奇幻紫 */
  --bg-gradient: linear-gradient(135deg, #fffbeb 0%, #f0fdf4 50%, #f0f9ff 100%);
  --card-bg: rgba(255, 255, 255, 0.94);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bubble-left-bg: #f8fafc;
  --bubble-right-bg: #eff6ff;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(245, 158, 11, 0.12);
  --shadow-hover: 0 12px 32px rgba(245, 158, 11, 0.22);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Fredoka', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 130px; /* 預留底部播放器安全高度 */
  line-height: 1.6;
}

/* 頂部導覽列 */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #fef3c7;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  font-size: 2.2rem;
  background: var(--primary-light);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
  animation: bounceSlow 3s infinite ease-in-out;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.brand-title h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #b45309;
  letter-spacing: -0.5px;
}

.brand-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-btn {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.tool-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.tool-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 主內容區容器 */
.main-wrapper {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

/* 程度分類選擇器 */
.level-bar {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  border: 2px solid #fed7aa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.level-bar-label {
  font-weight: 700;
  color: #9a3412;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.level-pill {
  border: none;
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-pill:hover {
  transform: scale(1.04);
}

.level-pill.active[data-level="all"] {
  background: #334155;
  color: #fff;
}

.level-pill.active[data-level="elementary_basic"] {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.level-pill.active[data-level="elementary_adv"] {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.level-pill.active[data-level="junior"] {
  background: #d97706;
  color: #fff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.level-pill.active[data-level="senior"] {
  background: #e11d48;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

/* 篇章下拉選單專屬樣式 (嚴格限制最大寬度，杜絕手機視窗被撐爆) */
.dialogue-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.dialogue-select-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #78350f;
  white-space: nowrap;
  flex-shrink: 0;
}

.dialogue-select-dropdown {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #fed7aa;
  background: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1e293b;
  outline: none;
  cursor: pointer;
  max-width: 380px;
  min-width: 0;
  width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.2s;
}

.dialogue-select-dropdown:hover,
.dialogue-select-dropdown:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* 主卡片主體 */
.dialogue-main-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 3px solid #fde68a;
  overflow: hidden;
  position: relative;
}

/* 對話頂部看板 */
.dialogue-hero {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  padding: 24px;
  border-bottom: 3px solid #fde68a;
  position: relative;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* 日期導覽器 (前一天 / 今日 / 後一天) */
.date-nav-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  border-radius: 999px;
  border: 2px solid #fcd34d;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
  gap: 4px;
}

.nav-day-btn {
  background: transparent;
  border: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: #78350f;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-day-btn:hover {
  background: #fef3c7;
  color: #b45309;
  transform: translateY(-1px);
}

.today-badge-btn {
  background: #fff;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.today-pill {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.5px;
  animation: pulseToday 2s infinite ease-in-out;
}

@keyframes pulseToday {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.badge-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-date {
  background: rgba(255, 255, 255, 0.8);
  color: #78350f;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.topic-title-en {
  font-size: 1.85rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 4px;
  line-height: 1.25;
}

.topic-title-zh {
  font-size: 1.15rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}

.situation-box {
  background: rgba(255, 255, 255, 0.75);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: #713f12;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 對話區域 */
.dialogue-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 句子氣泡卡片 */
.sentence-bubble {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bubble-left-bg);
  border: 2px solid #e2e8f0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  scroll-margin-top: 110px;    /* 避開頂部導覽列 */
  scroll-margin-bottom: 200px; /* 避開底部懸浮播放器 */
}

.sentence-bubble:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.12);
}

.sentence-bubble.active-reading {
  background: #fefce8;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3), 0 8px 20px rgba(245, 158, 11, 0.18);
  transform: scale(1.01);
}

.speaker-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 54px;
}

.speaker-avatar {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sentence-bubble.active-reading .speaker-avatar {
  border-color: #f59e0b;
  animation: pulseAvatar 1.5s infinite;
}

@keyframes pulseAvatar {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.speaker-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.sentence-content {
  flex: 1;
}

.sentence-en {
  font-size: 1.28rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.sentence-zh {
  font-size: 1rem;
  color: #475569;
  line-height: 1.4;
  transition: opacity 0.2s ease;
}

.sentence-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-speak-sentence {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0284c7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-speak-sentence:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

/* 高中/大字體模式 */
body.large-font .sentence-en {
  font-size: 1.6rem;
}
body.large-font .sentence-zh {
  font-size: 1.25rem;
}

/* 生詞關鍵字點擊與懸停效果 */
.inline-keyword {
  border-bottom: 2.5px dashed #f59e0b;
  color: #b45309;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.inline-keyword:hover {
  background: #fef3c7;
  color: #d97706;
  border-bottom-style: solid;
}

/* 偷看中文按鈕控制 */
.btn-peek-zh {
  display: none;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
  background: #ecfdf5 !important;
}

body.hide-zh .btn-peek-zh {
  display: inline-flex;
}

/* 隱藏中/英文模式控制與單句翻牌查看 */
body.hide-zh .sentence-zh {
  display: none;
}

body.hide-zh .sentence-zh.force-show {
  display: block !important;
  color: #059669;
  background: #f0fdf4;
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
  animation: fadeInZh 0.25s ease-out;
  border-left: 3px solid #10b981;
}

@keyframes fadeInZh {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

body.hide-en .sentence-en {
  display: none;
}

/* 單字卡片區 (Vocabulary Section) */
.extra-section {
  padding: 20px 24px;
  border-top: 2px dashed #fcd34d;
  background: #fffdf7;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.vocab-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s;
}

.vocab-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
}

.vocab-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.vocab-word {
  font-size: 1.2rem;
  font-weight: 700;
  color: #b45309;
}

.vocab-phonetic {
  font-size: 0.85rem;
  color: #64748b;
  font-family: Arial, sans-serif;
}

.vocab-speaker-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #f59e0b;
  padding: 2px;
}

.vocab-meaning {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.vocab-example {
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  margin-top: 4px;
  border-top: 1px dotted #e2e8f0;
  padding-top: 4px;
}

/* 今日金句與文化小撇步 */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tip-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  border: 1.5px solid #cbd5e1;
}

.tip-card.phrase-card {
  border-color: #86efac;
  background: #f0fdf4;
}

.tip-card.culture-card {
  border-color: #bae6fd;
  background: #f0f9ff;
}

/* 底部浮動播放器 (Sticky Audio Player) */
.fixed-player-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 1060px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 2.5px solid #f59e0b;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.16);
  padding: 10px 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 播放器頂部資訊列 (標題與收合按鈕) */
.player-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.player-left-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.current-playing-badge {
  background: var(--primary-light);
  color: #b45309;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.player-collapse-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.player-collapse-btn:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
}

/* 收合最小化狀態 (Minimized Mode) */
.fixed-player-bar.is-collapsed {
  padding: 6px 14px;
  gap: 4px;
  max-width: 500px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  border-color: #f59e0b;
}

.fixed-player-bar.is-collapsed .player-main-row {
  display: none !important;
}

.fixed-player-bar.is-collapsed .player-top-row {
  margin-bottom: 2px;
}

.fixed-player-bar.is-collapsed .current-playing-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
}

.fixed-player-bar.is-collapsed .progress-slider {
  height: 4px;
}

.player-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

/* 播放核心按鈕群 */
.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: #f1f5f9;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: #e2e8f0;
  transform: scale(1.08);
}

.control-btn.main-play {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #fff;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.control-btn.main-play:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.pulse-playing {
  animation: playPulse 2s infinite ease-in-out;
}

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

/* 速度切換群組 (Speed Selector) */
.speed-selector-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px 6px;
  border-radius: 9999px;
}

.speed-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
}

.speed-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.speed-btn:hover {
  color: #f59e0b;
}

.speed-btn.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

/* 音訊進度條 */
.player-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.time-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  min-width: 36px;
}

.time-text.right {
  text-align: right;
}

.progress-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  transition: background 0.1s;
}

.progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* 錄音對比專區 Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 24px;
  border: 3px solid #f59e0b;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  text-align: center;
}

.hidden {
  display: none !important;
}

/* 手機與平板響應式微調 (Responsive Mobile Optimizations) */
@media (max-width: 768px) {
  /* 頁面底端留白大幅縮小，杜絕大面積空白 */
  body {
    padding-bottom: 110px;
  }

  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .header-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
  }
  .tool-btn {
    padding: 5px 8px;
    font-size: 0.78rem;
    gap: 4px;
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
  .date-navigation-header {
    flex-direction: column;
    align-items: stretch;
  }
  .day-nav-group {
    width: 100%;
    justify-content: space-between;
  }
  .nav-day-btn {
    flex: 1;
    text-align: center;
  }

  /* 學習難度與篇章下拉選單手機自適應 (避免撐爆畫面) */
  .level-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }

  .level-bar-label {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 6px;
  }

  .level-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }

  .level-pill {
    padding: 6px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .dialogue-select-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .dialogue-select-dropdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1;
    font-size: 0.82rem;
    padding: 6px 8px;
  }

  /* 句子滾動安全間距 */
  .sentence-bubble {
    gap: 10px;
    padding: 12px;
    scroll-margin-top: 80px;
    scroll-margin-bottom: 120px;
  }
  .sentence-en {
    font-size: 1.15rem;
  }
  .topic-title-en {
    font-size: 1.45rem;
  }

  /* 手機專屬極致精巧播放器：高度縮小 60% 以上！ */
  .fixed-player-bar {
    bottom: 6px;
    width: calc(100% - 14px);
    max-width: 540px;
    padding: 6px 10px;
    border-radius: 16px;
    border-width: 1.5px;
    gap: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  }

  .player-top-row {
    gap: 6px;
  }

  .current-playing-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    max-width: 220px;
  }

  .player-collapse-btn {
    padding: 2px 7px;
    font-size: 0.72rem;
  }

  /* 橫向緊湊排列，絕不垂直堆疊！ */
  .player-main-row {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
  }

  .player-controls {
    gap: 6px;
  }

  .control-btn {
    width: 30px;
    height: 30px;
    font-size: 0.88rem;
  }

  .control-btn.main-play {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* 手機端隱藏「慢速/正常」中文後贅字，只留「0.75x」「1.0x」純數字 */
  .speed-selector-group {
    padding: 2px 4px;
    gap: 2px;
  }

  .speed-label,
  .speed-desc {
    display: none !important;
  }

  .speed-btn {
    padding: 2px 5px;
    font-size: 0.72rem;
  }

  /* 精巧進度條 */
  .player-progress-row {
    gap: 6px;
  }

  .time-text {
    font-size: 0.7rem;
    min-width: 28px;
  }

  .progress-slider {
    height: 4.5px;
  }

  .progress-slider::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
  }

  /* 收合狀態下極致輕盈（高度僅約 36px） */
  .fixed-player-bar.is-collapsed {
    padding: 4px 10px;
    border-radius: 999px;
    bottom: 6px;
    gap: 3px;
  }
}

/* 超小型手機 (寬度 <= 390px，如 iPhone SE, mini) */
@media (max-width: 390px) {
  .current-playing-badge {
    max-width: 170px;
    font-size: 0.68rem;
  }
  .control-btn {
    width: 27px;
    height: 27px;
    font-size: 0.8rem;
  }
  .control-btn.main-play {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .speed-btn {
    padding: 2px 4px;
    font-size: 0.68rem;
  }
}

