/* Scoped Real Product House Engine CSS (from studio.css + advent-v5.css) */


.hm-stage {
  position: relative;
  width: 100%;
  overflow: visible;
}

.hm-stage.is-synthesis {
  overflow: hidden;
  border-radius: 14px;
  background: #0d1628;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
}

.kit-mansion-canvas.is-exploded .hm-stage.is-synthesis {
  overflow: visible;
}

/* ==================== 3-WING STORYBOOK SYNTHESIS v3 LIGHTING, DEPTH & DETAILS ==================== */
.syn-sky-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.syn-sky-bg--v5 {
  background:
    radial-gradient(ellipse 68% 34% at 24% 21%, rgba(255, 224, 158, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 90% 44% at 62% 84%, rgba(62, 98, 148, 0.34) 0%, transparent 72%),
    linear-gradient(
      180deg,
      #060f22 0%,
      #0b1936 32%,
      #13294e 64%,
      #1d3962 84%,
      #10203b 100%
    );
}

.syn-sky-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 36% 0%;
  filter: saturate(1.06) brightness(0.98);
}

.syn-sky-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.22) 0%, transparent 45%, rgba(12, 22, 36, 0.35) 100%);
}

.syn-wing {
  background-repeat: repeat;
  overflow: hidden;
}

.syn-wing--left {
  filter: brightness(0.92) saturate(0.94);
}

.syn-wing--right {
  filter: brightness(0.94) saturate(0.95);
}

.syn-wing--center {
  box-shadow: 0 0 26px rgba(6, 12, 18, 0.55);
}

.syn-wing-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 28, 42, 0.16) 0%,
    rgba(0, 0, 0, 0) 18%,
    rgba(0, 0, 0, 0) 82%,
    rgba(24, 16, 10, 0.18) 100%
  );
  pointer-events: none;
}

.syn-eclectic-band {
  background-repeat: repeat;
  box-shadow: inset 0 10px 16px rgba(14, 10, 8, 0.28), inset 0 -10px 14px rgba(14, 10, 8, 0.22);
}

.syn-ground-plinth {
  background-repeat: repeat;
  filter: brightness(0.55) saturate(0.75);
}

/* On Master v5, all 3 wings extend continuously to the sidewalk — hide dark plinth so pure noble butter-lemon frames the portal! */
.syn-ground-plinth--master-v5 {
  display: none;
}

/* Deep vertical shadow separating recessed side wings from protruding central building */
.syn-wing-seam-shadow {
  pointer-events: none;
}

.syn-wing-seam--left {
  background: linear-gradient(90deg, rgba(6, 12, 20, 0) 0%, rgba(6, 12, 20, 0.68) 88%, rgba(6, 12, 20, 0.82) 100%);
}

.syn-wing-seam--right {
  background: linear-gradient(270deg, rgba(6, 12, 20, 0) 0%, rgba(6, 12, 20, 0.68) 88%, rgba(6, 12, 20, 0.82) 100%);
}

/* Isotropic repeating stone dentil cornice + real downward cast shadow */
.syn-cornice {
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: left center;
  filter: drop-shadow(0 6px 5px rgba(8, 14, 16, 0.54));
}

/* Alternating limestone corner quoins + dark iron downspouts (authentic townhouse edges, zero temple columns!) */
.syn-quoin {
  border-radius: 2px;
  background: linear-gradient(180deg, #efe2ca 0%, #dccbb0 72%, #bfa989 100%);
  border-top: 1px solid rgba(255, 250, 240, 0.7);
  border-bottom: 1.5px solid rgba(28, 22, 16, 0.42);
  box-shadow: 0 2px 4px rgba(6, 14, 14, 0.36);
  opacity: 0.92;
}

.syn-downspout {
  background: linear-gradient(90deg, #1b242c 0%, #3f4e5a 38%, #1d262e 100%);
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.48);
  opacity: 0.9;
}

/* Individual wall sconce warm lantern aura */
.syn-sconce-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 340%;
  height: 170%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 118, 0.54) 0%, rgba(255, 174, 72, 0.2) 44%, rgba(255, 160, 60, 0) 74%);
  mix-blend-mode: screen;
  z-index: 6;
  pointer-events: none;
}

/* ==================== TYUMEN MODERN ARCHITECTURES (CHELYUSKINTSEV 5 & BRUSNIKA 44) ==================== */
.syn-arch-band {
  pointer-events: none;
}

/* Chelyuskintsev 5: sculpted travertine stone belts with delicate snow lip & warm bronze edge */
.syn-arch-band--travertine,
.syn-arch-band--travertine-belt {
  background: linear-gradient(180deg, #f6f8fc 0%, #e7eef7 18%, #e4d7c1 24%, #d3c2a6 78%, #9b8464 100%);
  border-bottom: 1.5px solid rgba(90, 72, 52, 0.55);
  box-shadow: 0 5px 8px rgba(14, 16, 22, 0.34);
}

.syn-arch-band--v5-snow-cornice {
  background: linear-gradient(180deg, #f7faff 0%, #dce7f5 28%, #dfd3be 36%, #bda98c 80%, #7d694f 100%);
  border-bottom: 1.5px solid rgba(46, 28, 22, 0.55);
  box-shadow: 0 5px 10px rgba(16, 12, 18, 0.42);
}

.syn-arch-band--v5-navy-frieze {
  background: linear-gradient(180deg, #f6faff 0%, #dbe7f5 14%, #1e314d 20%, #16263e 86%, #111e33 100%);
  border-bottom: 1px solid rgba(9, 16, 28, 0.65);
  box-shadow: 0 4px 8px rgba(8, 12, 22, 0.4);
}

.hm-stage[data-arch-style="master-v5"] {
  overflow: hidden;
}

/* ==================== MASTER v5: WARM DIMMED SILHOUETTES <-> LIT NEW ZOOTOPIA CAST ==================== */
.syn-room-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.42s ease, transform 0.42s ease;
}

.syn-room-bg.is-warm-dim {
  filter: brightness(0.56) sepia(0.28) saturate(1.22) contrast(1.04);
}

/* Closed apartment windows: cozy warm curtained room interior — ZERO harsh black silhouettes! */
.syn-room-bg.is-warm-curtained {
  filter: brightness(0.76) sepia(0.14) saturate(1.04) contrast(0.96);
}

.syn-room-bg.is-future-night {
  filter: brightness(0.48) sepia(0.16) saturate(0.86) contrast(0.98);
}

/* ==================== 3-COLOR HAND-PAINTED 2.5D VELVET WINDOW CURTAINS (BURGUNDY / SPRUCE / NAVY) ==================== */
/* Real hand-painted 2.5D velvet curtains derived from v5-room-amber/fireplace — seated strictly INSIDE glass cutout! */
.syn-curtains {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  --curtain-img-l: url("/src/assets/v5/v5-curtain-burgundy-l.webp?v=20261128p8");
  --curtain-img-r: url("/src/assets/v5/v5-curtain-burgundy-r.webp?v=20261128p8");
}

.syn-curtains--burgundy {
  --curtain-img-l: url("/src/assets/v5/v5-curtain-burgundy-l.webp?v=20261128p8");
  --curtain-img-r: url("/src/assets/v5/v5-curtain-burgundy-r.webp?v=20261128p8");
}

.syn-curtains--spruce {
  --curtain-img-l: url("/src/assets/v5/v5-curtain-spruce-l.webp?v=20261128p8");
  --curtain-img-r: url("/src/assets/v5/v5-curtain-spruce-r.webp?v=20261128p8");
}

.syn-curtains--navy {
  --curtain-img-l: url("/src/assets/v5/v5-curtain-navy-l.webp?v=20261128p8");
  --curtain-img-r: url("/src/assets/v5/v5-curtain-navy-r.webp?v=20261128p8");
}

.syn-curtain {
  position: absolute;
  top: -1%;
  bottom: -1%;
  width: 45%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  will-change: transform, opacity;
}

.syn-curtain--l {
  left: -1%;
  transform-origin: left center;
  background-image: var(--curtain-img-l);
  filter: drop-shadow(3px 0 6px rgba(10, 6, 12, 0.36));
}

.syn-curtain--r {
  right: -1%;
  transform-origin: right center;
  background-image: var(--curtain-img-r);
  filter: drop-shadow(-3px 0 6px rgba(10, 6, 12, 0.36));
}

/* Delicate recessed glass shadow so painterly velvet sits seamlessly behind mullions & frame */
.syn-curtain-valance {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 22, 0.22) 0%, transparent 18%, transparent 82%, rgba(8, 12, 22, 0.14) 100%);
  box-shadow: inset 0 0 8px rgba(8, 12, 22, 0.26);
}

.syn-curtain-seam-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 46% 86% at 50% 54%, rgba(255, 224, 148, 0.84) 0%, rgba(255, 180, 76, 0.36) 52%, transparent 82%);
}

/* STATE 1: Future locked window — hand-painted velvet curtains slightly parted (~12% gap), cozy twilight tone (darker than lit, NEVER pitch black!) */
.syn-curtains.is-future .syn-curtain {
  filter: brightness(1.14) saturate(1.04) drop-shadow(0 0 4px rgba(10, 6, 12, 0.32));
}

.syn-curtains.is-future .syn-curtain--l {
  transform: translate3d(0%, 0, 0) scaleX(1);
}

.syn-curtains.is-future .syn-curtain--r {
  transform: translate3d(0%, 0, 0) scaleX(1);
}

/* STATE 2: Today's available window — painterly curtains parted slightly wider with warm inviting breath of light */
.syn-curtains.is-available .syn-curtain {
  filter: brightness(1.24) saturate(1.08);
}

.syn-curtains.is-available .syn-curtain--l {
  transform: translate3d(-18%, 0, 0) scaleX(0.92);
}

.syn-curtains.is-available .syn-curtain--r {
  transform: translate3d(18%, 0, 0) scaleX(0.92);
}

.syn-curtains.is-available .syn-curtain-seam-glow {
  opacity: 0.72;
  animation: synAvailableSeamBreathe 2.8s ease-in-out infinite;
}

@keyframes synAvailableSeamBreathe {
  0%, 100% { opacity: 0.56; transform: scaleX(0.92); }
  50% { opacity: 0.90; transform: scaleX(1.10); }
}

/* STATE 3: Lit window — painterly curtains pulled gracefully to outer frame edges, revealing warm room & hero! */
.syn-curtains.is-lit .syn-curtain {
  filter: brightness(1.26) saturate(1.10);
}

.syn-curtains.is-lit .syn-curtain--l {
  transform: translate3d(-82%, 0, 0) scaleX(0.48);
}

.syn-curtains.is-lit .syn-curtain--r {
  transform: translate3d(82%, 0, 0) scaleX(0.48);
}

.syn-curtains.is-lit .syn-curtain-valance {
  opacity: 0.16;
}

/* STATE 3B: JUST-LIT natural, organic 60fps dimmer light-up + symmetric painterly curtain parting (ZERO artificial white flash circle!) */
.syn-curtains.is-just-lit .syn-curtain {
  filter: brightness(1.26) saturate(1.10);
}

.syn-curtains.is-just-lit .syn-curtain--l {
  animation: synCurtainOpenL 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

.syn-curtains.is-just-lit .syn-curtain--r {
  animation: synCurtainOpenR 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

.syn-curtains.is-just-lit .syn-curtain-valance {
  animation: synCurtainValanceFade 0.9s ease 0s both;
}

@keyframes synCurtainOpenL {
  0% { transform: translate3d(-18%, 0, 0) scaleX(0.92); }
  100% { transform: translate3d(-82%, 0, 0) scaleX(0.48); }
}

@keyframes synCurtainOpenR {
  0% { transform: translate3d(18%, 0, 0) scaleX(0.92); }
  100% { transform: translate3d(82%, 0, 0) scaleX(0.48); }
}

@keyframes synCurtainValanceFade {
  0% { opacity: 0.9; }
  100% { opacity: 0.16; }
}

.syn-room-bg.is-just-lit {
  animation: synRoomDimmerUp 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

@keyframes synRoomDimmerUp {
  0% { filter: brightness(0.46) sepia(0.22) saturate(0.92); }
  100% { filter: brightness(1.06) saturate(1.12); }
}

.syn-char-sprite.is-just-lit {
  animation: synCharWarmReveal 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes synCharWarmReveal {
  0% { opacity: 0; filter: brightness(0.6) saturate(0.9); }
  100% { opacity: 1; filter: brightness(1.03) saturate(1.06) drop-shadow(0 3px 8px rgba(45, 20, 6, 0.45)); }
}

.syn-warm-room-glow.is-just-lit,
.syn-scene-warmth.is-just-lit {
  animation: synWarmthFadeIn 0.95s ease-out 0s both;
}

@keyframes synWarmthFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.syn-warm-halo.is-just-lit {
  animation: synHaloBloomIn 1.0s ease-out 0.06s both;
}

@keyframes synHaloBloomIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.syn-warm-curtain-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 76% 70% at 50% 48%, rgba(255, 206, 118, 0.16) 0%, rgba(164, 96, 32, 0.14) 64%, rgba(36, 18, 8, 0.40) 100%),
    linear-gradient(180deg, rgba(40, 22, 10, 0.24) 0%, rgba(255, 214, 142, 0.06) 45%, rgba(32, 16, 8, 0.30) 100%);
}

/* Ultra-soft, subtle blurred passing shadow gliding gently BEHIND sheer warm curtains */
.syn-curtain-passer {
  position: absolute;
  bottom: -6%;
  left: -34%;
  width: 44%;
  height: 76%;
  border-radius: 50% 50% 24% 24% / 44% 44% 18% 18%;
  background: radial-gradient(ellipse 52% 62% at 50% 34%, rgba(54, 24, 8, 0.62) 0%, rgba(54, 24, 8, 0.34) 55%, rgba(54, 24, 8, 0) 82%);
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: v5CurtainPass var(--pass-dur, 18s) ease-in-out var(--pass-delay, 0s) infinite;
}

@keyframes v5CurtainPass {
  0%, 58% {
    transform: translateX(0%);
    opacity: 0;
  }
  68% {
    opacity: 0.24;
  }
  82% {
    transform: translateX(260%);
    opacity: 0.20;
  }
  92%, 100% {
    transform: translateX(320%);
    opacity: 0;
  }
}

.syn-room-bg.is-lit {
  filter: brightness(1.06) saturate(1.12);
}

.syn-warm-dim-backlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 68% 68% at 50% 56%, rgba(255, 186, 86, 0.44) 0%, rgba(196, 112, 34, 0.22) 55%, rgba(56, 24, 10, 0.56) 100%);
}

.syn-warm-room-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 75% at 50% 55%, rgba(255, 224, 146, 0.28) 0%, rgba(255, 176, 72, 0.08) 65%, transparent 100%);
}

.syn-char-sprite {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 96%;
  object-fit: contain;
  pointer-events: none;
  transition: filter 0.42s ease, opacity 0.42s ease, transform 0.42s ease;
}

/* Warm backlit silhouette of the EXACT animal/character living inside — NEVER cold! */
.syn-char-sprite.is-silhouette {
  filter: brightness(0.11) sepia(1) hue-rotate(-14deg) saturate(2.6) drop-shadow(0 0 7px rgba(255, 192, 92, 0.62));
  opacity: 0.90;
}

.syn-char-sprite.is-lit {
  filter: brightness(1.03) saturate(1.06) drop-shadow(0 3px 8px rgba(45, 20, 6, 0.45));
  opacity: 1;
}

.syn-warm-dim-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(64, 28, 10, 0.26) 0%, rgba(176, 98, 28, 0.14) 55%, rgba(44, 18, 6, 0.34) 100%);
}

.hm-node.is-v5-clickable,
.hm-node.is-v5-shop-clickable {
  cursor: pointer;
  pointer-events: auto !important;
}

/* Decorative overlays MUST NEVER swallow taps on windows beneath them! */
.hm-stage[data-arch-style="master-v5"] .hm-dress,
.hm-stage[data-arch-style="master-v5"] .syn-sconce,
.hm-stage[data-arch-style="master-v5"] .syn-wing,
.hm-stage[data-arch-style="master-v5"] .syn-ground-plinth,
.hm-stage[data-arch-style="master-v5"] .hm-street-prop:not(.is-v5-shop-clickable):not(.is-v5-door-clickable),
.hm-stage[data-arch-style="master-v5"] .hm-roof-piece:not(.is-v5-clickable),
.hm-stage[data-arch-style="master-v5"] .hm-bay-piece:not(.is-v5-clickable) {
  pointer-events: none;
}

.hm-stage[data-arch-style="master-v5"] .is-v5-shop-clickable,
.hm-stage[data-arch-style="master-v5"] .is-v5-door-clickable {
  pointer-events: auto;
  cursor: pointer;
}

.syn-warm-badge {
  --lis-medallion-diameter: var(--lis-medallion-size-facade, 26px);
  --lis-medallion-text-size: var(--lis-medallion-font-facade, 12px);
  display: inline-grid;
  place-items: center;
  width: var(--lis-medallion-diameter);
  height: var(--lis-medallion-diameter);
  min-width: var(--lis-medallion-diameter);
  max-width: var(--lis-medallion-diameter);
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--lis-medallion-warm-bg, radial-gradient(circle at 35% 30%, #6a4424 0%, #3d2210 100%));
  border: 1.5px solid var(--lis-medallion-warm-border, rgba(246, 200, 118, 0.88));
  color: var(--lis-medallion-warm-ink, #fde3a8);
  font-family: var(--lis-font-sans, "Manrope", system-ui, sans-serif);
  font-size: var(--lis-medallion-text-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  box-shadow: var(--lis-medallion-warm-shadow, 0 2px 7px rgba(18, 8, 2, 0.65), inset 0 1px 2px rgba(255, 224, 152, 0.35));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.syn-warm-badge--future {
  background: var(--lis-medallion-future-bg, radial-gradient(circle at 35% 30%, #2c3548 0%, #171e2c 100%));
  border-color: var(--lis-medallion-future-border, rgba(186, 198, 220, 0.38));
  color: var(--lis-medallion-future-ink, rgba(220, 228, 242, 0.78));
  box-shadow: var(--lis-medallion-future-shadow, 0 2px 6px rgba(6, 10, 20, 0.62));
}

.syn-warm-badge--available {
  position: relative;
  background: var(--lis-medallion-available-bg, radial-gradient(circle at 35% 28%, #f8d886 0%, #c98c2e 68%, #8f5714 100%));
  border-color: var(--lis-medallion-available-border, #fff4d2);
  color: var(--lis-medallion-available-ink, #2c1008);
  box-shadow: var(--lis-medallion-available-shadow, 0 0 14px rgba(255, 210, 110, 0.88), 0 2px 8px rgba(24, 10, 2, 0.65), inset 0 1px 2px rgba(255, 250, 228, 0.75));
  animation: synAvailableBadgePulse 2.4s ease-in-out infinite;
}

@keyframes synAvailableBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 208, 108, 0.76), 0 2px 8px rgba(24, 10, 2, 0.65);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 22px rgba(255, 220, 128, 1), 0 2px 10px rgba(24, 10, 2, 0.7);
  }
}

.syn-wax-seal.is-just-lit {
  animation: synSealIgnitePop 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

@keyframes synSealIgnitePop {
  0% { transform: scale(0.72); box-shadow: 0 0 0 rgba(255, 214, 120, 0); }
  55% { transform: scale(1.24); box-shadow: 0 0 24px rgba(255, 222, 134, 0.96); }
  100% { transform: scale(1); }
}

.is-v5-clickable:hover .syn-warm-badge,
.is-v5-clickable:hover .syn-wax-seal {
  transform: scale(1.12);
}

/* Subtle, clean architectural ambient edge depth on noble butter-lemon facade (zero grunge!) */
.hm-stage[data-arch-style="master-v5"] .syn-wing--center .syn-wing-shade {
  background:
    linear-gradient(180deg, rgba(102, 74, 34, 0.20) 0%, transparent 6%, transparent 94%, rgba(92, 66, 28, 0.16) 100%),
    linear-gradient(90deg, rgba(102, 74, 34, 0.12) 0%, transparent 7%, transparent 93%, rgba(102, 74, 34, 0.14) 100%);
}

/* ==================== MASTER v5: ATOMIC SKY LAYERS + SOFT CLOCK/BAY SHADOWS + RIGHT HOUSE LIGHT & SHADOWS ==================== */
.syn-sky-layer {
  pointer-events: none;
}

.syn-sky-layer--stars {
  opacity: 0.94;
}

.syn-sky-layer--cloud {
  opacity: 0.92;
}

.syn-sky-layer--smoke {
  opacity: 0.86;
  mix-blend-mode: screen;
}

.syn-sky-layer--moon img {
  filter: drop-shadow(0 0 18px rgba(255, 232, 168, 0.56)) drop-shadow(0 0 6px rgba(255, 245, 204, 0.42));
}

/* Light tasteful contact shadow for wide lifted clock tower, roof slopes, dormers, chimneys & garlands */
.syn-shadow-light {
  filter: drop-shadow(0 3px 5px rgba(8, 14, 24, 0.22));
}

/* Soften bay turret shadows on master-v5 so the strict 0° butter-lemon turret stays clean & painterly */
.hm-stage[data-arch-style="master-v5"] .syn-bay-cast-shadow {
  background: radial-gradient(
    ellipse at 48% 50%,
    rgba(36, 24, 12, 0.28) 0%,
    rgba(36, 24, 12, 0.14) 54%,
    rgba(36, 24, 12, 0) 78%
  );
  filter: blur(6px);
}

.hm-stage[data-arch-style="master-v5"] .syn-shadow-bay {
  filter: drop-shadow(-3px 4px 5px rgba(28, 18, 10, 0.22));
}

/* Right Luxury Travertine House: bright creamy travertine columns matching reference (ZERO murky dark pillars!) */
.hm-stage[data-arch-style="master-v5"] .syn-wing--right {
  filter: brightness(1.05) saturate(0.94);
}

.hm-stage[data-arch-style="master-v5"] .syn-wing--right .syn-wing-shade {
  background:
    linear-gradient(180deg, rgba(42, 32, 22, 0.14) 0%, transparent 4%, transparent 95%, rgba(36, 28, 20, 0.14) 100%),
    linear-gradient(90deg, rgba(255, 250, 238, 0.08) 0%, transparent 18%, transparent 86%, rgba(42, 32, 22, 0.10) 100%);
}

/* Crisp narrow contact shadow where Center House meets bright travertine Right House (matching reference!) */
.hm-stage[data-arch-style="master-v5"] .syn-wing-seam--right {
  background: linear-gradient(90deg, rgba(26, 20, 18, 0.44) 0%, rgba(26, 20, 18, 0.16) 52%, rgba(26, 20, 18, 0) 100%);
}

.hm-stage[data-arch-style="master-v5"] .syn-arch-band--travertine-belt {
  background: linear-gradient(180deg, #f4f8ff 0%, #dce6f4 18%, #ebe0cc 24%, #d6c5aa 78%, #a69174 94%, #76634b 100%);
  box-shadow:
    0 8px 11px -2px rgba(24, 18, 14, 0.46),
    0 2px 3px rgba(20, 16, 12, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hm-stage[data-arch-style="master-v5"] .syn-win-frame--right {
  box-shadow:
    -6px 0 10px -4px rgba(18, 16, 20, 0.44),
    6px 0 10px -4px rgba(18, 16, 20, 0.44),
    0 -4px 7px -3px rgba(16, 14, 18, 0.42),
    inset 0 7px 9px -6px rgba(8, 10, 18, 0.50);
}

.hm-stage[data-arch-style="master-v5"] .syn-win-frame--right.is-lit {
  box-shadow:
    -6px 0 10px -4px rgba(22, 16, 14, 0.38),
    6px 0 10px -4px rgba(22, 16, 14, 0.38),
    0 0 28px 6px rgba(255, 202, 106, 0.48);
}

/* ==================== MASTER v5: WARM RADIAL LIGHT GRADIENTS AROUND EVERY LIGHT SOURCE ==================== */
.syn-light-bloom {
  border-radius: 50%;
  mix-blend-mode: screen;
  pointer-events: none;
}

.syn-light-bloom--window {
  background: radial-gradient(
    ellipse 52% 50% at 50% 50%,
    rgba(255, 220, 128, 0.46) 0%,
    rgba(255, 184, 78, 0.26) 36%,
    rgba(255, 154, 48, 0.10) 64%,
    rgba(255, 140, 38, 0) 84%
  );
}

.syn-light-bloom--window.syn-warm-halo--right {
  background: radial-gradient(
    ellipse 54% 52% at 50% 50%,
    rgba(255, 224, 134, 0.52) 0%,
    rgba(255, 188, 84, 0.30) 38%,
    rgba(255, 156, 52, 0.11) 66%,
    rgba(255, 144, 42, 0) 86%
  );
}

.syn-light-bloom--window-dim {
  background: radial-gradient(
    ellipse 50% 48% at 50% 52%,
    rgba(255, 178, 74, 0.16) 0%,
    rgba(245, 142, 42, 0.06) 52%,
    rgba(245, 130, 32, 0) 80%
  );
}

.syn-light-bloom--attic {
  position: absolute;
  left: -18%;
  top: -12%;
  width: 136%;
  height: 128%;
  z-index: 6;
  background: radial-gradient(
    ellipse 52% 50% at 50% 52%,
    rgba(255, 218, 124, 0.42) 0%,
    rgba(255, 176, 72, 0.20) 44%,
    rgba(255, 148, 44, 0) 78%
  );
}

.syn-light-bloom--lamp {
  background: radial-gradient(
    circle at 50% 48%,
    rgba(255, 248, 204, 0.92) 0%,
    rgba(255, 214, 114, 0.62) 22%,
    rgba(255, 176, 68, 0.28) 48%,
    rgba(255, 148, 42, 0.08) 72%,
    rgba(255, 138, 32, 0) 90%
  );
}

.syn-light-bloom--headlight {
  background: radial-gradient(
    ellipse 56% 44% at 32% 50%,
    rgba(255, 250, 214, 0.95) 0%,
    rgba(255, 218, 118, 0.68) 24%,
    rgba(255, 178, 66, 0.32) 52%,
    rgba(255, 148, 40, 0.09) 76%,
    rgba(255, 136, 30, 0) 94%
  );
}

.syn-light-bloom--shop {
  background: radial-gradient(
    ellipse 52% 48% at 50% 54%,
    rgba(255, 214, 118, 0.34) 0%,
    rgba(255, 174, 68, 0.16) 44%,
    rgba(255, 146, 42, 0.05) 70%,
    rgba(255, 136, 32, 0) 88%
  );
}

.syn-light-bloom--clock {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 232, 152, 0.56) 0%,
    rgba(255, 194, 88, 0.24) 44%,
    rgba(255, 168, 62, 0) 80%
  );
}

.syn-light-bloom--star {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 248, 198, 0.88) 0%,
    rgba(255, 214, 108, 0.42) 34%,
    rgba(255, 182, 68, 0) 76%
  );
}

.syn-light-bloom--moon {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 242, 196, 0.34) 0%,
    rgba(196, 216, 255, 0.14) 32%,
    rgba(160, 192, 255, 0.04) 54%,
    rgba(160, 192, 255, 0) 70%
  );
}

/* Sculpted bright hourglass (⧖) up/down sconce light cones + warm radial lamp core on bright travertine piers! */
.syn-arch-uplight--hourglass {
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 252, 224, 0.98) 0%, rgba(255, 224, 132, 0.72) 18%, transparent 38%),
    radial-gradient(ellipse 52% 40% at 50% 30%, rgba(255, 248, 206, 0.94) 0%, rgba(255, 212, 114, 0.66) 44%, rgba(248, 174, 68, 0.20) 74%, transparent 96%),
    radial-gradient(ellipse 52% 40% at 50% 70%, rgba(255, 248, 206, 0.94) 0%, rgba(255, 212, 114, 0.66) 44%, rgba(248, 174, 68, 0.20) 74%, transparent 96%);
  clip-path: polygon(4% 0%, 96% 0%, 62% 46%, 62% 54%, 96% 100%, 4% 100%, 38% 54%, 38% 46%);
  mix-blend-mode: screen;
  filter: blur(1.2px) drop-shadow(0 0 10px rgba(255, 210, 110, 0.62));
  pointer-events: none;
}

/* Noble Russian architectural serif lettering (Cormorant Garamond) dead-centered inside the recessed wood fascias (z=29),
   while the standalone evergreen pine garlands crown the upper cornice (z=30) with outer boughs framing the corners! */
.syn-shop-sign--v5-books,
.syn-shop-sign--v5-cafe {
  position: absolute;
  transform: translate(-50%, -50%) !important;
  white-space: nowrap;
  padding: 0 8px;
  font-family: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  color: #f9e1a0;
  text-shadow:
    0 1px 2px rgba(8, 4, 4, 0.96),
    0 2px 6px rgba(6, 3, 4, 0.72),
    0 0 12px rgba(255, 210, 122, 0.34);
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
  z-index: 8;
}

.syn-shop-sign--v5-books {
  font-size: clamp(13px, 1.56vw, 22px);
  top: 18.4%;
  left: 53.5%;
}

.syn-shop-sign--v5-cafe {
  font-size: clamp(12.5px, 1.48vw, 21px);
  top: 17.8%;
  left: 48.3%;
}

/* Gentle 2-layer painted winter snowfall over twilight sky & facades */
.syn-snowfall {
  position: absolute;
  inset: 0;
  z-index: 92;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.25s ease;
}

.kit-mansion-canvas.is-hide-snow [data-hm-layer="snow"] {
  opacity: 0;
}

.syn-snow-layer {
  position: absolute;
  inset: -12% 0 0 0;
  background-repeat: repeat;
}

.syn-snow-layer--far {
  opacity: 0.52;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 8%, rgba(242, 248, 255, 0.9), transparent),
    radial-gradient(1.4px 1.4px at 34% 22%, rgba(235, 244, 255, 0.85), transparent),
    radial-gradient(1.8px 1.8px at 58% 14%, rgba(255, 252, 240, 0.85), transparent),
    radial-gradient(1.4px 1.4px at 81% 28%, rgba(238, 246, 255, 0.85), transparent),
    radial-gradient(1.6px 1.6px at 23% 54%, rgba(242, 248, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 67% 62%, rgba(245, 250, 255, 0.85), transparent),
    radial-gradient(1.7px 1.7px at 91% 74%, rgba(240, 247, 255, 0.8), transparent),
    radial-gradient(1.4px 1.4px at 44% 86%, rgba(255, 252, 244, 0.8), transparent);
  background-size: 220px 260px;
  animation: synSnowDriftFar 19s linear infinite;
}

.syn-snow-layer--near {
  opacity: 0.70;
  background-image:
    radial-gradient(2.6px 2.6px at 18% 16%, rgba(255, 255, 255, 0.94), transparent),
    radial-gradient(2.2px 2.2px at 48% 36%, rgba(244, 249, 255, 0.86), transparent),
    radial-gradient(2.8px 2.8px at 76% 18%, rgba(255, 252, 242, 0.92), transparent),
    radial-gradient(2.1px 2.1px at 30% 72%, rgba(242, 248, 255, 0.84), transparent),
    radial-gradient(2.5px 2.5px at 62% 84%, rgba(255, 255, 255, 0.88), transparent),
    radial-gradient(2.3px 2.3px at 88% 58%, rgba(242, 248, 255, 0.86), transparent);
  background-size: 320px 360px;
  animation: synSnowDriftNear 13s linear infinite;
}

@keyframes synSnowDriftFar {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(18px, 260px, 0); }
}

@keyframes synSnowDriftNear {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-24px, 360px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .syn-snow-layer--far,
  .syn-snow-layer--near {
    animation: none;
  }
}

/* Raised Top-Layer Precision Alignment Grid (z=99, shown when "Сетка и контуры" is checked!) */
.syn-precision-grid {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.22) 1px, transparent 1px),
    linear-gradient(to right, rgba(250, 204, 21, 0.38) 1.5px, transparent 1.5px),
    linear-gradient(to bottom, rgba(250, 204, 21, 0.38) 1.5px, transparent 1.5px);
  background-size: 2.5% 2.5%, 2.5% 2.5%, 10% 10%, 10% 10%;
}

.kit-mansion-canvas.is-show-guides .syn-precision-grid {
  display: block;
}

.syn-grid-seam,
.syn-grid-safe {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
}

.syn-grid-seam {
  border-left: 1.5px dashed rgba(251, 146, 60, 0.88);
}

.syn-grid-safe {
  border-left: 2px dashed rgba(52, 211, 153, 0.92);
}

.syn-grid-seam span,
.syn-grid-safe span,
.syn-grid-haxis span {
  position: absolute;
  top: 6px;
  left: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(10, 16, 28, 0.88);
  color: #fde68a;
  border: 1px solid rgba(251, 146, 60, 0.65);
}

.syn-grid-safe span {
  top: 24px;
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.72);
}

.syn-grid-haxis {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px dashed rgba(244, 114, 182, 0.85);
}

.syn-grid-haxis span {
  top: -16px;
  left: 6px;
  color: #fbcfe8;
  border-color: rgba(244, 114, 182, 0.7);
}

.syn-arch-band--travertine-top {
  background: linear-gradient(180deg, #f8fbff 0%, #dce7f5 28%, #e6dac4 34%, #cbb99b 86%, #8f7a5c 100%);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 5px 10px rgba(12, 16, 24, 0.42);
}

/* Chelyuskintsev 5: two-level warm champagne architectural pier uplighting */
.syn-arch-uplight {
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(255, 214, 134, 0.52) 0%,
    rgba(255, 192, 98, 0.22) 38%,
    rgba(255, 176, 82, 0) 74%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Brusnika Gazovikov 44: minimalist dark charcoal-graphite metal drip ledges & snow coping */
.syn-arch-band--graphite {
  background: linear-gradient(180deg, #eef4fb 0%, #d3dfee 24%, #3c444f 30%, #262c34 100%);
  box-shadow: 0 4px 7px rgba(6, 10, 18, 0.48);
}

.syn-arch-band--graphite-heavy {
  background: linear-gradient(180deg, #f2f7fc 0%, #d5e2f2 22%, #434c58 28%, #252b33 82%, #171b21 100%);
  box-shadow: 0 7px 12px rgba(6, 10, 18, 0.58);
}

.syn-arch-band--graphite-top {
  background: linear-gradient(180deg, #f6faff 0%, #dce8f6 34%, #444d59 40%, #252b33 100%);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 5px 10px rgba(6, 10, 18, 0.52);
}

.syn-ground-plinth--brusnika {
  filter: brightness(0.76) saturate(0.92);
}

.syn-ground-plinth--chelyuskintsev {
  filter: brightness(0.68) saturate(0.86);
}

/* Warm radial light halo radiating from open windows onto surrounding stone & masonry */
.syn-warm-halo {
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 48%,
    rgba(255, 198, 104, 0.44) 0%,
    rgba(255, 166, 68, 0.22) 38%,
    rgba(255, 148, 52, 0.06) 62%,
    rgba(255, 140, 44, 0) 78%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.syn-bay-warm-halo {
  position: absolute;
  left: -14%;
  top: -8%;
  width: 128%;
  height: 118%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 52%,
    rgba(255, 202, 108, 0.36) 0%,
    rgba(255, 168, 72, 0.14) 46%,
    rgba(255, 148, 52, 0) 74%
  );
  mix-blend-mode: screen;
  z-index: 0;
  pointer-events: none;
}

/* Deep cast drop-shadow behind protruding 2-story hexagonal bay turret */
.syn-bay-cast-shadow {
  border-radius: 26px 26px 90px 90px;
  background: radial-gradient(
    ellipse at 48% 50%,
    rgba(6, 14, 16, 0.72) 0%,
    rgba(6, 14, 16, 0.48) 54%,
    rgba(6, 14, 16, 0) 80%
  );
  filter: blur(8px);
  pointer-events: none;
}

.syn-win-interior,
.syn-bay-cutout,
.syn-attic-cutout {
  overflow: hidden;
}

.syn-win-interior {
  border-radius: 46% 46% 3% 3% / 34% 34% 2% 2%;
}

.syn-bay-cutout {
  position: absolute;
  z-index: 1;
  border-radius: 46% 46% 2% 2% / 28% 28% 2% 2%;
}

.syn-attic-cutout {
  position: absolute;
  z-index: 1;
  border-radius: 46% 46% 4% 4% / 36% 36% 2% 2%;
}

.syn-scene-img,
.syn-frost-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.syn-scene-img {
  filter: brightness(1.04) saturate(1.08);
}

.syn-scene-dim {
  filter: brightness(0.48) saturate(0.76) sepia(0.24) contrast(1.05);
}

.syn-dim-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 184, 96, 0.14) 0%, rgba(26, 36, 54, 0.34) 68%, rgba(14, 22, 36, 0.56) 100%);
  box-shadow: inset 0 0 18px rgba(12, 18, 30, 0.62);
  pointer-events: none;
}

.syn-scene-warmth {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 18px rgba(255, 200, 108, 0.48);
  pointer-events: none;
}

.syn-frost-img {
  filter: brightness(0.92) contrast(1.04);
}

.syn-frost-sheen {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 194, 112, 0.24) 0%, rgba(255, 194, 112, 0) 54%),
    linear-gradient(135deg, rgba(226, 240, 255, 0.16) 0%, transparent 48%, rgba(16, 28, 52, 0.36) 100%);
  box-shadow: inset 0 0 14px rgba(12, 22, 42, 0.56);
  pointer-events: none;
}

/* Soft natural shadows per architectural depth plane */
.syn-shadow-soft {
  filter: drop-shadow(0 4px 6px rgba(8, 14, 16, 0.46));
}

.syn-shadow-frame {
  filter: drop-shadow(0 4px 5px rgba(8, 14, 16, 0.42));
}

.syn-shadow-bay {
  filter: drop-shadow(-6px 8px 11px rgba(6, 14, 14, 0.52));
}

.syn-shadow-roof {
  filter: drop-shadow(0 6px 10px rgba(6, 12, 22, 0.55));
}

.syn-shadow-street {
  filter: drop-shadow(0 4px 8px rgba(6, 10, 20, 0.48));
}

/* Clean gold Russian shopfront signage rendered inside the prod shop fascias */
.syn-shop-sign {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #f7dba0;
  text-shadow: 0 1px 4px rgba(10, 6, 4, 0.9), 0 0 10px rgba(255, 206, 118, 0.32);
  white-space: nowrap;
  pointer-events: none;
}

.syn-shop-sign--books {
  top: 17.5%;
  font-size: clamp(6.5px, 0.68vw, 10px);
}

.syn-shop-sign--cafe {
  top: 18.8%;
  font-size: clamp(7px, 0.74vw, 10.8px);
}

/* Street lamp warm golden lantern aura */
.syn-lamp-halo {
  position: absolute;
  left: 50%;
  top: 17%;
  width: 340%;
  height: 44%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 128, 0.72) 0%, rgba(255, 178, 76, 0.24) 44%, rgba(255, 160, 56, 0) 74%);
  mix-blend-mode: screen;
  z-index: 6;
  pointer-events: none;
}

/* Soft snow contact shadows anchoring street objects cleanly to the ground */
.syn-contact-shadow {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: 82%;
  height: 16%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(10, 18, 34, 0.68) 0%, rgba(10, 18, 34, 0.28) 54%, rgba(10, 18, 34, 0) 80%);
  z-index: 1;
  pointer-events: none;
}

.syn-contact-shadow--car {
  bottom: 4%;
  width: 92%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(8, 14, 28, 0.82) 0%, rgba(8, 14, 28, 0.38) 58%, rgba(8, 14, 28, 0) 82%);
}

.syn-contact-shadow--lamp {
  bottom: 0;
  width: 110%;
  height: 6%;
}

/* Top-layer unobstructed Advent Day Medallions (z=95) — specificity higher than .hm-node so (-50%,-50%) NEVER gets overridden! */
.hm-node.syn-day-badge {
  transform: translate(
    calc(-50% + var(--explode, 0) * var(--dx, 0px)),
    calc(-50% + var(--explode, 0) * var(--dy, 0px))
  );
}

.syn-wax-seal {
  --lis-medallion-diameter: var(--lis-medallion-size-facade, 26px);
  --lis-medallion-text-size: var(--lis-medallion-font-facade, 12px);
  display: inline-grid;
  place-items: center;
  width: var(--lis-medallion-diameter);
  height: var(--lis-medallion-diameter);
  min-width: var(--lis-medallion-diameter);
  max-width: var(--lis-medallion-diameter);
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--lis-medallion-lit-bg, radial-gradient(circle at 32% 28%, #c93c3c 0%, #861d24 68%, #581018 100%));
  border: 1.5px solid var(--lis-medallion-lit-border, #f7d694);
  box-shadow: var(--lis-medallion-lit-shadow, 0 2px 7px rgba(0, 0, 0, 0.62), 0 0 10px rgba(255, 192, 92, 0.4));
  color: var(--lis-medallion-lit-ink, #fff6df);
  font-family: var(--lis-font-sans, "Manrope", system-ui, sans-serif);
  font-size: var(--lis-medallion-text-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

.syn-lock-medallion {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 30px;
  filter: drop-shadow(0 2px 5px rgba(6, 12, 22, 0.65));
}

.syn-lock-medallion img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.syn-lock-medallion strong {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  color: #162238;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
}

/* Subtle twilight atmospheric grade tying moonlit roof to warm golden street */
.syn-atmo-grade {
  position: absolute;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(28, 54, 96, 0.08) 0%,
    rgba(0, 0, 0, 0) 26%,
    rgba(0, 0, 0, 0) 76%,
    rgba(255, 178, 78, 0.06) 92%,
    rgba(10, 18, 34, 0.16) 100%
  );
}

.hm-sky-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  z-index: 1;
  pointer-events: none;
}

.hm-sky-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.hm-sprite.is-flip-x {
  transform: scaleX(-1);
}

.hm-node {
  position: absolute;
  transform: translate(
    calc(var(--explode, 0) * var(--dx, 0px)),
    calc(var(--explode, 0) * var(--dy, 0px))
  );
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none;
}

.hm-wall-tile > img,
.hm-ground-tile > img,
.hm-sprite {
  position: relative;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.hm-shadow {
  filter: drop-shadow(0 4px 8px rgba(8, 14, 14, 0.45));
}

.hm-shadow-bay {
  filter: drop-shadow(-4px 6px 12px rgba(8, 16, 14, 0.48));
}

.hm-room-cutout,
.hm-win-room,
.hm-bay-room {
  position: absolute;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #e8a74c, #643615 92%);
  box-shadow: inset 0 0 16px rgba(255, 210, 128, 0.45);
}

.hm-room-cutout,
.hm-win-room {
  border-radius: 48% 48% 3% 3% / 38% 38% 2% 2%;
}

.hm-room-cutout,
.hm-bay-room {
  z-index: 1;
}

.hm-bay-room {
  border-radius: 16% 16% 2% 2%;
}

.hm-char-attic {
  height: 92%;
  bottom: -4%;
}

.hm-char-win {
  height: 88%;
  bottom: -2%;
}

.hm-char-bay {
  height: 86%;
  bottom: -2%;
}

.hm-char-couple {
  height: 86%;
  bottom: -2%;
}

.hm-day-pill {
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 8;
  transform: translateX(-50%);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(31, 22, 16, 0.88);
  border: 1px solid rgba(245, 200, 116, 0.68);
  color: #fce2aa;
  font-size: 9.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hm-day-pill--bay {
  bottom: 8%;
}

/* LAYER VISIBILITY TOGGLES */
.kit-mansion-canvas.is-hide-wall [data-hm-layer="wall"] { opacity: 0.08; }
.kit-mansion-canvas.is-hide-ground [data-hm-layer="ground"] { opacity: 0.08; }
.kit-mansion-canvas.is-hide-rooms [data-hm-layer="rooms"] { opacity: 0; }
.kit-mansion-canvas.is-hide-roof [data-hm-layer="roof"] { opacity: 0; }
.kit-mansion-canvas.is-hide-frames [data-hm-layer="frames"] { opacity: 0; }
.kit-mansion-canvas.is-hide-bay [data-hm-layer="bay"] { opacity: 0; }
.kit-mansion-canvas.is-hide-dress [data-hm-layer="dress"] { opacity: 0; }
.kit-mansion-canvas.is-hide-street [data-hm-layer="street"] { opacity: 0; }

/* PRECISION GRID & COMPONENT GUIDES */
.hm-tile-tag,
.hm-guide-tag {
  display: none;
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 30;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.hm-tile-tag {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.65);
  color: #7dd3fc;
}

.hm-guide-tag {
  top: -15px;
  background: rgba(14, 165, 233, 0.92);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.kit-mansion-canvas.is-show-guides .hm-tile-tag,
.kit-mansion-canvas.is-show-guides .hm-guide-tag {
  display: inline-block;
}

.kit-mansion-canvas.is-show-guides .hm-wall-tile,
.kit-mansion-canvas.is-show-guides .hm-ground-tile {
  outline: 1px dashed rgba(56, 189, 248, 0.72);
}

.kit-mansion-canvas.is-show-guides .hm-win-frame {
  outline: 1.5px dashed rgba(250, 204, 21, 0.9);
}

.kit-mansion-canvas.is-show-guides .hm-dress {
  outline: 1.5px dashed rgba(251, 113, 133, 0.92);
}

.kit-mansion-canvas.is-show-guides .hm-bay-piece {
  outline: 1.5px dashed #34d399;
}

.kit-mansion-canvas.is-show-guides .hm-street-prop {
  outline: 1.5px dashed #f5c874;
}

.asm-room-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.95) saturate(1.06);
  transition: opacity 0.2s ease;
}

.asm-char-img {
  position: absolute;
  left: 50%;
  bottom: -4%;
  height: 92%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  transform-origin: 50% 90%;
  animation: asmCharBreathe 4.6s ease-in-out infinite;
  transition: opacity 0.2s ease;
}

@keyframes asmCharBreathe {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  50% { transform: translateX(-50%) scaleY(1.018); }
}

/* RIGHT COLUMN: RAW SPRITE BREAKDOWN ON CHECKERBOARD TRANSPARENCY */
.asm-parts-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asm-parts-head h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #fff7ea;
}

.asm-parts-head p {
  margin: 0;
  font-size: 12.2px;
  line-height: 1.5;
  color: rgba(244, 235, 220, 0.72);
}

.asm-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.asm-parts-grid--wide {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.asm-part-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 13px;
  border: 1px solid rgba(247, 222, 176, 0.16);
  background: rgba(16, 25, 43, 0.86);
  color: #f4efe6;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.asm-part-card:hover {
  border-color: rgba(245, 200, 116, 0.55);
  transform: translateY(-1px);
}

.asm-part-card.is-selected {
  border-color: #f5c874;
  box-shadow: 0 0 0 1px rgba(245, 200, 116, 0.45);
}

.asm-part-thumb {
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  /* Classic transparent alpha checkerboard */
  background-color: #1a2130;
  background-image:
    linear-gradient(45deg, #273145 25%, transparent 25%),
    linear-gradient(-45deg, #273145 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #273145 75%),
    linear-gradient(-45deg, transparent 75%, #273145 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  border-bottom: 1px solid rgba(247, 222, 176, 0.12);
}

.asm-part-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.asm-part-meta {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.asm-part-layer {
  font-size: 10px;
  font-weight: 800;
  color: #f5c874;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.asm-part-meta strong {
  font-size: 12px;
  line-height: 1.3;
  color: #fff7ea;
}

.asm-part-dims {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: rgba(244, 235, 220, 0.58);
}

/* Also give Inspector image box transparent checkerboard so PNG/WebP cutouts are crystal clear */
.inspector-preview-box img {
  background-color: #1a2130;
  background-image:
    linear-gradient(45deg, #273145 25%, transparent 25%),
    linear-gradient(-45deg, #273145 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #273145 75%),
    linear-gradient(-45deg, transparent 75%, #273145 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}

@media (max-width: 1180px) {
  .asm-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  html, body {
    overflow: auto;
  }
  .studio-app {
    height: auto;
    min-height: 100vh;
  }
  .studio-topbar {
    flex-wrap: wrap;
  }
  .studio-body,
  .fs-overlay {
    grid-template-columns: 1fr;
  }
  .figma-viewport {
    min-height: 540px;
  }
  .mermaid-split {
    grid-template-columns: 1fr;
  }
}

/* Proportional v5-house-shell cqi rules */
/* Proportional container-query scaling so masonry textures, signs & badges match master render at ANY width (360px..1120px)! */
.v5-house-shell .syn-wing--left {
  background-size: 22.5cqi 22.5cqi !important;
}

.v5-house-shell .syn-wing--center {
  background-size: 25.5cqi 25.5cqi !important;
}

.v5-house-shell .syn-wing--right {
  background-size: 22.5cqi 22.5cqi !important;
}

.v5-house-shell.is-tablet .syn-wing--left {
  background-size: 15.6cqi 15.6cqi !important;
}

.v5-house-shell.is-tablet .syn-wing--center {
  background-size: 17.6cqi 17.6cqi !important;
}

.v5-house-shell.is-tablet .syn-wing--right {
  background-size: 15.6cqi 15.6cqi !important;
}

.v5-house-shell .syn-shop-sign--v5-books {
  font-size: clamp(9.5px, 2.55cqi, 24px);
  letter-spacing: 0.18em;
  top: 18.4%;
  left: 53.5%;
}

.v5-house-shell .syn-shop-sign--v5-cafe {
  font-size: clamp(9px, 2.35cqi, 22px);
  letter-spacing: 0.16em;
  top: 17.8%;
  left: 48.3%;
}

/* Storybook Mode B: pixel-grid centered inside measured gold signboard frames
   v5-shop-bookshop.webp (648x810): inner gold box x=[47..594] (cx=49.46%), y=[86..178] (cy=16.30%)
   v5-shop-cafe.webp     (597x810): inner gold box x=[97..501] (cx=50.08%), y=[106..203] (cy=19.07%)
   Explicit translate(-50%, -50%) restores vertical centering (previously overridden by .syn-shop-sign translateX(-50%))
   and text-indent cancels trailing letter-spacing for dead-center optical balance! */
.v5-house-shell .hm-stage[data-art-mode="storybook"] .syn-shop-sign--v5-books {
  left: 49.46%;
  top: 16.30%;
  transform: translate(-50%, -50%);
  font-size: clamp(10px, 2.65cqi, 24px);
  letter-spacing: 0.20em;
  text-indent: 0.20em;
  line-height: 1;
  padding: 0;
}

.v5-house-shell .hm-stage[data-art-mode="storybook"] .syn-shop-sign--v5-cafe {
  left: 50.08%;
  top: 19.07%;
  transform: translate(-50%, -50%);
  font-size: clamp(9px, 2.20cqi, 20px);
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  line-height: 1;
  padding: 0;
}

.v5-house-shell.is-tablet .syn-shop-sign--v5-books {
  font-size: clamp(10px, 1.76cqi, 23px);
}

.v5-house-shell.is-tablet .syn-shop-sign--v5-cafe {
  font-size: clamp(9.5px, 1.62cqi, 21.5px);
}

.v5-house-shell.is-tablet .hm-stage[data-art-mode="storybook"] .syn-shop-sign--v5-books {
  font-size: clamp(10px, 1.82cqi, 23px);
}

.v5-house-shell.is-tablet .hm-stage[data-art-mode="storybook"] .syn-shop-sign--v5-cafe {
  font-size: clamp(9.5px, 1.56cqi, 20px);
}

/* Crisp mobile-friendly fixed-circle day medallions (identical 1:1 diameter for 1-9 and 10-31!) */
.v5-house-shell .syn-warm-badge,
.v5-house-shell .syn-wax-seal,
.v5-house-shell .lis-medallion--facade {
  --lis-medallion-diameter: var(--lis-medallion-size-facade, clamp(22px, 5.2cqi, 28px));
  --lis-medallion-text-size: var(--lis-medallion-font-facade, clamp(10.5px, 2.55cqi, 13px));
  width: var(--lis-medallion-diameter);
  height: var(--lis-medallion-diameter);
  min-width: var(--lis-medallion-diameter);
  max-width: var(--lis-medallion-diameter);
  font-size: var(--lis-medallion-text-size);
  padding: 0;
  border-radius: 50%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.v5-house-shell.is-tablet .syn-warm-badge,
.v5-house-shell.is-tablet .syn-wax-seal,
.v5-house-shell.is-tablet .lis-medallion--facade {
  --lis-medallion-diameter: var(--lis-medallion-size-facade-tablet, clamp(22px, 3.5cqi, 28px));
  --lis-medallion-text-size: var(--lis-medallion-font-facade-tablet, clamp(10.5px, 1.75cqi, 13px));
}

.v5-house-shell .is-v5-clickable {
  cursor: pointer;
  touch-action: manipulation;
}

.v5-house-shell .is-v5-clickable:active .syn-warm-badge,
.v5-house-shell .is-v5-clickable:active .syn-wax-seal {
  transform: scale(1.18);
}

/* Snowfall toggle + silky fixed-viewport organic Canvas snow (direct body child so 1:1 round flakes!) */
.v5-house-shell.is-snow-off .syn-snowfall,
body.is-snow-off .syn-snow-canvas {
  opacity: 0;
  pointer-events: none;
}

/* Pre-baked in-stage Bloom & Halation texture pinned directly onto #v5-stage: 0ms JS & 0ms scroll lag (120fps native GPU compositor scroll!) */
.syn-postfx-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 88;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 1;
}

.syn-postfx-layer.is-breathe {
  animation: synPostFxBreathe 5.2s ease-in-out infinite;
}

body.v5-postcard-open .syn-postfx-layer.is-breathe,
body.v5-demo-guide-open .syn-postfx-layer.is-breathe {
  animation-play-state: paused;
}

@keyframes synPostFxBreathe {
  0%, 100% { opacity: 0.90; }
  50% { opacity: 1; }
}

.syn-postfx-layer.is-mask {
  mix-blend-mode: normal;
  background: rgba(4, 7, 14, 0.86);
  animation: none;
  opacity: 1;
}

.syn-baked-plates {
  pointer-events: none;
  overflow: hidden;
}

.syn-baked-plate {
  position: absolute;
  left: 0;
  width: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.syn-baked-hitbox {
  background: transparent;
}
