/* SPDX-License-Identifier: Apache-2.0 */
:root{color-scheme:dark;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#101114;color:#f1f1f4;--muted:#93949f;--line:#ffffff12;--accent:#b8a2ff;--panel:#191a20}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#27213530,transparent 48%)}button,input,select{font:inherit}button,a,input,select,summary{touch-action:manipulation}button,select,.file-button,summary{cursor:pointer}button{border:0}button:disabled,input:disabled,select:disabled,.file-button:has(input:disabled){opacity:.35;cursor:not-allowed}[hidden]{display:none!important}:focus-visible{outline:2px solid var(--accent);outline-offset:4px}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;flex-shrink:0}button{display:inline-flex;align-items:center;justify-content:center;gap:9px}button:hover:not(:disabled),.file-button:hover:not(:has(input:disabled)){background-color:#303139}button:active:not(:disabled){transform:translateY(1px)}
.masthead{height:76px;padding:0 4.2%;display:flex;align-items:center;gap:28px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:11px;font-size:23px;font-weight:650;letter-spacing:-1px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:#b9a6f5;border-radius:9px;color:#181322}.brand-mark svg{width:19px;height:19px;fill:currentColor;stroke-width:0;transform:translateX(-1px)}.beta{font-size:9px;letter-spacing:.8px;font-weight:550;border:1px solid #ffffff1a;color:#a4a3ae;padding:3px 6px;border-radius:5px;margin-left:2px}.header-divider{height:20px;width:1px;background:var(--line)}.nav-current{font-size:12px;color:#dedee6}.local{margin-left:auto;color:var(--muted);font-size:11px;display:flex;align-items:center;gap:8px}.local svg{width:14px;height:14px;color:#a8a2b6}
main{max-width:1224px;margin:auto;padding:20px 36px 0}.eyebrow{font-size:9px;letter-spacing:1.8px;color:#a7a0b8;font-weight:600;margin:0 0 12px;display:flex;align-items:center;gap:8px}.eyebrow>span{width:5px;height:5px;background:var(--accent);border-radius:50%;box-shadow:0 0 8px #b8a2ff55}
.viewer{min-width:0}.player-shell{position:relative;background:#15161b;border:1px solid #ffffff17;border-radius:16px;box-shadow:0 20px 70px #0004;overflow:hidden}.source-row{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--line);background:#191a20}.file-symbol{display:grid;place-items:center;color:#898594}.file-symbol svg{width:18px;height:18px}.source-info{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}.source-info strong{font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.source-info>span{font-size:10px;color:#858590}.source-row .file-button{padding:7px 10px;font-size:11px}.source-row .file-button svg{width:15px;height:15px}.source-row .icon-button{width:30px;height:30px}
.primary,.secondary,.text-button{border-radius:8px;padding:10px 16px;white-space:nowrap;transition:background .15s,transform .15s;font-size:12px;min-height:38px}.primary{background:#e7ddff;color:#241a36;font-weight:600;box-shadow:0 2px 10px #0003,inset 0 1px #fff8}.primary:hover:not(:disabled){background:#f3edff}.secondary{background:#ffffff05;border:1px solid #ffffff1b;color:#d7d5df}.text-button{background:transparent;color:var(--muted)}.icon-button{background:transparent;color:#a2a1af;border-radius:7px;padding:8px;width:36px;height:36px;flex-shrink:0;transition:background .15s,color .15s}.icon-button:hover:not(:disabled){color:#fff}.file-button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;font-size:12px}.file-button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-button:focus-within{outline:2px solid var(--accent);outline-offset:3px}
#stage{position:relative;height:var(--stage-height,clamp(260px,45svh,420px));min-height:0;background:#090a0e;overflow:hidden;display:grid;place-items:center}#stage:has(#empty:not([hidden])){background:radial-gradient(ellipse at 50% 25%,#63518813,transparent 65%),#0e0f14}#stage:has(#empty:not([hidden])):before{content:"";position:absolute;inset:0;background-image:radial-gradient(#a497ca20 .7px,transparent .7px);background-size:22px 22px;mask-image:radial-gradient(ellipse at 50% 35%,#000,transparent 70%);pointer-events:none}#surface{position:absolute;inset:0}#surface .demuxe-player{height:100%;display:grid;place-items:center}#surface video,#surface canvas{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}#empty{position:relative;text-align:center;max-width:100%;padding:28px 20px}.play-emblem{position:relative;display:grid;place-items:center;width:100px;height:100px;margin:0 auto 22px}.emblem-ring{position:absolute;inset:0;border:1px solid #b8a2ff0e;border-radius:50%;box-shadow:0 0 0 13px #b8a2ff03,inset 0 0 0 12px #b8a2ff03}.emblem-core{display:grid;place-items:center;width:60px;height:60px;border-radius:19px;background:linear-gradient(145deg,#3a304c,#211c30);border:1px solid #b8a2ff38;box-shadow:0 8px 24px #0004,inset 0 1px #ffffff0c;transform:rotate(-8deg);color:#d8c5ff}.emblem-core svg{width:27px;height:27px;fill:currentColor;stroke-width:0;transform:rotate(8deg)}h2{font-size:23px;letter-spacing:-.7px;margin:0 0 7px;font-weight:550}#empty>p{color:#85838f;margin:0 0 24px;font-size:12px}.empty-actions{display:flex;justify-content:center;gap:10px}.empty-actions button{height:42px;padding:0 18px}.empty-actions svg{width:16px;height:16px}.format-list{display:flex;justify-content:center;gap:6px;align-items:center;margin-top:21px;font:9px ui-monospace,SFMono-Regular,monospace;color:#83818e}.format-list>span:not(.more-formats){border:1px solid #ffffff0c;background:#ffffff02;border-radius:4px;padding:3px 6px}.more-formats{padding-left:4px;color:#64636f}#drop-overlay{display:none;position:absolute;inset:12px;border:1px dashed #b8a2ff99;border-radius:12px;background:#20182df5;color:#d9c9ff;align-items:center;justify-content:center;flex-direction:column;gap:20px;font-size:24px;z-index:5}.dragging #drop-overlay{display:flex}#drop-overlay svg{width:42px;height:42px}
#loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;background:#0d0e12e8;color:#aaa5b7;font-size:12px}#loading strong{font-size:16px;font-weight:500;color:#e8e3f1}.spinner{width:28px;height:28px;border:2px solid #ffffff15;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin-bottom:12px}@keyframes spin{to{transform:rotate(360deg)}}#audio-visual{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:20px;background:radial-gradient(ellipse at center,#34234850,transparent 70%),#0d0e12;color:#898190;font-size:11px}.audio-bars{height:64px;display:flex;align-items:center;gap:7px}.audio-bars i{width:5px;height:30%;border-radius:4px;background:linear-gradient(#ccb7f5,#726187)}.audio-bars i:nth-child(3n){height:80%}.audio-bars i:nth-child(3n + 1){height:55%}.audio-bars i:nth-child(5){height:100%}
.transport{padding:0 20px 12px;background:#15161b}.scrub{display:flex;align-items:center;margin:0 0 5px;height:22px}input[type=range]{accent-color:var(--accent);padding:0;min-width:0;cursor:pointer;margin:0}#timeline{width:100%;height:14px;--progress:0%;appearance:none;background:transparent}#timeline::-webkit-slider-runnable-track{height:3px;background:linear-gradient(to right,var(--accent) var(--progress),#ffffff19 var(--progress));border-radius:5px}#timeline::-webkit-slider-thumb{appearance:none;width:10px;height:10px;border-radius:50%;background:#e7ddff;margin-top:-3.5px;box-shadow:0 0 0 3px #b8a2ff12}#timeline::-moz-range-track{height:3px;background:#ffffff19;border-radius:5px}#timeline::-moz-range-progress{height:3px;background:var(--accent)}#timeline::-moz-range-thumb{width:10px;height:10px;background:#e7ddff;border:0;border-radius:50%}.transport-row{display:flex;align-items:center;gap:12px}.play-button{color:#e6d9ff;width:32px}.play-button svg{width:19px;height:19px}#play svg{fill:currentColor;stroke-width:0}#pause svg{stroke-width:4}.time-display{display:flex;gap:8px;font:10px ui-monospace,SFMono-Regular,monospace;color:#bfbcca;white-space:nowrap;font-variant-numeric:tabular-nums}.time-divider,#duration{color:#696873}.volume-label{margin-left:12px;display:flex;align-items:center;gap:10px;color:#9a96a6}.volume-label svg{width:16px;height:16px}#volume{width:64px;height:3px}.transport-spacer{flex:1}.speed-label select{font-size:11px;width:55px;background:transparent;border-color:transparent;padding:7px 3px;color:#c6c2cf}.pill{color:#bcb0d2;background:#b8a2ff0b;border:1px solid #b8a2ff15;padding:4px 7px;border-radius:5px;font:9px ui-monospace,monospace;letter-spacing:.4px;white-space:nowrap}
.status-row{display:flex;align-items:center;gap:8px;padding:15px 3px}.dot{display:inline-block;width:5px;height:5px;background:#9bad9d;border-radius:50%;flex-shrink:0}.status-row p{margin:0;color:#91909b;font-size:11px;overflow-wrap:anywhere;flex:1}.status-note{font:8px ui-monospace,monospace;letter-spacing:1px;color:#666570}.status-row[data-error=true] p{color:#f3aaae}.status-row[data-error=true] .dot{background:#f3aaae}
.remote-panel{border:1px solid var(--line);border-radius:10px;background:#ffffff02}.remote-panel summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:15px 18px;font-size:11px}.remote-panel summary::-webkit-details-marker{display:none}.remote-title{display:flex;align-items:center;gap:10px;color:#b4b0bf}.remote-title svg{width:15px;height:15px;color:#827b93}.remote-formats{font-size:9px;color:#6e697b;letter-spacing:.5px}.remote-formats b{margin-left:24px;font-size:17px;font-weight:400;color:#a29aaa}.remote-panel[open] .remote-formats b{display:inline-block;transform:rotate(45deg)}.remote-panel form{padding:0 18px 18px;max-width:740px}.remote-panel .check{margin-top:15px}.remote-panel button{margin-top:15px}
.capabilities{display:grid;grid-template-columns:1fr 1fr 1fr;padding:30px 4px;gap:28px}.capabilities>div{display:flex;gap:12px;align-items:flex-start}.capabilities svg{width:17px;height:17px;color:#827491;margin-top:2px}.capabilities strong{font-size:11px;font-weight:500;color:#c5c1ce;display:block;margin-bottom:4px}.capabilities span>span{font-size:10px;color:#73707f}footer{display:flex;justify-content:space-between;gap:15px;padding:20px 0 24px;color:#797582;font-size:10px;border-top:1px solid var(--line)}footer>span:last-child{font:8px ui-monospace,monospace;letter-spacing:1px}.footer-dot{padding:0 8px;color:#4d485a}
#settings-dialog{position:fixed;inset:0 0 0 auto;max-height:100dvh;height:100dvh;width:410px;max-width:100%;margin:0;padding:0;border:0;border-left:1px solid #ffffff1b;background:#191a20;color:#edeaf3;box-shadow:-20px 0 70px #0005;overflow-y:auto;overscroll-behavior:contain}#settings-dialog::backdrop{background:#08090b88;backdrop-filter:blur(4px)}#settings-dialog[open]{animation:drawer-in .2s ease-out}@keyframes drawer-in{from{transform:translateX(24px);opacity:.5}to{transform:translateX(0);opacity:1}}body:has(#settings-dialog[open]){overflow:hidden}.panel-heading{padding:26px 24px 22px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#191a20f5;backdrop-filter:blur(10px);z-index:2}.panel-heading h2{font-size:19px;margin:0;letter-spacing:-.5px}.panel-heading .eyebrow{font-size:8px;margin-bottom:7px}.setting-section{padding:20px 24px;border-bottom:1px solid var(--line)}h3{font-size:12px;font-weight:600;margin:0 0 14px}.section-title{display:flex;align-items:baseline;justify-content:space-between}.check{display:flex;align-items:center;gap:7px;font-size:12px;color:#bbb4ca}.check input{accent-color:var(--accent);margin:0;width:14px;height:14px}.toggle-line{justify-content:space-between}.hint{font-size:11px;line-height:1.7;color:#8c8598;margin:10px 0 0}label{display:block;font-size:11px;color:#aaa3b7}select,input:not([type=range],[type=checkbox],[type=file]){display:block;width:100%;min-width:0;margin-top:6px;background:#101116;border:1px solid #ffffff17;border-radius:7px;padding:10px 12px;color:#e0daea}select{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.form-grid select{margin-top:6px}#attachments{list-style:none;margin:8px 0 0;padding:0;font-size:11px;color:var(--accent);overflow-wrap:anywhere}#attachments:empty{display:none}#attachments li{margin-top:4px}.filters-panel summary{font-size:12px}.filters-panel form{margin-top:14px}.filters-panel label+label{margin-top:10px}summary{color:#c1b9ce}summary::marker{color:#7a728b}.diagnostics-panel{padding:20px 24px}.diagnostics-panel summary{font-size:12px}.diagnostics-panel button{width:100%;margin-top:10px}.diagnostics-panel svg{width:15px;height:15px}pre{max-height:300px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#aaa1bb;font:10px/1.7 ui-monospace,SFMono-Regular,monospace}.engine-explanation{margin-top:16px;padding:14px;border:1px solid #b8a2ff18;background:#b8a2ff06;border-radius:9px;overflow-wrap:anywhere}.engine-explanation h4{font-size:11px;color:#c0aadf;margin:0 0 7px;font-weight:550}.engine-explanation p{font-size:11px;line-height:1.7;color:#b1a6bf;margin:0}.engine-explanation ul{padding-left:14px;margin:8px 0 0;font-size:11px;line-height:1.7;color:#9c91ab;max-height:220px;overflow:auto}.engine-explanation ul:empty{display:none}.engine-explanation li+li{margin-top:8px}.engine-explanation strong{font-weight:550;color:#c3b8d0}.engine-explanation li{white-space:pre-line}
.playback-error{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px;padding:16px 18px;border:1px solid #d179853e;border-radius:10px;background:#2d1c23;color:#f5bcc5;overflow-wrap:anywhere}.playback-error>div{min-width:0;flex:1}.playback-error strong{font-size:14px}.playback-error p{font-size:12px;line-height:1.65;margin:7px 0 0;white-space:pre-line}.playback-error p:empty{display:none}.playback-error .icon-button{color:#f5bcc5}.playback-error #playback-error-source{color:#c398a5;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#player-frame:fullscreen{width:100vw;height:100dvh;max-width:none;border:0;border-radius:0;display:flex;flex-direction:column;background:#000}#player-frame:fullscreen #stage{height:auto;flex:1;min-height:0;aspect-ratio:auto}#player-frame:fullscreen .source-row{display:none}#player-frame:fullscreen .transport{flex-shrink:0}#player-frame:fullscreen #settings-dialog{position:fixed}

@media(max-width:800px){.masthead{padding:0 24px;gap:18px;height:66px}main{padding:16px 24px 0}.capabilities{gap:16px}.capabilities>div{gap:9px}.capabilities span>span{line-height:1.6;display:block}.transport-row{gap:9px}.status-note{display:none}}
@media(max-width:540px){.masthead{padding:0 20px;gap:16px}.brand{font-size:21px;gap:8px}.brand-mark{width:26px;height:26px}.header-divider,.nav-current{display:none}.local{font-size:0;gap:0}.local svg{width:17px;height:17px}.beta{font-size:8px}main{padding:16px 16px 0}.eyebrow{font-size:8px;letter-spacing:1.4px}.player-shell{border-radius:12px}.source-row{padding:12px;gap:8px}.source-row .file-button{padding:6px;min-height:32px}.source-row .file-button span{display:none}.source-info strong{font-size:11px}.source-info>span{font-size:9px}.file-symbol{display:none}.source-row .icon-button{width:26px;padding:5px}.play-emblem{margin-bottom:22px;width:86px;height:86px}.emblem-core{width:54px;height:54px;border-radius:17px}h2{font-size:20px}#empty{padding:24px 12px}#empty>p{font-size:11px}.empty-actions{gap:8px}.empty-actions button{padding:0 12px;font-size:11px;height:40px}.empty-actions svg{width:14px;height:14px}.format-list{gap:5px;font-size:8px}.transport{padding:0 10px 9px}.transport-row{gap:5px}.transport-row .icon-button{width:30px;height:34px;padding:6px}.transport-row .play-button{width:25px}.time-display{font-size:9px;gap:5px}.volume-label{margin-left:3px;gap:5px}.volume-label svg{display:none}#volume{width:32px}.pill{font-size:7px;padding:3px 4px;letter-spacing:0}.speed-label select{font-size:10px;width:42px;padding:6px 0}.status-row{padding:13px 3px}.status-row p{font-size:10px}.remote-panel summary{padding:13px;font-size:11px}.remote-formats{font-size:7px}.remote-formats b{margin-left:10px}.capabilities{grid-template-columns:1fr;gap:20px;padding:26px 4px}.capabilities>div{gap:12px}.capabilities strong{font-size:11px;margin-bottom:2px}.capabilities span>span{font-size:10px}footer{font-size:9px;padding-bottom:22px}footer>span:last-child{font-size:7px;max-width:90px;text-align:right;line-height:1.7}.footer-dot{padding:0 4px}#settings-dialog{width:min(410px,100%)}.panel-heading{padding:22px 20px}.setting-section,.diagnostics-panel{padding:20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

#player-toast{position:absolute;left:50%;top:18px;transform:translateX(-50%);z-index:8;padding:8px 15px;border:1px solid #ffffff22;border-radius:8px;background:#16121feb;color:#ede5ff;font-size:13px;pointer-events:none;white-space:nowrap}
#fullscreen-error{position:absolute;top:12px;left:12px;right:12px;z-index:12;display:flex;align-items:center;gap:12px;padding:12px 16px;background:#29212ff5;border:1px solid #b8a2ff55;border-radius:8px;font-size:12px;color:#e1d6ef}#fullscreen-error>div{flex:1}#fullscreen-error a{color:#d4bdff;text-decoration:underline}
#shortcut-help{padding:2px 6px;min-height:26px;font-size:10px;color:#aaa0b9;gap:6px}kbd{font:10px ui-monospace,monospace;display:inline-block;min-width:20px;padding:2px 5px;text-align:center;border:1px solid #ffffff24;border-radius:4px;background:#ffffff05;color:#d0c5df}.shortcut-list{margin:16px 0 0;font-size:11px}.shortcut-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0}.shortcut-list dt{color:#b4a9c2}.shortcut-list dd{margin:0;text-align:right;color:#9f92ae;font-size:10px}.volume-label{gap:5px}.volume-label #mute{width:28px;height:30px;padding:5px}.volume-label #mute[aria-pressed=true]{color:var(--accent);background:#b8a2ff15}
#player-frame:-webkit-full-screen{width:100vw;height:100dvh;max-width:none;border:0;border-radius:0;display:flex;flex-direction:column;background:#000}#player-frame:-webkit-full-screen #stage{height:auto;flex:1;min-height:0}#player-frame:-webkit-full-screen .source-row{display:none}#player-frame:-webkit-full-screen .transport{flex-shrink:0}
@media(max-width:540px){#stage{height:var(--stage-height,345px)}.volume-label{margin-left:0;gap:2px}.volume-label #mute{width:24px;padding:4px}.volume-label #mute svg{display:block;width:14px;height:14px}#volume{width:24px}.transport-row{gap:3px}.transport-row .time-display{gap:3px}}
/* The reusable component owns playback controls; playground tools stay outside. */
demuxe-player{display:block;margin:0 0 24px;--demuxe-radius:14px}.remote-panel{padding:20px 0;color:#b9b6c3}.remote-panel>label{display:block;margin-bottom:8px}.remote-row{display:flex;gap:12px;align-items:center;margin-bottom:8px}.remote-row input[type=url]{flex:1;min-width:100px}.remote-row label{white-space:nowrap}.remote-panel small{font-size:12px}.settings-body label{display:block;margin:12px 0}.settings-body input:not([type=checkbox]),.settings-body select{max-width:100%}#diagnostics{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}#status:empty{display:none}@media(max-width:600px){.remote-row{flex-wrap:wrap}.source-row{flex-wrap:wrap}.source-info{min-width:50%}}
.remote-row input[type=url]{width:auto;flex:1 1 320px;min-width:0}.remote-row select{width:auto;flex:0 0 auto;min-width:90px}.remote-row label{display:flex;gap:6px;align-items:center}.remote-row input[type=checkbox]{width:auto}

/* Quiet host page around the self-contained player. */
main{max-width:1320px;padding-top:32px}.source-row{background:none;border:0;padding:0 0 18px}.source-info strong{font-size:16px}.source-info>span{font-size:12px;margin-top:4px}demuxe-player{box-shadow:0 24px 90px #0005;margin-bottom:28px}.footer{justify-content:center;border:0;color:#706b7d}#settings{background:#191a20;color:#eee;border:1px solid #ffffff20;border-radius:16px;width:min(520px,calc(100% - 32px));max-height:85vh;padding:24px}#settings::backdrop{background:#0009;backdrop-filter:blur(8px)}.settings-header{display:flex;align-items:center;justify-content:space-between}.settings-header h2{font-size:20px}.settings-body section{border-top:1px solid #ffffff12;margin-top:20px;padding-top:20px}@media(max-width:600px){main{padding:20px 12px 0}.source-info{flex-basis:100%}.masthead{height:64px}}

/* Match the player's restrained dark menu and button surfaces. */
.secondary{background:#1b1c20;border:1px solid #ffffff12;color:#c7c8ce;border-radius:7px;box-shadow:0 1px 2px #0002;min-height:36px;padding:8px 13px}.secondary:hover:not(:disabled){background:#25262b;border-color:#ffffff22;color:#f3f3f5}#settings{background:#151619;border:1px solid #ffffff14;border-radius:10px;box-shadow:0 20px 60px #0007}#settings::backdrop{background:#0009;backdrop-filter:none}.settings-body input:not([type=checkbox],[type=file]),.settings-body select{background:#0e0f11;border:1px solid #ffffff12;border-radius:6px}.settings-body input::file-selector-button{font:inherit;color:#d5d5da;background:#25262b;border:1px solid #ffffff14;border-radius:6px;padding:8px 10px;margin-right:8px;cursor:pointer}

.header-actions{display:flex;align-items:center;gap:8px}.masthead{gap:24px}@media(max-width:760px){.masthead .local{display:none}}@media(max-width:540px){.masthead{padding:0 12px;gap:12px}.header-actions{margin-left:auto;gap:6px}.header-actions .secondary{font-size:10px;padding:7px 8px}.masthead .brand{font-size:18px;gap:6px}.masthead .beta{display:none}}@media(max-width:350px){.masthead{gap:6px}.masthead .brand-mark{display:none}.header-actions .secondary{padding-inline:6px}}

/* A compact, read-only summary belongs to the playground, outside the player. */
.playback-summary{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);align-items:baseline;gap:24px;margin:-10px 0 24px;padding:0 4px 18px;border-bottom:1px solid var(--line);font-size:12px}
.playback-summary>div{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:baseline;gap:10px;min-width:0;text-align:left}
.playback-summary dt{color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase;flex:0 0 48px}
.playback-summary dd{margin:0;color:#c7c8ce;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.summary-engine{flex:none}.summary-engine [data-active=true]{color:var(--accent)}
.summary-media{flex:none;justify-self:end;max-width:100%}.engine-description{color:var(--muted);margin-left:10px}
@media(max-width:540px){.playback-summary{grid-template-columns:minmax(0,1fr);gap:9px;padding-inline:2px}.playback-summary dt{width:48px}.playback-summary>div{flex-basis:auto}.summary-media{justify-self:start}}

/* Fit the playground to the viewport; menus retain their own scrolling. */
html,body{height:100%;overflow:hidden}
body{height:100dvh;display:flex;flex-direction:column}
.masthead{height:48px;min-height:48px;padding:0 24px;flex:none}
.masthead .brand{font-size:19px}.masthead .brand-mark{width:25px;height:25px}
main{width:100%;flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;padding:12px 24px 8px;margin:0 auto}
#viewer{flex:1;min-height:0;margin:0}
#viewer::part(container){height:100%}
@media not ((max-width:600px) and (orientation:portrait)){#viewer::part(stage){height:100%;min-height:0;max-height:none;aspect-ratio:auto}}
@media(max-width:600px) and (orientation:portrait){#viewer:is([controls-mode=desktop],[layout]:not([layout=classic]),:fullscreen)::part(stage){height:100%;min-height:0;max-height:none;aspect-ratio:auto}}
.playback-summary{flex:none;margin:0;padding:0 4px 8px;gap:12px 24px}
.footer{flex:none;margin:0;padding:0;font-size:9px}
#status{flex:none;margin:0;max-height:48px;overflow:auto}
@media(max-width:540px){.masthead{height:42px;min-height:42px;padding:0 12px}main{padding:8px 12px;gap:8px}.playback-summary{gap:5px}.footer{display:none}}
@media(max-height:450px){.masthead{height:36px;min-height:36px}main{gap:6px;padding-top:6px}.footer,.engine-description{display:none}.playback-summary{font-size:10px}}

/* The framed layout reserves header and transport space inside the viewport. */
#viewer:is([layout=studio],[layout=deck])::part(container){display:flex;flex-direction:column}
#viewer:is([layout=studio],[layout=deck])::part(stage){height:auto;flex:1;min-height:0}
#viewer:is([layout=studio],[layout=deck])::part(topbar),#viewer:is([layout=studio],[layout=deck])::part(controls){flex:none}

/* Compare presentations without opening a settings panel or replacing media. */
.layout-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;min-width:0}
.layout-options{display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:thin;padding:3px}
.layout-caption{font:9px/1.4 ui-monospace,monospace;letter-spacing:.14em;color:#737780;margin-right:12px}
.layout-options button{flex:none;min-height:34px;padding:6px 14px;border:1px solid transparent;border-radius:7px;background:transparent;color:#979ba5;font:12px/1.4 system-ui;cursor:pointer;transition:background .15s,color .15s}
.layout-options button:hover{color:#f6f3ed;background:#ffffff08}
.layout-options button[aria-pressed=true]{background:#24262b;border-color:#ffffff12;color:#f6f3ed}
.layout-options button:focus-visible,.layout-example:focus-visible{outline:2px solid #f3ead8;outline-offset:2px}
.layout-example{flex:none;min-height:34px;padding:6px 4px;background:none;border:0;color:#b8bbc3;font:12px/1.4 system-ui;cursor:pointer;white-space:nowrap}
.layout-example span{margin-left:6px;color:#6f7580}.layout-example:hover{color:#fff}
@media(max-width:650px){.layout-toolbar{gap:6px}.layout-caption{display:none}.layout-options button{padding-inline:10px}.layout-example{font-size:11px}}
@media(max-width:450px){.layout-toolbar{flex-wrap:wrap;gap:0}.layout-options{width:100%}.layout-options button{flex:1;padding-inline:7px;font-size:11px}.layout-example{margin-left:auto;min-height:26px}}

/* Let portrait pages scroll, and reserve landscape height for the picture. */
@media(max-width:600px){
 html,body{height:auto;min-height:100%;overflow:auto}
 body{min-height:100dvh}
 main{flex:none;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 #viewer{flex:none;height:clamp(300px,58svh,520px)}
 .layout-options button,.layout-example{min-height:44px}
 .layout-toolbar{gap:4px}
 .playback-summary{margin-top:4px}
}
@media(max-width:600px) and (orientation:portrait){
 #viewer:not([controls-mode=desktop]):not([layout]):not(:fullscreen),#viewer:not([controls-mode=desktop])[layout=classic]:not(:fullscreen){height:auto}
}
@media(max-height:500px) and (orientation:landscape){
 .masthead,.layout-toolbar,.playback-summary,.footer{display:none}
 main{padding:0;gap:0;max-width:none}
 #viewer{height:100dvh;margin:0;--demuxe-radius:0}
 #viewer::part(container){border:0}
}
