/* Stretch overrides art-page centering: size-contained artwork has no intrinsic cross-axis width. */
.art-page.behold-page{display:flex;flex-direction:column;align-items:stretch;justify-items:stretch;width:100%;height:100dvh;min-width:0;min-height:0;overflow:hidden;gap:0}
.behold-page .behold-stage{position:relative;display:grid;place-items:center;flex:1;width:100%;min-width:0;min-height:0;container-type:size;overflow:hidden;padding:0;margin-top:max(58px,env(safe-area-inset-top))}
.art-page.behold-page .behold-stage .art-canvas{position:static;inset:auto;transform:none;width:min(100cqw,100cqh);height:min(100cqw,100cqh);max-width:100%;max-height:100%;aspect-ratio:1;display:block;flex:none}
.behold-page>.caption,.behold-page>.behold-caption{flex:none;max-height:22dvh;overflow:auto;margin:6px 20px 8px;text-align:center}
.behold-turn-hint{position:absolute;bottom:0;left:0;right:0;margin:0;text-align:center;color:var(--muted);font-size:12px;pointer-events:none}
.behold-controls{display:flex;flex-direction:column;flex:none;width:100%;max-width:620px;margin:0 auto;padding-bottom:env(safe-area-inset-bottom)}
.behold-next{flex:none;padding:4px 14px 8px;text-align:center}
.behold-next .primary{min-height:44px;width:min(100%,340px);font-size:14px}
.behold-page .behold-tray,.behold-page .behold-dock{position:relative;inset:auto;left:auto;bottom:auto;transform:none;flex:none;width:100%;max-width:620px;margin:0 auto}
.behold-page .behold-tray{max-height:48dvh;overflow:auto;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));border-radius:18px 18px 0 0}
.behold-tray .behold-mode-row{display:flex;align-items:center;gap:4px}
.behold-tray .segments{display:flex;flex:1;min-width:0;gap:4px;margin:0}
.behold-tray .segments button{min-width:0;min-height:44px;flex:1;font-size:12px;line-height:1.15;padding:6px 7px}
.behold-tray .behold-icon{display:inline-grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:11px!important}
.behold-tray .behold-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.behold-tray .behold-width-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:2px 0 0}
.behold-tray .behold-width-heading>label{display:flex;align-items:center;gap:7px;margin:0;color:var(--ink);font-size:13px;min-width:60px}
.behold-tray .behold-inline-controls{display:flex;align-items:center;gap:0}
.behold-tray .glow-switch{display:flex;align-items:center;gap:7px;margin:0 0 0 5px;min-height:44px;color:var(--ink);font-size:13px}
.behold-tray .glow-switch input{width:28px;height:24px;margin:0;accent-color:var(--ink)}
.behold-tray input[type=range]{display:block;width:100%;min-height:44px;margin:0;accent-color:var(--ink);touch-action:pan-y}
.behold-width-readout{min-width:2ch;font-variant-numeric:tabular-nums;color:var(--muted);font-size:11px;opacity:0;transition:opacity .12s}
.behold-tray:has([data-behold-width]:focus) .behold-width-readout,.behold-tray[data-width-adjusting=true] .behold-width-readout{opacity:1}
.behold-tray .behold-mode-hint{font-size:12px;line-height:1.4;color:var(--muted);margin:3px 4px 5px;max-width:45rem}
.behold-tray .behold-picture-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;margin:0}
.behold-tray .behold-picture-row label{margin:0;font-size:12px;white-space:nowrap}
.behold-tray .art-actions{margin:2px 0 0;padding-top:4px;gap:4px}
.behold-tray .art-actions button,.behold-dock .art-actions button{min-height:44px;padding:6px 8px;font-size:13px}
.behold-tray .continue-flight{min-height:44px;margin:0 auto;padding:6px 12px}
.behold-page .behold-dock{padding:3px 14px 5px}
.behold-page .behold-dock>button{min-height:44px;padding:6px 12px}
.behold-page .behold-dock .art-actions{margin:0;padding-top:3px}
@supports not (width:1cqw){.art-page.behold-page .behold-stage .art-canvas{width:min(100vw,48dvh);height:min(100vw,48dvh)}}
@media(max-height:600px) and (orientation:landscape){
 .art-page.behold-page{display:grid;grid-template-columns:minmax(0,1fr) min(46vw,340px);grid-template-rows:minmax(0,1fr) auto}
 .behold-page .behold-stage{grid-column:1;grid-row:1;margin-top:max(46px,env(safe-area-inset-top))}
 .behold-page>.caption,.behold-page>.behold-caption{grid-column:1;grid-row:2;max-height:25dvh;margin:3px 12px 7px}
 .behold-controls{grid-column:2;grid-row:1/-1;min-height:0}
 .behold-page .behold-tray,.behold-page .behold-dock{min-height:0;max-height:none;max-width:none;flex:1;border-radius:18px 0 0 18px;padding:8px max(10px,env(safe-area-inset-right)) 6px 10px;overflow:auto}
 .behold-tray .segments button{font-size:11px;padding:5px 3px}
 .behold-tray .behold-picture-row{display:block}
 .behold-tray .behold-mode-hint{font-size:11px}
 .behold-page .behold-dock{display:flex;flex-direction:column;justify-content:center}
}
@media(prefers-reduced-motion:reduce){.behold-width-readout{transition:none}}

/* Explicit help is separate from the short introduction, so Info always reveals more. */
.behold-tray .behold-view-help{margin:4px 2px 6px;padding:9px 11px;border:1px solid #8795ac55;border-radius:10px;background:#192230;color:var(--muted);font-size:12px;line-height:1.45}
.behold-tray .behold-view-help p{margin:0}.behold-tray .behold-view-help p+p{margin-top:6px}.behold-tray .behold-view-help strong{color:var(--ink);font-weight:500}
.behold-tray .behold-legacy-note{font-size:11px;line-height:1.4;color:var(--muted);margin:4px}
