/* Setup (docs/06-redesign.md, "Setup"): the same big monitor as the Live screen, one step at a time. */
:root {
  --bg: #0f0e1a; --panel: #17162a; --card: #1e1c36; --line: #2e2b52; --text: #ecebff;
  --muted: #9a97c4; --accent: #38e1ff; --accent2: #7a5cff; --stop: #ff3b4e; --ok: #4cff8f; --warn: #ffb23f; --bad: #ff6b78;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 19px/1.45 "Segoe UI", system-ui, sans-serif; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
kbd { font: 600 .72em/1 ui-monospace, Consolas, monospace; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); vertical-align: middle; }
.muted, .sub, .hint { color: var(--muted); font-weight: 500; }
.sub { font-size: .75em; }
.hint { font-size: 16px; }
.hint.bad, .err { color: var(--bad); }
.warn { color: var(--warn); font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--bad); }
h1 { font-size: 36px; margin: 0 0 8px; }
h1 .sub { font-size: 20px; }
h2 { font-size: 20px; margin: 22px 0 8px; }
h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 6px; }
.lead { font-size: 22px; margin: 0 0 18px; color: #d6d4f5; }
q.say { font-weight: 800; color: var(--accent); quotes: "“" "”"; }

/* ---- sign-in (as the Live screen) */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #241f4a, var(--bg) 70%); z-index: 30; }
.login-card { width: min(400px, 90vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.login-card p { margin: 0; }
.login-card label { display: flex; flex-direction: column; gap: 6px; }
.login-card input { background: #13122a; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.login-card .primary { border: 0; border-radius: 10px; padding: 12px; font-weight: 800; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand.big { font-size: 26px; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; font-weight: 900; font-size: 17px; flex: none; }

/* ---- layout */
.setup { min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 18px; padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .brand { font-size: 20px; }
.progress { flex: 1; color: var(--muted); font-size: 17px; }
.go { border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; text-decoration: none; color: var(--muted); font-weight: 700; }
.go.ready { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; border-color: transparent; }
.body { flex: 1; display: grid; grid-template-columns: 290px 1fr; }
.steps { border-right: 1px solid var(--line); padding: 20px 14px; background: #131225; position: sticky; top: 59px; align-self: start; max-height: calc(100vh - 59px); overflow-y: auto; }
.steps ol, .steps ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 8px 10px; font-size: 17px; }
.steps li button:hover { background: var(--card); }
.steps li.here button { background: var(--card); box-shadow: inset 3px 0 0 var(--accent); }
.steps li i { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-weight: 800; font-size: 14px; border: 2px solid var(--line); color: var(--muted); flex: none; }
.steps li.done i { background: var(--ok); border-color: var(--ok); color: #0f0e1a; }
.steps li.skipped i { background: var(--warn); border-color: var(--warn); }
.steps ul li button { padding-left: 46px; color: #cfcdee; }
.steps .classic { font-size: 14px; color: var(--muted); margin-top: 24px; padding: 0 10px; }
.panel { padding: 30px 44px 60px; max-width: 1100px; width: 100%; }

/* ---- forms and steps */
.form { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
input:not([type]), input[type=number], .form input, .pair-form input, .type-form input, select { background: #13122a; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.form input { font-size: 22px; }
ol.do { margin: 0 0 18px; padding-left: 26px; display: flex; flex-direction: column; gap: 14px; }
ol.do > li::marker { color: var(--accent); font-weight: 800; }
ol.do p { margin: 0 0 6px; }
.btn, .copy { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent2); background: #1f1a40; border-radius: 10px; padding: 8px 16px; font-weight: 700; text-decoration: none; color: var(--text); }
.copy { padding: 5px 12px; font-size: 16px; margin: 2px 4px 2px 0; }
.next-row { margin-top: 30px; display: flex; justify-content: flex-end; }
.next { border: 0; border-radius: 12px; padding: 14px 34px; font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; text-decoration: none; }
.next:disabled { background: var(--card); color: var(--muted); cursor: default; }

/* The live checks: they go green by themselves. */
.check { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; margin: 10px 0; }
.check i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); flex: none; }
.check.wait i { border-color: var(--warn); border-top-color: transparent; animation: spin 1.2s linear infinite; }
.check.ok i { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 10px var(--ok); }
.check.ok { color: var(--ok); }
/* The stage check's answer: a few hitches, or a PC that struggles; not run yet is just grey. */
.check.warn i { background: var(--warn); border-color: var(--warn); }
.check.warn { color: var(--warn); }
.check.bad i { background: var(--bad); border-color: var(--bad); }
.check.bad { color: var(--bad); }
.check.none { color: var(--muted); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The link to drag into OBS. */
.drag { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 14px; border: 2px dashed var(--accent); background: #18243a; color: var(--text); font-size: 24px; font-weight: 800; text-decoration: none; cursor: grab; margin: 4px 0; }
.drag .sub { font-size: 15px; }
.drag:active { cursor: grabbing; }

/* A picture of OBS's Properties dialog, the box to tick ringed. */
.picture { width: 420px; max-width: 100%; border-radius: 8px; background: #2b2e38; border: 1px solid #44485a; padding: 10px 14px 14px; font: 14px/1.3 "Segoe UI", sans-serif; color: #dfe1e8; margin: 6px 0; }
.pic-title { font-size: 13px; color: #b7bac6; margin-bottom: 8px; }
.pic-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.pic-row > span:first-child:not(.pic-box) { width: 52px; color: #b7bac6; }
.pic-field { flex: 1; height: 22px; border-radius: 4px; background: #1d1f26; border: 1px solid #44485a; font-style: normal; padding: 0 6px; color: #b7bac6; }
.pic-field.short { flex: 0 0 64px; }
.pic-box { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; border: 1px solid #6b7080; background: #1d1f26; font-size: 12px; }
.pic-hit { outline: 3px solid var(--warn); outline-offset: 2px; border-radius: 4px; font-weight: 700; }
.pic-hit .pic-box { background: #476bd6; border-color: #476bd6; color: #fff; }

details.fallback { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; background: var(--panel); }
details.fallback summary { cursor: pointer; font-weight: 700; color: #cfcdee; }
details.fallback ol { margin: 10px 0 4px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.pair-form, .type-form { display: flex; gap: 8px; margin: 10px 0; }
.pair-form button, .type-form button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 16px; font-weight: 700; }
.type-form input { flex: 1; max-width: 520px; }

/* ---- camera */
.cam-layout { display: flex; gap: 30px; align-items: flex-start; }
.frame { position: relative; width: 300px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 35% 40%, #3a2a6e, #1c1338 60%, #0e0a1f); box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(0, 0, 0, .45); flex: none; }
.frame iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; pointer-events: none; color-scheme: normal; }
.cam-box { position: absolute; border: 3px solid var(--accent); background: rgba(56, 225, 255, .18); border-radius: 6px; display: grid; place-items: center; pointer-events: none; }
.cam-box span { font-weight: 800; color: var(--accent); }
.cam-handle { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 3px solid #0f0e1a; pointer-events: auto; touch-action: none; z-index: 3; }
.cam-box[data-corner=top-right] .cam-handle { left: -13px; bottom: -13px; cursor: nesw-resize; }
.cam-box[data-corner=top-left] .cam-handle { right: -13px; bottom: -13px; cursor: nwse-resize; }
.cam-box[data-corner=bottom-right] .cam-handle { left: -13px; top: -13px; cursor: nwse-resize; }
.cam-box[data-corner=bottom-left] .cam-handle { right: -13px; top: -13px; cursor: nesw-resize; }
.big-hint { font-size: 19px; max-width: 320px; margin: 0; }
.corner { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: rgba(15, 14, 26, .8); font-size: 22px; z-index: 2; }
.corner.on { border-color: var(--accent); background: var(--accent); color: #0f0e1a; }
.corner.tl { left: 8px; top: 8px; } .corner.tr { right: 8px; top: 8px; } .corner.bl { left: 8px; bottom: 8px; } .corner.br { right: 8px; bottom: 8px; }
.cam-ctl { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.cam-ctl label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.check-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 500 !important; margin: 6px 0; }
.check-label input { width: 20px; height: 20px; }
input[type=range] { width: 280px; accent-color: var(--accent); }

/* ---- talk button */
.mic-pick { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 16px; margin-top: 6px; }
.meter-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; font-size: 22px; }
.meter { width: 320px; height: 14px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--accent)); transition: width .06s linear; }

/* ---- say hello */
.feed { min-height: 92px; margin: 12px 0; }
.turn { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; background: var(--card); }
.turn.ok { border-color: var(--ok); }
.turn.failed { border-color: var(--bad); }
.turn .heard { font-size: 24px; font-weight: 700; }
.turn .turn-steps { font-size: 19px; color: #cfcdee; margin-top: 4px; }
.turn.ok .turn-steps { color: var(--ok); }
.turn.failed .turn-steps { color: var(--bad); }
.ask { border: 2px solid var(--accent2); border-radius: 14px; padding: 14px 18px; margin: 14px 0; background: #1b1838; }
.ask p { margin: 0 0 10px; font-size: 22px; }
.answers { display: flex; flex-wrap: wrap; gap: 10px; }
.answers button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 18px; font-weight: 700; }
.answers .yes { background: var(--ok); color: #0f0e1a; border-color: var(--ok); min-width: 110px; }
.trouble { border-left: 4px solid var(--warn); padding: 4px 18px; margin: 12px 0; background: #1e1a14; border-radius: 0 12px 12px 0; }
.trouble p { margin: 8px 0; }

/* ---- STOP */
.stop { border: 0; border-radius: 12px; padding: 12px 26px; font-size: 26px; font-weight: 900; background: var(--stop); color: #fff; box-shadow: 0 0 0 3px rgba(255, 59, 78, .25); margin-top: 6px; }

/* ---- connections */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.tile { border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px 16px; background: var(--panel); }
.tile h2 { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tile h2 i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); flex: none; }
.tile.on h2 i { background: var(--warn); }
.tile.ok h2 i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.tile.ok { border-color: #2b6b46; }
.tile p { margin: 6px 0; font-size: 17px; }
.tile .tile-on { display: none; }
.tile.on .tile-on { display: revert; }
.tile.on .tile-off { display: none; }
.tile ol { padding-left: 22px; font-size: 17px; display: flex; flex-direction: column; gap: 6px; }
.people { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.people li { display: flex; gap: 10px; align-items: baseline; }
.tips { font-size: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ---- settings */
.rows { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rows li { display: flex; gap: 16px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 8px; color: var(--muted); font-size: 17px; }
.seg button.on { background: var(--accent2); color: #fff; font-weight: 700; }
.inline-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 10px 0; }
.inline-row input[type=number] { width: 110px; margin-left: 4px; }
.sound-row { display: flex; gap: 20px; align-items: center; }

/* ---- toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #3a1620; border: 1px solid var(--bad); border-radius: 12px; padding: 12px 20px; font-size: 18px; z-index: 40; max-width: min(760px, 92vw); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.toast.ok { background: #143222; border-color: var(--ok); }

/* The guide (docs/PLAN-guided-setup.md): him, beside the steps, on this page only. */
.setup.guided .body { grid-template-columns: 290px minmax(0, 1fr) 340px; }
.guide { border-left: 1px solid var(--line); background: #131225; padding: 18px 16px 24px; position: sticky; top: 59px; align-self: start; max-height: calc(100vh - 59px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.guide-choose { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; padding-top: 30px; }
.guide-choose .next { font-size: 19px; padding: 12px 18px; }
.guide-q { font-size: 20px; font-weight: 800; margin: 0; }
.guide-body { display: flex; flex-direction: column; gap: 12px; }
.guide-box { position: relative; overflow: hidden; border-radius: 14px; background: radial-gradient(circle at 60% 35%, #3a2a78, #1b1438 70%); box-shadow: 0 0 0 1px var(--line); }
.guide-box #guideStage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.guide-box .hl-bubble { display: none !important; } /* the caption below says it, big enough to read */
.guide-caption { min-height: 3.2em; margin: 0; font-size: 19px; line-height: 1.4; font-weight: 600; }
.guide-caption.heard { color: var(--muted); font-style: italic; font-weight: 400; }
.guide-caption.bad { color: var(--bad); font-weight: 400; }
.guide-card { background: var(--card); border: 1px solid var(--accent2); border-radius: 12px; padding: 12px 14px; }
.guide-card h3 { margin: 0 0 6px; font-size: 17px; }
.guide-card ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.guide-card .card-close { margin-top: 8px; font-size: 14px; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-actions:empty { display: none; }
.ask { border: 0; border-radius: 14px; padding: 14px; font-size: 20px; font-weight: 800; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #0f0e1a; touch-action: none; user-select: none; }
.ask.on { background: var(--ok); }
.ask:disabled { background: var(--card); color: var(--muted); }
.guide-type { margin: 0; }
.guide-type input { flex: 1; min-width: 0; }
.guide-look .hint { font-size: 14px; margin: 6px 0 0; }
.guide-look .btn.on { border-color: var(--ok); background: #163a2a; }
.guide-foot { display: flex; justify-content: space-between; font-size: 15px; }
.mic-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.help-box { margin: 8px 10px 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.help-box textarea { width: 100%; background: #13122a; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); font: inherit; resize: vertical; }
.help-box .hint { font-size: 14px; margin: 0; }
.help-row { display: flex; gap: 12px; align-items: center; }
@media (max-width: 1250px) {
  .setup.guided .body { grid-template-columns: 240px minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
  .body, .setup.guided .body { grid-template-columns: 1fr; }
  .guide { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .steps { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel { padding: 20px 16px 40px; }
  .cam-layout { flex-direction: column; }
}

/* The look: which OBS source is which camera. */
.cam-pick { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.cam-pick label { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 520px; }
.cam-pick select { min-width: 220px; }
#obsForm input { max-width: 260px; }
#obsPort { max-width: 90px; }

/* Which station this is (src/web/station-mark.ts): a testing station's TEST, and the admin's strip. */
.st-test { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #f5b400; color: #1a1400; font-size: 11px; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.st-admin { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 14px; background: #2b2540; color: #ece9f5; font: 13px/1.4 system-ui, sans-serif; border-bottom: 1px solid #4a3f6b; }
.st-admin-test { background: #3d3100; border-bottom-color: #f5b400; }
.st-admin a { color: inherit; }
.st-admin button { flex: none; background: none; border: 1px solid currentColor; color: inherit; border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; }
