:root { color-scheme: dark; --canvas: #18191d; --surface: #24252a; --ink: #f7f4f2; --muted: #bbbcc6; --border: #42434b; --accent: #9d95ff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 4px; }
main { max-width: 1536px; margin: 0 auto; padding: 32px; }
header, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
header { margin-bottom: 28px; }
.brand, .muted { color: var(--muted); }
.brand { margin: 0 0 8px; font-size: 14px; }
h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
p { max-width: 70ch; }
button { font: inherit; min-height: 48px; padding: 10px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: var(--surface); cursor: pointer; }
button:hover { border-color: var(--muted); }
button:active { background: var(--border); }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,400px),1fr)); gap: 24px; margin-top: 24px; }
.grid.expanded { display: block; }
.camera { position: relative; min-width: 0; background: #08090b; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; max-height: 75dvh; }
.camera h2 { position: relative; margin: 0; padding: 14px 18px 4px; background: var(--surface); font-size: 18px; overflow-wrap: anywhere; }
.camera-status { margin: 0; max-width: none; padding: 4px 18px 16px; color: var(--muted); background: var(--surface); min-height: 44px; }
.media { position: relative; }
.open { position: absolute; inset: 0; width: 100%; border: 0; border-radius: 0; background: transparent; color: transparent; }
.connection-stats { padding: 0 18px 16px; background: var(--surface); border-top: 1px solid var(--border); font-size: 14px; }
.connection-stats summary { min-height: 44px; padding: 11px 0; cursor: pointer; }
.connection-stats summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.stats-note { margin: 4px 0 16px; color: var(--muted); }
.connection-stats dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0; }
.connection-stats dt { color: var(--muted); overflow-wrap: anywhere; }
.connection-stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.open:hover, .open:active { background: transparent; }
.open:focus-visible { outline-offset: -5px; }
.open::after { content: '↗'; position: absolute; right: 14px; top: 14px; display: grid; place-content: center; width: 44px; height: 44px; border-radius: 12px; background: #18191dcc; color: #fff; font-size: 24px; }
#empty { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 24px; }
@media (max-width: 600px) { main { padding: 20px; } h1 { font-size: 26px; } header { gap: 20px; margin-bottom: 16px; } .grid { gap: 18px; } }
@media (prefers-color-scheme: light) { :root { color-scheme: light; --canvas: #fff9f3; --surface: #fff; --ink: #24252a; --muted: #62636c; --border: #d2d3da; --accent: #4e51bf; } }
