/* AwaazLab — Matte Charcoal Studio & Crisp Light Theme */

:root,
html[data-theme="dark"] {
  --bg: #141414;
  --surface: #1E1E1E;
  --surface-2: #262626;
  --surface-hover: #2C2C2C;
  --border: #2E2E2E;
  --border-strong: #3E3E3E;
  --text: #F5F5F5;
  --text-muted: #9E9E9E;
  --text-subtle: #737373;
  --btn-primary-bg: #EFEFEF;
  --btn-primary-text: #111111;
  --btn-primary-hover: #FFFFFF;
  --btn-secondary-bg: #252525;
  --btn-secondary-text: #F5F5F5;
  --btn-secondary-hover: #2F2F2F;
  --track-bg: #333333;
  --track-fill: #F5F5F5;
  --wave-idle: #383838;
  --wave-played: #F5F5F5;
  --ad-bg: #181818;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.35);
  --success-text: #86EFAC;
  --warn-text: #FCD34D;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.35);
  --error-text: #FCA5A5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F6F7F9;
  --surface-2: #ECEFF3;
  --surface-hover: #E5E8EE;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #111111;
  --text-muted: #52525B;
  --text-subtle: #71717A;
  --btn-primary-bg: #111111;
  --btn-primary-text: #FFFFFF;
  --btn-primary-hover: #27272A;
  --btn-secondary-bg: #FFFFFF;
  --btn-secondary-text: #111111;
  --btn-secondary-hover: #F3F4F6;
  --track-bg: #D4D4D8;
  --track-fill: #111111;
  --wave-idle: #D1D5DB;
  --wave-played: #111111;
  --ad-bg: #F6F7F9;
  --success-bg: rgba(22, 163, 74, 0.1);
  --success-border: rgba(22, 163, 74, 0.3);
  --success-text: #15803D;
  --warn-text: #B45309;
  --error-bg: rgba(220, 38, 38, 0.08);
  --error-border: rgba(220, 38, 38, 0.3);
  --error-text: #B91C1C;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.06);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Top Navigation Header (No Left Sidebar)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9998;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background-color: var(--surface);
}

.nav-link.active {
  color: var(--text);
  background-color: var(--surface);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background-color: var(--surface-2);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-sun {
  display: none;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: #0F1115;
  box-shadow: var(--shadow-md);
  padding: 12px 20px 18px;
}

[data-theme="light"] .mobile-drawer {
  background-color: #FFFFFF;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list .nav-link {
  width: 100%;
  padding: 10px 12px;
}

/* =========================================================
   Main Layout
   ========================================================= */
.page-main {
  flex: 1 0 auto;
  padding: 32px 0 64px;
}

/* =========================================================
   Hero Header
   ========================================================= */
.hero-header {
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.hero-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 760px;
}

/* =========================================================
   2-Column Split Studio Workspace (~68% / ~32%)
   ========================================================= */
.studio-card {
  display: grid;
  grid-template-columns: minmax(0, 68%) minmax(0, 32%);
  min-height: 430px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Left Column: Text Editor */
.editor-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px 0;
  flex-wrap: wrap;
}

.sample-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.pill-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background-color: var(--surface-2);
}

.pill-btn-clear {
  color: var(--text-subtle);
}

.editor-textarea-wrap {
  flex: 1 1 auto;
  display: flex;
  padding: 12px 18px 8px;
}

.editor-textarea {
  width: 100%;
  min-height: 330px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.editor-textarea::placeholder {
  color: var(--text-subtle);
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  flex-wrap: wrap;
}

.counter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.word-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.word-counter strong {
  color: var(--text);
  font-weight: 700;
}

.word-counter.near-limit strong {
  color: var(--warn-text);
}

.word-counter.at-limit strong {
  color: var(--error-text);
}

.editor-hint {
  font-size: 12px;
  color: var(--warn-text);
}

.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.btn-primary-pill:hover:not(:disabled) {
  background-color: var(--btn-primary-hover);
}

.btn-primary-pill:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.6;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Right Column: Controls Panel */
.controls-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px 20px;
  gap: 24px;
  min-width: 0;
}

.controls-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.speed-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

/* Voice Selector Row + Preview Button + Interactive Popover */
.voice-control-wrap {
  position: relative;
  z-index: 50;
}

.voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-select-box {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  text-align: left;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 48px;
  padding: 0 32px 0 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.voice-select-box:focus-visible,
.voice-select-box:hover,
.voice-select-box[aria-expanded="true"] {
  border-color: var(--border-strong);
  outline: none;
}

.voice-select-box[aria-expanded="true"],
.voice-select-box:focus-visible {
  box-shadow: 0 0 0 2px var(--border);
}

.voice-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 10px;
  background: radial-gradient(
    circle at 30% 28%,
    rgba(255, 255, 255, 0.72),
    var(--orb-color, #ec4899) 46%,
    var(--orb-color-2, #8b5cf6) 86%,
    rgba(0, 0, 0, 0.35)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.voice-row-orb {
  width: 28px;
  height: 28px;
  margin-right: 12px;
}

.voice-display {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.voice-display-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-display-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-muted);
  display: inline-flex;
  transition: transform 0.15s ease;
}

.preview-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.preview-play-btn:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-2);
}

.preview-play-btn.playing {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

/* Custom Voice Picker Popover */
.voice-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
  width: min(390px, calc(100vw - 32px));
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  animation: popoverFadeIn 0.14s ease-out;
}

.voice-popover[hidden] {
  display: none;
}

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

.voice-popover-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.voice-search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-subtle);
  pointer-events: none;
}

.voice-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.voice-search-input:focus {
  border-color: var(--border-strong);
}

.voice-search-input::placeholder {
  color: var(--text-subtle);
}

.voice-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.voice-lang-filter-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.voice-lang-filter {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
}

.voice-lang-filter:focus,
.voice-lang-filter:hover {
  border-color: var(--border-strong);
}

.voice-lang-filter option {
  background-color: var(--surface);
  color: var(--text);
}

.gender-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.gender-pill {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gender-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.gender-pill.active {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
  font-weight: 600;
}

.voice-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.voice-list::-webkit-scrollbar {
  width: 6px;
}

.voice-list::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 999px;
}

.voice-group[hidden] {
  display: none;
}

.voice-group-heading {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.voice-option-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.voice-option-row[hidden] {
  display: none;
}

.voice-option-row:hover,
.voice-option-row:focus-visible {
  background-color: var(--surface-2);
  outline: none;
}

.voice-option-row.selected {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

.voice-option-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.28;
  padding-right: 8px;
}

.voice-option-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-option-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-row-preview-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.voice-row-preview-btn:hover {
  background-color: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

.voice-row-preview-btn.playing {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.voice-empty-state {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-subtle);
}

.voice-popover-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  font-size: 12px;
  color: var(--text-subtle);
}

/* Speed Range Slider */
.speed-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--track-bg);
  outline: none;
  cursor: pointer;
  margin: 6px 0 4px;
}

.speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--track-fill);
  border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.speed-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--track-fill);
  border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-subtle);
}

/* Turnstile Box */
.turnstile-slot {
  min-height: 66px;
}

.turnstile-box {
  position: relative;
  z-index: 1;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.controls-pane.popover-open .turnstile-box {
  display: none;
}

.turnstile-fallback {
  font-size: 12px;
  color: var(--text-subtle);
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  width: 100%;
}

.trust-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-subtle);
}

/* Status Banner */
.status-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  border: 1px solid transparent;
  display: none;
}

.status-banner.visible {
  display: block;
}

.status-banner.error {
  background-color: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.status-banner.success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.status-banner.queue {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

/* =========================================================
   Full-Width Waveform Audio Player Bar
   ========================================================= */
.player-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.player-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background-color: var(--surface-2);
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.player-bar.ready .player-play-btn {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
  cursor: pointer;
}

.player-bar.ready .player-play-btn:hover {
  background-color: var(--btn-primary-hover);
}

.waveform-container {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  cursor: default;
}

.player-bar.ready .waveform-container {
  cursor: pointer;
}

.waveform-idle-line {
  width: 100%;
  height: 2px;
  border-top: 2px dotted var(--border-strong);
}

.player-bar.ready .waveform-idle-line {
  display: none;
}

.waveform-canvas {
  display: none;
  width: 100%;
  height: 42px;
}

.player-bar.ready .waveform-canvas {
  display: block;
}

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

.player-placeholder-msg {
  font-size: 13px;
  color: var(--text-subtle);
}

.player-bar.ready .player-placeholder-msg {
  display: none;
}

.player-timer {
  display: none;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player-bar.ready .player-timer {
  display: inline-block;
}

.download-mp3-btn {
  display: none;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.player-bar.ready .download-mp3-btn {
  display: inline-flex;
}

.download-mp3-btn:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

/* =========================================================
   Concise SEO Guide & FAQ (Borderless Editorial)
   ========================================================= */
.editorial-section {
  margin-top: 48px;
}

.section-heading {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 44px;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
}

.step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 0 18px;
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 780px;
}

/* =========================================================
   Editorial Subpages (/about, /contact, /privacy, /terms)
   ========================================================= */
.editorial-wrap {
  max-width: 780px;
  padding-top: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: var(--text);
}

.editorial-h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.editorial-lead {
  margin: 0 0 24px;
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.key-facts-box {
  border: 1px solid var(--border);
  background-color: var(--surface);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.key-facts-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.key-facts-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--text-muted);
}

.editorial-body h2 {
  margin: 32px 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.editorial-body p,
.editorial-body li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.editorial-body ul {
  padding-left: 20px;
  margin: 10px 0 16px;
}

.editorial-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.glance-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 28px;
  font-size: 14px;
}

.glance-table th,
.glance-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.glance-table th {
  background-color: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.glance-table td {
  color: var(--text-muted);
}

.glance-table td:first-child {
  color: var(--text);
  font-weight: 500;
  width: 32%;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--border-strong);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Multi-Column Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  padding: 44px 0 32px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-brand-desc {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 260px;
}

.footer-col-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */
@media (max-width: 900px) {
  .studio-card {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .voice-popover {
    left: 0;
    right: 0;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .player-bar {
    flex-wrap: wrap;
  }

  .waveform-container {
    order: 3;
    flex-basis: 100%;
  }

  .player-right {
    margin-left: auto;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .studio-card {
    grid-template-columns: 1fr;
  }

  .editor-pane,
  .controls-pane {
    padding: 16px;
  }

  .editor-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-primary-pill {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .voice-popover {
    left: 0;
    right: 0;
    width: 100%;
    max-width: calc(100vw - 32px);
    z-index: 5000;
  }

  .voice-popover-controls {
    flex-wrap: wrap;
  }

  .voice-option-row {
    min-height: 48px;
    padding: 10px 12px;
  }

  .voice-row-preview-btn {
    width: 44px;
    height: 44px;
  }

  .player-bar.ready .player-right {
    width: 100%;
    justify-content: space-between;
  }

  .player-bar.ready .download-mp3-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .kbd-hint {
    display: none;
  }
}
