/* Two header rows only; page tools belong to the presentation rails. */
body .site-primary-nav .navigation-extra{display:inline-flex;align-items:center;align-self:stretch;margin-left:-10px;margin-right:6px;flex-shrink:0}
body .site-primary-nav .scenario-nav-filter{display:flex;align-items:center;margin:0;padding:0;flex:none;min-width:0}
#scenario-category-toggle{display:grid;place-items:center;width:36px;min-width:36px;height:40px;padding:0;border:0;border-radius:0;background:transparent;color:#242424;cursor:pointer;box-shadow:none;touch-action:manipulation}
#scenario-category-toggle>span{width:6px;height:6px;margin-top:-3px;border-bottom:1px solid currentColor;border-right:1px solid currentColor;transform:rotate(45deg);transition:transform .15s}
#scenario-category-toggle[aria-expanded=true]{background:#eaeaea}#scenario-category-toggle[aria-expanded=true]>span{transform:rotate(225deg);margin-top:3px}
#scenario-category-toggle:hover{background:#eee}#scenario-category-toggle:focus:not(:focus-visible){outline:none}
.scenario-category-menu{position:fixed;inset:auto;margin:0;padding:6px 0;width:360px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 100px);overflow-y:auto;overscroll-behavior:contain;border:1px solid #e1e1e1;border-top:0;border-radius:0;background:#fff;color:#161616;box-shadow:0 4px 10px #0003;font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif;scrollbar-width:thin;scrollbar-color:#b5b5b5 transparent}
.scenario-category-menu::backdrop{background:transparent}
.scenario-category-menu{z-index:80}.scenario-category-menu[hidden]{display:none!important}
.scenario-category-menu a{position:relative;display:block;min-height:36px;padding:8px 36px 8px 16px;color:#161616;text-align:left;text-decoration:none;overflow-wrap:anywhere;font-weight:400;line-height:20px}
.scenario-category-menu a:hover{background:#f0f0f0;text-decoration:underline}.scenario-category-menu a[aria-current=true]{background:#edf3f8;color:#005a9e}.scenario-category-menu a[aria-current=true]::after{content:'✓';position:absolute;right:15px;top:8px;font-size:14px}
.scenario-category-menu section+section{border-top:1px solid #e5e5e5;margin-top:6px;padding-top:4px}.scenario-category-menu h2{margin:0;padding:8px 16px 4px;color:#616161;font-size:12px;line-height:20px;font-weight:600}.scenario-category-menu a:focus-visible{outline:2px solid #161616;outline-offset:-3px}
body .showcase{--rail-size:clamp(112px,8vw,152px);--left-size:var(--rail-size)}
body .showcase .rail-right>.rail-top{gap:8px;margin-top:0}body .showcase.reading-mode .rail-right>.rail-top{flex-direction:row;flex-wrap:wrap}body .showcase.reading-mode .rail-right>.rail-top .rail-button{flex:1;white-space:nowrap}
/* Directory overlays never resize the presentation canvas. */
@media(min-width:701px){body .showcase.picker-open .page-panel{position:absolute;z-index:8;top:140px;left:12px;width:300px;padding:12px;background:#fffffff5;border:1px solid var(--ui-border,#dedee3);border-radius:14px;box-shadow:0 12px 36px #0002}body .showcase.reading-mode.picker-open .page-panel{top:70px}}

/* Keep the image canvas clear; names remain in the directory only. */
.presentation-canvas{display:flex;flex-direction:column;grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:hidden}

.presentation-canvas>.slides{flex:1;min-height:0;width:100%}
body .showcase .rail-left{padding-top:12px}body .showcase .rail-left>.rail-top{align-items:center;text-align:center}body .showcase #picker-open{font-size:15px;line-height:27px;min-height:27px;width:100%;padding:0 6px}
.presentation-page-count{position:absolute;z-index:4;right:16px;bottom:10px;font-size:14px;line-height:22px;color:var(--ui-muted,#6e6e73);font-variant-numeric:tabular-nums;letter-spacing:.02em;pointer-events:none}
body .showcase .rail-right>.rail-bottom{margin-bottom:28px}
body .showcase.no-slides .presentation-canvas{grid-column:1}
@media(max-width:800px){.showcase.reading-mode .presentation-canvas{grid-column:1;grid-row:2}.showcase.reading-mode .rail-left>.rail-top{width:100%}.showcase.reading-mode #picker-open{width:auto;min-width:72px}.showcase.reading-mode .presentation-page-count{position:absolute;bottom:10px}}
@media(max-width:700px){.presentation-canvas{grid-column:1;grid-row:2}.showcase .rail-left .rail-top{display:flex;justify-content:center}.showcase .rail-left #picker-open{width:auto;min-width:72px}body .showcase .rail-right>.rail-bottom{margin-bottom:0}}

.scenario-category-menu section>a{padding-left:28px}

/* A quiet dot keeps the tool toggle available without a persistent text label. */
body .showcase #controls-toggle{width:36px;height:36px;min-height:36px;left:calc((var(--rail-size) - 36px)/2);bottom:10px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;opacity:1;color:#8e8e93;transition:background .18s,color .18s}
body .showcase #controls-toggle>span{position:absolute;left:50%;top:50%;width:6px;height:6px;border-radius:50%;background:currentColor;transform:translate(-50%,-50%);pointer-events:none}
body .showcase #controls-toggle:hover,body .showcase #controls-toggle:focus-visible{background:#e8e8ed;color:var(--ui-primary,#0071e3)}
body .showcase #controls-toggle:focus:not(:focus-visible){outline:none}
@media(max-width:700px){body .showcase #controls-toggle{left:14px}}
@media(prefers-reduced-motion:reduce){body .showcase #controls-toggle{transition:none}}

.original-status{margin:0;padding:16px 20px;font-size:14px;line-height:1.6;color:var(--ui-muted,#6e6e73);text-align:center}

body .showcase .rail-left>.rail-top{flex-direction:column;align-items:stretch;min-width:0}body .showcase #picker-open{text-align:left}@media(max-width:700px){body .showcase .rail-left>.rail-top{align-items:flex-start}}

/* Phones and tablets use the full page width instead of desktop side rails. */
@media(max-width:1100px),(pointer:coarse) and (max-width:1400px){
 html:has(.presentation-page){scrollbar-gutter:auto}
 body.presentation-page{height:auto;min-height:100dvh;overflow-x:clip;overflow-y:auto;background:#f5f5f7}
 body.presentation-page .showcase,body.presentation-page:has(.reading-mode) .showcase{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;align-content:start;flex:none;width:100%;height:auto;min-height:0;overflow:visible;padding-bottom:38px;background:#f5f5f7}
 body .showcase .control-rail{position:static;display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;padding:6px 12px;overflow:visible}
 body .showcase .rail-left{grid-column:1;grid-row:1;border-bottom:1px solid #e5e5e7}
 body .showcase .rail-right{grid-column:1;grid-row:3;border-top:1px solid #e5e5e7}
 body .showcase .rail-left>.rail-top,body .showcase .rail-right>.rail-top{display:flex;flex-direction:row;align-items:center;gap:4px;width:auto;margin:0;text-align:left}
 body .showcase .rail-right>.rail-top{order:0}
 body .showcase .rail-right>.rail-middle{order:1}
 body .showcase .rail-right>.rail-bottom{order:2}
 body .showcase .control-rail>.rail-middle{position:static;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;transform:none;gap:4px;margin:0;width:auto}
 body .showcase .rail-left>.rail-middle{margin-left:auto}
 body .showcase .control-rail>.rail-bottom{display:flex;flex-direction:row;align-items:center;margin:0}
 body .showcase .rail-left>.rail-bottom:has(#image-error[hidden]){display:none}
 body .showcase .rail-button,body .showcase select,body .showcase #picker-open{width:auto;min-width:0;min-height:40px;font-size:13px;line-height:20px;padding:8px 10px;white-space:nowrap;border-radius:9px}
 body .showcase .arrow-button{width:40px;min-height:40px;font-size:25px;line-height:24px;padding:8px}
 body .showcase .arrow-button span{display:none}
 body .showcase .interval-label{display:flex;flex-direction:row;align-items:center;gap:0;font-size:0}
 body .showcase .interval-label select{width:auto;padding-inline:5px}
 body .showcase .rail-note{display:none}
 body .showcase #pin-page{display:block}
 body .showcase .presentation-canvas{grid-column:1;grid-row:2;width:100%;height:auto;aspect-ratio:var(--slide-aspect,1672 / 941);min-height:0;flex:none;touch-action:pan-y pinch-zoom}
 body .showcase .presentation-canvas>.slides{height:100%}
 body .showcase .slide{inset:0}
 body .showcase.controls-hidden:not(.reading-mode) .control-rail{display:none}
 body .showcase #controls-toggle{left:8px;bottom:1px}
 body .showcase .presentation-page-count{right:12px;bottom:8px;font-size:12px}
 body .showcase.picker-open .page-panel{left:8px;width:min(360px,calc(100vw - 16px));bottom:auto}
 body .showcase.reading-mode .rail-left{flex-direction:row}
 body .showcase.reading-mode .rail-right{flex-direction:row;justify-content:flex-start;padding:12px;gap:10px}
 body .showcase.reading-mode .rail-right>.rail-top{order:0;width:auto}
 body .showcase.reading-mode .rail-right>.rail-middle{order:1;margin-left:auto;height:auto;margin-bottom:0}
 body .showcase.reading-mode .rail-right>.reading-panel{order:2;flex:0 0 100%;width:100%;font-size:16px;line-height:1.75;padding:8px 2px}
 body .showcase.reading-mode .rail-right>.rail-bottom{order:3;margin-left:auto}
 body .showcase.reading-mode #reading-content{width:100%}
 body .showcase.no-slides .presentation-canvas{aspect-ratio:auto;min-height:320px}
 body .showcase.no-slides .slides{height:auto;min-height:320px}
 body.presentation-page .showcase:fullscreen{height:100dvh!important;grid-template-rows:auto minmax(0,1fr) auto;overflow:auto}
 body .showcase:fullscreen .presentation-canvas{height:100%;aspect-ratio:auto}
 body .showcase:fullscreen.controls-hidden{grid-template-rows:minmax(0,1fr)}
 body .showcase:fullscreen.controls-hidden .presentation-canvas{grid-row:1}
 body .showcase:fullscreen.reading-mode{display:block}
 body .showcase:fullscreen.reading-mode .presentation-canvas{height:auto;aspect-ratio:var(--slide-aspect,1672 / 941)}
}

/* All picture libraries share a compact directory that uses the space below its button. */
body .showcase.picker-open .rail-left{z-index:9}
body .showcase.picker-open .page-panel{
 width:min(340px,calc(100vw - 16px));height:auto;max-height:var(--page-panel-available-height,calc(100dvh - 180px));
 padding:10px;gap:6px;bottom:auto;background:var(--ui-surface,#fff);
}
body .showcase .page-panel #page-search{flex:0 0 34px;height:34px;min-height:34px;padding:6px 10px;font-size:13px}
body .showcase #page-list{flex:0 1 auto;min-height:0;gap:2px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
body .showcase #page-list .page-option{grid-template-columns:40px minmax(0,1fr);gap:8px;min-height:36px;padding:4px 6px;font-size:13px;line-height:18px}
body .showcase #page-list .page-option img{width:40px;height:23px;border-radius:5px}
body .showcase #page-list .page-option small{display:inline;margin-right:6px;font-size:10px;line-height:inherit;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(pointer:coarse){body .showcase #page-list .page-option{min-height:44px}}

