/* A complete page must fit a classroom display; scroll moves between pages. */
.fit-poster-view.poster-shell{width:min(100%,var(--poster-shell-width,700px))!important;max-width:100%!important;min-width:0;margin-inline:auto!important;padding:12px!important}
.poster-viewer{grid-template-columns:44px minmax(0,1fr) 44px!important;min-width:0;gap:12px!important}
.fit-poster-view #poster{position:relative;border:0!important;width:100%!important;height:var(--poster-display-height,600px)!important;min-height:0!important;aspect-ratio:auto!important;padding:0!important;margin:0!important;overflow:hidden!important;background:#eee8dd!important;scroll-margin-top:16px}
.fit-poster-view #poster:before{display:none!important}
.fit-poster-view #poster-image{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;transform:none!important}
.fit-poster-view #pdf-preview:not([hidden]){display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important;overflow-y:scroll!important;overflow-x:hidden!important;scrollbar-gutter:stable!important;scrollbar-width:auto;scrollbar-color:#967745 #eee8dd;scroll-snap-type:y mandatory;overscroll-behavior:contain;background:#eee8dd!important}
.fit-poster-view #pdf-preview>img,.fit-poster-view #pdf-preview>div{display:block!important;width:100%!important;height:var(--poster-display-height,600px)!important;min-height:0!important;max-width:100%!important;max-height:none!important;margin:0!important;padding:0!important;flex:none!important;aspect-ratio:auto!important;overflow:hidden!important;object-fit:contain!important;object-position:center!important;scroll-snap-align:start;scroll-snap-stop:always;transform:none!important;box-shadow:none!important;background:#fff!important}
.fit-poster-view #pdf-preview>div img,.fit-poster-view #pdf-preview>div canvas{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;margin:0!important;transform:none!important;box-shadow:none!important;background:#fff!important}
.fit-poster-view #pdf-preview[hidden],.fit-poster-view #poster-image[hidden],.poster-page-controls button[hidden]{display:none!important}
.fit-poster-view #pdf-preview::-webkit-scrollbar{width:14px}
.fit-poster-view #pdf-preview::-webkit-scrollbar-thumb{background:#967745;border:3px solid #eee8dd;border-radius:12px}
.fit-poster-view #scroll-cue{display:none!important}
.poster-fit-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 0 10px}
.poster-page-controls{display:flex;gap:8px;align-items:center;min-width:0}
.poster-fit-toolbar button{border:1px solid #cdb88f;border-radius:100px;padding:8px 12px;background:#fff;color:#775d36;font:600 12px/1.25 Arial,sans-serif;cursor:pointer}
.poster-fit-toolbar button:disabled{opacity:.4;cursor:default}
.poster-fit-toolbar span{font:600 12px/1.25 Arial,sans-serif;color:#74654f}
.poster-fit-toolbar button:focus-visible{outline:3px solid #775d36;outline-offset:2px}
.fit-poster-view:fullscreen{display:flex!important;flex-direction:column;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:12px!important;background:#eee8dd!important;overflow:hidden!important}
.fit-poster-view:fullscreen #poster{flex:none!important;height:var(--poster-display-height)!important}
.fit-poster-view:fullscreen .access-row,.fit-poster-view:fullscreen .poster-actions,.fit-poster-view:fullscreen .free-preview-membership{display:none!important}
.fit-poster-view:fullscreen .poster-fit-toolbar{flex:none}
@media(max-width:520px){.poster-viewer{grid-template-columns:1fr 1fr!important;gap:10px!important}.poster-fit-toolbar{gap:6px}.poster-fit-toolbar button{padding:7px 8px;font-size:11px}.poster-page-controls{gap:5px}.poster-fit-toolbar span{font-size:11px}}
@media print{.poster-fit-toolbar{display:none!important}.fit-poster-view #poster{height:auto!important;overflow:visible!important}.fit-poster-view #pdf-preview:not([hidden]){position:static!important;height:auto!important;overflow:visible!important}.fit-poster-view #pdf-preview>img,.fit-poster-view #pdf-preview>div{height:auto!important;break-after:page}.fit-poster-view #pdf-preview>div canvas,.fit-poster-view #pdf-preview>div img{height:auto!important}}

/* Presentation works inside the resource hub even without the Fullscreen API. */
.classroom-presenting #poster-shell.fit-poster-view{position:fixed!important;inset:0!important;z-index:10000!important;display:flex!important;flex-direction:column!important;width:100vw!important;max-width:none!important;height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:12px!important;background:#eee8dd!important;overflow:hidden!important}
.classroom-presenting #poster-shell .access-row,.classroom-presenting #poster-shell .poster-actions,.classroom-presenting #poster-shell .free-preview-membership{display:none!important}
.classroom-presenting #poster-shell .poster-fit-toolbar{flex:none!important}
.classroom-presenting #poster-shell #poster{flex:none!important;height:var(--poster-display-height)!important}
.classroom-presenting #poster-shell #pdf-preview{scroll-snap-type:y mandatory!important}
.classroom-presenting{overflow:hidden!important}

.classroom-presenting #poster-shell #pdf-preview>img,.classroom-presenting #poster-shell #pdf-preview>div,.classroom-presenting #poster-shell #pdf-preview>div img,.classroom-presenting #poster-shell #pdf-preview>div canvas{background:#eee8dd!important}

/* Keep the original, interactive tools alongside the complete poster. */
.classroom-screen-body{width:100%;min-width:0}
.classroom-presenting #poster-shell .classroom-screen-body{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(190px,22vw,280px)!important;gap:16px!important;flex:1!important;min-height:0!important;align-items:start!important}
.classroom-presenting #poster-shell .maths-tools{display:block!important;position:static!important;inset:auto!important;z-index:1!important;width:100%!important;max-width:none!important;max-height:100%!important;margin:0!important;padding:12px!important;overflow-y:auto!important;overscroll-behavior:contain;align-self:stretch!important;justify-self:stretch!important;background:#faf7f1!important}
.classroom-presenting #poster-shell .tool-icons{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.classroom-presenting #poster-shell .tool-select{flex-direction:row!important;gap:10px!important;min-height:50px!important;padding:9px!important;text-align:left!important;font-size:14px!important}
.classroom-presenting #poster-shell .tool-panel{width:100%!important;max-width:none!important;margin:12px 0 0!important;padding-top:12px!important}
.classroom-presenting #poster-shell .tool-action{width:100%!important;max-width:220px!important;min-height:120px!important;margin:0 auto!important}
.classroom-presenting #poster-shell .tools-heading{margin-bottom:10px!important}
.classroom-presenting #poster-shell .tool-panel-head{gap:4px!important;margin-bottom:8px!important}
.classroom-presenting #poster-shell #tool-instruction{margin:12px 0 6px!important}
.classroom-presenting #poster-shell #tool-status{min-height:36px!important;font-size:13px!important}
@media(max-width:650px){.classroom-presenting #poster-shell .classroom-screen-body{grid-template-columns:minmax(0,1fr) 160px!important;gap:10px!important}.classroom-presenting #poster-shell .maths-tools{padding:8px!important}.classroom-presenting #poster-shell .tool-select{font-size:12px!important;gap:6px!important}.classroom-presenting #poster-shell .pip-grid{width:90px;height:90px;gap:8px}}

/* Preserve each sheet's own paper shape in mixed-orientation documents. */
.fit-poster-view #pdf-preview>div{height:auto!important;background:#eee8dd!important}
.fit-poster-view #pdf-preview>div canvas,.fit-poster-view #pdf-preview>div img,
.fit-poster-view #pdf-preview>img{height:auto!important;max-height:var(--poster-display-height,600px)!important;background:transparent!important}
.fit-poster-view #pdf-preview{scroll-snap-type:y proximity!important}

.fit-poster-view #pdf-preview::after{content:'';display:block;height:var(--last-page-gap,0px);background:#eee8dd}
