/* Each fixture changes only its own light surfaces. No inherited scene state,
   shared filtered pool or gradient repaint couples the two switches. */
button.light-fixture {
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button.light-fixture > span { pointer-events: none; }
button.light-fixture:focus-visible { outline: 2px solid #e2c796; outline-offset: 9px; border-radius: 13px; }
.fixture-lens {
  background: radial-gradient(ellipse, #3d4547, #20292d 62%, #111a21);
  box-shadow: inset 0 1px 3px #71818a28;
  transition: none;
}
.fixture-lens::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse,#fff7d6 0,#f5daa2 45%,#a68043 85%);
  box-shadow: 0 0 7px #f4d9a099,0 5px 20px #ebce9b55,inset 0 1px 4px #fff2bb;
  opacity: 1;
  transition: opacity .22s;
  will-change: opacity;
  pointer-events: none;
}
button.light-fixture[aria-pressed="false"] .fixture-lens::after { opacity: 0; }
.door-scene .light-beam { opacity: .7; transition: opacity .24s; will-change: opacity; }
.door-scene .light-beam[data-lit="false"] { opacity: 0; }
.door-scene .floor-light { background: none; filter: none; }
.floor-pool {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity .24s;
  will-change: opacity;
}
.floor-pool-left { background: radial-gradient(ellipse at 35% 50%,#ebd9b32d 0,transparent 56%); }
.floor-pool-right { background: radial-gradient(ellipse at 65% 50%,#dfc29329 0,transparent 56%); }
.floor-pool[data-lit="false"] { opacity: 0; }

/* A readable ambient surface plus two local, additive warm contributions.
   Turning one off no longer draws a dark veil across the opposite hotspot.
   All animated opacity is on these flat leaves, never a 3D ancestor. */
.slab-front {
  background-image: linear-gradient(180deg,#08142414,#07142424),url('./assets/door-clean.png');
}
.door-illumination {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity .24s;
  will-change: opacity;
}
.door-illumination-left { background: radial-gradient(ellipse 64% 76% at 10% 0,#fff3cd70 0,#ffe6b82b 24%,#ffe6b812 45%,transparent 72%); }
.door-illumination-right { background: radial-gradient(ellipse 64% 76% at 90% 0,#fff3cd70 0,#ffe6b82b 24%,#ffe6b812 45%,transparent 72%); }
.door-illumination[data-lit="false"] { opacity: 0; }

.doorbell {
  position: absolute;
  z-index: 8;
  left: 470px;
  top: 335px;
  width: calc(48px / var(--stage-scale));
  height: calc(92px / var(--stage-scale));
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.doorbell > span { pointer-events: none; }
.bell-plate {
  display: block;
  position: absolute;
  top: 8px;
  left: 50%;
  width: 30px;
  height: 63px;
  transform: translateX(-50%);
  border: 1px solid #a99a7e9c;
  border-radius: 9px;
  background: linear-gradient(105deg,#101e2b,#354956 42%,#142b3a 86%);
  box-shadow: 3px 5px 9px #000b,0 0 5px #d6be8e18,inset 1px 1px 1px #c3d0d14d,inset -1px -1px 1px #000b;
}
.bell-ring {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 13px;
  border: 1px solid #efd293;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#55605a,#213440 72%);
  color: #f1d9a9;
  box-shadow: 0 0 9px #d7b66b68,inset 0 0 6px #dfc07b35;
  transition: background .18s,box-shadow .18s;
}
.bell-ring svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bell-led { display: block; position: absolute; left: 12px; bottom: 9px; width: 4px; height: 4px; border-radius: 50%; background: #d7bc83; box-shadow: 0 0 7px #e9c47c70; }
.doorbell:focus-visible { outline: 2px solid #e2c796; outline-offset: 3px; border-radius: 8px; }
.doorbell:hover .bell-ring { box-shadow: 0 0 13px #e9ca8a75,inset 0 0 8px #e9ca8a25; }
.doorbell.is-ringing .bell-ring { background: #b29359; color: #fff2d2; box-shadow: 0 0 20px #f4d799a1,inset 0 0 6px #fff2d273; animation: bell-glow .55s ease-out 2; }
.doorbell.is-ringing .bell-ring svg { animation: bell-nudge .22s ease-in-out 3; }
.doorbell.is-ringing .bell-led { background: #fff0c9; box-shadow: 0 0 11px #f4d799c2; }
.door-scene.unlatching .doorbell,.door-scene.unlatching .light-fixture,
.door-scene.opening .doorbell,.door-scene.opening .light-fixture { pointer-events: none; }
@keyframes bell-glow { 0% { box-shadow: 0 0 7px #f4d79970; } 35% { box-shadow: 0 0 22px #f4d799b3; } 100% { box-shadow: 0 0 13px #f4d79970; } }
@keyframes bell-nudge { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-13deg); } 70% { transform: rotate(13deg); } }
@media (prefers-reduced-motion: reduce) {
  .doorbell *,.door-scene .light-beam,.fixture-lens::after,.floor-pool,.door-illumination { animation: none !important; transition: none !important; }
}
