:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #121218; color: #f4f4f8; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 850px; margin: 0 auto; padding: 1.5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; margin-top: 2rem; }
a { color: #b7c8ff; }
button, input, select { font: inherit; border: 1px solid #707080; border-radius: .4rem; padding: .7rem; }
button { cursor: pointer; background: #30334a; color: white; min-height: 44px; }
button:disabled { cursor: not-allowed; opacity: .4; }
button:focus-visible, a:focus-visible { outline: 3px solid #b7c8ff; outline-offset: 2px; }
label { display: grid; gap: .4rem; }
form { display: grid; gap: 1rem; max-width: 360px; }
[hidden] { display: none !important; }
#error, .scene small { color: #ffb7b7; }
#error:empty { display: none; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.live-state { position: sticky; top: 0; background: #20212d; padding: .4rem 1rem; margin-top: 1rem; border-radius: .4rem; z-index: 1; }
.scene { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid #40404c; }
.scene small { grid-column: 1 / -1; }
.scene-active { background: #253d36; box-shadow: inset 4px 0 #83e5ad; padding-left: .8rem; padding-right: .8rem; }
.scene-pending { outline: 1px dashed #b7c8ff; outline-offset: -1px; }
.scene-badge { display: inline-block; margin-left: .6rem; padding: .15rem .4rem; border-radius: .3rem; background: #f4f4f8; color: #121218; font-size: .8rem; }
.scene-duration { display: block; margin-top: .2rem; }
.muted { color: #b0b0bd; font-size: .9rem; }
.audience { background: black; overflow: hidden; }
#light { position: fixed; inset: 0; background: black; }
.audience-controls { position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); left: 1rem; right: 1rem; display: flex; justify-content: center; align-items: center; gap: .5rem; }
.audience-controls button, #status { background: #141419; color: #ddd; font-size: .8rem; }
#status { border-radius: .4rem; padding: .5rem; }
#fullscreen-help { max-width: min(90vw, 420px); border: 1px solid #707080; border-radius: .5rem; padding: 1.5rem; background: #141419; color: #ddd; }
#fullscreen-help::backdrop { background: #000; }
#qr-dialog { position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; border: 0; background: #000; color: #111; padding: 1rem; }
#qr-dialog[open] { display: grid; place-items: center; }
#qr-dialog::backdrop { background: #000; }
.qr-panel { width: min(100%, 400px); padding: 1rem; background: white; color-scheme: light; text-align: center; border-radius: .5rem; }
.qr-panel img { display: block; width: 100%; height: auto; max-width: 320px; margin: auto; }
.qr-panel p { overflow-wrap: anywhere; font-size: .85rem; }
