:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: #f4f1ea;
  background: #10121a;
  --panel: #181b25;
  --line: #303341;
  --muted: #aaaebd;
  --gold: #f2c779;
  --green: #67d9a5;
  --yellow: #f6c653;
  --red: #ff8188;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .47; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.top { padding: .9rem max(1rem, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-bottom: 1px solid #252836; background: #141620; }
.brand { display: flex; gap: .7rem; align-items: center; font-size: 1.05rem; font-weight: 700; line-height: 1.05; white-space: nowrap; }
.brand strong { color: var(--gold); }
.brand small { display: block; margin-top: .27rem; letter-spacing: .2em; color: var(--muted); font-size: .64rem; }
.mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .7rem; background: var(--gold); color: #21190d; font-size: 1.75rem; }
.zoom, .phase { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 2rem; background: #212432; color: #dadcea; font-size: .8rem; }
.zoom { display: flex; align-items: center; gap: .4rem; text-align: left; }
.status-dot { width: .49rem; height: .49rem; border-radius: 50%; background: var(--gold); flex: none; }
.zoom[data-connected="true"] .status-dot { background: var(--green); }
main { max-width: 1152px; padding: 2.35rem 1rem .85rem; margin: auto; }
.meeting, .section-heading, .clock-header, .compact, .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.45rem, 4.2vw, 2.45rem); line-height: 1.13; letter-spacing: -.035em; }
h2 { font-size: 1.08rem; letter-spacing: -.012em; }
.tabs { display: flex; gap: 1.5rem; margin: 1.2rem 0 1rem; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: .65rem .2rem; font-weight: 650; }
.tabs button[aria-current] { border-color: var(--gold); color: var(--gold); }
.live-grid { display: grid; grid-template-columns: 1.14fr 1fr; gap: 1rem; align-items: start; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; }
.clock-panel { text-align: center; background: radial-gradient(ellipse at 50% 31%, #202331 0%, var(--panel) 61%); }
.dial { --cue-color: #414658; width: min(60vw, 13.5rem); aspect-ratio: 1; margin: 1.25rem auto .9rem; border-radius: 50%; display: grid; place-items: center; border: .46rem solid var(--cue-color); box-shadow: 0 0 0 .3rem #11131b55, inset 0 0 0 .34rem #171a24; background: #141620; }
.dial[data-phase=green] { --cue-color: var(--green); }
.dial[data-phase=yellow] { --cue-color: var(--yellow); }
.dial[data-phase=red] { --cue-color: var(--red); }
.dial-face { display: grid; justify-items: center; gap: .12rem; }
#elapsed { font-size: clamp(2rem, 10vw, 3.35rem); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.055em; line-height: 1; }
#clock-caption { color: var(--muted); font-size: .66rem; letter-spacing: .13em; }
.current-speaker { display: grid; gap: .18rem; overflow-wrap: anywhere; }
.current-speaker span, .section-heading p, .compact p, .row p, .hint, .footer { color: var(--muted); font-size: .88rem; }
.timer-actions, .actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.timer-actions { justify-content: center; margin: .85rem 0 1rem; }
.primary, .secondary, .icon-button { border-radius: .55rem; padding: .47rem .72rem; font-weight: 700; border: 1px solid var(--line); font-size: .87rem; }
.primary { background: var(--gold); border-color: var(--gold); color: #24190b; }
.secondary, .icon-button { background: #232634; color: #f5f1eb; }
.primary:hover:not(:disabled) { background: #ffda99; }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { border-color: #747b94; }
.cues { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.cue { background: #222532; border-radius: .55rem; padding: .43rem .2rem; font-size: .79rem; display: grid; gap: .13rem; }
.cue b { font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.yellow { color: var(--yellow); }
.red { color: var(--red); }
.side { display: grid; gap: .85rem; }
.section-heading p, .compact p { margin-top: .18rem; }
.empty { color: var(--muted); text-align: center; padding: 1.2rem .7rem; margin-top: .85rem; border: 1px dashed var(--line); border-radius: .65rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .62rem .55rem; margin-top: .5rem; border: 1px solid var(--line); border-radius: .55rem; overflow-wrap: anywhere; }
.row[data-selected=true] { border-color: var(--gold); }
.row .actions { justify-content: flex-end; flex-shrink: 0; }
.row p { margin-top: .12rem; }
.row .icon-button { min-width: 2rem; padding: .26rem .42rem; }
.row.drag-over { border-color: var(--gold); }
.handle { color: var(--muted); cursor: grab; margin-inline-end: .35rem; }
.report-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.report-row label { grid-column: 1 / -1; }
.result { text-align: right; font-variant-numeric: tabular-nums; }
.footer { margin-top: .85rem; }
dialog { width: min(34rem, calc(100vw - 1.5rem)); max-height: 90dvh; overflow: auto; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); color: inherit; padding: 1rem; }
dialog::backdrop { background: #08090bba; }
.dialog-head { margin-bottom: .75rem; }
form, label { display: grid; gap: .4rem; }
form { gap: .75rem; }
label { font-size: .88rem; color: #ddddea; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #474b5d; border-radius: .45rem; background: #11131d; color: #f4f1ea; padding: .5rem; }
textarea { resize: vertical; }
.rule-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
#notification { position: fixed; bottom: .8rem; left: 50%; transform: translateX(-50%); z-index: 2; width: max-content; max-width: calc(100% - 1.5rem); border: 1px solid var(--gold); background: #272233; padding: .6rem .85rem; border-radius: .55rem; }
@media (max-width: 720px) {
  main { padding-top: 1.2rem; }
  .live-grid { grid-template-columns: 1fr; }
  .dial { width: min(47vw, 13rem); }
}
@media (max-width: 420px) {
  .meeting, .workspace > .section-heading { align-items: flex-start; flex-direction: column; }
  .panel { padding: .8rem; }
  .row .actions { flex-shrink: 1; }
}
