:root {
  color-scheme: dark;
  --bg: #071312;
  --panel: #0d1f1d;
  --panel-2: #102a27;
  --line: #244541;
  --text: #e8fffb;
  --muted: #8eb8b1;
  --accent: #2dd4bf;
  --accent-2: #f6c453;
  --danger: #fb7185;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, select, textarea, input { font: inherit; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #081816; }
h1 { margin: 0; font-size: 20px; letter-spacing: 0; }
h2 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; color: var(--accent); }
p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
#statusDot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
#statusDot.speaking { background: #22c55e; box-shadow: 0 0 14px #22c55e; }
#statusDot.error { background: var(--danger); }
.workspace { width: min(1120px, 100%); margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.editor, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
label { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
textarea, select { width: 100%; border: 1px solid var(--line); background: #06100f; color: var(--text); border-radius: 6px; padding: 10px; outline: none; }
textarea:focus, select:focus { border-color: var(--accent); }
#inputText { min-height: 210px; resize: vertical; line-height: 1.45; }
#cleanedText { min-height: 110px; resize: vertical; color: #b8fff4; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
button { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text); padding: 0 12px; cursor: pointer; }
button:hover { border-color: var(--accent); color: white; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: #0f766e; border-color: #14b8a6; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #081816; }
.filter span { color: var(--text); font-size: 13px; }
.filter small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.filter input { width: 18px; height: 18px; accent-color: var(--accent); }
.panelHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panelHead h2 { margin: 0; }
@media (max-width: 720px) {
  .topbar { align-items: flex-start; }
  .grid, .filters { grid-template-columns: 1fr; }
  .controls button { flex: 1 1 140px; }
}
