/* Real geographic world. Same UI stacking and safe areas as the approved client. */
#map .maplibregl-canvas { outline: none; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { right: 5px; bottom: calc(var(--nav-height) + var(--nav-bottom) + 4px); }
.maplibregl-ctrl-attrib { max-width: 44vw; padding: 0 2px !important; border-radius: 2px 0 0 0; background: rgba(12,23,18,.54) !important; color: #c4cfc0; font: 8px/1.12 var(--font-body); }
.maplibregl-ctrl-attrib a { color: #d1dfc9; }
.maplibregl-ctrl-attrib-button { display: none !important; }
.map-view-control button { min-height: 44px; }
.map-view-control button[aria-pressed=true]:not(:disabled) { color: var(--lime); background: #d2ff5a14; }
.map-view-control small { max-width: 110px; padding: 4px; }
.world-marker { z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.world-pin { position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin: 5px; color: var(--pin-color); background: #12282ff5; border: 2px solid var(--pin-color); border-radius: 11px; box-shadow: 0 2px 0 #07161d,0 4px 12px #0008; }
.world-pin:after { content: ''; position: absolute; top: 100%; left: 50%; height: 7px; width: 1px; background: var(--pin-color); }
.world-marker.is-selected .world-pin { outline: 2px solid var(--lime); outline-offset: 3px; }
.world-marker.is-locked .world-pin { border-style: dashed; background: #17231de8; }
.world-label { display: none; position: absolute; left: 50%; top: 46px; translate: -50% 0; max-width: 140px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--overlay); color: var(--text); font: 10px/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.world-marker.has-world-label .world-label,
.world-marker:is(:focus-visible,:hover,.is-selected) .world-label { display: block; }
.world-overview .world-pin { scale: .88; opacity: .92; }
.world-marker.is-selected { z-index: 8 !important; }
.world-marker.world-friend { width:148px; height:54px; z-index:5; }
.world-friend-pill { position:relative; display:flex; align-items:center; gap:8px; width:100%; min-height:48px; padding:5px 8px; box-sizing:border-box; border:1px solid #89bfc8; border-radius:14px; background:#102b2bf5; box-shadow:0 3px 12px #0008; color:#e9f1eb; text-align:left; }
.world-friend-pill:after { content:''; position:absolute; top:100%; left:50%; width:1px; height:18px; background:#89bfc8; }
.world-friend-avatar { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:10px; overflow:hidden; background:#264343; }
.world-friend-avatar .player-avatar-art { display:block; width:100%; height:100%; object-fit:contain; }
.world-friend-avatar .player-avatar-initial { font:600 17px/1 var(--font-body); color:#e9f1eb; }
.world-friend-copy { min-width:0; flex:1; }
.world-friend-copy b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 12px/1.4 var(--font-body); }
.world-friend-status { display:flex; align-items:center; gap:4px; flex-shrink:0; font:600 9px/1.4 var(--font-body); color:#bde362; white-space:nowrap; }
.world-friend-status[data-friend-location-status="UPDATING"] { color:#d7b66d; }
.world-friend-status i { flex:0 0 5px; width:5px; height:5px; border-radius:50%; background:currentColor; }
.world-friend[data-friend-lod] .world-friend-pill,
.world-friend[data-friend-lod] .world-friend-avatar { transition:width .16s ease,height .16s ease,border-radius .16s ease,padding .16s ease; }
.world-friend[data-friend-lod="close"] .world-friend-status { position:absolute; left:52px; bottom:5px; }
.world-friend[data-friend-lod="close"] .world-friend-copy { padding-bottom:12px; }
.world-friend[data-friend-lod="medium"] .world-friend-pill { min-height:36px; height:36px; margin-top:4px; padding:4px 6px; gap:5px; border-radius:12px; }
.world-friend[data-friend-lod="medium"] .world-friend-avatar { flex-basis:26px; width:26px; height:26px; border-radius:8px; }
.world-friend[data-friend-lod="medium"] .world-friend-copy b { font-size:10px; }
.world-friend[data-friend-lod="medium"] .world-friend-status span,
.world-friend[data-friend-lod="far"] .world-friend-status span { display:none; }
.world-friend[data-friend-lod="far"] .world-friend-pill { width:28px; height:28px; min-height:28px; margin:8px; padding:1px; gap:0; border-radius:50%; }
.world-friend[data-friend-lod="far"] .world-friend-avatar { flex-basis:24px; width:24px; height:24px; border-radius:50%; }
.world-friend[data-friend-lod="far"] .world-friend-copy { display:none; }
.world-friend[data-friend-lod="far"] .world-friend-pill:after { height:6px; }
.world-friend[data-friend-lod="far"] .world-friend-status { position:absolute; right:0; bottom:0; padding:2px; border-radius:50%; background:#102b2b; }
.world-friend[data-friend-lod="far"] .world-count { font-size:8px; min-width:12px; top:-5px; right:-7px; }
@media (prefers-reduced-motion:reduce) { .world-friend[data-friend-lod] .world-friend-pill,.world-friend[data-friend-lod] .world-friend-avatar { transition:none; } }
.world-friend-pill .world-count { top:-5px; right:-5px; }
.world-chooser-row .world-friend-pill { width:100%; background:transparent; border:0; box-shadow:none; padding:0; }
.world-chooser-row .world-friend-pill:after { display:none; }
.world-count { position: absolute; top: -7px; right: -7px; min-width: 16px; padding: 2px; border-radius: 8px; background: var(--lime); color: var(--bg); font: 700 10px var(--font-body); }
.poi-category-icon { display:inline-block; width:24px; height:24px; flex-shrink:0; vertical-align:middle; }
.world-pin > .poi-category-icon { width:21px; height:21px; }
.sheet-icon > .poi-category-icon { width:30px; height:30px; }
.activity-icon > .poi-category-icon { width:24px; height:24px; }
.world-state { position:absolute; bottom:-5px; right:-5px; display:grid; place-items:center; width:15px; height:15px; border-radius:5px; background:#d2ff5a; color:#14221c; border:1px solid #14221c; }
.world-state svg { width:11px; height:11px; }
.is-locked .world-state,.is-unavailable .world-state { background:#a6b5ac; }
.is-mission .world-state { background:#c3a1ff; }
.world-event .world-state,.is-event .world-state { background:#ffc27a; }
.world-marker.is-unavailable .world-pin { border-style:dotted; color:#9baaa1; }
.world-marker.is-unavailable .world-pin { background:#233438; box-shadow:none; }
.world-marker.is-cluster .world-pin { border-color:#8fa6ad; color:#e1edef; border-radius:50%; background:#213d44; font:700 12px/1 var(--font-body); box-shadow:0 2px 6px #0004; }
#map[data-world-quality="reduced"] .world-pin { box-shadow:none; }
.world-data-status { position:absolute; z-index:800; left:50%; bottom:calc(var(--nav-height) + var(--nav-bottom) + 18px); translate:-50% 0; max-width:calc(100% - 32px); margin:0; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:var(--overlay); color:var(--text); font:11px/1.4 var(--font-body); pointer-events:none; }
.world-data-status[hidden] { display:none; }
.world-data-status button { pointer-events:auto; min-height:44px; margin-left:8px; padding:6px 10px; color:var(--lime); font:600 12px var(--font-body); }
.world-data-status button[hidden] { display:none; }
#exploreButton[hidden] { display:none; }
.world-mode-badge { display:inline-block; margin-top:4px; padding:3px 6px; border:1px solid var(--line); border-radius:5px; color:var(--muted); font:10px/1.4 var(--font-body); }
.world-marker:focus-visible { outline:2px solid var(--lime); outline-offset:3px; border-radius:12px; }
.world-marker.is-selected:focus-visible { outline:none; }
.world-player { z-index: 3; box-sizing:border-box; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: #1687ff; box-shadow: 0 0 0 7px #1687ff30,0 2px 5px #0008; pointer-events: none; }
.world-leaflet-marker { background: transparent; border: 0; }
.world-leaflet-marker > .world-player { display: block; margin: 11px; }
/* Compact place chooser; scroll only the bounded list, not the map or HUD. */
.world-chooser { position:absolute; z-index:1250; top:calc(var(--hud-panel-top) + 84px); left:max(8px, env(safe-area-inset-left)); right:64px; display:flex; flex-direction:column; max-height:min(52dvh, calc(100dvh - var(--hud-panel-top) - var(--nav-height) - var(--nav-bottom) - 100px)); overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--overlay); box-shadow:var(--shadow-panel); }
.world-chooser-header { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; padding:4px 6px 4px 12px; border-bottom:1px solid var(--line); }
.world-chooser-header strong { display:block; font:22px/1 var(--font-display); color:var(--text); }
.world-chooser-header small { display:block; margin-top:3px; color:var(--muted); font:9px/1.2 var(--font-body); letter-spacing:.1em; }
.world-chooser-close { width:44px; height:44px; padding:0; flex-shrink:0; font:25px/1 var(--font-body); }
.world-chooser-list { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.world-chooser-row { display:flex; align-items:center; gap:11px; width:100%; min-height:58px; padding:9px 12px; text-align:left; border-bottom:1px solid var(--line); border-left:2px solid transparent; }
.world-chooser-row.is-selected { border-left-color:var(--lime); background:#d2ff5a0c; }
.world-chooser-icon { position:relative; display:grid; place-items:center; width:28px; height:28px; flex-shrink:0; color:var(--text); }
.world-chooser-copy { min-width:0; }
.world-chooser-copy strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 12px/1.35 var(--font-body); color:var(--text); }
.world-chooser-copy small { display:block; margin-top:3px; color:var(--muted); font:10px/1.35 var(--font-body); }
.world-chooser-pages { display:flex; justify-content:space-between; flex-shrink:0; }
.world-chooser-pages button { min-height:44px; padding:8px 12px; font:11px var(--font-body); }
.world-chooser button:focus-visible { outline:2px solid var(--lime); outline-offset:-3px; }
@media (min-width:760px) { .world-chooser { width: 320px; right: auto; } .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { right: 6px; bottom: 6px; } .maplibregl-ctrl-attrib { max-width: none; } }
@media (prefers-reduced-motion:reduce) { #map * { scroll-behavior: auto; } }

/* Explicit staging QA fixture: distinct from the physical player marker. */
.world-qa .world-pin { border-style: dashed; color: #dbc078; }
.world-qa .world-label { display: block; opacity: 1; color: #dbc078; }

/* Explicit loopback-only QA control, created by the optional host adapter. */
.world-playcanvas-canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; }
.world-renderer-qa { position:absolute; left:12px; bottom:calc(var(--nav-height,74px) + 20px); z-index:12; min-height:36px; padding:8px 12px; border:1px solid #9bbaa3; border-radius:8px; background:#14282eeb; color:#e5efe9; font:600 11px system-ui; cursor:pointer; }
.world-renderer-qa:focus-visible { outline:2px solid #d2ff5a; outline-offset:3px; }
.citylife-playcanvas-qa { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
@media (any-pointer:coarse) {
  .citylife-playcanvas-qa .world-renderer-qa { top:calc(var(--hud-panel-top,96px) + 88px); bottom:auto; left:10px; z-index:950; min-height:44px; padding:6px 8px; font-size:10px; }
}

.world-playcanvas-attribution { position:absolute; right:4px; bottom:3px; z-index:9; max-width:46%; padding:3px 5px; background:#14282ee8; color:#e5efe9; font:9px/1.3 system-ui; text-align:right; text-decoration:none; }

/* Explain a graphics handoff without blocking the original HUD or map. */
.world-graphics-status { position:absolute; left:12px; bottom:calc(var(--nav-height,74px) + 66px); z-index:12; max-width:min(340px,calc(100% - 24px)); padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--overlay); color:var(--text); font:11px/1.4 var(--font-body); pointer-events:none; }
.world-graphics-status[hidden] { display:none; }
