:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  background: #0b0b0c;
  color: #f5f5f5;
}
* { box-sizing: border-box; }
body { margin: 0; background: #0b0b0c; }
button, select { font: inherit; }
.app { width: min(760px, 100%); margin: 0 auto; padding: 18px 14px 48px; }
header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h1 { margin: 3px 0 4px; font-size: clamp(26px, 7vw, 40px); }
h2 { margin: 0 0 10px; font-size: 19px; }
p { line-height: 1.45; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .16em; font-weight: 800; opacity: .7; }
.muted, .hint { color: #b8b8bd; margin: 4px 0 0; }
.hint { font-size: 13px; }
.badge, .status-pill { display: inline-flex; align-items: center; border: 1px solid #38383d; border-radius: 999px; padding: 7px 10px; font-size: 12px; background: #171719; white-space: nowrap; }
.card { background: #141416; border: 1px solid #29292d; border-radius: 18px; padding: 16px; margin: 12px 0; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.preview-card { position: relative; padding: 0; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-overlay { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
button, select, .device-display { min-height: 46px; border-radius: 12px; border: 1px solid #3a3a40; background: #202024; color: #fff; padding: 10px 12px; }
button { cursor: pointer; font-weight: 700; }
button:disabled, select:disabled { opacity: .45; cursor: not-allowed; }
button.primary { width: 100%; min-height: 54px; background: #f2f2f2; color: #101012; border-color: #f2f2f2; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid label { display: block; margin: 0 0 6px; font-weight: 750; }
.grid select { width: 100%; }
.full { grid-column: 1 / -1; }
.output-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.device-display { display: flex; align-items: center; color: #ddd; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.actions h2, .actions audio { grid-column: 1 / -1; }
audio { width: 100%; margin-top: 5px; }
.result { margin-top: 12px; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.result.neutral { background: #212125; }
.result.ok { background: #12351f; }
.result.bad { background: #3a1717; }
.diagnostics { margin: 0; }
.diagnostics div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid #29292d; }
.diagnostics div:last-child { border-bottom: 0; }
dt { color: #aaaab0; }
dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.target { line-height: 1.8; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #cfcfd4; font-size: 12px; max-height: 320px; overflow: auto; }
summary { cursor: pointer; font-weight: 800; }
@media (max-width: 560px) {
  header { display: block; }
  header .badge { margin-top: 10px; }
  .grid, .actions { grid-template-columns: 1fr; }
  .actions h2, .actions audio { grid-column: auto; }
  .output-row { grid-template-columns: 1fr; }
  .diagnostics div { grid-template-columns: 1fr; }
  dd { text-align: left; }
}
