:root { color-scheme: dark; font: 1rem system-ui, sans-serif; color: #f2f3f7; background: #10141a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(54rem, 100%); margin: auto; padding: clamp(1rem, 4vw, 3rem); }
header, #filters, nav, li, #transport { display: flex; align-items: center; gap: .75rem; }
header, li, #transport { justify-content: space-between; }
h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 2.4rem); }
#status:empty, #progress:empty { display: none; }
#status, #count, small, #progress { color: #bdc7d2; }
#login { display: grid; max-width: 26rem; gap: .7rem; margin-top: 2rem; }
#filters { margin-top: 1.5rem; flex-wrap: wrap; }
#search { flex: 1 1 14rem; min-width: 0; }
input, select, button { font: inherit; border: 1px solid #546170; border-radius: .45rem; padding: .5rem .8rem; min-height: 2.6rem; }
input, select, nav button, #fullscreen { background: #1c232c; color: inherit; }
button { background: #c0ddf6; color: #102334; font-weight: 600; cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
:focus-visible { outline: 2px solid white; outline-offset: 2px; }
ul { list-style: none; padding: 0; margin: 0; }
li { padding: .7rem 0; border-top: 1px solid #34404d; }
li div, #transport div { min-width: 0; overflow-wrap: anywhere; }
small, #progress { display: block; margin-top: .2rem; }
nav { justify-content: flex-end; margin: 1rem 0; }
#stage { position: fixed; inset: 0; background: #050607; }
#screen, #screen img { width: 100%; height: 100%; }
#screen img { object-fit: contain; display: block; }
#transport { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%); width: min(34rem, calc(100% - 1.5rem)); display: grid; justify-content: stretch; gap: .4rem; background: #151b22e8; border-radius: .6rem; padding: .6rem .8rem; }
#timeline, .actions { display: flex; align-items: center; gap: .5rem; }
.actions { flex-wrap: wrap; }
#seek { min-width: 3rem; min-height: 1.5rem; flex: 1; margin: 0; padding: 0; accent-color: #c0ddf6; }
#time { font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }
#transport button { flex-shrink: 0; }
#sections, #hierarchy { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: .5rem; }
#sections [aria-pressed="true"] { background: #c0ddf6; color: #102334; }
#quality label { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; }
#quality select, #hideControls, #showControls { min-height: 2rem; font-size: .85rem; padding: .3rem .55rem; }
#hideControls, #showControls { justify-self: start; background: #182331e8; color: #dceaff; }
#showControls { position: absolute; right: .75rem; bottom: .75rem; }
#transport { max-height: calc(100% - 1.5rem); overflow: auto; }
#stage { display: grid; align-content: end; justify-items: center; gap: .55rem; padding: .75rem; }
#screen { position: absolute; inset: 0; }
#transport { position: relative; left: auto; bottom: auto; transform: none; width: min(34rem, 100%); z-index: 1; max-height: calc(100dvh - 4rem); }
#captions { position: relative; z-index: 1; text-align: center; white-space: pre-line; max-width: 86%; padding: .12em .45em; border-radius: .18em; background: #000c; color: white; font-size: clamp(1.05rem, 3.4vmin, 2.8rem); line-height: 1.25; pointer-events: none; }
#captions:empty, #trackNotice:empty { display: none; }
#stage:has(#transport[hidden]) #captions { margin-bottom: 2.2rem; }
#tracks label { display: flex; align-items: center; gap: .3rem; min-width: 0; max-width: 100%; font-size: .9rem; }
#tracks select { min-width: 0; max-width: 19rem; min-height: 2rem; padding: .3rem .55rem; }
#trackNotice { color: #bdc7d2; font-size: .85rem; }
