/* Village scene: interactive hit areas are aligned with the illustrated buildings. */
/* Background art includes the houses/tree. Their duplicate sprites are hidden only in
   the world view; original sprites remain accessible in upgrade/detail panels. */
.scene {
  background: #1d3155 url("assets/stage2/world/town.jpg") center center / cover no-repeat !important;
}
.scene::before { content: none !important; }
.scene::after { opacity: .17 !important; }
.scene .sky-glow,.scene .aurora-ribbon,.scene .moon,
.scene .mountains,.scene .forest,.scene .land,.scene .river,
.scene .path,.scene .snow-bank,.scene .pine,.scene .scenic-props,
.scene .fireflies,.scene .scene-label { display: none !important; }
.scene .world-object { filter: none !important; }
.scene .world-object:hover, .scene .world-object:focus-visible { filter: none !important; }
.scene .world-object.selected::after { opacity: .55; }
.scene .illustrated-building .building-art,
.scene .tree-object #tree-art,
.scene .house-object #house-art { opacity: 0 !important; }
.scene .tree-object .tree-halo,.scene .tree-object .tree-star { display: none !important; }
.scene .illustrated-building,.scene .tree-object,.scene .house-object { border-radius: 20px; }
.scene .illustrated-building:focus-visible,.scene .tree-object:focus-visible,
.scene .house-object:focus-visible { outline: 3px solid #ffe6a0 !important; outline-offset: -3px; }
.scene .illustrated-building:hover,.scene .tree-object:hover,.scene .house-object:hover {
  background: rgba(255,224,143,.09);
  box-shadow: inset 0 0 0 2px rgba(255,234,166,.45),0 0 25px rgba(255,210,120,.18);
}
.scene .world-object .object-tag,
.scene .illustrated-building .building-sign {
  position: absolute; left: 50%; top: auto; bottom: 0;
  transform: translateX(-50%);
  width: max-content; max-width: 160%;
  padding: 5px 10px; border: 1px solid #efd5a4;
  border-radius: 10px; background: linear-gradient(#fff8e6f5,#e9c992eb);
  color: #573c29; font: 700 clamp(10px,.9vw,13px)/1.2 system-ui,sans-serif;
  text-shadow: 0 1px #fff7e2;
  box-shadow: 0 3px 10px #14253d8c;
}
.scene .world-object .lock-badge { top: 3%; right: 0; }
/* Image coordinates on the 16:9 village plate. These bounds are interactive, not decoration. */
.scene .tree-object { left: 32%; top: 10%; width: 20%; height: 53%; min-width: 0; }
.scene .house-object { left: 0%; top: 43%; width: 27%; height: 46%; }
.scene .workshop.illustrated-building { left: 5%; top: 21%; width: 24%; height: 28%; }
.scene .post.illustrated-building { left: 48%; top: 47%; width: 24%; height: 39%; }
.scene .nursery.illustrated-building { left: 67%; top: 24%; width: 20%; height: 31%; }
.scene .varya-object { left: 26%; top: 49%; width: 6%; height: 23%; min-width: 55px; }
.scene .pet-object { left: 31%; top: 68%; width: 5%; height: 10%; min-width: 42px; }
.scene .ded-object { left: 84%; top: 52%; width: 8%; height: 23%; min-width: 65px; }
.scene .chest-object { left: 75%; top: 72%; width: 7%; height: 13%; min-width: 55px; }
.scene .sleigh-object { left: 82%; top: 72%; width: 11%; height: 15%; min-width: 85px; }
.scene .quest-card { z-index: 20; width: min(280px,24vw); }
.scene .scene-hint { bottom: 92px; }
/* Keep counters, quests and navigation readable without painting over the whole world. */
.topbar { background: linear-gradient(180deg,#142443f5,#172e4ee3) !important; }
.quest-card { background: #fff8e9f4 !important; box-shadow: 0 8px 26px #15243f66; }
.bottom-nav { background: #20324fe8 !important; }
/* A portrait screen gets a wider virtual world with horizontal camera pan rather
   than shrinking all clickable buildings into tiny targets. */
@media(max-width:900px){
 .scene { background-size: cover !important; background-position: center center !important; }
 .scene .tree-object { left: 30%; top: 22%; width: 32%; height: 43%; }
 .scene .house-object { left: 0%; top: 50%; width: 28%; height: 29%; }
 .scene .workshop.illustrated-building { left: 0%; top: 30%; width: 26%; height: 22%; }
 .scene .post.illustrated-building { left: 55%; top: 54%; width: 23%; height: 26%; }
 .scene .nursery.illustrated-building { left: 76%; top: 33%; width: 23%; height: 21%; }
 .scene .varya-object { left: 24%; top: 55%; width: 9%; height: 19%; }
 .scene .pet-object { left: 36%; top: 72%; width: 8%; height: 9%; }
 .scene .ded-object { left: 81%; top: 56%; width: 12%; height: 20%; }
 .scene .chest-object { left: 66%; top: 76%; width: 10%; height: 10%; }
 .scene .sleigh-object { left: 79%; top: 75%; width: 17%; height: 11%; }
 .scene .quest-card { width: min(235px, 48vw); }
}
@media (max-width:500px) {
 .scene { background-position: center center !important; }
 .scene .world-object .object-tag,.scene .illustrated-building .building-sign { font-size:9px; padding:4px 6px; }
 .scene .quest-card { width: min(205px, 54vw); }
}

/* The scene layout module places hit areas using the background's actual cover transform. */
.scene .world-object { touch-action: manipulation; }
/* Because the village is a painted plate, the following art is deliberately hidden in
   the scene only: duplicating it would show two trees/houses in the same location.
   Upgrade/detail panels still render independent level-specific sprites. */
.scene .world-object[data-object="tree"]:focus-visible,
.scene .world-object[data-object="house"]:focus-visible { outline: 3px solid #fff0a8 !important; }
/* Visible level progression while the village itself remains a temporary painted plate. */
.scene .tree-object[data-level="2"] .object-tag,
.scene .tree-object[data-level="3"] .object-tag,
.scene .tree-object[data-level="4"] .object-tag,
.scene .tree-object[data-level="5"] .object-tag,
.scene .tree-object[data-level="6"] .object-tag,
.scene .tree-object[data-level="7"] .object-tag,
.scene .tree-object[data-level="8"] .object-tag {
  box-shadow: 0 0 18px rgba(255,202,88,.9),0 3px 12px rgba(20,27,47,.8);
}
