/* The forest atlas uses one stage for both map views. */
html:has(.forest-bar), body:has(.forest-bar) { height:100%; min-height:0; overflow:hidden; overscroll-behavior:none; scroll-behavior:auto; }
body:has(.forest-bar) { height:100vh; height:100dvh; display:flex; flex-direction:column; }
.forest-bar { flex:none; display:flex; align-items:center; gap:14px; padding:6px clamp(8px,2vw,24px); background:var(--paper); border-bottom:1px solid var(--line); }
.forest-bar h1 { font:600 clamp(18px,2vw,25px)/1 Georgia,serif; margin:0 auto 0 0; }
.forest-switch { display:flex; gap:2px; padding:3px; background:#e2e9df; border-radius:8px; }
.forest-switch a { padding:6px 12px; color:#305142; border-radius:5px; text-decoration:none; font-weight:600; }
.forest-switch a[aria-current] { background:#234d3d; color:#fff; }
.forest-bar button { min-width:36px; }
.forest-workspace { flex:1; min-height:0; position:relative; }
.forest-workspace > [hidden] { display:none; }
.forest-workspace > section { height:100%; min-height:0; }
.forest-workspace .viewer { grid-template-rows:minmax(0,1fr) auto; }
.forest-workspace .dock { border-top:1px solid var(--line); }
.forest-frame iframe { width:100%; height:100%; }
.forest-links { border-top:1px solid var(--line); padding-top:12px; }
.forest-actions { display:flex; align-items:center; gap:5px; }
dialog.les-paged[open], .forest-controls.les-paged:not(.forest-collapsed) { display:flex; flex-direction:column; gap:0; overflow:hidden; }
dialog.les-paged .dhead, .forest-controls.les-paged .forest-panel-head { flex:none; position:static; }
dialog.les-paged .inner { padding:0; }
.les-paged .les-pages { flex:1; min-height:0; margin:10px 14px; overflow:hidden; columns:1; column-fill:auto; column-gap:24px; overflow-wrap:anywhere; }
.les-pages :is(button, select, label, summary, h2, .forest-place-row) { break-inside:avoid; }
.les-pages h2 { break-after:avoid; }
.les-pages .presets { display:block; }
.les-pages .presets button { display:block; width:100%; margin-bottom:5px; }
.les-pages p { orphans:2; widows:2; }
.les-pager { flex:none; display:flex; justify-content:space-between; align-items:center; padding:6px 12px; border-top:1px solid #b9c5b7; background:#f6f7ee; }
.les-pager button { min-height:36px; font:600 14px system-ui; }
.les-pager button:disabled { opacity:.45; cursor:default; }
.les-pager output { font:13px system-ui; }
.forest-controls.les-paged:not(.forest-collapsed) { height:100%; max-height:100%; padding:0 10px; }
.forest-controls.les-paged .les-pages { margin:0 0 8px; }
.forest-controls .les-pager { padding:4px 0; }
body:has(.forest-bar).app-focus { padding-top:0; }
.app-focus #atlasNavigation { display:none; }
@media(max-width:650px) {
 .forest-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; padding:5px 8px; }
 .forest-bar h1 { margin:0; font-size:18px; }
 .forest-switch { grid-column:1; grid-row:2; width:max-content; }
 .forest-actions { grid-column:2; grid-row:1/3; flex-wrap:wrap; justify-content:flex-end; max-width:135px; }
 .forest-bar button { padding:4px 7px; min-height:32px; font-size:13px; }
 .forest-switch a { font-size:13px; padding:4px 8px; }
}
@media(max-height:460px) and (min-width:590px) {
 .forest-bar { display:flex; padding-block:2px; }
 .forest-actions { max-width:none; }
 .forest-workspace .dock { flex-wrap:nowrap; }
}
@media(max-width:760px) { .forest-controls.les-paged:not(.forest-collapsed) { max-height:83dvh; height:83dvh; } }