/* History-only content. Native immersion/diagram shell cascades are copied intact. */
.g5-tempo--main select{width:78px!important;min-width:78px!important;max-width:78px!important}.g5-tempo>span{text-shadow:none!important}
#full-visual{position:relative;width:100%;height:100%;overflow:hidden;min-height:0}#full-visual>svg{width:100%;height:100%;display:block}#full-visual>.aw-reason{position:absolute;inset:0;overflow:hidden;max-width:none;margin:0}#full-visual .full-photo{display:block;width:100%;height:100%;object-fit:cover}#full-visual .full-source{background:#102e39}.h5-question-pane .question .actions{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}.h5-question-pane .question .actions button{min-height:44px}.h5-question-pane .h5-criteria label{display:flex;gap:8px;align-items:flex-start}.h5-question-pane .h5-criteria input{margin-top:5px;flex:none}.full-text{white-space:normal;font:18px/1.6 Georgia,serif;max-height:65vh;overflow:auto}.full-parts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:65vh;overflow:auto}.full-parts button{min-height:44px;text-align:left}.term-materials{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:8px;width:100%;height:100%;padding:8px;box-sizing:border-box}.term-material{position:relative;min-width:0;min-height:0;padding:0;overflow:hidden;background:#153a46;border:1px solid #55787e;border-radius:5px;cursor:zoom-in}.term-material img{width:100%;height:100%;object-fit:cover;display:block}.term-material span{position:absolute;top:8px;left:8px;color:#153b42;background:#fff4dc;border-radius:4px;padding:4px 8px;font:700 17px Georgia}.term-material:last-child img{object-fit:contain}.speech[hidden]{display:none!important}
@media(max-width:600px){.full-parts{grid-template-columns:1fr}.term-materials{gap:5px;padding:5px}.term-material span{font-size:14px;top:5px;left:5px;padding:3px 6px}}
/* Source transitions retain the already-rendered DOM. Commit shell, visual and caption together after exact media position and assets are ready; no hidden intermediate board. */
.speech .subtitle{hyphens:none!important;overflow-wrap:normal!important;word-break:normal!important;text-wrap:balance;line-height:1.35!important}.h5-caption-line{display:block;white-space:nowrap}
#full-visual[data-visual=palette]{box-sizing:border-box;padding:clamp(10px,2vw,25px);background:radial-gradient(ellipse at 50% 38%,#373830 0%,#202625 50%,#121c1d 100%)}
.museum-stage{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;height:100%;width:100%;margin:0;min-height:0}.museum-mount{min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #9a927143;box-shadow:0 12px 32px #0008;background:#000;border-radius:3px}.museum-mount .full-source{width:100%;height:100%;display:block;background:#000!important}.museum-stage figcaption{display:flex;justify-content:space-between;gap:8px;color:#e4dfc9;font:14px/1.35 Georgia,serif;letter-spacing:.015em}.museum-stage figcaption span:last-child{font:12px/1.5 system-ui;color:#b9c0b5}
@media(max-width:600px){.speech .subtitle{font-size:22px!important}.museum-stage{gap:8px}.museum-stage figcaption{font-size:13px;flex-direction:column;gap:2px}.museum-stage figcaption span:last-child{font-size:11px}}

#full-visual[data-visual=palette]{container-type:size}.museum-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.museum-mount{position:relative;width:min(100%,calc((100cqh - 58px)*var(--museum-ratio)));height:auto;aspect-ratio:var(--museum-ratio);flex:0 1 auto;max-height:calc(100% - 48px)}.museum-mount .full-source{position:absolute;inset:0}.museum-stage figcaption{width:min(100%,calc((100cqh - 58px)*var(--museum-ratio)));flex:none}
/* Use the available caption width, independent of the previous card's intrinsic grid size. */
body.annual-player.production-scene .speech .subtitle{display:block!important;width:100%!important;max-width:none!important;box-sizing:border-box!important}

body.annual-player.production-scene .speech .subtitle{font:400 22px/1.4 Georgia,serif!important;min-width:0!important}@media(max-width:600px){body.annual-player.production-scene .speech .subtitle{font-size:20px!important}}
/* H5SYNC-R01-V01: the inherited align-content:end also aligns overflowing
   block content in WebKit, placing its first lines at negative scroll offsets.
   Keep the accepted floating box/size/type, but start its scrollable text at top. */
body.annual-player.production-scene .narration .speech .subtitle{align-content:start!important}

/* R04: honor the hidden contract above late scene-theme display!important rules.
   This component rule applies to every History state, not a particular map. */
body.annual-player #main .narration>.speech[hidden]{display:none!important}

/* R14: the More panel remains inside the actual viewport; native summary toggles it.
   Escape and explicit close return focus; no transport action is attached to closing. */
body.annual-player #main .aw-scene .sample-more[open] .scene-tools{position:fixed!important;top:var(--h5-menu-top,64px)!important;right:var(--h5-menu-right,10px)!important;left:auto!important;min-width:0!important;width:min(300px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;max-height:calc(100svh - var(--h5-menu-top,64px) - 12px)!important;box-sizing:border-box!important;overflow:auto!important;overscroll-behavior:contain}
body.annual-player #main .aw-scene .sample-more[open]>summary{outline:2px solid #b9cec4!important;outline-offset:2px}
body.annual-player #main .aw-scene .scene-tools [data-close-more]{border-bottom:1px solid #78918c!important;font-weight:700!important}
@media(max-width:600px){body.aw-active #pause#pause#pause#pause{width:100px!important;min-width:100px!important;max-width:100px!important;padding:4px!important;font:12px/1.2 system-ui!important}body.aw-active #pause#pause#pause#pause::after{display:none!important}body.aw-active #main .aw-scene .sample-research-launch.sample-research-launch{width:40px!important;min-width:40px!important;padding:0!important;font-size:0!important}body.aw-active #main .aw-scene .sample-research-launch.sample-research-launch::after{content:'⌖';font:22px/1.2 system-ui}}

/* L01 repeated reasoning uses the accepted one-question layout, not a duplicated text column. */
body.h5-repeat-single .aw-scene.sample-dual .board-grid{display:block!important;padding:72px 18px 20px!important;box-sizing:border-box}body.h5-repeat-single .board-grid>.diagram-pane:not(.reading-card){display:none!important}body.h5-repeat-single .board-grid>.reading-card{width:min(900px,100%);height:100%;margin:0 auto;overflow:auto;box-sizing:border-box}@media(max-width:600px){body.h5-repeat-single .aw-scene.sample-dual .board-grid{padding:64px 12px 16px!important}}

/* History three-mode controls, same native dialog/radio route as accepted Biology; History palette. */
.h5-research-menu{display:none}[data-mode-switch]{font:14px/1.2 system-ui;min-height:44px;white-space:nowrap}.h5-mode-small{display:none}.h5-mode-dialog{width:min(620px,calc(100vw - 28px));max-height:calc(100svh - 30px);overflow:auto;padding:24px;background:#103441;color:#fff3dc;border:1px solid #9ab3b0;border-radius:4px}.h5-mode-dialog::backdrop{background:#001721b8}.h5-mode-dialog h2{font:30px Georgia;margin:0}.h5-mode-dialog .dialog-heading{display:flex;justify-content:space-between;gap:15px}.h5-mode-dialog .dialog-heading button{min-width:44px;min-height:44px}.h5-mode-dialog>p{font:17px/1.5 system-ui}.h5-mode-cards{padding:0;border:0;margin:20px 0;display:grid;gap:10px}.h5-mode-cards label{display:flex;align-items:flex-start;gap:12px;padding:15px;border:1px solid #92aca7;border-radius:4px;cursor:pointer;min-height:64px}.h5-mode-cards label:has(input:checked){background:#254d56;border-color:#e4cc92}.h5-mode-cards input{margin-top:5px;accent-color:#ecd7a5}.h5-mode-cards strong{display:block;font:21px/1.2 Georgia}.h5-mode-cards span span{display:block;font:15px/1.4 system-ui;margin-top:7px}.h5-mode-dialog button[data-apply-mode]{padding:12px 20px;min-height:44px;background:#f0dfb3;color:#153e48;border:0;font:16px system-ui}.h5-answer-note summary{font:16px/1.5 system-ui;cursor:pointer;min-height:44px}.h5-answer-note p,.h5-mode-note,.flow-note{font:14px/1.5 system-ui}.h5-answer-note label{display:block;font:16px/1.4 system-ui}.h5-chosen-explanation{border-left:3px solid #d2a16e;padding-left:12px}.h5-question-pane .feedback h2{font:24px/1.3 Georgia}.h5-question-pane .question>.instruction{font:16px/1.4 system-ui}.h5-question-pane .feedback .instruction{font:15px/1.4 system-ui}.h5-question-pane .question .link{min-height:44px}.h5-question-pane kbd{font:12px system-ui;margin-left:5px}.h5-mode-dialog :focus-visible{outline:3px solid #e5bf70;outline-offset:3px}
@media(max-width:900px){.h5-mode-wide{display:none}.h5-mode-small{display:inline}.sample-actions{flex-wrap:wrap}.scene-top [data-mode-switch]{position:static;padding:8px;min-width:62px;font-size:13px}.scene-top .sample-research-launch{display:none!important}.h5-research-menu{display:block}.h5-mode-dialog{padding:18px}.h5-mode-dialog h2{font-size:27px}.h5-mode-dialog .h5-mode-cards{margin:14px 0}.h5-mode-cards label{padding:12px}}

#full-visual .restored-material{height:100%;width:100%;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:24px 30px 40px;background:#f0eee3;color:#253c3d;display:block;text-align:left;line-height:1.5;font:clamp(16px,1.35vw,21px)/1.5 Georgia,serif}.restored-material h2{font-size:1.35em;margin:0 0 12px}.restored-material h3{font-size:1.1em;margin:8px 0}.restored-material p{margin:8px 0 14px}.restored-cards,.restored-material .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.restored-cards article,.restored-material .card,.restored-texts article,.restored-regions article{border:1px solid #aebbb4;border-radius:10px;background:#fffdf4;padding:16px}.restored-who,.restored-material .who{font-family:system-ui;font-size:.85em;color:#476767}.restored-material button{background:#214f56;color:#fff;border:2px solid transparent;border-radius:8px;padding:10px;font:15px/1.4 system-ui;cursor:pointer}.restored-material button[aria-pressed=true]{border-color:#a66a30;background:#143a40}.restored-material button:focus-visible{outline:3px solid #b67830;outline-offset:3px}.restored-tribes{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.restored-tribes strong{display:block;font-size:.8em}.restored-count{font-size:1.4em;font-weight:bold}.restored-regions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.restored-regions article:nth-child(2){background:#e4f0ed}.restored-regions article:nth-child(3){background:#ece3d0}.restored-coast{margin:18px 0}.restored-coast img{display:block;width:100%;max-height:420px;object-fit:contain}.restored-coast figcaption{font-size:.8em;line-height:1.5}.restored-texts{display:grid;gap:14px;margin:16px 0}.restored-legal .restored-regions{grid-template-columns:2fr 1fr}@media(max-width:600px){#full-visual .restored-material{padding:16px 16px 32px;font-size:16px}.restored-cards,.restored-material .cards{grid-template-columns:1fr}.restored-tribes{grid-template-columns:repeat(2,1fr)}.restored-regions,.restored-legal .restored-regions{grid-template-columns:1fr}.restored-material article{padding:12px}.restored-coast img{max-height:300px}}

.restored-material .restored-scroll-note{font:12px/1.4 system-ui;color:#526d6b;margin:0 0 10px}@media(max-width:600px){.restored-material h2{font-size:19px;line-height:1.3}.restored-material>p{margin:6px 0 10px}}

.release-photo{height:100%;width:100%;margin:0;position:relative;overflow:hidden;background:#15343c}.release-photo picture{display:block;width:100%;height:100%}.release-photo img{width:100%;height:100%;object-fit:cover;object-position:var(--release-focus);display:block}.release-photo.release-real{display:flex;flex-direction:column}.release-photo.release-real picture{flex:1;min-height:0;height:auto}.release-photo.release-real img{object-fit:contain}.release-photo.release-real>figcaption{position:static;flex:none}.release-photo>figcaption{position:absolute;bottom:0;left:0;right:0;padding:7px 12px;background:#092a34dc;color:#f5f3e8;font:13px/1.4 system-ui}.release-concepts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px}.release-concepts article{padding:18px;background:#f7efd9;border:1px solid #8b907f;border-radius:10px}.release-model{width:100%;height:100%;border:0;display:block;background:#f0eee3}.release-orders{height:100%;overflow:auto;box-sizing:border-box;padding:22px;color:#223e42}.release-orders svg{display:block;max-height:70%;width:100%;min-height:240px}@media(max-width:900px)and(orientation:portrait){.release-photo picture{display:block;width:100%;height:100%}.release-photo img{object-position:var(--release-phone)}.release-photo>figcaption{font-size:11px;padding:6px 8px}.release-orders{padding:14px}.release-orders svg{min-height:260px}}

/* SF21: source aspect ratios, scene backdrops and responsive comparison. */
.sf-object{height:100%;width:100%;margin:0;display:flex;flex-direction:column;background:var(--sf-object-background,#181c1e);color:#f7f3e9}.sf-object-mount{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}.sf-object-mount svg,.sf-object-mount img{width:100%;height:100%;display:block;object-fit:contain}.sf-object figcaption{padding:8px 14px;font:14px/1.4 system-ui;background:#121b1dd9}
.sf-panel,.sf-diagram{height:100%;overflow:auto;box-sizing:border-box;padding:20px 24px;background:#f0eee3;color:#233e43;font:17px/1.55 system-ui;overscroll-behavior:contain}.sf-panel h2,.sf-diagram h2{font:600 26px/1.2 Georgia;margin:0 0 16px}.sf-panel h3,.sf-diagram h3{font:600 20px/1.3 system-ui;margin:0 0 10px}.sf-panel p,.sf-diagram p{margin:8px 0}.sf-panel-sections,.sf-diagram-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;align-items:start}.sf-panel article,.sf-diagram article{padding:18px;background:#fffaf0;border:1px solid #a5ac9f;border-radius:8px}.sf-diagram svg{display:block;width:100%;height:190px}.sf-panel-note{border-top:1px solid #a5ac9f;padding-top:14px}.sf-source-compare{display:grid;grid-template-columns:minmax(220px,1fr) minmax(300px,1.5fr);gap:20px}.sf-source-compare figure{margin:0}.sf-source-compare img{width:100%;max-height:430px;object-fit:contain}.sf-source-compare figcaption{font:14px/1.4 system-ui}.sf-enlarged{font-size:20px}.sf-enlarged h3{font-size:24px}.sf-enlarged svg{height:250px}.sf-enlarged .sf-diagram-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.sf-cycle{font-size:23px}
#full-visual .sync-pair{height:100%;max-height:none;overflow:auto;padding:16px 18px;box-sizing:border-box}#full-visual .sync-pair .sync-pair-grid{align-items:start;gap:16px}#full-visual .sync-pair .sync-pair-photo{height:clamp(230px,48vh,540px);background:#263d40}#full-visual .sync-pair .sync-pair-grid figure{display:flex;flex-direction:column}#full-visual .sync-pair .sync-pair-grid figcaption{margin:8px 0;font:15px/1.4 system-ui}.sync-pair .sync-footnote{margin:12px 0 0}.sync-detail{min-height:42px;align-self:flex-start}
@media(max-width:600px){.sf-panel,.sf-diagram{padding:15px 13px;font-size:17px}.sf-panel h2,.sf-diagram h2{font-size:23px}.sf-diagram-grid,.sf-panel-sections,.sf-source-compare{grid-template-columns:1fr}.sf-diagram h3{font-size:20px}.sf-enlarged{font-size:20px}.sf-enlarged .sf-diagram-grid{grid-template-columns:1fr}.sf-diagram article,.sf-panel article{padding:15px}.sf-diagram svg{height:180px}.sf-enlarged svg{height:230px}#full-visual .sync-pair{padding:12px}#full-visual .sync-pair .sync-pair-grid{grid-template-columns:1fr;gap:16px}#full-visual .sync-pair .sync-pair-photo{height:clamp(240px,38vh,380px)}#full-visual .sync-pair .sync-pair-grid figcaption{font-size:15px}.sf-object figcaption{font-size:12px}}

/* SF22: contain the entire selected detail; reserve the return button row. */
#full-visual .exact-source-detail{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin:0;background:#172c32}
#full-visual .exact-source-detail .course-image-mount{flex:1;min-height:0;height:0;width:100%;overflow:hidden}
#full-visual .exact-source-detail .course-image-mount svg{height:100%!important;width:100%!important;max-height:100%;display:block}
#full-visual .exact-source-detail figcaption{flex:none}
#full-visual .sf-diagram{padding-top:max(20px,var(--course-return-reserve,20px))}
.sf-social-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;position:relative}.sf-person{text-align:center;padding:12px;border-bottom:2px solid #667e73;font-weight:650}.sf-social-links article{border-top:5px solid #668c80}.sf-slavery{margin-top:22px;border-left:5px solid #815444!important}.sf-social-links h3{font-size:24px}.sf-social-links p{font-size:20px}
@media(max-width:600px){.sf-social-links{grid-template-columns:1fr;gap:12px}.sf-social-links h3{font-size:21px}.sf-social-links p{font-size:18px}}

.exact-source-detail figcaption{color:#f4f0e6;background:#172c32;padding:8px 14px;font:14px/1.4 system-ui}

/* CROP23: the selected rectangle stays intact inside the safe pupil scene. */
#full-visual .crop23-photo{position:relative;margin:0;width:100%;height:100%;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;padding:var(--crop23-top) 8px var(--crop23-bottom);background:#15323b;color:#fff7e6}
#full-visual .crop23-mount{flex:1;min-height:0;overflow:hidden;width:100%}
#full-visual .crop23-mount svg{width:100%!important;height:100%!important;display:block;overflow:hidden}
#full-visual .crop23-photo figcaption{flex:none;font:13px/1.35 system-ui;padding:7px 12px;margin:0;color:#fff7e6;background:#15323b}
