/* ═══════════════════════════════════════════
   Murmur & Dew — No-scroll Mobile Layout
   ═══════════════════════════════════════════ */

:root {
  --ivory: #FBF7F0;
  --warm-white: #FEFAF3;
  --cream: #F5EDE0;
  --latte: #E8D5C0;
  --walnut: #5C3D2E;
  --light-walnut: #8B6F5E;
  --amber: #C4823E;
  --warm-shadow: rgba(92, 61, 46, 0.08);
  --text-primary: #4A3728;
  --text-secondary: #8B7355;
  --text-muted: #B8A89A;
  --border-soft: rgba(139, 111, 94, 0.15);
  --safe-top: env(safe-area-inset-top, 47pt);
  --safe-bottom: env(safe-area-inset-bottom, 34pt);
  --nav-bar-h: 44pt;
  --tab-bar-h: 49pt;
  --siamese-blue: #4A7FB5;

  /* Type scale */
  --text-xs: 0.75rem;     /* 12px — captions, toast */
  --text-sm: 0.812rem;    /* 13px — secondary btns, lock toggle */
  --text-base: 0.9rem;    /* 14.4px — body, inputs */
  --text-md: 0.938rem;    /* 15px — primary CTA */
  --text-lg: 1.2rem;      /* 19.2px — panel headings */
  --text-xl: 1.5rem;      /* 24px — logo */
  --leading-snug: 1.4;
  --leading-normal: 1.7;
  --leading-relaxed: 1.9;
}

/* ═══ Viewport Lock — No Scroll ═══ */
html, body {
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--tab-bar-h) + var(--safe-bottom));
}

/* ═══ Main container — fills from top to nav ═══ */
.container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 16px 0;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ═══ Navigation Bar — 44pt (iOS HIG) ═══ */
.header {
  height: var(--nav-bar-h);
  min-height: var(--nav-bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 0;
}
.logo {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--walnut);
  letter-spacing: 0.04em;
  font-style: italic;
  line-height: var(--leading-snug);
}
.logo-sub {
  display: block;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--text-muted);
  font-style: normal;
  letter-spacing: 0.08em;
}

/* ═══ Steps (compact) ═══ */
.steps {
  display: flex; gap: 6px; align-items: center;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.step-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--latte);
  transition: all 0.5s ease;
}
.step-dot.active {
  width: 22px; border-radius: 3px; background: var(--amber);
}
.step-dot.done { background: var(--amber); }
.step-line {
  flex: 1; height: 1px;
  background: var(--border-soft); max-width: 32px;
}

/* ═══ Section title (compact) ═══ */
.section-title {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: var(--text-xl); font-weight: 500;
  line-height: var(--leading-snug);
  color: var(--walnut);
  flex-shrink: 0;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}
.section-desc {
  font-size: var(--text-sm); color: var(--text-secondary);
  font-weight: 300;
  line-height: var(--leading-snug);
  flex-shrink: 0;
  margin-bottom: 14px;
}

/* ═══ Content area — flexible, scroll if overflow ═══ */
.content-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ═══ Page action bar ═══ */
.page-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
}

/* ═══ Bottom Tab Bar — 83pt (49pt content + 34pt safe area) ═══ */
.bottom-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tab-bar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(254, 250, 243, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  box-shadow: 0 -4px 24px rgba(92, 61, 46, 0.04);
}

.nav-item {
  flex: 1; max-width: 120px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  padding: 6px 6px;
  text-decoration: none; cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.nav-item .nav-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.35s ease;
}
.nav-item .nav-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-xs); font-weight: 400;
  line-height: var(--leading-snug);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: all 0.35s ease;
}
.nav-item.active .nav-icon { color: var(--siamese-blue); }
.nav-item.active .nav-label { color: var(--walnut); font-weight: 500; }
.nav-item.active::before {
  content: '';
  position: absolute; top: 0;
  left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  border-radius: 1px; background: var(--siamese-blue);
}
.nav-item:active { transform: scale(0.95); }

/* ═══ Buttons (shared) ═══ */
.btn-back, .btn-next {
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.35s ease;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-back {
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.4);
  color: var(--text-secondary);
}
.btn-next {
  background: var(--walnut);
  color: var(--warm-white);
  border: none;
  font-weight: 500;
}
.btn-back:active, .btn-next:active { transform: scale(0.97); }

/* ═══ Settings Button ═══ */
.settings-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border-soft); border-radius: 50%;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s ease;
  color: var(--light-walnut);
  flex-shrink: 0;
}
.settings-btn:active { transform: scale(0.92); }
.settings-btn svg { width: 17px; height: 17px; }

/* ═══ Settings Panel ═══ */
.settings-overlay {
  position: fixed; inset: 0;
  background: rgba(74, 55, 40, 0.2);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.settings-overlay.open { opacity: 1; pointer-events: auto; }
.settings-panel {
  position: fixed; top: 0; right: 0;
  width: 100vw; max-width: 380px; height: 100dvh;
  background: #ffffff;
  z-index: 101;
  padding: 40px 28px;
  box-sizing: border-box;
  box-shadow: -8px 0 40px rgba(31, 41, 55, 0.08);
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  overflow-y: auto;
  transform: translateX(100%);
}
.settings-panel.open { transform: translateX(0); }
.settings-panel h3 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: var(--text-lg); font-weight: 500; color: var(--walnut);
  line-height: var(--leading-snug);
  margin-bottom: 28px; letter-spacing: 0.03em;
}
.settings-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--text-muted);
  padding: 8px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: var(--text-xs); font-weight: 500;
  line-height: var(--leading-snug);
  color: var(--text-secondary); margin-bottom: 5px;
  letter-spacing: 0.04em;
}
.form-group input, .form-group select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: var(--text-base); line-height: var(--leading-normal);
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B8A89A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--latte);
  box-shadow: 0 0 0 3px rgba(232, 213, 192, 0.2);
}
.settings-save {
  width: 100%; padding: 11px;
  background: var(--walnut); color: var(--warm-white);
  border: none;
  border-radius: 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-base); font-weight: 500;
  line-height: var(--leading-snug);
  cursor: pointer; letter-spacing: 0.04em;
  transition: all 0.3s ease;
}

/* Provider preset buttons */
.provider-presets {
  display: flex;
  gap: 6px;
}
.preset-btn {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 0.03em;
}
.preset-btn.active {
  border-color: var(--amber);
  background: rgba(196, 130, 62, 0.1);
  color: var(--amber);
  font-weight: 500;
}
.preset-btn:active { transform: scale(0.96); }

/* Form hint text */
.form-hint {
  display: block;
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--amber);
  line-height: var(--leading-snug);
}

/* ═══ Toast ═══ */
.toast {
  position: fixed;
  bottom: calc(var(--tab-bar-h) + var(--safe-bottom) + 12px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--walnut); color: var(--warm-white);
  padding: 10px 24px; border-radius: 20px;
  font-size: var(--text-xs); font-family: 'Noto Sans SC', sans-serif;
  line-height: var(--leading-snug);
  opacity: 0; transition: all 0.35s ease;
  z-index: 200; pointer-events: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══ Bloom (shared) ═══ */
.bloom-top {
  position: fixed; top: -80px; right: -40px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(228, 200, 160, 0.14) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.bloom-bottom {
  position: fixed; bottom: -60px; left: -30px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(156, 168, 139, 0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.bloom-center {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(228, 200, 160, 0.10) 0%, rgba(196, 130, 62, 0.03) 30%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ═══ Film grain ═══ */
body::after {
  content: '';
  position: fixed; inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9999;
}

/* ═══ Keyframes ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   Page-specific: Affirmation Generation
   ═══════════════════════════════════════════ */

.textarea-wrap textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: all 0.35s ease;
  box-sizing: border-box;
}
.textarea-wrap textarea:focus {
  border-color: var(--latte);
  box-shadow: 0 4px 16px rgba(92, 61, 46, 0.05), 0 0 0 3px rgba(232, 213, 192, 0.2);
  background: rgba(255,255,255,0.7);
}
.textarea-wrap textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}
.char-count {
  text-align: right;
  font-size: 0.688rem;
  line-height: var(--leading-snug);
  color: var(--text-muted); margin-top: 2px;
}

.section-label {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: var(--text-base); font-weight: 500;
  line-height: var(--leading-snug);
  color: var(--walnut);
  flex-shrink: 0;
  margin-bottom: 6px;
}

/* Requirement & Affirmation sections */
.requirement-section,
.affirmation-section {
  flex-shrink: 0;
}

/* Length selector */
.length-section {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.length-chip {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.45);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: var(--leading-snug);
  -webkit-tap-highlight-color: transparent;
}
.length-chip.active {
  border-color: var(--amber);
  background: rgba(196, 130, 62, 0.08);
  color: var(--amber);
  font-weight: 500;
}
.length-chip:active { transform: scale(0.96); }

/* Generate button wrap */
.generate-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  flex-shrink: 0;
}

.generate-btn {
  padding: 11px 18px;
  background: radial-gradient(circle at 40% 35%, rgba(92,61,46,0.10) 0%, rgba(92,61,46,0.04) 50%, transparent 70%);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--walnut);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-md); font-weight: 500;
  line-height: var(--leading-snug);
  cursor: pointer; letter-spacing: 0.03em;
  transition: all 0.35s ease;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
}
.generate-btn:active { transform: scale(0.97); }
.generate-btn:disabled { opacity: 0.4; }
.generate-btn.loading .btn-dot { animation: dotPulse 1.2s ease infinite; }
.btn-dot { display: none; width: 5px; height: 5px; border-radius: 50%; background: var(--walnut); }
.generate-btn.loading .btn-dot { display: inline-block; }
.generate-btn.loading .btn-dot:nth-child(2) { animation-delay: 0.15s; }
.generate-btn.loading .btn-dot:nth-child(3) { animation-delay: 0.3s; }

/* Lock toggle section */
.lock-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 2px;
  gap: 6px;
}

.lock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--text-secondary);
  transition: all 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}
.lock-toggle:active { transform: scale(0.96); }

.lock-toggle .lock-icon-unlocked { display: block; }
.lock-toggle .lock-icon-locked { display: none; }

.lock-toggle.locked {
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--warm-white);
}
.lock-toggle.locked .lock-icon-unlocked { display: none; }
.lock-toggle.locked .lock-icon-locked { display: block; }

.lock-hint {
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════
   Page-specific: Voice Settings
   ═══════════════════════════════════════════ */

.affirmation-preview {
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}
.affirmation-preview h4 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: 0.72rem; font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.affirmation-preview p {
  font-size: 0.85rem; line-height: 1.6;
  color: var(--text-primary); font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.affirmation-preview .edit-link {
  display: inline-block; margin-top: 6px;
  font-size: 0.72rem; color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-soft);
}

.slider-group { flex-shrink: 0; }
.slider-group .slider-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.slider-group label {
  font-size: 0.78rem; color: var(--text-secondary);
}
.slider-group .slider-val {
  font-size: 0.7rem; color: var(--walnut); font-weight: 500;
  background: rgba(255,255,255,0.5);
  padding: 1px 8px; border-radius: 6px;
  border: 1px solid var(--border-soft);
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--latte), var(--walnut));
  outline: none;
  margin: 6px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--warm-white);
  border: 2px solid var(--walnut);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(92, 61, 46, 0.1);
}

.btn-preview {
  padding: 10px 24px;
  border: 1px solid var(--walnut); border-radius: 10px;
  background: transparent;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.88rem; font-weight: 500;
  color: var(--walnut); cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.35s ease;
  display: inline-flex; align-items: center; gap: 6px;
  width: 100%; justify-content: center;
}
.btn-preview.playing {
  background: var(--walnut); color: var(--warm-white);
}

.no-voices-note {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(196, 130, 62, 0.06);
  border: 1px solid rgba(196, 130, 62, 0.12);
  font-size: 0.78rem; color: var(--light-walnut);
  display: none;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   Page-specific: Playback
   ═══════════════════════════════════════════ */

.affirmation-card {
  text-align: center;
  flex-shrink: 0;
}
.affirmation-card .mood-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.7rem; font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.affirmation-card .affirmation-body {
  font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 500;
  line-height: 1.9;
  color: var(--walnut); font-style: italic;
}

.player {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 4px 32px var(--warm-shadow);
  flex-shrink: 0;
}

/* Wave indicator */
.playing-indicator {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  height: 16px; margin-bottom: 6px;
}
.wave-bar {
  width: 3px; border-radius: 2px;
  background: var(--amber);
  height: 4px;
  transition: height 0.15s ease;
}
.wave-bar.active { animation: wave 0.8s ease-in-out infinite; }
.wave-bar:nth-child(1).active { animation-delay: 0s; }
.wave-bar:nth-child(2).active { animation-delay: 0.15s; }
.wave-bar:nth-child(3).active { animation-delay: 0.3s; }
.wave-bar:nth-child(4).active { animation-delay: 0.15s; }
.wave-bar:nth-child(5).active { animation-delay: 0s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

/* Progress */
.progress-wrap { margin-bottom: 16px; flex-shrink: 0; }
.progress-bar-bg {
  width: 100%; height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  cursor: pointer; position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--latte), var(--amber));
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}
.time-info {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 0.7rem; color: var(--text-muted);
}

/* Controls */
.controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 16px;
  flex-shrink: 0;
}
.btn-control {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.35s ease;
  color: var(--walnut);
}
.btn-control:active { transform: scale(0.92); }
.btn-control:disabled { opacity: 0.3; }
.btn-control svg { width: 16px; height: 16px; }

.btn-play {
  width: 60px; height: 60px;
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--warm-white);
  box-shadow: 0 6px 24px rgba(92, 61, 46, 0.14);
}
.btn-play svg { width: 24px; height: 24px; }

/* Voice info */
.voice-info {
  text-align: center;
  font-size: 0.7rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}
.voice-info .dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════
   Page-specific: Voice selection & audio generation
   ═══════════════════════════════════════════ */

.voice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.voice-chip {
  padding: 12px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.voice-chip:active { transform: scale(0.96); }
.voice-chip.selected {
  border-color: var(--amber);
  background: rgba(196, 130, 62, 0.08);
}
.voice-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--walnut);
}
.voice-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: 'Noto Sans SC', sans-serif;
}

/* Speed selector */
.speed-ctrl {
  display: flex;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 8px;
}
.speed-chip {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: rgba(255,255,255,0.4);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.speed-chip.active {
  background: var(--walnut);
  color: var(--warm-white);
  font-weight: 500;
}
.speed-chip:active { background: var(--light-walnut); color: var(--warm-white); }

/* Mode toggle (voiced ↔ silent) */
.mode-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 8px 0;
}
.mode-label-left,
.mode-label-right {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.mode-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.mode-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.mode-slider {
  position: absolute;
  inset: 0;
  background: var(--latte);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.35s ease;
}
.mode-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.35s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.mode-toggle input:checked + .mode-slider {
  background: var(--walnut);
}
.mode-toggle input:checked + .mode-slider::before {
  transform: translateX(24px);
}

/* Track verification table */
.track-table-section {
  flex-shrink: 0;
  margin-bottom: 8px;
}
.track-table {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
}
.track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--text-sm);
  font-family: 'Noto Sans SC', sans-serif;
}
.track-row:last-child { border-bottom: none; }
.track-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}
.track-status {
  white-space: nowrap;
  font-size: var(--text-xs);
}
.track-status.status-ok { color: #6B8E6B; }
.track-status.status-incomplete { color: #C4823E; }
.track-status.status-underfill { color: #C46B5E; }
.track-dur {
  color: var(--text-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}
.track-wave {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}
.track-wave .wave-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--latte);
  height: 6px;
}
.track-wave .wave-bar.active {
  height: 14px;
  background: var(--amber);
}

.track-overall {
  text-align: center;
  padding: 10px 0 4px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.track-overall.status-ok { color: #5A7A5A; }
.track-overall.status-incomplete { color: var(--amber); }
.track-overall.status-underfill { color: #C46B5E; }

/* Download button */
.download-section {
  flex-shrink: 0;
  padding: 4px 0;
}
.btn-download {
  width: 100%;
  padding: 12px;
  background: var(--walnut);
  color: var(--warm-white);
  border: none;
  border-radius: 10px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.btn-download:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════
   Desktop adjustments
   ═══════════════════════════════════════════ */
@media (min-width: 768px) {
  .container { padding: 24px 40px 0; }
  .logo { font-size: 2rem; }
  .section-title { font-size: 2rem; }
  .section-desc { font-size: var(--text-base); }
  .textarea-wrap textarea { min-height: 140px; }
  .affirmation-card .affirmation-body { font-size: 1.35rem; }
}
