/* Playable world: every upgradable object is an independent DOM sprite.
   This file intentionally loads last to supersede the obsolete painted-town overlay. */
.scene {
  background: #122c4c url("assets/stage2/world/playable-landscape.webp") center center / cover no-repeat !important;
}
.scene::before { content: none !important; }
.scene .sky-glow,.scene .moon,.scene .mountains,.scene .forest,.scene .land,
.scene .river,.scene .path,.scene .snow-bank,.scene .pine,
.scene .aurora-ribbon,.scene .scene-label { display: none !important; }
.scene .world-object { background: transparent; filter: drop-shadow(0 12px 10px #17243a75) !important; }
.scene .world-object img,
.scene .illustrated-building .building-art,
.scene .tree-object #tree-art,
.scene .house-object #house-art { opacity: 1 !important; visibility: visible !important; }
.scene .tree-object .tree-halo,.scene .tree-object .tree-star { display: block !important; }
.scene .world-object.selected::after { opacity: .55; }
.scene .world-object:hover,
.scene .world-object:focus-visible {
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 14px 9px #14283c9a) drop-shadow(0 0 10px #ffe4a37a) !important;
}
.scene .world-object .object-tag,.scene .illustrated-building .building-sign { z-index: 5; }
.scene .world-object:focus-visible { outline: 3px solid #ffebaa !important; outline-offset: -3px; }
.scene .buildings { z-index: 7; }
.scene .decor-layer { z-index: 9; }
.scene .tree-object { z-index: 10; }
.scene .varya-object,.scene .pet-object,.scene .chest-object,.scene .sleigh-object,.scene .ded-object { z-index: 11; }
@media (prefers-reduced-motion: reduce) { .scene .tree-star { animation: none; } }

/* Tree progression is tied to state.levels.tree; no image regeneration. */
.scene .tree-object .tree-lights {
  position: absolute;
  z-index: 2;
  top: 20%; left: 25%; width: 50%; height: 55%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, #fffbd2 0 2px, transparent 3px) 14% 12% / 40px 46px,
              radial-gradient(circle, #ffe3a2 0 2px, transparent 3px) 80% 65% / 52px 59px;
  filter: drop-shadow(0 0 5px #ffe7a8);
  transition: opacity .5s ease;
}
.scene .tree-object[data-level="3"] .tree-lights,
.scene .tree-object[data-level="4"] .tree-lights { opacity: .45; }
.scene .tree-object[data-level="5"] .tree-lights,
.scene .tree-object[data-level="6"] .tree-lights { opacity: .7; }
.scene .tree-object[data-level="7"] .tree-lights,
.scene .tree-object[data-level="8"] .tree-lights { opacity: 1; }
.scene .tree-object[data-level="7"] #tree-art { filter: drop-shadow(0 0 12px #ffdc8299) !important; }
.scene .tree-object[data-level="8"] #tree-art { filter: drop-shadow(0 0 19px #ffe4a7dd) !important; }
.scene .tree-object[data-level="8"] .tree-star { text-shadow: 0 0 20px #fff8c4, 0 0 36px #ffc45c; transform: scale(1.22); }
.scene .tree-object .tree-upgrade-meter {
  position: absolute;
  bottom: 1%; left: 20%; width: 60%; height: 6px;
  overflow: hidden; pointer-events: none;
  border: 1px solid #f9ecc3; border-radius: 30px;
  background: #102c3baf; box-shadow: 0 2px 5px #071c3160;
  z-index: 4;
}
.scene .tree-object .tree-upgrade-meter > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffbd55, #fff3af);
  transition: width .25s ease;
}
.scene .tree-object[data-upgrade-ready="max"] .tree-upgrade-meter { display: none; }
@media (prefers-reduced-motion: reduce) {
  .scene .tree-object .tree-lights,
  .scene .tree-object .tree-upgrade-meter > span { transition: none; }
}

/* Building systems: distinct art and truthful state, without invented upgrade levels. */
.scene .illustrated-building .building-art { object-fit: contain; }
.scene .illustrated-building .lock-badge { top: 9%; right: 5%; z-index: 6; }
.scene .illustrated-building[data-object="post"],
.scene .illustrated-building[data-object="nursery"] { filter: drop-shadow(0 10px 7px #17243a75) saturate(.88) !important; }
.scene .illustrated-building .building-status {
  position: absolute; z-index: 6; top: 5%; left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 4px 8px; border-radius: 999px;
  color: #f9ebc7; background: #203a4ddd; border: 1px solid #e4cd8c;
  font: 700 clamp(9px,.85vw,12px)/1.2 system-ui,sans-serif;
  box-shadow: 0 3px 9px #0d1e2c77;
}
.scene .illustrated-building[data-production-status="working"] .building-status {
  background: #66502edb;
}
.scene .illustrated-building[data-production-status="ready"] .building-status {
  background: #26634ddb; border-color: #f6da79;
  box-shadow: 0 0 16px #f9d36e99, 0 3px 9px #0d1e2c77;
}
.scene .illustrated-building[data-production-status="ready"] .building-art {
  filter: drop-shadow(0 0 10px #ffdb8299);
}
@media (prefers-reduced-motion: reduce) {
 .scene .illustrated-building .building-status { transition: none; }
}

/* The house uses the same visible resource progression as the central tree. */
.scene .house-object .house-upgrade-meter {
  position: absolute; z-index: 4; bottom: 1%; left: 22%; width: 56%; height: 6px;
  overflow: hidden; pointer-events: none; border: 1px solid #f9ecc3;
  border-radius: 30px; background: #102c3baf; box-shadow: 0 2px 5px #071c3160;
}
.scene .house-object .house-upgrade-meter > span {
  display: block; height: 100%; width: 0%; background: linear-gradient(90deg,#ffbd55,#fff3af);
  transition: width .25s ease;
}
.scene .house-object[data-upgrade-ready="max"] .house-upgrade-meter { display:none; }
@media (prefers-reduced-motion: reduce) {
 .scene .house-object .house-upgrade-meter > span { transition:none; }
}

/* Actual interaction states, derived from saved/server state. */
.scene .world-state-label {
  position: absolute; z-index: 6; top: -8px; bottom: auto; left: 50%; transform: translateX(-50%);
  padding: 3px 8px; white-space: nowrap; border-radius: 999px;
  border: 1px solid #e8d2a0; background: #263c55e8; color: #fff4d7;
  font: 700 clamp(9px,.78vw,12px)/1.3 system-ui,sans-serif;
  box-shadow: 0 2px 8px #0b1c2f99; pointer-events: none;
}
.scene .chest-object[data-game-status="claimed"] img { filter: grayscale(.3) brightness(.78) !important; }
.scene .chest-object[data-game-status="claimed"] .ready-dot { display: none !important; }
.scene .chest-object[data-game-status="ready"] .world-state-label,
.scene .sleigh-object[data-game-status="ready"] .world-state-label {
  background: #27634ce8; border-color: #ffe5a1; box-shadow: 0 0 14px #ffe5a174;
}
.scene .sleigh-object[data-game-status="traveling"] img { opacity: .55 !important; }
.scene .sleigh-object[data-game-status="traveling"] .world-state-label { background: #4b5976e8; }
@media (prefers-reduced-motion: reduce) { .scene .world-state-label { transition: none; } }

/* World-space set dressing: the layout module positions each prop with the same
   cover transform as interactive objects. Art cannot consume pointer events. */
.scene .scenic-props { display: block !important; position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.scene .scenic-props [data-scenery] {
  display: block !important; position: absolute; max-width: none; object-fit: contain;
  pointer-events: none; opacity: .9;
  filter: drop-shadow(0 7px 5px #10253c67);
}
.scene .scenic-props [data-scenery^="lantern"] { filter: drop-shadow(0 0 12px #ffcf76a0) drop-shadow(0 8px 5px #10253c6b); }
.scene .scenic-props [data-scenery^="fence"] { opacity: .78; }
.scene .scenic-props [data-scenery^="pine"] { opacity: .91; }
@media (prefers-reduced-motion: reduce) { .scene .scenic-props [data-scenery] { transition: none; } }
