/* Native, dependency-free UI. One accent, square geometry, no remote fonts. */
:root {
  color-scheme: dark;
  --bg: #080a08;
  --surface: #101410;
  --border: #2a3429;
  --text: #e9eee5;
  --muted: #939e8e;
  --accent: #b9ff53;
  --accent-text: #142007;
  --danger: #ffaaa2;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "PingFang SC", "Microsoft YaHei", monospace;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; flex-shrink: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { max-width: 1160px; padding: 0 40px; margin: 0 auto; }
.topbar { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 650; line-height: 1.2; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: var(--accent-text); }
.brand-mark svg { width: 25px; height: 25px; }
.brand-name { display: block; color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: .13em; margin-top: 5px; }
.topbar-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-square { width: 5px; height: 5px; background: var(--accent); }
.quiet { color: var(--muted); font-size: 13px; }
main { padding-top: 40px; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1.35; }
h2 { font-size: 20px; font-weight: 550; line-height: 1.5; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .12em; margin-bottom: 10px; }
.home-hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 44px; padding: 26px 0 48px; }
.hero-copy h1 { font-size: clamp(38px, 4.5vw, 52px); letter-spacing: -.045em; line-height: 1.22; }
.hero-copy h1 span, .desktop-heading h1 span { color: var(--accent); }
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero-copy .eyebrow span { color: var(--accent); }
.hero-intro { color: var(--muted); margin-top: 20px; font-size: 13px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .button { min-height: 46px; padding: 11px 17px; }
.hero-actions .primary { min-width: 134px; justify-content: space-between; }
.action-arrow { margin-left: 8px; font-size: 18px; font-weight: 400; }
.download-caption { font-size: 10px; color: var(--muted); margin-top: 12px; letter-spacing: .02em; }
.hero-art { display: flex; flex-direction: column; align-items: center; color: var(--accent); padding-top: 8px; }
.pixel-screen { width: min(100%, 320px); height: auto; stroke: none; }
.pixel-invader { color: var(--text); }
.art-caption { font-size: 10px; letter-spacing: .2em; color: #65745c; margin-top: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); padding-top: 24px; margin-bottom: 20px; }
.live-heading { display: flex; align-items: baseline; gap: 12px; }
.live-heading .eyebrow { color: var(--accent); margin: 0; letter-spacing: .07em; }
.live-heading h2 { font-size: 17px; }
.section-note { font-size: 11px; color: var(--muted); }
.count { font-size: 12px; color: var(--accent); font-weight: 400; margin-left: 5px; }
.button { border: 1px solid transparent; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; min-height: 42px; font-size: 13px; font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.button:active { transform: translateY(1px); }
.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.primary:hover { background: #ceff89; border-color: #ceff89; }
.secondary { background: transparent; color: var(--text); border-color: #3c4b35; }
.secondary:hover { border-color: var(--accent); background: #151d11; }
.danger { background: #211411; color: var(--danger); border-color: #54312a; }
.danger:hover { background: #321c17; border-color: #865046; }
.icon-button { width: 40px; height: 40px; border-radius: 0; border: 1px solid transparent; background: transparent; color: var(--muted); display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-button:hover { color: var(--text); background: #172014; border-color: var(--border); }
.empty { display: grid; grid-template-columns: 64px 1fr auto; column-gap: 24px; align-content: center; min-height: 182px; padding: 32px; border: 1px dashed #34432d; background: #0c100b; }
.empty-screen { grid-column: 1; grid-row: 1 / 3; align-self: center; display: grid; place-items: center; color: #56684b; }
.empty-screen svg { width: 48px; height: 48px; }
.empty h2 { grid-column: 2; align-self: end; font-size: 17px; }
.empty p { grid-column: 2; color: var(--muted); font-size: 12px; margin-top: 6px; }
.empty .button { grid-column: 3; grid-row: 1 / 3; align-self: center; min-width: 90px; }
.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #6f7d67; font-size: 10px; margin: 20px 0 32px; }
.footer-cursor { color: var(--accent); margin-left: 3px; }
.loading-line { padding: 64px 0; text-align: center; font-size: 13px; color: var(--muted); }
.notice { border-left: 2px solid var(--danger); color: var(--danger); padding: 10px 14px; margin-bottom: 20px; font-size: 13px; background: #211411; }
.rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.room-card { min-width: 0; display: block; border: 1px solid var(--border); background: #0c100b; transition: border-color .12s; }
.room-card:hover { border-color: var(--accent); }
.room-thumbnail { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #49613a; position: relative; background: #11190d; }
.room-thumbnail > svg { width: 54px; height: 54px; }
.thumbnail-live { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--accent); background: var(--bg); padding: 4px 7px; }
.thumbnail-live:before { content: ""; width: 5px; height: 5px; background: var(--accent); }
.room-card-info { padding: 15px 16px 17px; }
.room-card-title { font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.room-card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.room-card-meta span { display: flex; align-items: center; gap: 5px; }
.room-card-meta svg { width: 13px; height: 13px; }
.room-heading { display: flex; align-items: center; gap: 14px; margin: 6px 0 24px; }
.room-heading > .icon-button { margin-left: -8px; }
.room-heading-title { flex: 1; min-width: 0; }
.room-heading h1 { font-size: 23px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 11px; color: var(--muted); margin-top: 7px; }
.live-badge { background: var(--accent); color: var(--accent-text); font-size: 9px; font-weight: 650; letter-spacing: .07em; padding: 1px 5px; }
.meta-divider { color: #4b5d43; }
.viewer-count { display: inline-flex; align-items: center; gap: 5px; }
.viewer-count svg { width: 13px; height: 13px; }
.player { position: relative; background: #030403; border: 1px solid var(--border); overflow: hidden; aspect-ratio: 16 / 9; isolation: isolate; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #030403; }
.player-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 28px; background: #0b0f09; text-align: center; }
.player-overlay h2 { font-size: 19px; }
.player-overlay p { color: var(--muted); font-size: 13px; max-width: 440px; }
.player-overlay .button { margin-top: 6px; }
.spinner { width: 24px; height: 24px; border: 2px solid #34422c; border-top-color: var(--accent); animation: spin 1s steps(8, end) infinite; margin-bottom: 2px; }
.preview-label { position: absolute; left: 14px; bottom: 14px; font-size: 10px; padding: 5px 8px; color: #b9c6b0; background: #080a08e6; pointer-events: none; }
.player-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; border-bottom: 1px solid var(--border); }
.connection { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; }
.connection-dot { width: 5px; height: 5px; background: #6a7a60; }
.connection-dot.connected { background: var(--accent); }
.connection-dot.failed { background: var(--danger); }
.metrics { margin-left: 9px; color: #788970; font-variant-numeric: tabular-nums; }
.player-actions { display: flex; align-items: center; gap: 5px; }
.player-actions .danger { margin-left: 12px; }
.room-hint { margin: 16px 0 32px; font-size: 11px; color: var(--muted); }
.player:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border: 0; }
.player:fullscreen video { width: 100%; height: 100%; }
.icon-button.mic-off { color: var(--danger); background: #211411; }
dialog { color: var(--text); background: var(--surface); border: 1px solid #5d754c; width: min(448px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 28px; border-radius: 0; overflow: auto; box-shadow: 8px 8px 0 #0008; }
dialog::backdrop { background: #000b; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dialog-heading .icon-button { margin-top: -10px; margin-right: -10px; }
.dialog-heading > div { min-width: 0; }
.dialog-heading h2 { min-width: 0; font-size: 22px; overflow-wrap: anywhere; }
.field-label, legend { display: block; margin-bottom: 8px; color: #c1ccba; font-size: 12px; font-weight: 500; }
input[type=text], input[type=password], input:not([type]), input[readonly] { width: 100%; min-width: 0; border: 1px solid #405036; border-radius: 0; padding: 12px; background: var(--bg); color: var(--text); font-size: 13px; }
input::placeholder { color: #75836b; }
input:focus { border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 22px 0; }
.quality-options { display: flex; gap: 10px; }
.quality-options label { position: relative; flex: 1; min-width: 0; display: block; }
.quality-options input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.quality-options span { display: block; padding: 12px 10px; border: 1px solid #405036; background: var(--bg); }
.quality-options strong { display: block; font-size: 12px; font-weight: 500; }
.quality-options small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.quality-options input:checked + span { border-color: var(--accent); background: #1a2512; }
.quality-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.checkbox { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #c1ccba; font-size: 12px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.capture-hint { color: var(--muted); font-size: 11px; line-height: 1.9; margin: 20px 0; }
.start-button { width: 100%; margin-top: 5px; min-height: 46px; }
.form-error { margin-bottom: 14px; font-size: 12px; color: var(--danger); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 28px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--accent); background: #18230f; color: var(--text); font-size: 12px; text-align: center; }
.toast.error { border-color: var(--danger); background: #2a1914; }
#share-dialog p { margin-bottom: 18px; }
#share-dialog .start-button { margin-top: 18px; }
#share-url { font-size: 11px; }
.download-link { color: var(--accent); }
.download-link:hover { text-decoration: underline; }
.method-options { display: flex; gap: 4px; border: 1px solid var(--border); background: var(--bg); padding: 4px; margin-bottom: 22px; }
.method-options label { flex: 1; position: relative; text-align: center; cursor: pointer; }
.method-options input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; cursor: pointer; }
.method-options span { display: block; padding: 8px; color: var(--muted); font-size: 12px; }
.method-options input:checked + span { background: #202e17; color: var(--accent); }
.method-options input:focus-visible + span { outline: 2px solid var(--accent); }
.direct-option { display: block; border-left: 2px solid var(--accent); padding: 12px 14px; background: #172210; margin-bottom: 22px; }
.direct-option:hover { background: #202e17; }
.direct-option strong { display: block; color: var(--accent); font-size: 13px; font-weight: 500; }
.direct-option span { display: block; font-size: 11px; color: #a4b496; margin-top: 5px; }
.obs-dialog { width: min(510px, calc(100% - 32px)); }
.copy-field { display: flex; gap: 8px; margin-bottom: 18px; }
.copy-field input { flex: 1; width: 0; font-size: 11px; }
.copy-field .button { padding: 8px 12px; font-size: 11px; min-height: 40px; }
.text-button { border: 0; background: none; color: var(--muted); font-size: 11px; padding: 5px 0; cursor: pointer; }
.text-button:hover { color: var(--accent); }
.text-button.destructive { color: var(--danger); margin-top: 16px; }
.setup-status { color: var(--accent); font-size: 12px; border: 1px solid #3e562d; padding: 10px 12px; background: #172210; }
.setup-status.error { color: var(--danger); border-color: #54312a; background: #211411; }
.setup-details { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin-top: 20px; }
.setup-details summary { color: #b9c6b0; font-size: 12px; cursor: pointer; }
.setup-details p { color: var(--muted); font-size: 11px; line-height: 1.9; margin-top: 12px; }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.setup-actions .button { flex: 1; }
.desktop-shell { max-width: 820px; }
.desktop-heading { margin: 18px 0 20px; }
.desktop-heading h1 { font-size: 32px; }
.desktop-intro { color: var(--muted); font-size: 12px; line-height: 1.9; margin-bottom: 30px; }
.desktop-card { padding: 26px; border: 1px solid var(--border); background: #0c100b; }
.desktop-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; color: var(--muted); font-size: 12px; }
.desktop-stats strong { color: var(--accent); font-weight: 500; }
.desktop-card .start-button { margin-top: 20px; }
.desktop-card .field-label { margin-top: 18px; }
.desktop-card .field-label:first-child { margin-top: 0; }
.desktop-card #desktop-status { margin-bottom: 22px; }
.desktop-card .setup-actions { margin-top: 24px; }
.desktop-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0 28px; color: var(--muted); font-size: 10px; }
.desktop-log { color: var(--danger); font-size: 12px; margin: 14px 0 0; overflow-wrap: anywhere; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1600px) {
  .shell { max-width: 1240px; }
  .home-hero { padding-top: 42px; padding-bottom: 62px; }
}
@media (max-width: 900px) {
  .shell { padding: 0 28px; }
  .home-hero { grid-template-columns: 1.4fr 1fr; gap: 24px; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { padding: 10px 13px; font-size: 12px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { margin-left: 2px; }
}
@media (max-width: 600px) {
  .shell { padding: 0 20px; }
  .topbar { height: 76px; gap: 12px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-name { font-size: 8px; }
  .topbar-note { font-size: 10px; gap: 6px; }
  main { padding-top: 28px; }
  .home-hero { display: block; padding: 12px 0 32px; }
  .hero-copy h1 { font-size: 39px; line-height: 1.25; }
  .hero-copy .eyebrow { font-size: 9px; margin-bottom: 16px; }
  .hero-intro { font-size: 11px; margin-top: 18px; }
  .hero-art { display: none; }
  .hero-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .button { min-height: 44px; font-size: 12px; }
  .hero-actions .primary { justify-content: center; position: relative; }
  .action-arrow { position: absolute; right: 16px; }
  .download-caption { font-size: 9px; text-align: center; margin-top: 10px; }
  .section-heading { padding-top: 20px; margin-bottom: 16px; gap: 10px; }
  .live-heading { gap: 9px; }
  .live-heading h2 { font-size: 15px; }
  .live-heading .eyebrow { font-size: 9px; }
  .section-note { font-size: 9px; }
  .rooms { grid-template-columns: 1fr; gap: 16px; }
  .empty { grid-template-columns: 40px 1fr; column-gap: 18px; padding: 24px; min-height: 188px; }
  .empty-screen { grid-row: 1 / 3; }
  .empty-screen svg { width: 36px; height: 36px; }
  .empty h2 { font-size: 15px; }
  .empty p { font-size: 10px; }
  .empty .button { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 18px; min-height: 36px; font-size: 11px; }
  .home-footer { font-size: 9px; margin-top: 18px; }
  .room-heading { flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
  .room-heading-title { flex: 1 1 calc(100% - 49px); }
  .room-heading h1 { font-size: 19px; }
  .room-heading > #share { margin-left: 41px; min-height: 35px; padding: 7px 12px; font-size: 11px; }
  .room-meta { font-size: 10px; }
  .player { margin-left: -20px; margin-right: -20px; border-left: 0; border-right: 0; min-height: 210px; }
  .player-toolbar { min-height: 68px; flex-wrap: wrap; padding: 10px 0; }
  .connection { flex: 1; min-width: 110px; font-size: 10px; }
  .metrics { display: block; width: 100%; margin-left: 12px; font-size: 9px; }
  .player-actions { gap: 0; }
  .player-actions .danger { margin-left: 5px; min-height: 36px; padding: 8px 9px; font-size: 11px; }
  .player-actions .icon-button { width: 34px; height: 36px; }
  .player-overlay { padding: 15px; gap: 8px; }
  .player-overlay h2 { font-size: 16px; }
  .player-overlay p { font-size: 11px; }
  .preview-label { left: 10px; bottom: 10px; font-size: 9px; }
  .room-hint { font-size: 10px; }
  dialog { padding: 24px; }
  .quality-options { gap: 8px; }
  .quality-options span { padding: 11px 8px; }
  .quality-options strong { font-size: 11px; }
  .quality-options small { font-size: 9px; }
  .toast { bottom: 20px; font-size: 11px; }
  .desktop-heading { margin-top: 12px; }
  .desktop-heading h1 { font-size: 26px; }
  .desktop-intro { font-size: 11px; margin-bottom: 24px; }
  .desktop-card { padding: 20px; }
  .desktop-card .copy-field { gap: 6px; }
  .desktop-card .copy-field input { font-size: 10px; }
  .desktop-card .copy-field .button { padding: 8px 10px; }
  .desktop-foot { align-items: flex-start; gap: 10px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 2s !important; transition: none !important; }
}
