/* LoRa Video: BPYL's look (bpyl.si): navy ink, paper, one light-blue
   accent, Helvetica with IBM Plex Mono labels, near-square corners, flat
   surfaces with hairlines instead of shadows. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap");
:root {
  --ink: #0c1620; --ink-2: #152733; --ink-3: #1d3548;
  --bg: #f8f9f6; --panel: #ffffff; --panel-2: #eef1ee; --text: #1b2e3b; --muted: #4f626d; --faint: #75858d; --line: #d3dad8;
  --accent: #1d3548; --accent-hover: #2a4a63; --accent-2: #8fc6e5; --accent-soft: #e4f1f8; --accent-text: #ffffff; --mark: #8fc6e5;
  --ok: #2f7d4f; --ok-soft: #e6f1ea; --warn: #9a6100; --warn-soft: #f8efdc; --bad: #b3362b; --bad-soft: #f8e6e3;
  --input: #ffffff; --code: #edf0ec; --shadow: none;
  --radius: 4px; --radius-s: 3px; --side: 264px;
  --sans: Helvetica, "Helvetica Neue", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1620; --panel: #121f2a; --panel-2: #152733; --text: #f7f9f8; --muted: #b5c5ce; --faint: #7f95a2; --line: #2a3f4d;
    --accent: #8fc6e5; --accent-hover: #b4daef; --accent-2: #8fc6e5; --accent-soft: #16303f; --accent-text: #0c1620;
    --ok: #6fcf97; --ok-soft: #14301f; --warn: #f2b84b; --warn-soft: #33270f; --bad: #ff8a7e; --bad-soft: #3a1915;
    --input: #0f1b25; --code: #0f1b25; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 3px; }
h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; margin: 4px 0 10px; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.hidden { display: none !important; }
code, pre { background: var(--code); border-radius: 2px; font: 12.5px/1.5 var(--mono); }
code { padding: 1px 5px; }
pre { padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 8px 0; }

/* ---- shell: navy sidebar + paper content */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100%; }
.side { background: #152733; color: #f7f9f8; padding: 26px 0 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; flex-direction: column; gap: 10px; padding: 0 22px; text-decoration: none; color: #f7f9f8; }
.brand img { width: 112px; height: auto; display: block; }
.brand .product { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #c9d6de; }
.brand .product b { color: #8fc6e5; font-weight: 600; }
.navgroup { display: flex; flex-direction: column; }
.navlabel { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #98aebb; padding: 0 22px 8px; }
.navitem { display: flex; gap: 12px; align-items: baseline; padding: 10px 22px; text-decoration: none; color: #eef3f6; position: relative; border-left: 2px solid transparent; }
.navitem:hover { background: #1d3548; color: #fff; }
.navitem.active { background: #24425a; border-left-color: #8fc6e5; color: #fff; }
.navitem .dot { font-family: var(--mono); font-size: 12.5px; color: #98aebb; width: 22px; flex: none; }
.navitem.active .dot { color: #8fc6e5; }
.navitem.done .dot { color: #8fc6e5; }
.navitem .dot svg { vertical-align: -2px; }
.navitem .t { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.navitem .s { font-size: 13px; color: #b3c4ce; line-height: 1.35; margin-top: 2px; }
.navitem .ico { width: 22px; flex: none; color: #98aebb; align-self: center; }
.navitem.active .ico { color: #8fc6e5; }
.devices { margin: auto 16px 0; border: 1px solid #2f4a5e; border-radius: var(--radius); padding: 12px 14px; }
.devices .navlabel { padding: 0 0 8px !important; }
.device { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 3px 0; color: #eef3f6; }
.device.muted { color: #b3c4ce; }
.led { width: 8px; height: 8px; border-radius: 50%; background: #5d7687; flex: none; }
.led.on { background: #8fc6e5; box-shadow: 0 0 0 3px rgba(143, 198, 229, .18); }
.content { padding: 40px clamp(20px, 4vw, 56px) 56px; max-width: 1080px; width: 100%; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 10px; }
.lead { font-size: 16.5px; color: var(--muted); max-width: 640px; margin-bottom: 26px; }
footer { color: #98aebb; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; padding: 0 22px; }
footer a { color: #c9d6de; }

/* ---- surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 18px 0; }
.card.flat { background: transparent; }
.card h2 { display: flex; align-items: center; gap: 10px; }
.card h2 svg { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.cards > .card { margin: 0; border: 0; border-radius: 0; border-right: 1px solid var(--line); background: transparent; }
.cards > .card:last-child { border-right: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---- buttons: solid ink, square, arrow at the far end (bpyl.si .btn) */
button, .button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent); border-radius: var(--radius-s); padding: 11px 18px; font: 700 14px/1.3 var(--sans); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
button:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.secondary, .button.secondary { background: transparent; color: var(--text); border-color: var(--line); font-weight: 600; }
button.secondary:hover, .button.secondary:hover { border-color: var(--text); background: transparent; }
button.ghost { background: transparent; border-color: transparent; color: var(--text); min-height: 0; padding: 6px 8px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
button.ghost:hover { background: transparent; text-decoration-color: var(--text); }
button.ghost svg + span, button.ghost svg { text-decoration: none; }
button.big, .button.big { min-height: 52px; padding: 14px 22px; font-size: 15px; justify-content: space-between; gap: 28px; }
button:disabled { opacity: .4; cursor: default; }
button.danger { background: transparent; color: var(--bad); border-color: var(--line); }
button.danger:hover { border-color: var(--bad); background: transparent; }

/* ---- choice tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { white-space: normal; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; font-weight: 400; position: relative; min-height: 0; }
.tile:hover { border-color: var(--text); background: var(--panel); }
.tile.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--mark); }
.tile .title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.tile .sub { font-size: 13px; color: var(--muted); }
.tile .badge { position: absolute; top: 14px; right: 14px; }
.tile svg { color: var(--muted); margin-bottom: 6px; }

/* ---- wizard progress inside a step: 01 — 02 — 03 */
.substeps { display: flex; gap: 0; margin: 0 0 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.substep { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 18px 12px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.substep .n { font-weight: 600; }
.substep .n svg { vertical-align: -2px; }
.substep.current { color: var(--text); border-bottom-color: var(--accent); }
.substep.done { color: var(--muted); }
.substep.done .n { color: var(--ok); }

/* ---- forms */
label { display: block; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 7px; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--input); color: var(--text); font: 15px var(--sans); }
input:focus, select:focus { outline: 2px solid var(--mark); outline-offset: 0; border-color: var(--text); }
.hint-text { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); flex-wrap: wrap; }
.segmented button { white-space: normal; background: transparent; color: var(--muted); border: 0; border-radius: 0; min-height: 0; padding: 11px 18px; font-weight: 600; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border-right: 1px solid var(--line); }
.segmented button:last-child { border-right: 0; }
.segmented button:hover { background: var(--panel-2); color: var(--text); }
.segmented button small { font-weight: 400; font-size: 12px; color: var(--faint); }
.segmented button.on { background: var(--accent); color: var(--accent-text); }
.segmented button.on small { color: var(--accent-2); }
.switch { display: flex; align-items: flex-start; gap: 14px; margin: 16px 0; cursor: pointer; font: 400 14px var(--sans); color: var(--text); letter-spacing: 0; text-transform: none; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 2px; background: var(--line); position: relative; flex: none; border: 0; padding: 0; cursor: pointer; transition: background .15s; margin: 1px 0 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 1px; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 21px; background: var(--mark); }
.switch b { display: block; }
.switch span span { color: var(--muted); font-size: 13px; }
details.more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more > summary { cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.phrase { display: flex; gap: 6px; }
.phrase input { font: 600 17px var(--mono); letter-spacing: .01em; }
.phrase button { min-width: 46px; padding: 0 12px; }

/* ---- status: problems, results, pills */
.problem { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; border: 1px solid var(--line); border-left: 3px solid var(--muted); background: var(--panel); border-radius: var(--radius-s); padding: 14px 16px; margin: 14px 0; }
.problem .icon { grid-row: span 3; margin-top: 1px; }
.problem.error { border-left-color: var(--bad); }
.problem.error .icon { color: var(--bad); }
.problem.warn { border-left-color: var(--warn); }
.problem.warn .icon { color: var(--warn); }
.problem.ok { border-left-color: var(--ok); }
.problem.ok .icon { color: var(--ok); }
.problem .title { font-weight: 700; }
.problem ol { margin: 6px 0 0 18px; padding: 0; }
.problem li { margin: 3px 0; }
.problem details { grid-column: 2; margin-top: 6px; font-size: 12px; color: var(--muted); }
.problem details summary { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.problem details pre { white-space: pre-wrap; word-break: break-word; background: transparent; padding: 6px 0; }
.result { text-align: left; padding: 4px 0 8px; display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; align-items: center; }
.result .big-icon { width: 56px; height: 56px; border-radius: var(--radius); display: grid; place-items: center; grid-row: span 2; border: 1px solid var(--line); }
.result.ok .big-icon { color: var(--ok); border-color: var(--ok); }
.result.bad .big-icon { color: var(--bad); border-color: var(--bad); }
.result.busy .big-icon { color: var(--text); }
.result h2 { font-size: 22px; margin: 0; }
.result p { margin: 2px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 2px; padding: 3px 8px; font: 600 11.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: transparent; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.bad { color: var(--bad); border-color: var(--bad); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; font-size: 14px; margin: 6px 0 0; }
.kv dt { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; }
.progress { margin: 18px 0; }
.progress .bar { height: 4px; background: var(--panel-2); overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress .label { display: flex; justify-content: space-between; font: 11px var(--mono); letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.log { font-size: 12px; color: var(--muted); max-height: 160px; overflow: auto; white-space: pre-wrap; }

/* ---- lists */
.list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 14px 2px; }
.item .name { font-weight: 700; }
.item .meta { color: var(--muted); font-size: 13px; }
.slots { display: grid; gap: 8px; }
.slot { border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 132px; margin: 0; }
.slot.filled { border: 1px solid var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--mark); }
.slot .role { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---- illustrations, hints */
.hint { display: flex; gap: 18px; align-items: center; background: var(--panel-2); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; }
.hint svg { flex: none; color: var(--text); }
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 36px; align-items: center; margin-bottom: 8px; }
.hero svg { width: 100%; height: auto; display: block; }
.steps-list { display: grid; gap: 0; margin: 4px 0 14px; border-top: 1px solid var(--line); }
.step-row { display: flex; gap: 18px; align-items: center; text-decoration: none; color: var(--text); padding: 16px 4px; border-bottom: 1px solid var(--line); }
.step-row:hover { background: var(--panel-2); }
.step-row:hover .go { transform: translateX(3px); }
.step-row .go { transition: transform .15s; color: var(--muted); }
.step-row .dot { font: 600 13px var(--mono); color: var(--muted); width: 26px; flex: none; }
.step-row.done .dot { color: var(--ok); }
.step-row .t { font-weight: 700; font-size: 16px; }
.step-row .s { font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 6px 0 20px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 0; min-height: 0; margin-bottom: -1px; font-weight: 600; }
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---- viewer */
.screen { position: relative; background: #05090c; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; }
.screen canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.screen .overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(12, 22, 32, .82); color: #f7f9f8; }
.screen .overlay .title { font-size: 20px; font-weight: 700; }
.screen .overlay .cause { max-width: 560px; margin: 8px auto 0; color: #b5c5ce; }
.screen .badge { position: absolute; left: 12px; top: 12px; background: rgba(12, 22, 32, .75); color: #f7f9f8; padding: 4px 9px; border-radius: 2px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.screen .badge.warn { background: rgba(154, 97, 0, .92); }
.screen .live { position: absolute; right: 12px; top: 12px; background: rgba(12, 22, 32, .75); color: #f7f9f8; padding: 4px 9px; border-radius: 2px; font: 600 11px var(--mono); letter-spacing: .1em; display: flex; gap: 7px; align-items: center; }
.screen .live .led.on { box-shadow: none; background: #ff5a4e; }
.statusbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.stat { padding: 10px 14px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat span { font: 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---- small screens: the sidebar becomes a top bar */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; gap: 10px; padding: 14px 0 6px; }
  .brand { flex-direction: row; align-items: center; gap: 12px; padding: 0 16px; }
  .brand img { width: 74px; }
  .navgroup { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .navlabel, .navitem .s, .devices, footer { display: none; }
  .navitem { padding: 8px 12px; flex: none; border-left: 0; border-bottom: 2px solid transparent; }
  .navitem.active { border-bottom-color: #8fc6e5; }
  .navitem .t { font-size: 13px; white-space: nowrap; }
  .content { padding: 22px 16px 44px; }
  .hero, .split { grid-template-columns: 1fr; }
  .cards > .card { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat { border-bottom: 1px solid var(--line); }
}

/* ---- camera recordings: gallery and viewer */
.rec-status .row { gap: 12px; }
.rec-meta { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; color: var(--muted); font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; margin: 8px 0 4px; }
.rec-disk { display: inline-flex; align-items: center; gap: 8px; }
.rec-disk-bar { width: 90px; height: 4px; background: var(--panel-2); overflow: hidden; display: inline-block; }
.rec-disk-bar span { display: block; height: 100%; background: var(--accent); }
.rec-toolbar { margin: 14px 0 10px; min-height: 36px; }
.rec-empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.rec-empty svg { color: var(--faint); }
.rec-empty h2 { justify-content: center; color: var(--text); margin: 10px 0 4px; }
.rec-empty p { max-width: 460px; margin: 0 auto 16px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.rec-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; outline: none; }
.rec-card:hover, .rec-card:focus-visible { border-color: var(--text); }
.rec-card.selected { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.rec-thumb { position: relative; aspect-ratio: 16 / 9; background: #0b1218; overflow: hidden; }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #3d5266; background: linear-gradient(110deg, #0e1720 30%, #16222d 50%, #0e1720 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.rec-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s; }
.rec-card:hover .rec-play, .rec-card:focus-visible .rec-play { opacity: 1; }
.rec-length { position: absolute; right: 8px; bottom: 8px; background: rgba(12, 22, 32, .8); color: #f7f9f8; font: 600 11px var(--mono); padding: 2px 6px; border-radius: 2px; }
.rec-live { position: absolute; left: 8px; top: 8px; background: #c8372d; color: #fff; font: 600 10.5px var(--mono); letter-spacing: .1em; padding: 2px 6px; border-radius: 2px; }
.rec-check { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 2px; border: 2px solid #fff; background: rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; }
.rec-check.on { background: #0c1620; border-color: #8fc6e5; color: #8fc6e5; }
.rec-info { padding: 10px 12px 10px; position: relative; }
.rec-title { font-weight: 700; font-size: 14px; }
.rec-sub { font: 12px var(--mono); letter-spacing: .02em; color: var(--muted); margin-top: 2px; }
.rec-actions { position: absolute; right: 4px; top: 6px; display: flex; opacity: 0; transition: opacity .15s; }
.rec-card:hover .rec-actions, .rec-card:focus-within .rec-actions { opacity: 1; }
.rec-actions button { padding: 6px; color: var(--muted); }
.rec-actions button:hover { color: var(--accent); }
@media (hover: none) { .rec-actions { opacity: 1; } .rec-play { opacity: .7; } }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(12, 22, 32, .97); color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.viewer .rec-sub { color: #9fb0bf; }
.viewer button.ghost { color: #dbe6ef; }
.viewer button.ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.viewer-top { display: flex; align-items: center; gap: 4px; padding: 12px 16px; }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 16px; }
.viewer-stage canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 140px) * 16 / 9)); background: #000; border-radius: 2px; }
.viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.viewer-loading .progress { width: min(420px, 90%); }
.viewer-loading .progress .label { color: #9fb0bf; }
.viewer-loading .problem { color: var(--text); max-width: 560px; }
.viewer-controls { display: flex; align-items: center; gap: 12px; padding: 12px 16px 16px; }
.rec-seek { flex: 1; accent-color: var(--accent-2); padding: 0; border: 0; background: transparent; }
.rec-time { font-variant-numeric: tabular-nums; font-size: 13px; color: #c4d2de; min-width: 92px; text-align: right; }

/* ---- manual firmware download */
details.manual { padding: 0; }
details.manual > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; }
details.manual > summary::-webkit-details-marker { display: none; }
details.manual[open] > summary { border-bottom: 1px solid var(--line); }
details.manual[open] > summary svg { transform: rotate(90deg); }
.manual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 32px; padding: 6px 26px 22px; }
.manual-grid h3 { margin-top: 18px; }
.manual-grid pre { font-size: 11.5px; }
.dl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--text); font: 600 13px var(--mono); margin: 6px 0; }
.dl:hover { border-color: var(--text); }
.dl small { margin-left: auto; font-weight: 400; color: var(--muted); }
.dl-list .dl { margin: 4px 0; }
.input-unit { display: flex; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; min-width: 0; }
.input-unit select { width: auto; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; background: var(--panel-2); }
.grid > div { min-width: 0; }

/* ---- help tooltips and field errors */
.help { position: relative; display: inline-flex; vertical-align: -3px; margin-left: 4px; color: var(--muted); cursor: help; outline: none; text-transform: none; letter-spacing: 0; }
.help:hover, .help:focus { color: var(--text); }
.help-pop { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 280px; background: #152733; color: #eef3f6; font: 400 13px/1.5 var(--sans); padding: 10px 12px; border-radius: var(--radius-s); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20; }
.help-pop::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #152733; }
.help:hover .help-pop, .help:focus .help-pop, .help:focus-within .help-pop { opacity: 1; }
input.invalid, select.invalid { border-color: var(--bad); outline-color: var(--bad-soft); }
.field-error { color: var(--bad); font-size: 12.5px; margin-top: 6px; }
.code-disabled pre { user-select: none; -webkit-user-select: none; opacity: .5; cursor: not-allowed; }
.code-disabled { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.code-disabled pre { flex-basis: 100%; }
