/* A common, compact toolbar for image galleries and the live Studio tour. */
:is(.codex-presentation,.studio-tour){--presentation-panel:var(--studio-surface,#151920);--presentation-text:var(--studio-ink,#f4f5f7);--presentation-muted:var(--studio-muted,#b6beca);--presentation-border:var(--studio-line,#48515e)}
html:root :is(.codex-presentation-header,.studio-tour>header){display:flex;align-items:center;gap:18px;padding:14px clamp(16px,3vw,36px);min-height:80px;background:var(--presentation-panel);color:var(--presentation-text);border-bottom:1px solid var(--presentation-border)}
html:root :is(.codex-presentation-header,.studio-tour>header)>div:first-child{flex:1;min-width:140px;display:grid;gap:6px}
html:root :is(.codex-presentation-header,.studio-tour>header) strong{font:650 17px/1.35 Inter,system-ui,sans-serif;letter-spacing:-.02em;color:var(--presentation-text);white-space:normal;overflow-wrap:anywhere}
html:root :is(.codex-presentation-header,.studio-tour>header) small{font:600 10px/1.5 Inter,system-ui,sans-serif;letter-spacing:.11em;color:var(--presentation-muted);margin:0}
html:root [data-presentation-count]{font:500 12px/1.5 Inter,system-ui,sans-serif;color:var(--presentation-muted);white-space:nowrap;margin:0}
html:root .presentation-tools{display:flex;align-items:center;gap:14px;flex:0 1 auto;min-width:0}
.presentation-options{display:flex;gap:8px;min-width:0}.presentation-tool-buttons{display:flex!important;align-items:center;gap:6px;flex:none;flex-wrap:nowrap!important}
html:root :is(.presentation-tools button,.presentation-close,.presentation-options select){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;height:44px;padding:10px 13px;margin:0;border:1px solid var(--presentation-border);border-radius:13px;background:transparent;color:var(--presentation-text);font:600 13px/1.4 Inter,system-ui,sans-serif;letter-spacing:0;text-transform:none;white-space:nowrap;box-shadow:none;cursor:pointer;flex:none}
html:root .presentation-options select{display:block;width:clamp(150px,15vw,220px);min-width:0;padding-right:28px;font-size:14px;font-weight:500;white-space:normal}.presentation-options select+select{width:110px}
.presentation-options option{background:var(--presentation-panel);color:var(--presentation-text)}
html:root :is(.presentation-tools button,.presentation-close):hover{background:color-mix(in srgb,var(--presentation-text) 8%,transparent);border-color:var(--presentation-text);transform:none}
html:root :is(.presentation-tools button,.presentation-close,.presentation-options select):focus-visible{outline:2px solid var(--presentation-text);outline-offset:3px}
.presentation-tools svg,.presentation-close svg{display:block;width:18px;height:18px;flex:none}.presentation-close>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.presentation-close{width:44px}
html:root :is(.presentation-tools button,.presentation-close)[hidden]{display:none!important}
html:root .codex-presentation{grid-template-rows:auto minmax(0,1fr) auto;background:#0b0e13}
html:root .codex-presentation-stage{display:grid;place-items:center;min-width:0;min-height:0;padding:clamp(12px,2vw,28px);overflow:hidden;overflow-anchor:none;background:#0b0e13;touch-action:pan-y}
html:root .codex-presentation-cover{display:block;min-width:0;min-height:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;box-shadow:0 10px 40px #0005}
.codex-presentation-stage.is-zoomed{display:block!important;overflow:auto!important;touch-action:pan-x pan-y}.codex-presentation-stage.is-zoomed .codex-presentation-cover{width:170%;height:auto;max-width:none;max-height:none;object-fit:initial}
html:root .codex-presentation-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;min-height:76px;padding:12px clamp(16px,3vw,36px);background:var(--presentation-panel);color:var(--presentation-text);border-top:1px solid var(--presentation-border)}
.codex-presentation-footer>div{flex:1;min-width:90px}.codex-presentation-footer>span{font-size:12px!important;letter-spacing:0;color:var(--presentation-muted)!important}.codex-presentation-footer a{margin:0!important;min-height:44px;font:600 13px/1.4 Inter,system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none;padding:10px 16px!important;border-radius:12px!important}
.codex-presentation-footer [data-presentation-open]{background:transparent!important;color:var(--presentation-text)!important;border:1px solid var(--presentation-border)}
.codex-presentation-error{text-align:center;line-height:1.7}.codex-presentation-error button{display:block;margin:18px auto 0;min-height:44px;padding:10px 18px;border-radius:12px;cursor:pointer}
html:root .studio-tour[open]{grid-template-rows:auto minmax(0,1fr) 4px}.studio-tour-stage iframe{display:block;image-rendering:auto}.studio-tour-progress i{background:var(--presentation-text)}
@media(max-width:1320px){.presentation-tool-buttons button>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}html:root .presentation-tool-buttons button{width:44px;padding:10px}.presentation-tools{gap:8px!important}.presentation-options select{max-width:180px}}
@media(max-width:1000px){
 html:root :is(.codex-presentation-header,.studio-tour>header){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px 16px}
 html:root :is(.codex-presentation-header,.studio-tour>header)>div:first-child{grid-column:1;grid-row:1;min-width:0}.presentation-close{grid-column:2;grid-row:1}
 [data-presentation-count]{display:none!important}html:root .presentation-tools{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;min-width:0}
 .presentation-options{flex:1 1 100%;display:grid;grid-template-columns:minmax(0,1fr) 105px;gap:8px}html:root .presentation-options select{width:100%;max-width:none;font-size:16px}.presentation-tool-buttons{width:100%;justify-content:center}
 html:root .codex-presentation-footer{padding:10px 16px max(10px,env(safe-area-inset-bottom));gap:10px;min-height:64px}.codex-presentation-footer>div{flex-basis:100%;height:2px}.codex-presentation-footer a{flex:1;justify-content:center;min-width:0;text-align:center;font-size:12px!important}
 html:root .codex-presentation-stage{padding:10px}.codex-presentation-cover{border-radius:8px!important}
}
@media(max-height:560px) and (min-width:600px){html:root :is(.codex-presentation-header,.studio-tour>header){padding-block:8px;min-height:60px}.codex-presentation-header small,.studio-tour header small{display:none!important}.codex-presentation-footer{min-height:54px!important;padding-block:6px!important}}

html:root :is(.codex-presentation-cover,.codex-presentation-error)[hidden]{display:none!important}
.codex-presentation-error{color:#edf1f7}.codex-presentation-error button{background:#edf1f7;color:#10151d;border:1px solid #edf1f7;font:600 14px/1.5 Inter,system-ui,sans-serif}

html:root .presentation-options select+select{width:110px}
@media(max-width:1000px){html:root .presentation-options select+select{width:100%}}

html:root .codex-presentation-stage.is-zoomed .codex-presentation-cover{display:block;margin:0;justify-self:start;align-self:start;transition:none;overflow-anchor:none}
