:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #11151d;
  --panel-2: #171c26;
  --text: #f5f7fb;
  --muted: #9099aa;
  --line: #272e3b;
  --red: #e82127;
  --red-soft: rgba(232, 33, 39, .14);
  --green: #42d68b;
  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:
    radial-gradient(circle at 75% -10%, rgba(232,33,39,.12), transparent 35%),
    linear-gradient(180deg, #0c0f15 0%, var(--bg) 55%);
  color: var(--text);
}
button, select { font: inherit; }
button { touch-action: manipulation; }
.shell { width: min(1180px, 100%); margin: 0 auto; padding: 34px 34px 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); letter-spacing: .18em; font-size: 11px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.055em; line-height: 1; }
h1 span { color: var(--red); }
.badge { display: flex; align-items: center; gap: 9px; color: var(--muted); background: rgba(23,28,38,.85); border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; font-size: 13px; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #f0a447; box-shadow: 0 0 0 4px rgba(240,164,71,.12); }
.badge.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(66,214,139,.12); }
.control-panel, .transcript-card { background: rgba(17,21,29,.9); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.control-panel { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; padding: 24px; }
.field label { display: block; margin-bottom: 8px; color: #c7ceda; font-size: 13px; font-weight: 750; }
select { width: 100%; min-height: 54px; color: var(--text); background: var(--panel-2); border: 1px solid #303746; border-radius: 12px; padding: 0 40px 0 14px; outline: none; }
select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.hint { min-height: 18px; margin: 8px 2px 0; color: var(--muted); font-size: 12px; }
.compatibility-option { grid-column: 1 / -1; display: flex; align-items: center; gap: 13px; padding: 14px 16px; color: #d9dee7; background: rgba(23,28,38,.72); border: 1px solid #303746; border-radius: 12px; cursor: pointer; }
.compatibility-option.detected { border-color: rgba(232,33,39,.65); background: var(--red-soft); }
.compatibility-option input { width: 23px; height: 23px; flex: 0 0 auto; accent-color: var(--red); }
.compatibility-option span { display: flex; flex-direction: column; gap: 3px; }
.compatibility-option strong { font-size: 14px; }
.compatibility-option small { color: var(--muted); line-height: 1.35; }
.permission-help { grid-column: 1 / -1; padding: 14px 16px; color: #ffd8d9; background: var(--red-soft); border: 1px solid rgba(232,33,39,.45); border-radius: 12px; font-size: 13px; line-height: 1.5; }
.record-button { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 16px; min-height: 82px; color: white; border: 0; border-radius: 15px; background: linear-gradient(135deg, #e82127, #bd151a); box-shadow: 0 10px 30px rgba(232,33,39,.22); cursor: pointer; }
.record-button:active { transform: translateY(1px); }
.record-button.recording { background: linear-gradient(135deg, #2b303a, #1e222b); box-shadow: inset 0 0 0 2px var(--red); }
.record-icon { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.15); }
.recording .record-icon { border-radius: 5px; background: var(--red); animation: pulse 1.4s infinite; }
.record-copy { display: flex; flex-direction: column; text-align: left; }
.record-copy strong { font-size: 19px; }
.record-copy small { color: rgba(255,255,255,.7); margin-top: 4px; }
.meter { grid-column: 1 / -1; height: 5px; overflow: hidden; background: #080a0e; border-radius: 5px; }
.meter div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #e8bd21, var(--red)); transition: width 80ms linear; }
.session-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.transcript-card { min-height: 360px; margin-top: 20px; padding: 26px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.actions { display: flex; gap: 8px; }
.icon-button { min-height: 42px; padding: 0 14px; color: #d7dce5; background: var(--panel-2); border: 1px solid #303746; border-radius: 10px; cursor: pointer; }
.icon-button.danger { color: #ff898d; }
.empty-state { display: grid; justify-items: center; align-content: center; min-height: 250px; text-align: center; color: var(--muted); }
.empty-state h3 { margin: 20px 0 8px; color: #d9dee7; }
.empty-state p { max-width: 420px; }
.sound-mark { display: flex; align-items: center; gap: 6px; height: 40px; }
.sound-mark span { width: 5px; height: 15px; border-radius: 4px; background: #51596a; }
.sound-mark span:nth-child(2), .sound-mark span:nth-child(4) { height: 28px; }
.sound-mark span:nth-child(3) { height: 40px; background: var(--red); }
.transcript { padding: 24px 2px 8px; font-size: clamp(20px, 2.5vw, 29px); line-height: 1.55; letter-spacing: -.015em; white-space: pre-wrap; }
.interim { margin: 0 2px; color: var(--muted); font-size: 20px; font-style: italic; }
footer { padding: 18px 4px 0; color: #667083; text-align: center; font-size: 12px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(232,33,39,.12); } }
@media (max-width: 760px) {
  .shell { padding: 22px 16px; }
  .control-panel { grid-template-columns: 1fr 1fr; padding: 18px; }
  .model-field { grid-column: 1 / -1; }
  .transcript-card { padding: 20px; }
  .card-heading { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .icon-button { flex: 1; }
}
