/* SVG rendering adapted directly from Trace Battle's renderWorld(). */
body.exploration-mode { background: #fafbf9; }
#areaTransitionAnnouncement { position: fixed; top: 37%; left: 50%; transform: translate(-50%, -50%); z-index: 620; width: calc(100% - 40px); text-align: center; pointer-events: none; color: #405348; font-size: clamp(26px, 4.5vw, 42px); font-weight: 400; letter-spacing: .18em; text-shadow: 0 1px 9px #fafbf9, 0 1px 20px #fafbf9; animation: area-arrival 2.8s ease both; }
body.is-log-open #areaTransitionAnnouncement { animation-play-state: paused; visibility: hidden; }
body.auth-pending #areaTransitionAnnouncement { display: none; }
@keyframes area-arrival { 0% { opacity: 0; margin-top: 8px; } 16%, 68% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -6px; } }
@media(prefers-reduced-motion:reduce) { #areaTransitionAnnouncement { animation-name: area-arrival-still; } @keyframes area-arrival-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }
body.exploration-mode #statusWindow, body.exploration-mode #directionPad { display: none !important; }
body.exploration-mode #MAPUI { top: 50%; left: 50%; width: min(calc(100vw - 48px), 780px); height: min(68svh, 560px); z-index: 1; gap: 0; }
body.exploration-mode #mapContainer { position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; transform: none; background: #fafbf9; box-shadow: none; backdrop-filter: none; touch-action: none; user-select: none; }
#traceWorldMap { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#mapContainer .map-proxy-row { visibility: hidden; pointer-events: none; height: calc(100% / 12); }
#mapContainer .map-proxy-row .tile { width: calc(100% / 12); height: 100%; }
#mapPlayerAvatar { pointer-events: none; }
.trace-interaction-marker { cursor: pointer; pointer-events: all; }
.trace-interaction-marker:focus { outline: none; }
.trace-interaction-marker:focus-visible > circle:nth-child(2) { stroke: #568b77; stroke-width: 1.8; }
body.is-log-open #traceInteractionMarkers, body.is-loading #traceInteractionMarkers { pointer-events: none; visibility: hidden; }
#mapPlayerAvatar .map-pawn { transform-origin: 0 0; }
#mapPlayerAvatar.walking .map-pawn { animation: map-walk .36s ease-in-out infinite; }
@keyframes map-walk { 50% { transform: translateY(-1.8px) rotate(3deg); } }
@media(prefers-reduced-motion:reduce) { #mapPlayerAvatar.walking .map-pawn { animation: none; } }
body:not(.exploration-mode) #mapPlayerAvatar { display: none; }
body.exploration-mode #mainButton svg circle { fill: currentColor; stroke: none; }
body.exploration-mode #gameMenu { left: auto; top: auto; right: 24px; bottom: max(17px, env(safe-area-inset-bottom)); z-index: 600; }
body.exploration-mode #mainButton,
body.exploration-mode #mainButton:hover:not(:disabled) { min-width: 44px; min-height: 44px; width: auto; height: auto; border: 0; border-radius: 0; background: none; color: #98a49b; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 7px; font-size: 25px; line-height: 1; letter-spacing: 2px; }
body.exploration-mode #mainButton:hover:not(:disabled) { color: #536f60; }
body.exploration-mode #primaryMenu { top: auto; bottom: 0; left: auto; right: 56px; flex-direction: row-reverse; }
body.exploration-mode #primaryMenu .secondary-menu { top: auto; bottom: 60px; left: auto; right: 0; transform-origin: bottom right; }
body.exploration-mode #specialActionShortcut { bottom: max(28px, env(safe-area-inset-bottom)); }
#worldExploreHud { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 880px); height: 60px; pointer-events: none; z-index: 3; color: #28342e; }
#worldAreaName { position: absolute; right: 28px; top: 24px; font-size: 13px; color: #849086; }
#worldExploreHp { position: absolute; left: 28px; right: 160px; top: 27px; display: flex; gap: 15px; align-items: center; }
#worldExploreHpNumber { font-size: 17px; }
.world-explore-hp-track { flex: 1; height: 4px; background: #28342e12; border-radius: 9px; overflow: hidden; }
#worldExploreHpFill { display: block; height: 100%; background: #72a38a; transition: width .25s ease; }
body:not(.exploration-mode) #worldExploreHud, body.auth-pending #worldExploreHud { display: none; }
@media(max-width:650px) { body.exploration-mode #MAPUI { width: calc(100vw - 20px); } #worldExploreHp { right: 145px; } body.exploration-mode #gameMenu { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); } body.exploration-mode #mainButton { font-size: 23px; } }
#mapObjectScene { position: fixed; z-index: 1400; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 45%, #eaf0e5fa 0%, #d6dfd1fa 100%); backdrop-filter: blur(12px); color: #4d614e; }
body.map-object-active #MAPUI, body.map-object-active #worldExploreHud { visibility: hidden; }
body.map-object-active #logBlocker { z-index: 1501; }
body.map-object-active #logWindow { z-index: 1502; }
.map-object-art { width: min(80vw, 450px); margin-top: -40px; }
.map-object-art > svg { display: block; width: 100%; }
.map-object-back { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 24px; }
.map-object-action { position: absolute; bottom: max(17dvh, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); min-width: 144px; padding: 14px 28px; font-size: 16px; }
.map-object-back, .map-object-action { border: 1px solid #aab8a7; border-radius: 99px; color: #405a43; background: #f8fbf1b8; cursor: pointer; box-shadow: 0 3px 16px #405a4310; }
.map-object-back { padding: 10px 18px; }
.map-object-action:disabled { opacity: .5; }
.inspection-lid { transform-origin: 160px 124px; }
.chest-gap, .chest-tooth { opacity: 0; }
.uneasy .inspection-lid { animation: casual-chest-shake 2.7s ease-in-out infinite; }
.uneasy .chest-gap, .uneasy .chest-tooth { animation: casual-chest-peek 2.7s ease-in-out infinite; }
.opened .inspection-lid { animation: none; transform: translateY(-24px) rotate(-5deg); transition: transform .18s; }
@keyframes casual-chest-shake { 0%,32%,58%,100% { transform: none; } 38%,48% { transform: translateY(-5px) rotate(-1.5deg); } 43%,53% { transform: translateY(-3px) rotate(1.5deg); } }
@keyframes casual-chest-peek { 0%,32%,58%,100% { opacity: 0; } 38%,48% { opacity: 1; } }
@media(prefers-reduced-motion:reduce) { #mapPlayerAvatar { transition: none; } .uneasy .inspection-lid { animation: none; transform: translateY(-5px); } .uneasy .chest-gap, .uneasy .chest-tooth { animation: none; opacity: 1; } }
/* Legacy panels remain only as shortcut/state hooks; the world and trace scene own presentation. */
#statusWindow, #directionPad, #center { display: none !important; }
