/* World location details use the same paper, woodland and gold as gathering. */
.map-location-panel,.map-location-share-panel{min-width:0;color:var(--antique-ink)}
.map-location-panel .panel-scene-caption{flex-wrap:wrap;overflow-wrap:anywhere}
.map-location-panel .panel-scene-art>.map-location-ground-art{width:100%;height:100%;object-fit:cover;object-position:center 60%;mask-image:linear-gradient(0deg,transparent,#000 20% 80%,transparent)}
.map-location-panel .panel-scene-art>img:not(.map-location-ground-art){display:block;max-width:100%;width:auto;height:166px;object-fit:contain}
.map-location-panel .panel-scene-art>.map-location-resource-art{width:100%;height:190px;object-fit:contain}
/* World anchors cannot position preview art; keep the full painting inside this scene. */
.map-location-panel .panel-scene-art>.objective-world-art{display:flex;align-items:center;justify-content:center;position:relative;inset:auto;transform:none;flex:none;width:calc(100% - 24px);height:calc(100% - 16px);align-self:center;pointer-events:none}
.map-location-panel .panel-scene-art>.objective-world-art>img{display:block;width:100%;height:100%;object-fit:contain}
.map-location-panel .panel-scene-art>.objective-world-art>.building-sprite:not(img){width:auto;height:100%;max-width:100%;aspect-ratio:1}
/* Atlas cells are square: the visible background must retain that proportion. */
.map-location-panel .panel-scene-art>.objective-world-art:is(.fortress,.shrine){width:auto;height:calc(100% - 16px);max-width:calc(100% - 24px);aspect-ratio:1}
.map-location-coordinate-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:8px 10px;border:1px solid #9b7b4566;border-radius:4px;background:#ab803016}
.map-location-coordinate-copy{display:grid;gap:4px;min-width:0}
.map-location-coordinate-strip[data-map-location-card]{margin:0 0 12px;flex-shrink:0}
.map-location-coordinate-strip[data-map-location-card]>.map-location-tools{display:flex;flex:none;gap:6px;margin:0}
.map-location-coordinate-strip small{font:12px/1.3 var(--sans);color:var(--antique-muted)}
.map-location-coordinate-strip strong{font:700 19px/1.3 var(--serif);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.map-location-share-button{display:grid;justify-items:center;align-content:center;flex:none;gap:3px;min-width:66px;min-height:50px;padding:4px 6px;border:1px solid #9b7b4570;border-radius:3px;background:#f7f0de88;color:var(--green);font:11px/1.2 var(--sans)}
.map-location-share-button .icon{width:24px;height:24px}
.map-location-details{margin:12px 0}
.map-location-details p{overflow-wrap:anywhere}
/* Keep the complete atlas cell inside the shorter scene, including roof flags. */
.map-location-combat-panel>.panel-scene{margin-bottom:0}
.map-location-panel.map-location-combat-panel .panel-scene-art{height:130px}
.map-location-panel.map-location-combat-panel .panel-scene-art>.world-site-sprite{width:178px;height:130px}
.map-location-combat-panel>.map-location-combat-stats{position:relative;margin:0;padding:0}
.map-location-combat-stats>.game-info-button{position:absolute;right:0;bottom:100%;list-style:none}
.map-location-combat-stats>.game-info-button::-webkit-details-marker{display:none}
.map-location-combat-stats[open]>.game-info-button{bottom:auto;top:-44px}
.map-location-combat-stats-body{padding:8px;border-block:1px solid #9b7b4566}
.map-location-panel:has(.map-location-combat-stats:not([open])) .map-location-actions{margin-top:6px}
@media(max-height:740px){
 .map-location-panel.map-location-combat-panel .panel-scene-art{height:110px}
 .map-location-panel.map-location-combat-panel .panel-scene-art>.world-site-sprite{width:150px;height:110px}
}
.map-location-cohort{border-top:1px solid #9b7b4544;margin-top:12px}
.map-location-cohort h4{margin:8px 0;font:700 17px var(--serif)}
.map-location-cohort .muted{margin:6px 0}
.map-location-actions{display:grid;gap:6px;margin:12px 2px 8px}
.map-location-actions>button{width:100%;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}
.map-location-share-summary{display:flex;align-items:center;gap:10px;padding:10px;border-block:1px solid #9b7b4566;background:#ab803016}
.map-location-share-summary>span{display:grid;place-items:center;flex:none;color:var(--green)}
.map-location-share-summary>span .icon{width:34px;height:34px}
.map-location-share-summary>div{display:grid;gap:5px;min-width:0}
.map-location-share-summary strong{font:700 21px/1.15 var(--serif);overflow-wrap:anywhere}
.map-location-share-summary>div>span{font:13px/1.4 var(--sans);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.map-location-share-options,.map-location-private-results{display:grid;gap:7px;margin:12px 0}
.map-location-share-choice,.map-location-share-peer{display:grid;grid-template-columns:32px minmax(0,1fr) 24px;align-items:center;gap:8px;width:100%;min-width:0;min-height:62px;padding:8px 10px;border:1px solid #9b7b4566;border-radius:3px;background:#ffffff26;color:var(--antique-ink);text-align:left}
.map-location-share-choice>span:nth-child(2),.map-location-share-peer>span:nth-child(2){display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
.map-location-share-choice strong,.map-location-share-peer strong{font:700 19px/1.2 var(--serif)}
.map-location-share-choice small,.map-location-share-peer small{font:12px/1.4 var(--sans);color:var(--antique-muted)}
.map-location-channel-icon,.map-location-share-peer>span:first-child{display:grid;place-items:center;color:var(--green)}
.map-location-choice-arrow,.map-location-share-peer>span:last-child{text-align:center;font:24px/1 var(--serif);color:var(--green)}
.map-location-private-picker{margin:14px 0 0;border-top:1px solid #9b7b4544}
.map-location-private-picker>.ornament{font:700 21px/1.2 var(--serif)}
.map-location-private-search{display:grid;gap:6px}
.map-location-private-search label{font:12px/1.4 var(--sans);color:var(--antique-muted)}
.map-location-private-search>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.map-location-private-search input{min-width:0;width:100%;min-height:44px}
.map-location-private-search button{min-width:0;min-height:44px;--button-overhang:-5px}
.chat-location-card{display:grid;grid-template-columns:32px minmax(0,1fr) 20px;align-items:center;gap:8px;width:100%;min-width:0;min-height:76px;margin:8px 0 2px;padding:10px;border:1px solid #b3965a88;border-radius:3px;background:linear-gradient(105deg,#b3965a20,#ffffff30);color:var(--antique-ink);text-align:left}
.chat-location-symbol{display:grid;place-items:center;color:var(--green)}
.chat-location-symbol .icon{width:30px;height:30px}
.chat-location-copy{display:grid;gap:4px;min-width:0}
.chat-location-copy strong{font:700 19px/1.2 var(--serif);overflow-wrap:anywhere}
.chat-location-copy small{font:11px/1.4 var(--sans);color:var(--antique-muted)}
.chat-location-coordinates{font:13px/1.4 var(--sans);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.chat-location-arrow{color:var(--green);font:24px/1 var(--serif)}
.map-location-share-button:hover,.map-location-share-choice:hover,.map-location-share-peer:hover,.chat-location-card:hover{background-color:#b3965a25}
.map-location-panel :focus-visible,.map-location-share-panel :focus-visible,.chat-location-card:focus-visible{outline:2px solid var(--antique-gold);outline-offset:2px}
.map-location-share-panel [disabled],.map-location-panel [disabled]{opacity:.6;cursor:default}
@media(max-width:380px){.map-location-coordinate-strip{gap:8px;padding-inline:8px}.map-location-coordinate-strip strong{font-size:17px}.map-location-share-button{min-width:58px}.map-location-share-choice,.map-location-share-peer{padding-inline:8px}.chat-location-card{grid-template-columns:26px minmax(0,1fr) 16px;gap:6px;padding:8px}}
@media(forced-colors:active){.map-location-coordinate-strip,.map-location-share-button,.map-location-share-choice,.map-location-share-peer,.chat-location-card{border-color:ButtonText;background:Canvas;color:CanvasText}.map-location-panel :focus-visible,.map-location-share-panel :focus-visible,.chat-location-card:focus-visible{outline-color:Highlight}}

.alliance-flag-durability{padding:8px 0}.alliance-flag-durability label{display:flex;justify-content:space-between;font-size:13px}.alliance-flag-durability progress{width:100%;height:12px;accent-color:var(--green,#145346)}

/* Player identity and paper facts inside the standard world-location sheet. */
.map-player-castle-panel{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;--player-castle-avatar-frame:url('./art-web/player-castle-portrait-frame-v1-0d931acb0c.webp')}
.map-player-castle-body{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
.map-player-castle-hero{min-height:102px;margin:0;padding:8px 4px;border-bottom:1px solid #9b7b4544;background:linear-gradient(90deg,#f0e5cfc9 0%,#f0e5cfc9 57%,#f0e5cf22),url('./art-web/player-castle-hero-v1-120a240e67.webp') center/cover}
.map-player-castle-identity{display:grid;grid-template-columns:64px minmax(0,1fr) 76px;align-items:center;gap:6px;min-width:0;min-height:86px}
.map-player-castle-avatar{position:relative;display:block;align-self:center;width:64px;height:86px;padding:12px 8px 14px}
.map-player-castle-avatar::after{content:'';position:absolute;inset:0;pointer-events:none;background:var(--player-castle-avatar-frame) center/100% 100% no-repeat}
.map-player-castle-portrait{position:relative;display:block;width:100%;height:100%;overflow:hidden;background:#73563722}
.map-player-castle-portrait img{position:absolute;top:0;left:50%;display:block;width:180%;height:auto;max-width:none;transform:translateX(-50%)}
.map-player-castle-portrait.is-custom-avatar img{inset:0;width:100%;height:100%;object-fit:cover;object-position:center;transform:none}
.map-player-castle-portrait.is-loading{display:grid;place-items:center;color:#896030}
.map-player-castle-portrait.is-loading>.icon{width:32px;height:32px}
.map-player-castle-copy{min-width:0;color:var(--antique-ink)}
.sheet-content .map-player-castle-copy h3{margin:0 0 6px;font:700 20px/1.12 var(--serif);overflow-wrap:anywhere}
.map-player-castle-copy dl{margin:0}
.map-player-castle-copy dl>div{display:flex;align-items:center;gap:5px;min-width:0}
.map-player-castle-copy dt{display:flex;flex:none}
.map-player-castle-copy dt>.icon{width:18px;height:20px;color:#694a26;fill:currentColor}
.map-player-castle-copy dd{min-width:0;margin:0;font:600 14px/1.3 var(--serif);overflow-wrap:anywhere}
.map-player-castle-art{display:grid;place-items:center;align-self:center;width:76px;height:76px;pointer-events:none}
.map-player-castle-art>.building-sprite{position:relative;inset:auto;display:block;width:100%;height:auto;max-width:100%;aspect-ratio:1;transform:none;filter:drop-shadow(0 2px 1px #26311933)}
.map-player-castle-facts{display:grid;gap:0;margin:4px 0;border:1px solid #9b7b4566;border-radius:3px;background:#f7f0de66}
.map-player-castle-facts>div{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:4px 6px;border-bottom:1px solid #9b7b4533;color:var(--antique-ink)}
.map-player-castle-facts>div:last-child{border-bottom:0}
.map-player-castle-facts>.map-player-castle-alliance{grid-template-columns:minmax(0,1fr);gap:2px;padding:6px}
.map-player-castle-facts>.map-player-castle-alliance dd{text-align:left;padding-bottom:3px}
.map-player-castle-facts dt{display:flex;align-items:center;gap:6px;min-width:0;font:16px/1.2 var(--serif)}
.map-player-castle-facts dt>.icon{flex:none;width:23px;height:23px;color:#694a26}
.map-player-castle-facts dd{min-width:0;margin:0;font:700 16px/1.25 var(--serif);text-align:right;overflow-wrap:anywhere}
.map-player-castle-facts .map-player-castle-power dd{font-size:18px;font-variant-numeric:tabular-nums}
.map-player-castle-standard{position:relative;display:block;flex:none;width:28px;height:32px;overflow:hidden;pointer-events:none}
.map-player-castle-standard img{position:absolute;left:-9px;top:-5px;width:47px;height:71px;max-width:none;object-fit:contain}
.map-player-castle-alliance-symbol{display:grid;place-items:center;flex:none;width:28px;height:30px;color:#694a26}
.map-player-castle-alliance-symbol .icon{width:20px;height:26px}
.map-player-castle-panel .map-location-actions{display:grid;flex:none;gap:0;margin:0;background:transparent}
.sheet-content .map-player-castle-panel .map-location-actions>button{width:100%;min-height:44px;margin:0;padding:8px 16px;font:700 17px/1.15 var(--serif);--button-overhang:-7px;white-space:normal;overflow-wrap:anywhere}
.map-player-castle-panel .map-location-actions>button .icon{width:18px;height:18px}
.map-player-castle-profile-error button{min-height:44px;padding:4px;color:var(--green);font:inherit;text-decoration:underline}
@media(max-width:340px){.map-player-castle-identity{grid-template-columns:56px minmax(0,1fr) 64px;min-height:78px}.map-player-castle-avatar{width:56px;height:78px;padding:11px 7px 13px}.map-player-castle-art{width:64px;height:64px}.sheet-content .map-player-castle-copy h3{font-size:19px}}
@media(forced-colors:active){.map-player-castle-hero,.map-player-castle-facts,.map-player-castle-copy{background:Canvas;color:CanvasText}.map-player-castle-avatar::after{display:none}.map-player-castle-avatar{border:1px solid CanvasText}.map-player-castle-facts,.map-player-castle-facts>div{border-color:CanvasText}.map-player-castle-copy dt>.icon,.map-player-castle-facts dt>.icon,.map-player-castle-alliance-symbol{color:CanvasText}}
