/* Full-window Focus view. Overlays never take canvas layout space. */
#focus-view-bar,#focus-search-panel{display:none}
body.dd-wheel.wheel-focus-view{display:block!important}
body.dd-wheel.wheel-focus-view>main{position:fixed!important;inset:0!important;display:block!important;width:100%!important;height:100dvh!important;max-width:none!important}
body.dd-wheel.wheel-focus-view #stage{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
body.dd-wheel.wheel-focus-view>header,body.dd-wheel.wheel-focus-view>footer{display:none!important}
body.dd-wheel.wheel-focus-view aside{display:none!important}
body.dd-wheel.wheel-focus-view.focus-profile-open aside{display:block!important;position:fixed!important;z-index:12;top:80px!important;right:12px!important;bottom:12px!important;left:auto!important;width:340px!important;max-width:calc(100vw - 24px)!important;height:auto!important;max-height:none!important;border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:0 6px 24px #35452b24;padding:0 18px 18px!important;overflow:auto}
body.dd-wheel.wheel-focus-view aside #details-content{display:block!important}
body.dd-wheel.wheel-focus-view #profile-done{display:block!important}
body.dd-wheel.wheel-focus-view #details-toggle,body.dd-wheel.wheel-focus-view #profile-reopen,body.dd-wheel.wheel-focus-view .lock,body.dd-wheel.wheel-focus-view .hint,body.dd-wheel.wheel-focus-view #visible-generations,body.dd-wheel.wheel-focus-view #family-view-tools{display:none!important}
body.dd-wheel.wheel-focus-view #focus-view-bar{display:flex;position:fixed;z-index:20;top:12px;left:12px;max-width:calc(100vw - 24px);gap:6px;padding:6px;flex-wrap:wrap;background:var(--pg-paper);border:1px solid var(--pg-green);border-radius:12px;box-shadow:0 4px 16px #35452b1a}
#focus-view-bar button{min-width:44px;font-size:14px}
body.dd-wheel #focus-view-bar button[aria-expanded="true"]{background:var(--pg-pink)!important;color:var(--pg-green)!important}
body.dd-wheel.wheel-focus-view.focus-search-open #focus-search-panel{display:block;position:fixed;z-index:19;top:80px;left:12px;width:420px;max-width:calc(100vw - 24px);padding:12px;border:1px solid var(--pg-green);border-radius:12px;background:var(--pg-paper);box-shadow:0 4px 16px #35452b1a}
#focus-search-panel .search{width:100%}#focus-search-panel #search{width:100%;min-width:0}
#focus-search-panel #search-results{width:100%;max-height:55dvh}
body.dd-wheel.wheel-focus-view #record-search-panel{top:80px;max-height:calc(100% - 92px)}
body.dd-wheel.wheel-focus-view.focus-controls-open>header{display:block!important;position:fixed;z-index:15;top:80px;left:12px;right:12px;max-height:45dvh;overflow:auto;border:1px solid var(--pg-green);border-radius:12px}
body.dd-wheel.wheel-focus-view.focus-controls-open>footer{display:flex!important;position:fixed;z-index:15;bottom:12px;left:12px;right:12px;max-height:35dvh;overflow:auto;border:1px solid var(--pg-green);border-radius:12px}
body.dd-wheel.wheel-focus-view #focus-view-enter{display:none}
@media(max-width:560px){
 body.dd-wheel.wheel-focus-view #focus-view-bar{gap:4px;top:8px;left:8px;max-width:calc(100vw - 16px);padding:4px}
 #focus-view-bar button{padding:8px!important}
 body.dd-wheel.wheel-focus-view.focus-profile-open aside{top:auto!important;bottom:0!important;right:0!important;left:0!important;width:100%!important;max-width:none!important;height:55dvh!important;max-height:55dvh!important;border-radius:14px 14px 0 0!important;padding:0 12px 16px!important}
 body.dd-wheel.wheel-focus-view .profile-sidebar-heading{margin:0 -12px!important;padding:12px!important}
 body.dd-wheel.wheel-focus-view.focus-search-open #focus-search-panel,body.dd-wheel.wheel-focus-view.focus-controls-open>header{top:124px}
 body.dd-wheel.wheel-focus-view #record-search-panel{top:124px;max-height:calc(100% - 136px)}
}


body.dd-wheel #focus-view-enter{position:absolute;z-index:5;right:16px;top:12px;min-height:48px;padding:10px 18px!important;background:#35452B!important;color:#F7F2E8!important;border:2px solid #E5A4B4!important;font-size:16px!important;font-weight:600;box-shadow:0 3px 12px #35452b26}
#focus-view-bar .drag-modes{padding-right:6px;border-right:1px solid var(--line);gap:4px}
body.dd-wheel #focus-view-bar .drag-modes button[aria-pressed="true"]{background:#E5A4B4!important;color:#35452B!important;border-color:#35452B!important;box-shadow:inset 0 -3px #35452B}
@media(max-width:560px){
 body.dd-wheel #focus-view-enter{right:8px;top:8px;font-size:14px!important;min-height:44px;padding:8px 12px!important}
 body.dd-wheel.wheel-focus-view #focus-view-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:400px}
 #focus-view-bar .drag-modes{grid-column:span 2;order:1;border:0;padding:0}#focus-view-bar .drag-modes button{flex:1;min-width:0}
 #focus-search{order:2}#focus-profile{order:3}#focus-minus{order:4}#focus-plus{order:5}#focus-controls{order:6}#focus-exit{order:7}
}

/* Explorer panels follow the actual toolbar/search height, including wrapped text. */
.explorer-help{display:none}body.wheel-focus-view .explorer-help{display:block}
body.dd-wheel.wheel-focus-view.focus-search-open #focus-search-panel,
body.dd-wheel.wheel-focus-view.focus-controls-open>header,
body.dd-wheel.wheel-focus-view.focus-profile-open aside{top:var(--explorer-panel-top,80px)!important}
body.dd-wheel.wheel-focus-view #record-search-panel{top:var(--explorer-results-top,80px)!important;max-height:calc(100% - var(--explorer-results-top,80px) - 12px)!important}
body.dd-wheel.wheel-focus-view #search-results{max-height:calc(100dvh - var(--explorer-results-top,160px) - 16px)}
body.dd-wheel.wheel-focus-view>footer #minus,body.dd-wheel.wheel-focus-view>footer #plus{display:none}
body.dd-wheel.wheel-focus-view #overview96{z-index:16}
@media(max-width:560px){
 body.dd-wheel.wheel-focus-view.focus-profile-open aside{top:auto!important;max-height:calc(100dvh - var(--explorer-panel-top,124px) - 8px)!important}
}

body.dd-wheel.wheel-focus-view #family-view-tools:not([hidden]){display:flex!important;position:static!important;flex-wrap:wrap;max-width:100%;margin:0}
@media(max-height:600px){body.dd-wheel.wheel-focus-view .record-search-note{display:none}}
