/* Course-local material adapters; accepted controls, tempo and caption styles remain pinned. */
.course-photo{margin:0;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden}.course-image-mount{flex:1;min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center}.course-image-mount img{width:100%;height:100%;object-fit:contain;transform-origin:center;user-select:none}.course-museum{background:#e3dfd3;color:#163743}.course-museum figcaption{font:600 15px/1.35 Georgia,serif;padding:7px 14px}.course-reconstruction{background:#12323d}.course-model{height:100%;box-sizing:border-box;overflow:auto;padding:22px;color:#163743;background:#efe8d6;font:19px/1.5 Georgia,serif}.course-model h3{font-size:22px;margin:6px 0 12px}.model-limit{font:600 15px/1.4 system-ui;margin:0 0 18px}.course-exact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.course-exact-cards article{background:#fff7e6;border-left:3px solid #b78348;padding:16px}.course-native-svg svg{display:block;width:100%;max-height:490px;height:auto}.course-native-svg svg text{font-family:Georgia,serif;fill:#163743}.source-zoom{overflow:auto}.source-zoom svg{min-width:1000px;max-height:none}.course-source-pair{display:flex;gap:15px;flex-wrap:wrap}.course-source-pair figure{margin:0;flex:1 1 220px;min-width:0}.course-source-pair img{width:100%;max-height:350px;object-fit:contain}.course-source-pair figcaption{font-size:15px}.course-source-gap{border-left:3px solid #9b672d;background:#f6e8cf;color:#44371f;font:16px/1.5 Georgia;padding:12px}.course-timeline{display:grid;grid-template-columns:repeat(4,1fr);margin:70px 0 15px}.course-tick{position:relative;padding:30px 14px;border-top:5px solid #275969;text-align:center}.course-tick i{position:absolute;width:15px;height:15px;background:#a66c3c;border:3px solid #efe8d6;border-radius:50%;top:-12px;left:calc(50% - 10px)}.course-tick input{width:100%;box-sizing:border-box;font:16px/1.3 Georgia;background:#fffaf0;border:1px solid #6b7d77;padding:10px}.course-intervals{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;text-align:center}.course-intervals span{border-top:2px solid #a66c3c;padding-top:10px}.timeline-direction{text-align:right}.branch-material svg{width:100%;max-height:440px}.branch-material text{font:28px Georgia;fill:#163743}.grain-bars{display:flex;flex-direction:column;gap:22px;padding:16px 0}.grain-row{display:grid;grid-template-columns:145px 1fr 35px;gap:12px;align-items:center}.grain-bar-track{background:#d5d6c8;height:33px}.grain-bar-track b{display:block;background:#b98545;height:100%;border-radius:2px}.grain-row strong{font-size:25px}.grain-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px}.grain-motion{width:100%;max-height:450px}.grain-motion text{font:24px Georgia;fill:#163743}.motion-limits{font:14px/1.4 Georgia;color:#fff6de}.experimental-water{width:100%;height:100%}
@media(max-width:600px){.course-model{font-size:17px;padding:16px}.course-model h3{font-size:20px}.course-exact-cards{display:flex;flex-direction:column}.course-timeline{margin:35px 0 16px}.course-tick{font-size:15px;padding:22px 5px}.course-tick input{font-size:14px;padding:6px 3px}.course-intervals{font-size:14px;gap:8px}.grain-row{grid-template-columns:95px 1fr 24px;gap:7px}.grain-pair{grid-template-columns:1fr}.course-museum figcaption{font-size:14px}.branch-material text{font-size:31px}}
.course-native-svg{max-width:100%;overflow:auto}.course-native-svg svg{min-width:760px}.branch-material svg{min-width:0}.course-native-svg:focus-visible{outline:3px solid #a86e37;outline-offset:3px}.h5-question .sparta-summary{min-height:450px}.course-source-pair{align-items:flex-start}.course-source-pair figure{flex:1 1 300px}
/* One shared fix for L02/L09 and other concrete manual model views: reserve the measured return-button row. */
#full-visual .course-model{padding-top:max(22px,var(--course-return-reserve,22px))}
@media(max-width:600px){.grain-pair{gap:10px}.grain-pair h3{font-size:17px;margin:3px 0 6px}.grain-bars{gap:8px;padding:6px 0}.grain-bar-track{height:19px}.grain-row{font-size:16px;line-height:1.2}.grain-row strong{font-size:19px}.grain-motion text{font-size:31px}.grain-material>.model-limit{font-size:13px;margin-bottom:8px}.grain-material>p:last-child{font-size:14px;line-height:1.35;margin:9px 0}.grain-motion{max-height:270px}}
/* Keep the complete conditional branching graphic and its explanation together on phones. */
.branch-material svg{height:auto!important;aspect-ratio:1000/460;max-height:none!important;min-height:0!important}.grain-motion{height:auto!important;aspect-ratio:700/430;min-height:0!important}
@media(max-width:600px){.branch-material text{font-size:48px!important}.branch-material svg{margin:12px 0}.grain-motion text{font-size:34px!important}.grain-material .model-limit{font-size:13px}.grain-pair{gap:7px}.grain-pair h3{margin:2px 0 5px}}

/* H5SYNC-R01. Exact source pairs, neutral holds and one local L07 composition. */
.sync-pair-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.sync-pair-grid figure{margin:0;min-width:0}.sync-pair-photo{height:clamp(130px,27vh,310px);display:flex;align-items:center;justify-content:center;background:#e3dfd3}.sync-pair-photo img{width:100%;height:100%;object-fit:contain}.sync-pair-grid figcaption{font:15px/1.4 Georgia;margin:10px 0;color:#173c46}.sync-detail{font:15px/1.3 system-ui;padding:7px 12px;background:#204e59;border:0;border-radius:4px;color:#fff6df;cursor:pointer}.sync-scroll-hint{font:14px/1.4 system-ui}.sync-footnote{font:15px/1.5 Georgia;margin-top:18px}.sync-labels{display:flex;flex-wrap:wrap;gap:15px;margin:22px 0}.sync-labels>span{border-left:3px solid #b9874c;background:#fff6e4;padding:12px 15px;max-width:33em}.sync-neutral{display:flex;flex-direction:column;justify-content:center;padding:clamp(30px,8vw,100px);font-size:clamp(19px,2.1vw,28px)}.sync-neutral h3{font-size:clamp(24px,3vw,38px)}.sync-timeline-scroll{overflow:auto;width:100%}.sync-timeline-scroll svg{display:block;min-width:680px;width:100%;height:auto}.sync-timeline-scroll text{font:25px Georgia;fill:#163743}.l07-panorama .course-image-mount img{object-fit:cover}.l07-whole-hint{position:absolute;left:16px;bottom:calc(var(--ar-caption-safe,115px) + 10px);font:13px/1.3 system-ui;color:#fff8e6;background:#153f4de6;padding:6px 10px;border-radius:4px;pointer-events:none}.sync-context-note{font:14px/1.4 Georgia;color:#173c46;background:#eee7d6;padding:8px 14px}
@media(max-width:600px){.sync-pair{padding:20px 12px!important}.sync-pair h3{font-size:19px}.sync-pair-grid{gap:12px}.sync-pair-photo{height:145px}.sync-pair-grid figcaption{font-size:14px;line-height:1.4}.sync-footnote{font-size:14px}.sync-labels{gap:9px;margin:15px 0}.sync-labels>span{padding:8px 10px;font-size:17px}.sync-neutral{padding:25px 18px!important;justify-content:flex-start;font-size:19px}.sync-neutral h3{font-size:25px}.l07-panorama{padding:70px 0 max(190px,var(--ar-caption-safe,190px));box-sizing:border-box}.l07-panorama .course-image-mount img{object-fit:cover;object-position:65% 50%}.l07-whole-hint{bottom:calc(max(190px,var(--ar-caption-safe,190px)) + 10px);left:10px;font-size:12px}}

/* Only the two dated map candidates; accepted atlas label and scale furniture. */
.hist-map{height:100%;display:flex;flex-direction:column;background:#183b45;color:#fff5df;min-height:0}.hist-map-heading{padding:9px 12px;display:flex;flex-direction:column;gap:3px;font:16px/1.35 Georgia}.hist-map-heading span{font-size:13px}.hist-map-canvas{flex:1;min-height:200px;position:relative;overflow:hidden}.hist-map-canvas svg{display:block;width:100%;height:100%}.hist-map-canvas .context-map-caveat{display:none}.hist-map-legend{padding:7px 12px;background:#eee7d7;color:#173c46;font:14px/1.4 Georgia}.hist-map-legend p{margin:0 0 4px}.hist-map-legend small{font:11px/1.3 system-ui}.h5-question .hist-map-legend{font-size:13px}@media(max-width:600px){.hist-map-heading{font-size:15px;padding:6px 8px}.hist-map-heading span{font-size:12px}.hist-map-legend{padding:6px 8px;font-size:12px}.h5-question .hist-map-legend{font-size:12px}.hist-map-legend small{font-size:10px}.hist-map-canvas{min-height:270px}body.h5-question:has(.hist-map) .board-grid{grid-template-rows:minmax(530px,auto) minmax(440px,auto)!important}}

/* The two portrait map tasks need a readable map row before the question. */
@media(max-width:600px){body.annual-player.h5-question:has(.hist-map) .aw-scene.sample-dual .board-grid.board-grid{grid-template-rows:minmax(740px,auto) minmax(440px,auto)!important}body.annual-player.h5-question .hist-map-canvas{min-height:500px!important}.hist-map-legend{flex:none}}

/* H5 framing candidate: only pinned narrative story photographs fill their scene.
   Whole-source inspection, museum photos, maps, pair comparisons and questions keep precise fit. */
.course-photo.course-story-photo{position:absolute;inset:0;width:100%;height:100%;background:#12323d}
.course-story-photo .course-image-mount{position:absolute;inset:0;width:100%;height:100%;padding:0;margin:0}
.course-story-photo .course-image-mount picture{display:block;width:100%;height:100%}
.course-story-photo .course-image-mount img{display:block;width:100%;height:100%;object-fit:cover;object-position:var(--story-focus,50% 45%)}
@media(max-width:900px) and (orientation:portrait){.course-story-photo .course-image-mount img{object-position:var(--story-phone-focus,50% 45%)}}

/* R14: source-bounded narrative composition; use whole source when cover cuts a required actor/object. */
.course-story-photo .course-image-mount img{object-fit:var(--story-fit,cover)}
/* The diagram shell already reserves header and subtitles. Avoid the R05 source adapter's second reservation. */
body.annual-player:not(.h5-question) #full-visual .r05-material.r05-maps{padding-top:0!important;padding-bottom:0!important}
/* Restore source event controls instead of inserting an uninitialised SVG placeholder. */
.bce-restored{padding:14px 22px!important;box-sizing:border-box}.bce-restored>h3{margin:0 0 5px!important;font-size:24px}.bce-restored .model-limit{margin:0 0 6px;font:14px/1.35 system-ui}.bce-restored svg.bce-band{display:block;width:100%;height:125px;max-height:125px;min-width:0;background:#e2dcc7;border-radius:6px;margin:6px 0}.bce-restored svg text{font:21px Georgia;fill:#173d46}.bce-buttons{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.bce-buttons button{background:#24515c;color:#fff6df;border:1px solid #7c9391;border-radius:4px;min-height:44px;padding:8px 14px;font:16px/1.3 system-ui;cursor:pointer}.bce-buttons button[aria-pressed=true]{background:#835a32;outline:2px solid #b79b6b;outline-offset:2px}.bce-restored [data-bce-result]{background:#fff7e7;border-left:3px solid #9c7046;padding:12px 18px;margin:12px 0}.bce-restored [data-bce-result] h3{margin:0 0 10px;font-size:25px}.bce-restored [data-bce-result] p{margin:8px 0;font-size:22px;line-height:1.45}.bce-limit{font-weight:600}.bce-source-limit{font:13px/1.45 system-ui;margin:10px 0}.r14-atlas .hist-map-heading{padding-top:3px}.r14-atlas .hist-map-legend{flex:none}
@media(max-width:600px){.bce-restored{padding:10px 12px!important}.bce-restored>h3{font-size:19px}.bce-restored svg.bce-band{height:105px;max-height:105px}.bce-restored [data-bce-result]{padding:9px 12px;margin:9px 0}.bce-restored [data-bce-result] h3{font-size:21px}.bce-restored [data-bce-result] p{font-size:18px;line-height:1.4}.bce-buttons button{font-size:15px;padding:7px 10px}.bce-source-limit{font-size:12px}.r14-atlas .hist-map-canvas{min-height:240px!important}}

.bce-restored .bce-buttons[hidden]{display:none!important}
