/* Location cards have explicit rows so inherited flex rules cannot squeeze their art. */
#world .map-controls{display:none!important}
#world .map{background:#c5c9aa;transition:none}
#world .map-art::before{display:none}
#world .scene{object-fit:cover;object-position:50% 50%}
#world .destination{justify-content:start;gap:8px;padding:12px 15px;border:1px solid #e0d6bc;border-bottom:0;background:linear-gradient(135deg,#fffdf4,#f7f1e2);box-shadow:0 -3px 12px #233c2b15;overflow:hidden;transition:none}
#world .destination.location-here{display:grid;grid-template-rows:14px 64px 10px minmax(0,1fr);height:var(--card);min-height:0}
#world .destination:not(.location-here){display:flex;gap:9px;height:var(--card)}
#world .destination-heading{height:14px;min-height:0;gap:10px}
#world #destination-kicker{font-size:9px;line-height:14px;letter-spacing:2px;margin:0}
#world .destination-top{height:64px;min-height:0;flex:none;gap:11px;align-items:center;flex-wrap:nowrap}
#world .destination-thumb{display:block;width:61px;height:61px;border-radius:10px;object-fit:cover;border:1px solid #d8c9a9}
#world .destination-copy{flex:1;min-width:0}
#world .destination h2{font:700 21px/1.1 Interface,sans-serif;letter-spacing:-.35px}
#world .destination p{font-size:10px;line-height:1.4;margin-top:5px;max-height:2.8em;color:#938775}
#world .destination .destination-divider{display:flex;flex:none;align-items:center;gap:9px;height:10px;min-height:0;margin:0}
#world .destination-divider::before,#world .destination-divider::after{content:"";flex:1;height:1px;background:#b7aa8c88}
#world .destination-divider i{display:block;flex:none;width:6px;height:6px;border:1px solid #aa9670;background:transparent;transform:rotate(45deg)}
#world .location-here #secondary-actions{display:block;align-self:stretch;min-height:0;height:100%;margin:0;padding:0}
#world .location-choices{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;height:100%;min-height:0}
#world .location-choice{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;min-width:0;min-height:0;padding:4px 4px 7px;border:1px solid #d6c5a4;border-radius:10px;background:linear-gradient(#fffdf7,#f9f3e6);box-shadow:inset 0 0 0 2px #fffaf0;color:#24585a;overflow:hidden}
#world .location-choice-scene{display:block;position:relative;flex:1;min-height:65px;width:100%;border-radius:7px;border:1px solid #dfd3b9;overflow:hidden;background:#e9e6d5}
#world .location-choice-scene>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 55%}
#world .location-choice-scene>.location-choice-figure{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 2px #283a2960)}
#world .location-choice[data-location-panel="residents"] .location-choice-figure{height:200%;object-fit:cover;object-position:center top}
#world .location-choice-icon{flex:none;display:grid;place-items:center;width:29px;height:29px;margin:-15px 0 -1px;border:1px solid #d8c6a3;border-radius:50%;background:#fff9ec;z-index:1;box-shadow:0 1px 2px #705b2710}
#world .location-choice-icon .icon{font-size:17px;color:#8e7856}
#world .location-choice strong{flex:none;font:700 17px/1.15 Interface,sans-serif;margin:3px 0 5px;white-space:nowrap}
#world .location-choice small{flex:none;display:block;min-width:80%;font-size:9px;line-height:13px;padding:2px 6px;border:1px solid #e7dcc5;border-radius:12px;color:#93816a;background:#efe5d13b;white-space:nowrap}
#world .map.zoomable .map-pin{width:34px;height:34px;min-height:34px;padding:3px;border-radius:50%;box-shadow:0 2px 4px #4b48333b}
#world .map.zoomable .map-pin>.icon{width:24px;height:24px;font-size:20px;background:transparent}
/* Compact rows use each NPC's existing portrait. */
.modal.location-residents-modal{max-width:440px!important;padding:17px;border:1px solid #d9c8a8;border-radius:19px;background:linear-gradient(135deg,#fffdf3,#f7efdc)}
.location-residents-modal .modal-header{align-items:center;margin-bottom:13px;padding-bottom:12px;border-bottom:1px solid #dcd1b8}
.location-residents-modal .modal-header h2{font:700 25px/1.15 Interface,sans-serif;color:#285856}
.location-residents-modal .modal-header .icon-button{width:36px;height:36px;border-radius:10px}
.location-residents-modal .resident-card{display:flex;align-items:center;gap:12px;width:100%;min-height:76px;padding:9px;margin:0 0 8px;border:1px solid #ddd2ba;border-radius:12px;background:#fffdf5;box-shadow:0 1px 2px #66523108;text-align:left}
.location-residents-modal .resident-portrait{display:grid;place-items:center;flex:0 0 54px;width:54px;height:58px;border:1px solid #e2d6bb;border-radius:8px;background:linear-gradient(#eee9d7,#f8f2e2);overflow:hidden}
.location-residents-modal .resident-portrait>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 15%}
.location-residents-modal .resident-portrait>.icon{font-size:24px;color:#6d8775}
.location-residents-modal .resident-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.location-residents-modal .resident-copy strong{font-size:15px;line-height:1.15;color:#2c5d59}
.location-residents-modal .resident-copy small{font-size:11px;line-height:1.35;color:#9b8e77}
.location-residents-modal .resident-card>.icon{font-size:19px;color:#7b9a86;margin-right:3px}
.location-residents-modal .location-section-label{font-size:9px;letter-spacing:1.2px;text-transform:uppercase;color:#a18c69;padding:5px 0 8px}
.location-residents-modal .location-action-row{min-height:59px}
.location-residents-modal .location-action-row .resident-portrait{height:38px;border:0;background:transparent}
.location-residents-modal .location-events-button{display:flex;align-items:center;gap:8px;width:100%;margin-top:12px;min-height:39px;font-size:11px;border-radius:9px;background:#eee9d7;border-color:#d7c8a6}
.location-residents-modal .location-events-button>.icon:last-child{margin-left:auto;font-size:17px}
/* One drawer controls both panes. Only its height animates. The arena track stays fixed. */
#battle-root .spell-panel-battle>.battle-console,
#battle-root .spell-panel-battle>.battle-console.journal-expanded{position:absolute;left:0;right:0;bottom:34px;grid-row:auto;height:auto;min-height:0;max-height:none;margin:0;overflow:visible;transition:none;--combat-drawer-height:clamp(132px,22dvh,180px)}
#battle-root .spell-panel-battle .battle-console .combat-action-panel,
#battle-root .spell-panel-battle .battle-console.journal-expanded .combat-action-panel{position:relative;height:auto;min-height:102px;max-height:none;transition:none}
#battle-root .spell-panel-battle .battle-console #battle-actions,
#battle-root .spell-panel-battle .battle-console.journal-expanded #battle-actions{position:relative!important;inset:auto;height:auto;min-height:102px;max-height:none;display:flex;flex-direction:column;gap:6px;overflow:visible;transition:none}
#battle-root .spell-panel-battle .battle-console #skills-root{height:102px;min-height:102px;max-height:102px}
#battle-root .spell-panel-battle .battle-console .battle-log,
#battle-root .spell-panel-battle .battle-console .battle-log.log-expanded{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:32px auto;column-gap:6px;row-gap:0;position:relative;flex:none;height:auto;min-height:32px;max-height:none;overflow:visible;transition:none}
#battle-root .spell-panel-battle .battle-log>.battle-log-toggle{display:flex;align-items:center;justify-content:space-between;min-width:0;width:100%;height:32px;min-height:32px;padding:6px 9px;border:1px solid #cbd2bc;border-radius:9px;background:#f8f8ed;font-size:12px;line-height:17px;color:#315f56}
#battle-root .spell-panel-battle .battle-log>.battle-log-toggle[aria-expanded="true"]{background:#eef2e3;border-color:#aebfa2;border-radius:9px 9px 4px 4px}
#battle-root .spell-panel-battle .battle-log-toggle>span{display:flex;align-items:center;gap:6px}
#battle-root .spell-panel-battle .battle-log-toggle .icon{font-size:17px}
#battle-root .spell-panel-battle .potion-toggle>span>img{width:17px;height:20px;object-fit:contain}
#battle-root .spell-panel-battle .combat-drawer{grid-column:1/-1;position:relative;height:0;min-height:0;overflow:hidden;contain:layout paint;transition:height .26s cubic-bezier(.22,.72,.25,1)}
#battle-root .spell-panel-battle .combat-drawer[data-open="true"]{height:var(--combat-drawer-height)}
#battle-root .spell-panel-battle .combat-drawer.drawer-instant{transition:none}
#battle-root .spell-panel-battle .combat-drawer>.battle-log-content,
#battle-root .spell-panel-battle .combat-drawer>.combat-potions{position:absolute;inset:6px 0 0;width:100%;height:calc(var(--combat-drawer-height) - 6px);min-height:0;max-height:none;margin:0;border:1px solid #ced7bc;border-radius:9px;background:#fcfbf0;box-shadow:none;opacity:1;pointer-events:auto;transition:none;transform:none}
#battle-root .spell-panel-battle .combat-drawer>.battle-log-content{overflow-x:hidden;overflow-y:auto;padding:7px 9px;font-size:10px;line-height:1.5;overscroll-behavior:contain}
#battle-root .spell-panel-battle .combat-drawer>.combat-potions{overflow-x:auto;overflow-y:hidden;padding:8px;overscroll-behavior-x:contain;scrollbar-width:thin;touch-action:pan-x}
#battle-root .spell-panel-battle .battle-potion-list{display:flex;gap:8px;width:max-content;min-width:100%;height:100%;align-items:stretch}
#battle-root .spell-panel-battle .battle-potion-card{display:flex;position:relative;flex:0 0 100px;width:100px;min-height:0;height:100%;align-items:center;justify-content:center;gap:5px;padding:7px 5px;border:1px solid #d6c9aa;border-radius:8px;background:linear-gradient(#fffdf5,#f4ecd8);box-shadow:inset 0 0 0 2px #fff9;color:#345f54}
#battle-root .spell-panel-battle .battle-potion-card>img{width:60px;height:clamp(45px,8dvh,65px);min-height:32px;flex:0 1 auto;object-fit:contain}
#battle-root .spell-panel-battle .battle-potion-card>strong{font-size:10px;line-height:1.15}
#battle-root .spell-panel-battle .battle-potion-card>small{font-size:9px;line-height:1.25;color:#96815f}
#battle-root .spell-panel-battle .battle-potion-card:disabled{opacity:.58}
#battle-root .spell-panel-battle .battle-buttons{flex:none;height:65px;min-height:65px;margin:0;opacity:1;transform:none;pointer-events:auto}
@media(max-width:899px){
 #world .destination:not(.location-here) .destination-top{flex:1;display:flex;flex-direction:column;align-items:stretch;height:auto;min-height:0;gap:10px}
 #world .destination:not(.location-here) .destination-thumb{width:100%;height:0;min-height:50px;flex:1;object-position:center 55%}
 #world .destination:not(.location-here) .destination-copy{flex:none}
 #world .destination:not(.location-here) .primary{flex:none;min-height:42px;margin-top:0}
}
@media(max-height:730px){
 #world .destination.location-here{height:var(--card);grid-template-rows:12px 56px 8px minmax(0,1fr);gap:7px;padding:10px 14px}
 #world .destination-top{height:56px}
 #world .destination-thumb{width:53px;height:53px}
 #world .destination h2{font-size:19px}
 #world .location-choice strong{font-size:16px}
}
@media(min-width:900px){
 #world .destination.location-here{height:388px;grid-template-rows:14px 94px 10px minmax(0,1fr);padding:16px;gap:12px}
 #world .destination:not(.location-here){height:auto;min-height:240px}
 #world .destination-top{height:94px;align-items:center}
 #world .destination-thumb{width:84px;height:84px}
 #world .destination h2{font-size:23px}
 #world .destination p{font-size:12px}
 #world .location-choice strong{font-size:19px}
 #world .location-choice small{font-size:10px}
}
@media(prefers-reduced-motion:reduce){#battle-root .spell-panel-battle .combat-drawer{transition:none}}
#app.reduced-motion #battle-root .spell-panel-battle .combat-drawer{transition:none}

@media(max-height:680px) and (max-width:899px){#world .destination.location-here{grid-template-rows:12px 52px 8px minmax(0,1fr);gap:6px;padding:8px 12px}#world .destination-top{height:52px}#world .destination-thumb{width:49px;height:49px}#world .location-choice-scene{min-height:38px}#world .location-choice strong{font-size:15px}}
