/* Map-first layout. 85vw atlas with an on-demand character overlay.
   This CSS intentionally overrides the older three-column grid without changing maps. */
html,body{min-height:100%;overflow-x:hidden}
.layout{
 position:relative!important;display:block!important;
 width:100%;height:calc(100vh - 100px)!important;
 min-height:540px!important;max-height:none;
 padding:0;overflow:hidden;
 background:radial-gradient(ellipse at center,#46301e 0%,#1e1510 66%,#090807 100%);
}
.layout>.main{
 width:85vw!important;max-width:none;min-width:0;
 height:100%!important;min-height:0!important;
 margin:0 auto;border-left:3px ridge #9f7136;
 border-right:3px ridge #9f7136;
 box-shadow:0 0 50px #000d,0 0 0 1px #2e1c0c;
 overflow:hidden;
}
.layout>.main .map-viewport{min-height:0;flex:1}
.layout>.main .map-toolbar{flex:none}
.layout>.panel{
 display:none;position:absolute;z-index:30;
 top:14px;bottom:14px;right:clamp(12px,5vw,84px);
 width:min(410px,calc(100vw - 24px));
 height:auto!important;max-height:none!important;
 min-height:0!important;overflow-y:auto;overscroll-behavior:contain;
 padding:0 16px 18px!important;
 border:2px ridge #bc904c!important;
 background:linear-gradient(155deg,#2d2016ed,#100e18f5 45%,#150f0df7);
 box-shadow:0 13px 45px #000f,inset 0 0 0 2px #2d1c0e;
 scrollbar-color:#a17939 #171119;
}
.layout>.panel.is-open{display:block!important}
.layout>.panel .drawer-top{
 position:sticky;top:0;z-index:7;
 display:flex;justify-content:space-between;align-items:center;
 margin:0 -16px;padding:9px 13px 9px 17px;
 background:linear-gradient(#472919,#21140e);
 border-bottom:2px ridge #bd8e43;
 color:#e8c280;font:bold 11px Georgia,serif;letter-spacing:1.8px;
}
#closeDrawer{
 width:34px;height:34px;display:grid;place-items:center;
 color:#ffe0a0;background:linear-gradient(#641c12,#2c0c0a);
 border:2px ridge #b78d4b;border-radius:2px;
 font:700 24px/1 Georgia,serif;
}
.layout>.panel #panelTitle,.layout>.panel #panelSubtitle,.layout>.panel #characterList{display:none!important}
.layout>.panel.show-roster #panelTitle,.layout>.panel.show-roster #panelSubtitle,.layout>.panel.show-roster #characterList{display:block!important}
.layout>.panel.show-roster .char-grid{display:grid!important;grid-template-columns:1fr!important}
.layout>.panel.show-roster #panelTitle{margin-top:22px}
.layout>.panel.show-roster #details,.layout>.panel.show-roster .hall-panel{display:none!important}
.layout>.panel.show-character #details{margin-top:12px}
.layout>.panel .detail{margin:9px 0 8px;padding:15px 13px}
.layout>.panel .detail .player-head{gap:12px}
.layout>.panel .detail .player-name .name{font-size:22px}
.layout>.panel .detail .activity-list{max-height:230px}
.layout>.panel .hall-panel{
 position:relative;display:flex;min-width:0;min-height:250px;
 max-height:none;height:auto;overflow:visible;
 margin:15px 0 18px;border:2px ridge #a67f44!important;
 background:linear-gradient(135deg,#1f1720,#121625);
}
.layout>.panel .hall-heading{padding:13px 12px 12px}
.layout>.panel .hall-heading h2{font-size:23px;margin:7px 0}
.layout>.panel .hall-heading p{font-size:11px}
.layout>.panel .hall-summary{margin:9px 11px 3px}
.layout>.panel .hall-feed{overflow:visible;min-height:0;padding:9px;max-height:none;gap:9px}
.layout>.panel .hall-card{padding:10px}
.layout>.panel .hall-privacy{padding:9px 11px}
.layout>.panel .hall-switch button{min-height:30px;padding:6px 9px}
.layout>.panel .advanced-tools{margin:22px 0 12px;border:1px solid #6c5232;background:#17141b;border-radius:2px}
.layout>.panel .advanced-tools>summary{
 cursor:pointer;padding:12px 10px;color:#d7bf91;
 font:700 12px Georgia,serif;letter-spacing:.4px
}
.layout>.panel .advanced-tools[open]{padding:0 10px 15px}
.layout>.panel .advanced-tools[open]>summary{margin:0 -10px 12px;border-bottom:1px solid #685033}
.layout>.panel .advanced-tools .footnote{font-size:10px;overflow-wrap:anywhere}
.profession-section{margin:14px 0 12px;padding:11px 12px;border:1px solid #886a39;background:linear-gradient(#261e1b,#131521)}
.profession-section h3{margin:0 0 8px!important;font:bold small-caps 17px Georgia,serif!important;color:#f1d492}
.profession-section h3:after{display:none}
.profession-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid #6f55342e;font:12px Georgia,serif;color:#e0cfad}
.profession-row b{color:#ffe1a0}
.profession-empty{font-size:12px;color:#ae9d87;margin:0}
#openRoster{white-space:nowrap}
#openRoster[aria-expanded=true]{border-color:#ffdf8b!important;background:linear-gradient(#813a1f,#28110d)!important}
.layout>.panel.show-roster .advanced-tools{margin-top:25px}
@media(max-width:850px){
 .layout{height:calc(100dvh - 78px)!important;min-height:420px!important;display:block!important}
 .layout>.main{width:100vw!important;height:100%!important;min-height:0!important;border-left:0;border-right:0}
 .layout>.panel{top:8px;bottom:8px;right:8px;width:min(400px,calc(100vw - 16px));max-height:none!important}
 .layout>.main .atlas-head{padding:8px;min-height:55px}
 .layout>.main .atlas-head .intro{display:none}
 .layout>.main .map-toolbar{padding:7px 9px;min-height:48px}
 #sourceStatus{display:none}
}
@media(max-width:500px){
 .layout>.panel{width:calc(100vw - 16px)}
 .layout>.panel .hall-feed{max-height:none}
 .layout>.panel .detail .activity-list{max-height:170px}
 .map-toolbar .left{gap:5px}
 #cloudSyncStatus{font-size:10px}
 .layout>.main .tab{padding:7px}
}
@media(prefers-reduced-motion:reduce){.layout>.panel{scroll-behavior:auto}}
