:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #101611;
  color: #edf2eb;
  --muted: #b4c2b4;
  --accent: #c6f477;
  --border: #455447;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 72rem; margin: auto; padding: clamp(1rem, 4vw, 3rem); }
header { margin-bottom: 1.6rem; }
header p { margin: .4rem 0 0; color: var(--muted); }
header .eyebrow { color: var(--accent); font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; }
h1 { font-size: clamp(2.7rem, 8vw, 4.75rem); line-height: 1; letter-spacing: -.065em; margin: .45rem 0 .7rem; }
h2 { font-size: 1.06rem; margin: 0 0 .9rem; }
.workspace { display: grid; gap: 1rem; }
.panel { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: #1b251d; }
.stage-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; color: var(--accent); }
#timer { font-variant-numeric: tabular-nums; }
.video-frame { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 3; background: #0b100c; border-radius: .65rem; color: var(--muted); text-align: center; }
video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.actions { display: flex; gap: .65rem; }
.stage .actions { margin-top: .85rem; }
.actions > * { flex: 1; min-width: 0; }
.settings .actions button { flex: 0 0 auto; }
button, input, select, textarea { font: inherit; min-height: 46px; border: 1px solid var(--border); border-radius: .55rem; }
button { padding: .55rem 1rem; font-weight: 650; background: #2a382d; color: inherit; cursor: pointer; }
#start { background: var(--accent); color: #18220e; border-color: var(--accent); }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { width: 100%; padding: .6rem .7rem; background: #101812; color: inherit; }
label { display: block; margin: .7rem 0 .35rem; font-size: .9rem; }
fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
#persona-picker { margin-top: .8rem; }
#persona-picker legend { padding: 0; margin-bottom: .35rem; font-size: .9rem; }
.persona-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.persona-card { position: relative; display: grid; gap: .35rem; margin: 0; padding: .3rem; border: 2px solid var(--border); border-radius: .65rem; text-align: center; cursor: pointer; }
.persona-card input { position: absolute; top: .55rem; right: .55rem; margin: 0; width: 1rem; height: 1rem; min-height: 0; accent-color: var(--accent); }
.persona-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .3rem; background: #101812; }
.persona-card:has(input:checked) { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.persona-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
#persona-picker:disabled .persona-card { cursor: default; }
textarea { resize: vertical; line-height: 1.45; }
.muted { color: var(--muted); font-size: .875rem; margin: .6rem 0 0; }
#error { color: #ffbfab; margin: .75rem 0 0; }
.feed { min-height: 4rem; max-height: 14rem; overflow: auto; overflow-wrap: anywhere; margin: 0; line-height: 1.5; }
.feed p { margin: 0 0 .45rem; white-space: pre-wrap; }
.events { padding-left: 1.3rem; color: var(--muted); font-size: .875rem; }
[hidden] { display: none !important; }
@media (min-width: 52rem) {
  .workspace { grid-template-columns: 1.35fr 1fr; }
}
