/* One rounded card; travel and local actions share the same available height. */
#world .destination{--loc-pad:12px;--loc-x:15px;--loc-kicker:14px;--loc-head:64px;--loc-gap:8px;--loc-footer:59px;--loc-top:calc(var(--loc-pad) + var(--loc-kicker) + var(--loc-head) + var(--loc-gap) * 2);bottom:3px;height:calc(var(--card) - 3px)!important;grid-template-rows:var(--loc-kicker) var(--loc-head) minmax(0,1fr)!important;gap:var(--loc-gap);padding:var(--loc-pad) var(--loc-x);border:1px solid #d9cfb7;border-radius:22px;background:#fcf8ed;overflow:hidden;isolation:isolate;transition:height .4s cubic-bezier(.2,.72,.25,1)}
#world .destination-heading{grid-row:1;margin-right:15px}
#world .destination-top{grid-row:2}
#world .destination #secondary-actions{position:relative;grid-row:3;height:100%;min-height:0;padding:18px 0 0!important}
#world .destination[data-here="false"] #secondary-actions{padding:0 0 var(--loc-footer)!important}
#world .destination .destination-divider{position:absolute;left:var(--loc-x);right:var(--loc-x);top:var(--loc-top);z-index:4;display:flex;align-items:center;gap:9px;height:10px;min-height:0;margin:0;pointer-events:none}
#world .destination[data-here="false"] .destination-divider{top:calc(100% - var(--loc-pad) - var(--loc-footer) + 8px)}
#world .destination-divider:before,#world .destination-divider:after{display:none}
#world .destination-divider>.destination-line{display:block;flex:1;height:1px;background:#c9bea5;transform-origin:center}
#world .destination-divider>i{flex:none;width:5px;height:5px;margin:0;border:1px solid #b6a581;background:none;transform:rotate(45deg)}
#world .destination #primary-action{position:absolute;z-index:5;left:var(--loc-x);right:var(--loc-x);bottom:var(--loc-pad);width:calc(100% - var(--loc-x) * 2);height:33px;min-height:33px;margin:0;border-radius:9px}
#world .destination>.location-inline-panel{inset:0;width:100%;height:100%;padding:13px 15px;border:1px solid #d2c5a8;border-radius:21px;background:#fcf8ed;clip-path:inset(0 round 21px);overflow:hidden;box-shadow:inset 0 0 0 2px #fffdf5}
#world .destination .location-board{border-radius:12px}
#world .location-board .location-choices{gap:18px}
#world .world-choice{padding:7px 7px 9px;border:1px solid #d4c8ac;border-radius:12px;background:#fcf9ef;box-shadow:inset 0 0 0 2px #fffdf5}
#world .world-choice-scene{width:100%;min-height:28px;border:1px solid #dfd2b5;border-radius:8px;background:#f7f3e7}
#world .world-choice .world-choice-figure{max-height:108px;padding:5px 3px 13px;filter:none}
#world .world-choice .world-choice-figure.is-portrait{padding:0 0 8px;width:100%;height:100%;max-height:112px;border-radius:7px;object-fit:cover;object-position:center 20%}
#world .world-choice .location-choice-icon{display:grid;place-items:center;position:relative;flex:none;width:30px;height:30px;margin:-15px 0 0;border:1px solid #d3c39f;border-radius:50%;background:#fff9e9;box-shadow:0 1px 2px #67533117}
#world .world-choice .location-choice-icon>img{width:21px;height:21px;object-fit:contain}
#world .world-choice>strong{margin:5px 0 4px;min-height:21px}
#world .world-choice>small{width:calc(100% - 18px);min-height:23px;padding:3px 7px;border:1px solid #e1d7c0;border-radius:13px;background:#f5efdf;line-height:12px}
#world .world-choice-direction{bottom:15px}
#world .world-choice.is-favourite:after{content:'★';position:absolute;right:10px;top:10px;font-size:10px;color:#a58c59;background:#fff9e8;border:1px solid #dfd2b5;border-radius:50%;width:16px;height:16px;display:grid;place-items:center}
.world-panel-favourite{display:grid;place-items:center;flex:none;width:26px;height:26px;padding:4px;border:1px solid #d8cdb5;border-radius:7px;background:#fbf8ed;color:#86967b;touch-action:manipulation}
.world-panel-favourite>img{width:17px;height:17px;opacity:.5}
.world-panel-favourite[aria-pressed="true"]{border-color:#bba16a;background:#f3e8c8}
.world-panel-favourite[aria-pressed="true"]>img{opacity:1}
.world-panel-heading{padding-right:18px}
.world-panel-heading>small{max-width:19%}
.location-fold-toggle{position:absolute;top:3px;right:10px;z-index:50;display:grid;place-items:center;width:24px;height:19px;padding:0;border:0;border-radius:0 0 8px 8px;background:#f0ebdc;color:#6b8370;touch-action:manipulation}
.location-fold-toggle>.chevron{width:7px;height:7px;margin:2px 0 0;transform:rotate(225deg);transition:transform .3s ease}
#world .destination[data-expanded="false"]{grid-template-rows:14px!important;gap:0;padding:8px 15px;border-radius:15px}
#world .destination[data-expanded="false"] .destination-heading{margin-right:28px}
#world .destination[data-expanded="false"]>.destination-top,#world .destination[data-expanded="false"]>.destination-divider,#world .destination[data-expanded="false"]>#secondary-actions,#world .destination[data-expanded="false"]>#primary-action,#world .destination[data-expanded="false"]>.location-inline-panel{visibility:hidden!important;pointer-events:none!important}
#world .destination[data-expanded="false"]>.location-fold-toggle>.chevron{transform:rotate(45deg)}
.location-preview{display:flex;gap:4px;height:100%;width:100%;padding:6px 8px;border:1px solid #d9cdb2;border-radius:13px;background:#f8f4e8;opacity:1;transform:none;overflow:hidden}
.location-preview>img{width:112px;height:100%;max-height:116px;min-height:30px;object-fit:contain;flex:1 1 50px;margin:0}
.location-preview>strong{flex:none;font:700 16px/21px Interface,sans-serif;color:#536e5a}
.location-preview>small{flex:none;font-size:9px;line-height:14px;text-align:center;color:#9c8d71}
.world-npc-scene>img,.world-npc-card.npc-master .world-npc-scene>img{display:block;width:100%;height:100%;max-width:122px;max-height:122px;aspect-ratio:1;object-fit:cover;object-position:center 22%;border:1px solid #daceb2;border-radius:9px}
.world-forge-services>button>img{width:31px;height:31px;object-fit:contain;filter:none}
.world-pit-tabs{flex:none}
.world-pit-loot-label{display:flex;align-items:center;gap:6px;min-height:25px;padding:4px 9px;border:1px solid #c6d1b8;border-radius:7px;background:#eaf0df;font-size:11px;color:#55765e}
.world-pit-loot-label>b{min-width:17px;border-radius:5px;background:#d6e1c8;text-align:center;font-size:10px}
.world-pit-card{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:9px;flex:none;width:100%;min-width:0;min-height:88px;height:auto;max-height:none;padding:9px 8px 9px 11px;border:1px solid #cbbfa7;border-left-width:3px;border-radius:11px;background:#fbf8ee;box-shadow:inset 0 0 0 2px #fffdf6}
.world-pit-card.rarity-rare{border-color:#acbac0;border-left-color:#859fae}
.world-pit-card.rarity-uncommon{border-color:#bdc8af;border-left-color:#8fa57f}
.world-pit-card.rarity-epic{border-color:#beb0c5;border-left-color:#a38bab}
.world-pit-card>.world-pit-item{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:auto;align-items:center;gap:9px;height:100%;min-width:0;padding:0;text-align:left;background:none}
.world-pit-thumb{position:relative;display:grid;place-items:center;width:52px;height:58px;border:1px solid #dcd0b7;border-radius:8px;background:#f4eedf}
.world-pit-thumb>img{position:static;width:43px;height:45px;object-fit:contain;filter:none}
.world-pit-thumb>b{position:absolute;bottom:-4px;right:-4px;min-width:21px;padding:2px 4px;border:1px solid #d2c7ac;border-radius:6px;background:#fffaf0;font-size:9px;color:#587665;text-align:center}
.world-pit-copy{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.world-pit-copy>.world-pit-rarity{position:static;display:flex;gap:4px;align-items:center;font-size:8px;line-height:11px;color:#9b8d71}
.world-pit-copy>.world-pit-rarity>i{width:4px;height:4px;display:inline-block;border-radius:50%;background:#9b8d71}
.world-pit-copy>strong{font:700 12px/15px Interface,sans-serif;color:#3c6658;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.world-pit-copy>small{font-size:8px;line-height:11px;color:#a09379}
.world-pit-item-actions{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:0;border:0}
.world-pit-item-actions>button{width:100%;min-height:27px;font-size:9px;border-radius:6px}
.world-pit-discard{height:24px;border:1px solid #d8ccb4;background:#faf5e8;color:#99866b}
/* Each tab owns its own frame. The shared grid carries no outer contour. */
#battle-root .spell-panel-battle .battle-console .battle-log{border:0!important;outline:0;background:none!important;box-shadow:none!important;border-radius:0;padding:0}
#battle-root .spell-panel-battle .battle-log>.battle-log-toggle{border-radius:9px!important}
#battle-root .spell-panel-battle .battle-log-toggle>span>img.combat-tab-art{display:block;width:19px;height:21px;object-fit:contain;filter:none}
#battle-root .spell-panel-battle .combat-drawer>.combat-potions{padding:8px;border-color:#d4c9b1;background:#fbf8ee;scroll-padding:8px;scroll-snap-type:x proximity}
#battle-root .spell-panel-battle .battle-potion-list{gap:10px;align-items:stretch}
#battle-root .spell-panel-battle .battle-potion-card{display:grid;grid-template-rows:27px minmax(33px,1fr) 23px;flex:0 0 157px;width:157px;height:100%;min-height:0;padding:7px 8px;gap:5px;align-items:stretch;border:1px solid #d5c5a4;border-radius:11px;background:#fffcf4;box-shadow:inset 0 0 0 2px #fffefa;scroll-snap-align:start;text-align:left;color:#3f6656;overflow:hidden}
#battle-root .potion-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:4px;min-width:0}
#battle-root .potion-card-head>strong{font:700 12px/14px Interface,sans-serif;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#battle-root .potion-card-head>.potion-stack{position:static;flex:none;min-width:24px;padding:2px 3px;border:1px solid #e0d5be;border-radius:6px;background:#f5efdf;font-size:10px;color:#6e826b;line-height:13px;text-align:center}
#battle-root .potion-card-body{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:7px;min-height:0}
#battle-root .potion-card-bottle{display:grid;place-items:center;height:100%;min-height:30px;max-height:57px;border:1px solid #e1d5bd;border-radius:8px;background:#f7f0de}
#battle-root .potion-card-bottle>img{width:39px;height:100%;max-height:52px;min-height:0;object-fit:contain}
#battle-root .potion-card-restoration{display:flex;flex-direction:column;gap:4px;min-width:0}
#battle-root .potion-card-restoration>small{font-size:8px;line-height:11px;color:#a18f70}
#battle-root .potion-card-restoration>strong{font-size:11px;line-height:14px;color:#577a5f;overflow-wrap:break-word}
#battle-root .potion-card-use{display:grid;place-items:center;min-height:23px;padding:3px 4px;border:1px solid #bdcdb4;border-radius:6px;background:#edf2e2;color:#4f735a;font-size:9px;line-height:12px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#battle-root .spell-panel-battle .battle-potion-card:disabled{opacity:.7;filter:none}
#battle-root .battle-potion-card:disabled .potion-card-use{background:#f1ecde;border-color:#ded3bc;color:#9c8c71;font-size:8px}
@media(max-height:730px){
 #world .destination{--loc-pad:10px;--loc-x:13px;--loc-head:57px;--loc-gap:7px;--loc-footer:53px}
 #world .destination .destination-top{height:57px}
 #world .destination .destination-thumb{height:53px;width:53px;flex-basis:53px!important}
 #world .destination h2{font-size:19px}
 #world .destination>.location-inline-panel{padding:10px 13px}
 #world .world-choice .world-choice-figure{max-height:83px}
 #world .world-choice .location-choice-icon{width:27px;height:27px;margin-top:-13px}
 #world .world-choice .location-choice-icon>img{width:19px;height:19px}
 #world .world-choice>strong{font-size:16px;min-height:18px;margin:4px 0}
 #world .world-choice>small{font-size:8px;min-height:22px}
 .world-pit-card{min-height:79px;padding-top:7px;padding-bottom:7px}
}
@media(prefers-reduced-motion:reduce){#world .destination,.location-fold-toggle>.chevron,.location-preview{transition:none}}
.reduced-motion #world .destination,.reduced-motion .location-fold-toggle>.chevron{transition:none}

/* A collapsed card keeps all map destinations reachable at the initial zoom. */
#world.location-card-collapsed .scene{object-fit:contain}
#world.location-card-collapsed .map-art:before{display:block;opacity:.28;filter:blur(18px)}
/* 05.11.2026: звезда избранного отвечает на нажатие */
.world-panel-favourite{position:relative;overflow:visible}
.world-panel-favourite>img{transition:opacity .25s ease}
.world-panel-favourite.fav-pop-on>img{animation:fav-star-on .55s cubic-bezier(.2,1.5,.4,1) both}
.world-panel-favourite.fav-pop-off>img{animation:fav-star-off .32s ease both}
.world-panel-favourite.fav-pop-on:before,.world-panel-favourite.fav-pop-on:after{content:"";position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;pointer-events:none}
.world-panel-favourite.fav-pop-on:before{border:2px solid #d3a94f;animation:fav-ring .55s ease-out both}
.world-panel-favourite.fav-pop-on:after{background:radial-gradient(circle,#f7dc8fcc,#f7dc8f00 68%);animation:fav-glow .6s ease-out both}
@keyframes fav-star-on{0%{transform:scale(.55) rotate(-28deg)}55%{transform:scale(1.42) rotate(8deg)}100%{transform:none}}
@keyframes fav-star-off{0%{transform:none}45%{transform:scale(.72) rotate(-14deg)}100%{transform:none}}
@keyframes fav-ring{0%{opacity:.95;transform:scale(.45)}100%{opacity:0;transform:scale(1.75)}}
@keyframes fav-glow{0%{opacity:0;transform:scale(.5)}35%{opacity:1}100%{opacity:0;transform:scale(1.9)}}
@media(prefers-reduced-motion:reduce){.world-panel-favourite.fav-pop-on>img,.world-panel-favourite.fav-pop-off>img,.world-panel-favourite.fav-pop-on:before,.world-panel-favourite.fav-pop-on:after{animation:none}}
.reduced-motion .world-panel-favourite.fav-pop-on>img,.reduced-motion .world-panel-favourite.fav-pop-off>img,.reduced-motion .world-panel-favourite.fav-pop-on:before,.reduced-motion .world-panel-favourite.fav-pop-on:after{animation:none}
