/* ============================================================================
   VISTA HOME // 3D SMART HOME COMMAND CENTER (NEON BLUE GLOW)
   Zero-Build-Step Custom Stylesheet (styles.css)
   ============================================================================ */

:root {
  color-scheme: dark;
  --cyber-bg: #030816;
  --cyber-panel-bg: rgba(5, 14, 34, 0.78);
  --cyber-card-bg: rgba(6, 17, 42, 0.76);
  --neon-border: rgba(0, 195, 255, 0.45);
  --neon-border-bright: rgba(0, 225, 255, 0.85);
  --neon-glow-outer: 0 0 22px rgba(0, 195, 255, 0.25);
  --neon-glow-inner: inset 0 0 16px rgba(0, 195, 255, 0.14);
}

body {
  background-color: #030816;
}

/* Ambient Electric Blue Neon Orbs & Cyber Blueprint Background Grid */
.ambient-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
  pointer-events: none;
}

@media (max-width: 1024px), (hover: none) {
  .ambient-orb {
    display: none !important;
  }
}

/* CRITICAL 3D GPU PERFORMANCE RULE:
   Any continuous CSS keyframe animation (animate-pulse, animate-ping, opacity/transform keyframes)
   inside a transform-style: preserve-3d scene forces Chromium's 3D BSP compositor to re-split and
   re-rasterize every 3D wall, floor, and appliance polygon at 60fps, causing constant mobile flicker. */
.house-3d-viewport .animate-pulse,
.house-3d-viewport .animate-ping,
.house-3d-scene .animate-pulse,
.house-3d-scene .animate-ping,
.house-3d-scene .app3d-lidar-pulse,
.house-3d-scene .app3d-spinning-drum,
.house-3d-scene .app3d-water-wave,
.house-3d-scene .app3d-rising-steam {
  animation: none !important;
}

.orb-electric-cyan {
  width: 600px;
  height: 600px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.32) 0%, transparent 70%);
}

.orb-deep-blue {
  width: 680px;
  height: 680px;
  bottom: -220px;
  right: -140px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.36) 0%, transparent 70%);
}

.orb-neon-azure {
  width: 500px;
  height: 500px;
  top: 28%;
  left: 38%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, transparent 72%);
}

.cyber-blueprint-grid {
  display: none !important;
}

/* Cyber Glass Surfaces */
.cyber-header {
  background: rgba(3, 8, 22, 0.88);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 4px 28px rgba(0, 195, 255, 0.14);
}

.cyber-sidebar {
  background: rgba(4, 11, 29, 0.92);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    inset -1px 0 18px rgba(0, 195, 255, 0.08),
    8px 0 32px rgba(0, 0, 0, 0.65);
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}

/* Auto-Hide Sidebar Collapsed State (Desktop & Mobile) */
#main-sidebar.sidebar-collapsed {
  margin-left: -18rem;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1023px) {
  #main-sidebar {
    position: fixed;
    top: 3.5rem;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 17.5rem;
    margin-left: 0 !important;
  }

  #main-sidebar.sidebar-collapsed {
    transform: translateX(-105%);
    opacity: 0;
    pointer-events: none;
  }
}

/* Left Edge Hover Trigger Strip Highlight on Hover */
#sidebar-edge-trigger {
  background: linear-gradient(90deg, rgba(0, 225, 255, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

#sidebar-edge-trigger:hover {
  opacity: 1;
}

.cyber-modal {
  background: rgba(4, 11, 28, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 0 45px rgba(0, 195, 255, 0.35),
    inset 0 0 22px rgba(0, 195, 255, 0.15);
}

.neon-icon-box {
  box-shadow:
    0 0 18px rgba(0, 195, 255, 0.35),
    inset 0 0 10px rgba(0, 195, 255, 0.25);
}

.cyber-stage-panel {
  background: linear-gradient(165deg, rgba(6, 18, 44, 0.86) 0%, rgba(3, 9, 24, 0.92) 100%);
  border: 1px solid var(--neon-border);
  box-shadow:
    0 14px 40px -10px rgba(0, 0, 0, 0.75),
    0 0 28px rgba(0, 195, 255, 0.18),
    inset 0 0 24px rgba(0, 195, 255, 0.1);
}

/* ============================================================================
   1:1 SQUARE 3D ROTATING CYBER-BLUEPRINT HOUSE FLOORPLAN (520px × 520px)
   ============================================================================ */

.house-3d-viewport {
  width: 100%;
  min-height: 640px;
  height: calc(100vh - 9.25rem);
  perspective: none;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  border-radius: 1rem;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(0, 195, 255, 0.16) 0%, rgba(3, 8, 22, 0.95) 74%);
  border: 1px solid rgba(0, 195, 255, 0.3);
  box-shadow: inset 0 0 40px rgba(0, 195, 255, 0.14);
}

.house-3d-stage-inner {
  width: 100%;
  height: 100%;
  perspective: 2600px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.house-3d-stage-inner > .house-3d-scene {
  pointer-events: auto;
}

.house-3d-viewport:active {
  cursor: grabbing;
}

.house-3d-scene,
.house-scene {
  position: relative;
  width: 528px;
  height: 528px;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  will-change: transform;
  animation: none;
  transition: none;
}

.house-3d-scene.dragging {
  animation: none;
  transition: none;
}

/* Cyber-Grid 1:1 Square Base Floor Plane Hidden (Clean Deep-Space 3D House) */
.cyber-floor-grid-plane,
.compass-ring {
  display: none !important;
}

/* Holographic Corner Structural Pillars hidden unless in Grid Edit Mode */
.holo-pillar {
  display: none !important;
}

.pillar-nw,
.pillar-ne,
.pillar-sw,
.pillar-se {
  display: none !important;
}

/* Floating Holographic 1:1 Square Floor Coordinate Containers (Clean — No Outer Grid Box in Normal View) */
.floor-layer {
  position: absolute;
  inset: 0;
  width: 528px;
  height: 528px;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  border-radius: 0.85rem;
  padding: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
  transition: none;
}

.house-3d-scene.grid-edit-active .floor-layer {
  background: transparent;
  border: none;
}

.floor-plate-label {
  display: none !important;
}

/* Default Dual-Layer Stack Positions (128px apart so 124px room walls on Lower Floor reach all the way up to Upper Level) */
.floor-layer-lower {
  transform: translateZ(-64px);
}

.floor-layer-upper {
  transform: translateZ(64px);
}

/* Floor Focus Modes (when user focuses Lower or Upper floor specifically, completely hide the other floor) */
.house-3d-scene[data-focus-mode="lower"] .floor-layer-lower {
  transform: translateZ(0px) scale(1.02);
  border-color: rgba(0, 225, 255, 0.9);
}

.house-3d-scene[data-focus-mode="lower"] .floor-layer-upper {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.house-3d-scene[data-focus-mode="upper"] .floor-layer-upper {
  transform: translateZ(0px) scale(1.02);
  border-color: rgba(0, 225, 255, 0.9);
}

.house-3d-scene[data-focus-mode="upper"] .floor-layer-lower {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.floor-plate-label {
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 1px 10px;
  border-radius: 9999px;
  background: #04122c;
  border: 1px solid rgba(0, 225, 255, 0.7);
  color: #67e8f9;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 0 12px rgba(0, 195, 255, 0.45);
  pointer-events: none;
  z-index: 10;
}

/* 1:1 Square Blueprint Room Coordinate Container (500px × 500px inner canvas) */
.floor-blueprint-grid {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Individual Holographic 3D Room Tile positioned using scaled 1:1 square coordinates (x, y, w, h) */
.blueprint-room-tile {
  position: absolute;
  transform-style: preserve-3d;
  transform: translateZ(4px);
  border-radius: 0.45rem;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(4, 18, 46, 0.84), rgba(2, 9, 25, 0.92));
  border: 1.5px solid rgba(0, 210, 255, 0.62);
  box-shadow:
    0 0 18px rgba(0, 195, 255, 0.22),
    inset 0 0 20px rgba(0, 195, 255, 0.14);
  color: #e2e8f0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.blueprint-room-tile.room-cutout-sw50 {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.blueprint-room-tile.room-cutout-sw50 .room-hud-plane {
  pointer-events: auto;
  cursor: pointer;
}

.blueprint-room-tile.room-cutout-sw50:hover,
.blueprint-room-tile.room-cutout-sw50.room-hovered {
  transform: translateZ(18px);
  background: transparent !important;
  box-shadow: none !important;
}

.blueprint-room-tile.room-cutout-sw50:hover .landing-floor-hit-polygon,
.blueprint-room-tile.room-cutout-sw50.room-hovered .landing-floor-hit-polygon {
  fill: rgba(8, 36, 82, 0.94);
  stroke: #00f5ff;
  stroke-width: 2.8;
}

.blueprint-room-tile.room-has-active {
  border-color: rgba(0, 235, 255, 0.82);
  box-shadow:
    0 0 24px rgba(0, 225, 255, 0.34),
    inset 0 0 22px rgba(0, 225, 255, 0.22);
}

.blueprint-room-tile:hover,
.blueprint-room-tile.room-hovered {
  transform: translateZ(18px);
  border-color: #00f0ff;
  background: linear-gradient(145deg, rgba(8, 34, 78, 0.92), rgba(4, 16, 42, 0.96));
  box-shadow:
    0 0 32px rgba(0, 235, 255, 0.6),
    inset 0 0 24px rgba(0, 235, 255, 0.32);
}

.blueprint-room-tile:hover .room-3d-wall,
.blueprint-room-tile.room-hovered .room-3d-wall {
  border-color: #67e8f9;
  box-shadow:
    0 0 18px rgba(0, 245, 255, 0.55),
    inset 0 0 14px rgba(0, 245, 255, 0.28);
}

.blueprint-room-tile:hover .room-box-top-rim,
.blueprint-room-tile.room-hovered .room-box-top-rim {
  border-color: #ffffff;
  box-shadow:
    0 0 24px rgba(0, 245, 255, 0.75),
    inset 0 0 16px rgba(0, 245, 255, 0.32);
}

/* Selected Room pops up in 3D space (translateZ(20px)) with intense electric cyan glow */
.blueprint-room-tile.room-selected {
  transform: translateZ(20px);
  border: 2px solid #00f0ff;
  background: linear-gradient(145deg, rgba(0, 140, 210, 0.42), rgba(6, 28, 68, 0.95));
  box-shadow:
    0 0 32px rgba(0, 240, 255, 0.75),
    0 0 12px rgba(0, 240, 255, 0.55),
    inset 0 0 22px rgba(0, 240, 255, 0.38);
}

.blueprint-room-tile.room-alert {
  border-color: rgba(244, 63, 94, 0.92);
  box-shadow:
    0 0 28px rgba(244, 63, 94, 0.65),
    inset 0 0 16px rgba(244, 63, 94, 0.35);
}

/* 12×12 Snap-Grid Edit Mode Selected Room Highlight & Corner Resize Handle */
.blueprint-room-tile.grid-edit-selected {
  border: 2px dashed #00f0ff !important;
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.7),
    inset 0 0 24px rgba(0, 240, 255, 0.35) !important;
  z-index: 25;
}

.house-3d-scene.grid-edit-active .blueprint-room-tile {
  cursor: move;
}

.grid-resize-corner-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.32);
  border: 1px solid #00f0ff;
  color: #ffffff;
  font-size: 10px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: nwse-resize;
  z-index: 30;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.65);
}

.grid-resize-corner-handle:hover {
  background: #00e5ff;
  color: #030816;
}

/* ============================================================================
   PHASE 13.1: TRUE 3D VOLUMETRIC ROOM BOXES (46PX TALL WALLS + TOP CAP RIM)
   ============================================================================ */

.room-3d-walls-assembly {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.house-3d-scene.hide-3d-walls .room-3d-walls-assembly,
.house-3d-scene.hide-3d-walls .flat-roof-onepiece,
.house-3d-scene.hide-3d-walls .pitched-attic-roof-assembly {
  display: none !important;
}

.room-3d-wall {
  position: absolute;
  transform-style: preserve-3d;
  background:
    linear-gradient(
      180deg,
      rgba(0, 229, 255, 0.28) 0%,
      rgba(0, 180, 255, 0.1) 50%,
      rgba(0, 229, 255, 0.32) 100%
    );
  border: 1.5px solid rgba(0, 235, 255, 0.78);
  box-shadow:
    0 0 12px rgba(0, 225, 255, 0.3),
    inset 0 0 12px rgba(0, 225, 255, 0.18);
  pointer-events: none;
}

.room-3d-wall.wall-active {
  border-color: #00f5ff;
  background:
    linear-gradient(
      180deg,
      rgba(0, 240, 255, 0.36) 0%,
      rgba(0, 200, 255, 0.16) 50%,
      rgba(103, 232, 249, 0.42) 100%
    );
  box-shadow:
    0 0 16px rgba(0, 245, 255, 0.5),
    inset 0 0 14px rgba(0, 245, 255, 0.26);
}

.room-3d-wall.wall-alert {
  border-color: rgba(251, 113, 133, 0.95);
  background:
    linear-gradient(
      180deg,
      rgba(244, 63, 94, 0.38) 0%,
      rgba(244, 63, 94, 0.14) 50%,
      rgba(253, 164, 175, 0.44) 100%
    );
}

/* North Wall (top edge standing straight UP full storey height from Z = 0px to Z = +124px) */
.room-wall-n {
  top: 0;
  left: 0;
  width: 100%;
  height: 124px;
  transform-origin: top center;
  transform: rotateX(90deg);
}

/* South Wall (bottom edge standing straight UP full storey height from Z = 0px to Z = +124px) */
.room-wall-s {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 124px;
  transform-origin: bottom center;
  transform: rotateX(-90deg);
}

/* West Wall (left edge standing straight UP full storey height from Z = 0px to Z = +124px) */
.room-wall-w {
  top: 0;
  left: 0;
  width: 124px;
  height: 100%;
  transform-origin: center left;
  transform: rotateY(-90deg);
}

/* East Wall (right edge standing straight UP full storey height from Z = 0px to Z = +124px) */
.room-wall-e {
  top: 0;
  right: 0;
  width: 124px;
  height: 100%;
  transform-origin: center right;
  transform: rotateY(90deg);
}

/* Mid-Height Horizontal Wireframe Box Rib at Z = +62px (Half-Storey Rib) */
.room-box-mid-rib {
  position: absolute;
  inset: 0;
  border-radius: 0.35rem;
  border: 1px dashed rgba(0, 229, 255, 0.36);
  transform: translateZ(62px);
  pointer-events: none;
}

.room-box-mid-rib.wall-active {
  border-color: rgba(103, 232, 249, 0.55);
}

/* Top Ceiling Wireframe Box Rim at Z = +124px (Meets the Next Floor Slab) */
.room-box-top-rim {
  position: absolute;
  inset: 0;
  border-radius: 0.4rem;
  border: 1.8px solid rgba(0, 235, 255, 0.88);
  background: rgba(0, 215, 255, 0.04);
  box-shadow:
    0 0 14px rgba(0, 229, 255, 0.42),
    inset 0 0 12px rgba(0, 229, 255, 0.16);
  transform: translateZ(124px);
  pointer-events: none;
}

.room-box-top-rim.wall-active {
  border-color: #67e8f9;
  box-shadow:
    0 0 20px rgba(0, 245, 255, 0.65),
    inset 0 0 14px rgba(0, 245, 255, 0.25);
}

.room-box-top-rim.wall-alert {
  border-color: #fb7185;
  box-shadow:
    0 0 20px rgba(244, 63, 94, 0.7),
    inset 0 0 14px rgba(244, 63, 94, 0.3);
}

/* Open East & South Sides on Outside Porch */
.room-box-mid-rib.open-east-south,
.room-box-top-rim.open-east-south {
  border-right: none !important;
  border-bottom: none !important;
}

/* ============================================================================
   ONE-PIECE 3D FLAT ROOF (UTILITY + OUTSIDE) + 3D PITCHED ATTIC ROOF (UPPER FLOOR)
   ============================================================================ */

[data-room-tile="Utility"] .room-box-top-rim,
[data-room-tile="Outside"] .room-box-top-rim {
  display: none !important;
}

.flat-roof-onepiece,
.flat-roof-onepiece *,
.pitched-attic-roof-assembly,
.pitched-attic-roof-assembly *,
.room-3d-walls-assembly,
.room-3d-walls-assembly * {
  pointer-events: none !important;
}

.pitched-attic-roof-assembly .attic-selectable-badge,
.pitched-attic-roof-assembly .attic-selectable-badge *,
.pitched-attic-roof-assembly .attic-floor-deck,
.pitched-attic-roof-assembly .appliance-3d-anchor,
.pitched-attic-roof-assembly .appliance-3d-anchor * {
  pointer-events: auto !important;
  cursor: pointer;
}

.attic-selectable-badge {
  transform-style: flat;
  backface-visibility: visible;
  transform:
    translateZ(38px)
    rotateZ(calc(-1 * var(--scene-yaw, -28deg)))
    rotateX(calc(-1 * var(--scene-pitch, 60deg)));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.attic-selectable-badge:hover {
  transform:
    translateZ(42px)
    rotateZ(calc(-1 * var(--scene-yaw, -28deg)))
    rotateX(calc(-1 * var(--scene-pitch, 60deg)))
    scale(1.06);
  border-color: #00f5ff !important;
  box-shadow: 0 0 28px rgba(0, 245, 255, 0.9) !important;
}

.attic-floor-deck {
  position: absolute;
  inset: 0;
  border-radius: 0.45rem;
  background: linear-gradient(145deg, rgba(6, 26, 62, 0.86), rgba(3, 12, 34, 0.92));
  border: 2px solid #00f5ff;
  box-shadow:
    0 0 32px rgba(0, 240, 255, 0.65),
    inset 0 0 24px rgba(0, 229, 255, 0.25);
}

.attic-roof-slope.attic-slope-cutaway {
  opacity: 0.16 !important;
  border-style: dashed !important;
  transition: opacity 0.24s ease;
}

.flat-roof-onepiece {
  position: absolute;
  transform-style: preserve-3d;
  transform: translateZ(124px);
  pointer-events: none;
}

.pitched-attic-roof-assembly {
  position: absolute;
  transform-style: preserve-3d;
  transform: translateZ(124px);
  pointer-events: none;
}

.attic-roof-slope {
  position: absolute;
  left: 0;
  transform-style: flat;
  backface-visibility: visible;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 229, 255, 0.24) 0px,
      rgba(0, 229, 255, 0.24) 1.2px,
      rgba(4, 18, 44, 0.52) 1.2px,
      rgba(4, 18, 44, 0.52) 38px
    ),
    linear-gradient(
      180deg,
      rgba(0, 225, 255, 0.28) 0%,
      rgba(4, 16, 40, 0.65) 50%,
      rgba(103, 232, 249, 0.36) 100%
    );
  border: 1.8px solid rgba(0, 240, 255, 0.88);
  box-shadow:
    0 0 18px rgba(0, 229, 255, 0.38),
    inset 0 0 18px rgba(0, 229, 255, 0.22);
}

.attic-roof-slope.slope-north {
  top: 0;
  transform-origin: top center;
}

.attic-roof-slope.slope-south {
  bottom: 0;
  transform-origin: bottom center;
}

.attic-gable-side {
  position: absolute;
  top: 0;
  height: 100%;
  transform-style: flat;
  backface-visibility: visible;
  pointer-events: none;
}

.attic-gable-side.gable-west {
  left: 0;
  transform-origin: center left;
  transform: rotateY(-90deg);
}

.attic-gable-side.gable-mid-ew {
  transform-origin: center left;
  transform: rotateY(-90deg);
}

.attic-gable-side.gable-east {
  right: 0;
  transform-origin: center right;
  transform: rotateY(90deg);
}

.attic-ridge-beam-ew {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  margin-top: -1.5px;
  background: #67e8f9;
  box-shadow:
    0 0 16px #00f5ff,
    0 0 6px #ffffff;
  pointer-events: none;
}

.attic-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Glowing 3D Upper Box Corner Vertices */
.box-vertex {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #67e8f9;
  box-shadow: 0 0 8px #00f0ff;
}

.box-vertex.v-nw { top: -3px; left: -3px; }
.box-vertex.v-ne { top: -3px; right: -3px; }
.box-vertex.v-sw { bottom: -3px; left: -3px; }
.box-vertex.v-se { bottom: -3px; right: -3px; }

/* Architectural Doorway Portal Cutout on 3D Walls (Anchored at Floor Edge Z = 0px) */
.wall-door-frame {
  position: absolute;
  display: block;
  background: rgba(2, 6, 18, 0.88);
  border: 2px solid #00f5ff;
  box-shadow:
    0 0 12px rgba(0, 245, 255, 0.75),
    inset 0 0 10px rgba(0, 229, 255, 0.35);
}

/* On North Wall (transform-origin: top center), top: 0 is the floor (Z = 0) */
.room-wall-n .wall-door-frame {
  top: 0;
  height: 70%;
  border-top-width: 1px;
}

/* On South Wall (transform-origin: bottom center), bottom: 0 is the floor (Z = 0) */
.room-wall-s .wall-door-frame {
  bottom: 0;
  height: 70%;
  border-bottom-width: 1px;
}

/* On West Wall (transform-origin: center left), left: 0 is the floor (Z = 0) */
.room-wall-w .wall-door-frame {
  left: 0;
  width: 70%;
  border-left-width: 1px;
}

/* On East Wall (transform-origin: center right), right: 0 is the floor (Z = 0) */
.room-wall-e .wall-door-frame {
  right: 0;
  width: 70%;
  border-right-width: 1px;
}

/* Architectural Double-Line Window Glazing Mullions on Exterior 3D Walls */
.wall-window-glazing {
  position: absolute;
  display: block;
  border: 1.2px solid rgba(165, 243, 252, 0.9);
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 240, 255, 0.16) 0px,
    rgba(0, 240, 255, 0.16) 6px,
    transparent 6px,
    transparent 12px
  );
  box-shadow: 0 0 8px rgba(103, 232, 249, 0.55);
}

.room-wall-n .wall-window-glazing,
.room-wall-s .wall-window-glazing {
  width: 44%;
  height: 46%;
  left: 28%;
  top: 27%;
}

.room-wall-e .wall-window-glazing,
.room-wall-w .wall-window-glazing {
  width: 46%;
  height: 44%;
  left: 27%;
  top: 28%;
}

/* 3D Holographic Stepped Staircase Riser Assembly (Connects Stairs & Hallway L01 up to Landing L02) */
.holo-staircase-3d-shaft {
  position: absolute;
  left: 24%;
  width: 52%;
  top: 12%;
  height: 74%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.holo-stair-tread {
  position: absolute;
  left: 0;
  width: 100%;
  height: 7%;
  border: 1px solid rgba(103, 232, 249, 0.78);
  background: rgba(0, 215, 255, 0.22);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

/* Interior Per-Room CAD Blueprint SVG Layer */
.room-cad-blueprint-layer {
  position: absolute;
  inset: 3px;
  z-index: 1;
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.blueprint-room-tile:hover .room-cad-blueprint-layer {
  opacity: 1;
}

.house-3d-scene.hide-cad-vectors .room-cad-blueprint-layer {
  display: none !important;
}

/* Stationary 3D Floor Vertex Hit-Map Anchors */
.floor-hit-map {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(4px);
  pointer-events: none !important;
}

.floor-hit-vertex {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none !important;
}

/* Elevated 3D Architectural Room HUD Plane floating inside the 3D Room Box */
.room-hud-plane {
  transform: translateZ(16px);
  pointer-events: none !important;
}

.room-hud-plane * {
  pointer-events: none !important;
}

.room-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(4, 18, 44, 0.9);
  border: 1px solid rgba(0, 215, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.25);
}

.room-icon-badge.badge-active {
  background: rgba(0, 195, 255, 0.28);
  border-color: #67e8f9;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.55);
}

/* Floor Focus Pills & 3D Control Buttons */
.floor-focus-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Cascadia Code", Consolas, monospace;
  color: #94a3b8;
  background: rgba(4, 14, 36, 0.75);
  border: 1px solid rgba(0, 195, 255, 0.3);
  transition: all 0.15s ease;
  cursor: pointer;
}

.floor-focus-pill:hover {
  color: #e0f2fe;
  border-color: rgba(0, 225, 255, 0.65);
}

.floor-focus-pill.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.32), rgba(37, 99, 235, 0.35));
  border-color: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 195, 255, 0.35);
}

.cyber-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Cascadia Code", Consolas, monospace;
  color: #bae6fd;
  background: rgba(4, 16, 42, 0.85);
  border: 1px solid rgba(0, 195, 255, 0.4);
  box-shadow: inset 0 0 10px rgba(0, 195, 255, 0.1);
  transition: all 0.15s ease;
  cursor: pointer;
}

.cyber-ctrl-btn:hover {
  color: #ffffff;
  border-color: #00e5ff;
  background: rgba(0, 195, 255, 0.22);
  box-shadow: 0 0 14px rgba(0, 195, 255, 0.3);
}

.cyber-ctrl-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.35), rgba(37, 99, 235, 0.35));
  border-color: #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
}

/* ============================================================================
   LEFT SIDE CATEGORY BUTTONS & SETTINGS RAIL BUTTON
   ============================================================================ */

.category-rail-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(5, 16, 40, 0.55);
  border: 1px solid rgba(0, 195, 255, 0.2);
  transition: all 0.16s ease;
  text-align: left;
  cursor: pointer;
}

.category-rail-btn:hover {
  color: #f1f5f9;
  background: rgba(0, 195, 255, 0.12);
  border-color: rgba(0, 195, 255, 0.5);
  box-shadow: 0 0 14px rgba(0, 195, 255, 0.15);
}

.category-rail-btn.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0, 195, 255, 0.28), rgba(37, 99, 235, 0.18));
  border-color: #00e5ff;
  box-shadow:
    0 0 18px rgba(0, 195, 255, 0.3),
    inset 3px 0 0 0 #00f0ff;
}

.cyber-settings-btn {
  color: #e0f2fe;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.2), rgba(30, 64, 175, 0.3));
  border: 1.5px solid rgba(0, 195, 255, 0.55);
  box-shadow:
    0 0 20px rgba(0, 195, 255, 0.22),
    inset 0 0 12px rgba(0, 195, 255, 0.15);
  cursor: pointer;
}

.cyber-settings-btn:hover {
  color: #ffffff;
  border-color: #00f0ff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.35), rgba(37, 99, 235, 0.45));
  box-shadow:
    0 0 26px rgba(0, 240, 255, 0.45),
    inset 0 0 16px rgba(0, 240, 255, 0.25);
}

.cyber-settings-btn.active {
  color: #ffffff;
  border-color: #00f0ff;
  background: linear-gradient(135deg, rgba(0, 225, 255, 0.42), rgba(37, 99, 235, 0.5));
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.6),
    inset 0 0 18px rgba(0, 240, 255, 0.35);
}

/* ============================================================================
   RICH DEVICE CYBER-BLUEPRINT CARDS
   ============================================================================ */

.device-card {
  position: relative;
  background: linear-gradient(160deg, rgba(7, 22, 54, 0.82) 0%, rgba(3, 10, 27, 0.9) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(0, 195, 255, 0.38);
  border-radius: 1rem;
  box-shadow:
    0 12px 32px -8px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(0, 195, 255, 0.12),
    inset 0 0 16px rgba(0, 195, 255, 0.08);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s ease,
              box-shadow 0.18s ease;
}

/* Prevent nested backdrop-filter GPU blackouts and 3D Z-buffer punch-through on Android/iOS mobile browsers inside the Hero Popup Modal */
body.hero-popover-open .house-3d-stage-inner,
body.hero-popover-open #house-3d-scene,
body.hero-popover-open #hud-people-presence-strip {
  display: none !important;
}

#app3d-action-popover {
  z-index: 9999 !important;
  transform: translate3d(0, 0, 2000px);
}

#app3d-action-popover,
#app3d-hero-modal-panel,
#app3d-action-popover .device-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#app3d-action-popover .device-card {
  background: linear-gradient(160deg, rgba(8, 26, 62, 0.98) 0%, rgba(3, 11, 28, 0.99) 100%) !important;
}

.device-card:hover {
  border-color: rgba(0, 225, 255, 0.72);
  box-shadow:
    0 16px 40px -8px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(0, 195, 255, 0.25),
    inset 0 0 20px rgba(0, 195, 255, 0.14);
}

.device-card.card-active-glow {
  border-color: rgba(0, 225, 255, 0.65);
  box-shadow:
    0 14px 36px -10px rgba(0, 195, 255, 0.28),
    0 0 24px rgba(0, 195, 255, 0.2),
    inset 0 0 18px rgba(0, 195, 255, 0.14);
}

.device-card.card-alert-glow {
  border-color: rgba(244, 63, 94, 0.8);
  box-shadow:
    0 0 30px -4px rgba(244, 63, 94, 0.45),
    inset 0 0 18px rgba(251, 113, 133, 0.35);
  animation: pulse-alert-border 1.6s infinite ease-in-out;
}

.device-card.card-dragging,
.cyber-stage-panel.card-dragging {
  opacity: 0.42;
  transform: scale(0.97);
  border: 1.5px dashed rgba(0, 240, 255, 0.85) !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.35);
}

.device-card.card-drag-over,
.cyber-stage-panel.card-drag-over {
  border: 2px dashed #00f0ff !important;
  box-shadow:
    0 0 32px rgba(0, 240, 255, 0.55),
    inset 0 0 22px rgba(0, 240, 255, 0.25) !important;
  transform: translateY(-2px) scale(1.01);
}

@keyframes pulse-alert-border {
  0%, 100% { border-color: rgba(244, 63, 94, 0.85); }
  50% { border-color: rgba(251, 191, 36, 0.9); }
}

/* Header Summary Pills & Action Buttons */
.summary-pill {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(4, 16, 42, 0.75);
  border: 1px solid rgba(0, 195, 255, 0.32);
  box-shadow: inset 0 0 10px rgba(0, 195, 255, 0.1);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.15s ease;
  cursor: pointer;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn-primary {
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.3), rgba(37, 99, 235, 0.35));
  color: #e0f2fe;
  border: 1px solid rgba(0, 225, 255, 0.6);
  box-shadow: 0 0 18px rgba(0, 195, 255, 0.25);
}

.action-btn-primary:hover {
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.45), rgba(37, 99, 235, 0.5));
  border-color: #00f0ff;
}

.action-btn-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.action-btn-amber:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(251, 191, 36, 0.75);
}

.action-btn-subtle {
  background: rgba(4, 16, 42, 0.75);
  color: #bae6fd;
  border: 1px solid rgba(0, 195, 255, 0.35);
}

.action-btn-subtle:hover {
  background: rgba(0, 195, 255, 0.2);
  color: #ffffff;
  border-color: #00e5ff;
}

/* Settings Page Tabs */
.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(4, 14, 36, 0.65);
  border: 1px solid rgba(0, 195, 255, 0.25);
  transition: all 0.15s ease;
  cursor: pointer;
}

.settings-tab-btn:hover {
  color: #e2e8f0;
  border-color: rgba(0, 195, 255, 0.55);
}

.settings-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 195, 255, 0.3), rgba(37, 99, 235, 0.3));
  border-color: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 195, 255, 0.3);
}

/* ============================================================================
   PHASE 13.2: LIVOLO TEMPERED CRYSTAL GLASS SWITCH & UK BS 1363 WALL SOCKET CARDS
   ============================================================================ */

.livolo-glass-plate,
.livolo-crystal-faceplate {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(14, 38, 84, 0.94), rgba(3, 10, 26, 0.98));
  border: 1.5px solid rgba(0, 229, 255, 0.55);
  box-shadow:
    inset 0 0 0 3px rgba(5, 22, 54, 0.9),
    inset 0 1px 0 rgba(165, 243, 252, 0.38),
    inset 0 0 22px rgba(0, 195, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

/* Subtle 135deg Diagonal Tempered Crystal Glass Reflection Sheen */
.livolo-glass-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(165, 243, 252, 0.1) 0%,
    rgba(0, 229, 255, 0.03) 34%,
    transparent 48%,
    rgba(0, 195, 255, 0.04) 85%,
    rgba(165, 243, 252, 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Corner Bevel Registration Ticks on 86x86mm Glass Switch Faceplate */
.livolo-chamfer-tick {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: rgba(103, 232, 249, 0.45);
  pointer-events: none;
  z-index: 2;
}

.livolo-chamfer-tick.tick-nw {
  top: 7px;
  left: 7px;
  border-top: 1.2px solid rgba(103, 232, 249, 0.5);
  border-left: 1.2px solid rgba(103, 232, 249, 0.5);
}

.livolo-chamfer-tick.tick-ne {
  top: 7px;
  right: 7px;
  border-top: 1.2px solid rgba(103, 232, 249, 0.5);
  border-right: 1.2px solid rgba(103, 232, 249, 0.5);
}

.livolo-chamfer-tick.tick-sw {
  bottom: 7px;
  left: 7px;
  border-bottom: 1.2px solid rgba(103, 232, 249, 0.5);
  border-left: 1.2px solid rgba(103, 232, 249, 0.5);
}

.livolo-chamfer-tick.tick-se {
  bottom: 7px;
  right: 7px;
  border-bottom: 1.2px solid rgba(103, 232, 249, 0.5);
  border-right: 1.2px solid rgba(103, 232, 249, 0.5);
}

/* Engraved LIVOLO Micro-Wordmark at Bottom Center of Tempered Glass Bevel */
.livolo-bezel-brand {
  position: relative;
  z-index: 10;
  text-align: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.34em;
  color: rgba(165, 243, 252, 0.48);
  text-transform: uppercase;
  padding-top: 2px;
  user-select: none;
  pointer-events: none;
}

/* Concentric Capacitive Touch Ring Button (Standard, Large 1-Gang Switch, and Top-Corner Socket Ring) */
.livolo-touch-ring {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.livolo-touch-ring.ring-switch-lg {
  width: 78px;
  height: 78px;
}

/* Top-Corner Circular Capacitive Touch ON/OFF Button on UK Socket Outlets */
.livolo-touch-ring.ring-corner-socket {
  width: 28px;
  height: 28px;
}

.livolo-touch-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(165, 243, 252, 0.22);
  pointer-events: none;
}

.livolo-touch-ring.ring-corner-socket::before {
  inset: 2.5px;
}

.livolo-touch-ring.ring-off {
  border: 2.5px solid #00e5ff;
  background: radial-gradient(circle, rgba(6, 26, 62, 0.92) 0%, rgba(3, 12, 32, 0.96) 100%);
  box-shadow:
    0 0 18px rgba(0, 229, 255, 0.48),
    inset 0 0 12px rgba(0, 229, 255, 0.26);
}

.livolo-touch-ring.ring-on {
  border: 2.5px solid #ff2a4b;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.26) 0%, rgba(28, 6, 14, 0.92) 100%);
  box-shadow:
    0 0 26px rgba(255, 42, 75, 0.78),
    inset 0 0 14px rgba(255, 42, 75, 0.42);
}

.livolo-ring-inner-dot {
  width: 11px;
  height: 11px;
  border-radius: 9999px;
  transition: all 0.22s ease;
}

.livolo-touch-ring.ring-corner-socket .livolo-ring-inner-dot {
  width: 6.5px;
  height: 6.5px;
}

.livolo-ring-inner-dot.dot-off {
  background: #38bdf8;
  box-shadow: 0 0 10px #00e5ff;
}

.livolo-ring-inner-dot.dot-on {
  background: #ff4d6d;
  box-shadow:
    0 0 14px #ff2a4b,
    0 0 6px #ffffff;
}

.livolo-touch-ring:hover {
  transform: scale(1.07);
}

.livolo-touch-ring:active {
  transform: scale(0.95);
}

/* UK BS 1363 (Type-G) 3-Pin Recessed Socket Well */
.livolo-uk-socket-well {
  width: 98px;
  height: 90px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.livolo-uk-socket-well.socket-well-on {
  filter: drop-shadow(0 0 12px rgba(255, 42, 75, 0.35));
}

.livolo-uk-socket-well.socket-well-off {
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.22));
}

/* ============================================================================
   PHASE 13.3: TADO° V3+ SQUARE LED-MATRIX THERMOSTAT (RU02) & CYLINDRICAL TRV (VA02)
   ============================================================================ */

/* RU02 104x104mm Square Chamfered Polycarbonate Wall Thermostat Housing */
.tado-ru02-unit {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(12, 36, 80, 0.94), rgba(3, 10, 25, 0.98));
  border: 1.8px solid rgba(0, 229, 255, 0.58);
  box-shadow:
    inset 0 0 0 3.5px rgba(5, 22, 54, 0.92),
    inset 0 1px 0 rgba(165, 243, 252, 0.42),
    inset 0 0 28px rgba(0, 195, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

.tado-ru02-glass-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(165, 243, 252, 0.09) 0%,
    rgba(0, 229, 255, 0.02) 36%,
    transparent 52%,
    rgba(0, 195, 255, 0.05) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* VA02 Cylindrical Rotary Smart Radiator Valve (TRV) Housing */
.tado-va02-trv-unit {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(10, 34, 78, 0.95) 0%, rgba(4, 13, 33, 0.98) 72%, rgba(2, 7, 19, 0.99) 100%);
  border: 1.5px solid rgba(0, 225, 255, 0.48);
  box-shadow:
    inset 0 0 26px rgba(0, 195, 255, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

/* Pinpoint 10x19 LED-Matrix Display Window (Shines Through Matte Tado° Surface) */
.tado-led-matrix-screen {
  position: relative;
  background-color: rgba(2, 9, 24, 0.9);
  background-image: radial-gradient(rgba(0, 229, 255, 0.16) 1px, transparent 1px);
  background-size: 4px 4px;
  border: 1.2px solid rgba(0, 229, 255, 0.42);
  box-shadow:
    0 0 18px rgba(0, 215, 255, 0.22),
    inset 0 0 14px rgba(0, 195, 255, 0.18);
}

/* Cylindrical Curved Barrel Shading on VA02 Smart Radiator Valve */
.tado-trv-led-barrel {
  background-image:
    linear-gradient(
      90deg,
      rgba(0, 195, 255, 0.12) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0, 195, 255, 0.12) 100%
    ),
    radial-gradient(rgba(0, 229, 255, 0.16) 1px, transparent 1px);
  background-size: 100% 100%, 4px 4px;
}

/* ============================================================================
   PHASE 13.4: TUYA 2000W SMART TEMPERED GLASS CONVECTOR HEATER PANEL
   ============================================================================ */

.heater-tempered-glass-face {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(12, 34, 76, 0.94), rgba(3, 10, 25, 0.98));
  border: 1.6px solid rgba(0, 229, 255, 0.55);
  box-shadow:
    inset 0 0 0 3px rgba(5, 22, 54, 0.9),
    inset 0 1px 0 rgba(165, 243, 252, 0.38),
    inset 0 0 22px rgba(0, 195, 255, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.65);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.heater-tempered-glass-face.heater-glass-active {
  border-color: rgba(251, 146, 60, 0.72);
  box-shadow:
    inset 0 0 0 3px rgba(34, 14, 24, 0.85),
    inset 0 1px 0 rgba(253, 186, 116, 0.42),
    inset 0 0 28px rgba(249, 115, 22, 0.22),
    0 0 22px rgba(249, 115, 22, 0.25),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

.heater-tempered-glass-face.heater-led-dimmed .tado-led-matrix-screen {
  opacity: 0.48;
}

/* 4 Corner Glass Standoff Cap Screws on Tempered Convector Panel */
.heater-glass-standoff {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(6, 28, 66, 0.95);
  border: 1px solid rgba(103, 232, 249, 0.58);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.35);
  pointer-events: none;
  z-index: 5;
}

.heater-glass-standoff.pin-tl { top: 7px; left: 7px; }
.heater-glass-standoff.pin-tr { top: 7px; right: 7px; }
.heater-glass-standoff.pin-bl { bottom: 7px; left: 7px; }
.heater-glass-standoff.pin-br { bottom: 7px; right: 7px; }

/* Etched Glass Capacitive Touch Circle Ring Buttons (- / + / POWER) */
.heater-glass-touch-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1.6px solid rgba(0, 229, 255, 0.62);
  background: radial-gradient(circle, rgba(6, 26, 62, 0.92) 0%, rgba(2, 10, 26, 0.96) 100%);
  color: #e0f2fe;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 12px rgba(0, 215, 255, 0.28),
    inset 0 0 8px rgba(0, 215, 255, 0.2);
  transition: all 0.18s ease;
  cursor: pointer;
}

.heater-glass-touch-btn:hover {
  transform: scale(1.07);
  border-color: #67e8f9;
  color: #ffffff;
  box-shadow:
    0 0 16px rgba(0, 240, 255, 0.55),
    inset 0 0 10px rgba(0, 240, 255, 0.3);
}

.heater-glass-touch-btn:active {
  transform: scale(0.93);
}

.heater-glass-touch-btn.touch-power-on {
  border-color: #fb923c;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3) 0%, rgba(36, 10, 18, 0.94) 100%);
  color: #fed7aa;
  box-shadow:
    0 0 18px rgba(249, 115, 22, 0.68),
    inset 0 0 10px rgba(249, 115, 22, 0.36);
}

/* Dual Aluminum Floor Stand Feet beneath Tempered Glass Convector Panel */
.heater-floor-foot {
  width: 34px;
  height: 7px;
  border-radius: 0 0 6px 6px;
  background: rgba(5, 20, 50, 0.95);
  border: 1.3px solid rgba(0, 215, 255, 0.55);
  border-top: none;
  box-shadow: 0 4px 10px rgba(0, 195, 255, 0.2);
}

/* ============================================================================
   PHASE 13.5: SAMSUNG 75" UHD 4K SMART TV & ECOBUBBLE / ADDWASH WASHER-DRYER
   ============================================================================ */

.samsung-tv-bezel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(12, 38, 86, 0.94), rgba(3, 9, 24, 0.98));
  border: 1.8px solid rgba(0, 229, 255, 0.62);
  box-shadow:
    inset 0 0 0 2.5px rgba(5, 22, 54, 0.92),
    inset 0 1px 0 rgba(165, 243, 252, 0.4),
    inset 0 0 24px rgba(0, 195, 255, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.68);
}

.samsung-tv-bezel.tv-screen-off {
  border-color: rgba(0, 195, 255, 0.35);
  opacity: 0.9;
}

/* Dual V-Shape Blade Stand Feet beneath 75" Samsung TV */
.samsung-tv-stand-foot {
  width: 28px;
  height: 8px;
  background: rgba(5, 22, 54, 0.95);
  border: 1.4px solid rgba(0, 225, 255, 0.6);
  border-top: none;
  box-shadow: 0 4px 10px rgba(0, 195, 255, 0.22);
}

.samsung-tv-stand-foot.foot-left {
  border-radius: 0 0 4px 10px;
  transform: skewX(-18deg);
}

.samsung-tv-stand-foot.foot-right {
  border-radius: 0 0 10px 4px;
  transform: skewX(18deg);
}

/* Samsung EcoBubble / AddWash Front-Load Washer-Dryer Chassis */
.samsung-washer-chassis {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(10, 34, 78, 0.94), rgba(3, 10, 25, 0.98));
  border: 1.6px solid rgba(0, 229, 255, 0.52);
  box-shadow:
    inset 0 0 0 3px rgba(5, 22, 54, 0.9),
    inset 0 1px 0 rgba(165, 243, 252, 0.35),
    inset 0 0 22px rgba(0, 195, 255, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

@keyframes washerDrumSpin360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.washer-drum-spin {
  animation: washerDrumSpin360 3.2s linear infinite;
}

/* ============================================================================
   PHASE 13.6: HAIER hOn SMART APPLIANCES (HOOVER DISHWASHER & CANDY TUMBLE DRYER)
   ============================================================================ */

.hon-appliance-chassis {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(10, 36, 78, 0.94), rgba(3, 10, 25, 0.98));
  border: 1.6px solid rgba(45, 212, 191, 0.52);
  box-shadow:
    inset 0 0 0 3px rgba(5, 22, 54, 0.9),
    inset 0 1px 0 rgba(153, 246, 228, 0.35),
    inset 0 0 22px rgba(20, 184, 166, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

@keyframes dishwasherSprayPulse {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.dishwasher-spray-pulse {
  animation: dishwasherSprayPulse 1.4s ease-in-out infinite;
}

/* ============================================================================
   PHASE 13.7: SMARTLIFE SMART GLASS KETTLE (DMD123) & UK SMART ENERGY PLUG
   ============================================================================ */

.smartlife-hardware-chassis {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(12, 36, 80, 0.94), rgba(3, 10, 25, 0.98));
  border: 1.6px solid rgba(0, 229, 255, 0.52);
  box-shadow:
    inset 0 0 0 3px rgba(5, 22, 54, 0.9),
    inset 0 1px 0 rgba(165, 243, 252, 0.35),
    inset 0 0 22px rgba(0, 195, 255, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.65);
}

@keyframes kettleBubbleRiseAnim {
  0%, 100% {
    transform: translateY(0px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.kettle-bubble-rise {
  animation: kettleBubbleRiseAnim 1.2s ease-in-out infinite;
}

.smartlife-plug-well {
  background: transparent;
  border: none;
  padding: 0;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.25));
}

/* ============================================================================
   PHASE 13.8: uLAMP 33-IC RGBIC TV PERIMETER HALO BACKLIGHT
   ============================================================================ */

.ulamp-tv-halo-chassis {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 26, 70, 0.94), rgba(3, 9, 24, 0.98));
  border: 1.6px solid rgba(217, 70, 239, 0.55);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

@keyframes ulampIcPulseAnim {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.75));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(217, 70, 239, 0.95));
  }
}

.ulamp-ic-pulse {
  animation: ulampIcPulseAnim 2.2s ease-in-out infinite;
}

/* ============================================================================
   PHASE 13.9: AMAZON FIRE TV & GOOGLE CHROMECAST PHYSICAL REMOTE BODIES
   ============================================================================ */

.firetv-remote-chassis {
  position: relative;
  background:
    radial-gradient(circle at 50% 22%, rgba(16, 40, 88, 0.96), rgba(3, 10, 26, 0.99));
  border: 1.8px solid rgba(0, 229, 255, 0.58);
  box-shadow:
    inset 0 0 0 2.5px rgba(5, 22, 54, 0.92),
    inset 0 1px 0 rgba(165, 243, 252, 0.38),
    inset 0 0 22px rgba(0, 195, 255, 0.16),
    0 12px 26px rgba(0, 0, 0, 0.72);
}

.chromecast-remote-chassis {
  position: relative;
  background:
    radial-gradient(circle at 50% 25%, rgba(12, 42, 76, 0.96), rgba(3, 10, 26, 0.99));
  border: 1.8px solid rgba(45, 212, 191, 0.58);
  box-shadow:
    inset 0 0 0 2.5px rgba(5, 24, 52, 0.92),
    inset 0 1px 0 rgba(153, 246, 228, 0.38),
    inset 0 0 22px rgba(16, 185, 129, 0.16),
    0 12px 26px rgba(0, 0, 0, 0.72);
}

.remote-tactile-key {
  padding: 0.42rem 0.25rem;
  border-radius: 0.65rem;
  background: rgba(6, 22, 52, 0.9);
  border: 1px solid rgba(0, 215, 255, 0.32);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(165, 243, 252, 0.2);
  transition: all 0.14s ease;
  cursor: pointer;
}

.remote-tactile-key:hover {
  background: rgba(0, 195, 255, 0.24);
  border-color: rgba(103, 232, 249, 0.75);
  color: #ffffff;
}

.remote-tactile-key:active {
  transform: scale(0.92);
}

/* Fire TV & Proscenic Interactive D-Pad */
.dpad-container {
  width: 132px;
  height: 132px;
  border-radius: 9999px;
  background: radial-gradient(circle, #0b2149 0%, #040d24 100%);
  border: 1px solid rgba(0, 195, 255, 0.4);
  box-shadow:
    inset 0 0 14px rgba(0, 195, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.55);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 6px;
}

.dpad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bae6fd;
  border-radius: 0.5rem;
  transition: all 0.12s ease;
}

.dpad-btn:hover {
  color: #ffffff;
  background: rgba(0, 195, 255, 0.2);
}

.dpad-btn:active {
  transform: scale(0.9);
  background: rgba(0, 195, 255, 0.4);
}

.dpad-center-btn {
  border-radius: 9999px;
  background: linear-gradient(145deg, #0d2858, #061534);
  border: 1px solid rgba(0, 195, 255, 0.45);
  font-size: 0.65rem;
  font-weight: 700;
  color: #e0f2fe;
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.25);
}

.dpad-center-btn:hover {
  border-color: #00f0ff;
  color: #ffffff;
}

/* Custom Range Sliders */
input[type="range"].vista-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: rgba(0, 195, 255, 0.22);
  outline: none;
}

input[type="range"].vista-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #00e5ff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.85);
  cursor: pointer;
  transition: transform 0.12s ease;
}

input[type="range"].vista-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Modal Wizard (<dialog>) */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(2, 6, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog.wizard-dialog {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1.25rem;
  background: transparent;
  border: 0;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
}

dialog.wizard-dialog:not([open]) {
  display: none;
}

dialog.wizard-dialog[open] {
  display: flex;
}

/* Custom Sleek Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 195, 255, 0.28);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 225, 255, 0.55);
}

/* Ring Camera Scanline Animation */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(260px); }
}

.camera-scanline {
  position: absolute;
  inset-x: 0;
  height: 28px;
  background: linear-gradient(to bottom, transparent, rgba(0, 225, 255, 0.18), transparent);
  animation: scanline 4.5s linear infinite;
  pointer-events: none;
}

/* ============================================================================
   NEON-BLUE BLANK CANVAS CARD SLOTS ("READY TO ADD CARDS")
   ============================================================================ */

.blank-card-slot {
  position: relative;
  min-height: 240px;
  border-radius: 1rem;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgba(6, 20, 48, 0.65) 0%, rgba(3, 9, 24, 0.85) 100%);
  border: 1.5px dashed rgba(0, 225, 255, 0.5);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(0, 195, 255, 0.14),
    inset 0 0 22px rgba(0, 195, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.9rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.blank-card-slot:hover {
  transform: translateY(-3px);
  border-color: #00f0ff;
  background: linear-gradient(160deg, rgba(10, 34, 78, 0.78) 0%, rgba(4, 15, 38, 0.92) 100%);
  box-shadow:
    0 16px 36px -8px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 225, 255, 0.32),
    inset 0 0 24px rgba(0, 225, 255, 0.18);
}

.blank-slot-icon-ring {
  width: 54px;
  height: 54px;
  border-radius: 1rem;
  background: radial-gradient(circle, rgba(0, 225, 255, 0.24) 0%, rgba(4, 16, 42, 0.9) 100%);
  border: 1px solid rgba(0, 225, 255, 0.6);
  box-shadow:
    0 0 20px rgba(0, 225, 255, 0.35),
    inset 0 0 12px rgba(0, 225, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #67e8f9;
}

/* ============================================================================
   PHASE 13.10: RING VIDEO DOORBELL WIRED & PROSCENIC M9 LIDAR ROBOT VACUUM
   ============================================================================ */

.ring-hw-chassis,
.proscenic-hw-chassis {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: 1rem;
  background: linear-gradient(175deg, rgba(6, 20, 46, 0.92) 0%, rgba(2, 8, 22, 0.98) 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(125, 249, 255, 0.22),
    inset 0 0 18px rgba(0, 195, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.65);
}

.ring-hw-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.65rem;
  background: rgba(3, 10, 26, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.28);
}

.ring-hw-ir-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #38bdf8;
  box-shadow: 0 0 8px #00e5ff;
  flex-shrink: 0;
}

.ring-hw-ir-dot.ir-active {
  background: #f43f5e;
  box-shadow: 0 0 10px #fb7185;
}

.ring-hw-faceplate {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(8, 25, 56, 0.75) 0%, rgba(3, 11, 28, 0.92) 100%);
  border: 1px solid rgba(0, 229, 255, 0.34);
  box-shadow: inset 0 0 14px rgba(0, 225, 255, 0.08);
}

.ring-hw-halo-btn {
  position: relative;
  border-radius: 9999px;
  padding: 2px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.16) 0%, transparent 72%);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ring-hw-halo-btn:hover {
  transform: scale(1.05);
}

.ring-hw-halo-btn:active {
  transform: scale(0.96);
}

.ring-hw-halo-idle .ring-hw-halo-circle {
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.85));
}

.ring-hw-halo-live .ring-hw-halo-circle {
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.95));
}

.ring-hw-halo-alert .ring-hw-halo-circle {
  filter: drop-shadow(0 0 10px rgba(251, 113, 133, 0.95));
  animation: pulse 1.1s infinite;
}

.ring-hw-pill {
  padding: 0.38rem 0.55rem;
  border-radius: 0.6rem;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(3, 10, 25, 0.82);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ring-hw-pill:hover {
  border-color: rgba(0, 229, 255, 0.5);
  color: #e0f2fe;
}

.ring-hw-pill.active-cyan {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(34, 211, 238, 0.58);
  color: #cffafe;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.14);
}

.ring-hw-pill.active-emerald {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.58);
  color: #d1fae5;
}

.ring-hw-pill.active-sky {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.6);
  color: #e0f2fe;
}

.ring-hw-pill.active-amber {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fef3c7;
}

.ring-hw-pill.active-rose {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(251, 113, 133, 0.65);
  color: #ffe4e6;
}

.ring-hw-select-box {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.32rem 0.45rem;
  border-radius: 0.6rem;
  background: rgba(3, 10, 26, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.28);
}

.ring-hw-select-label {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(103, 232, 249, 0.78);
  font-weight: 700;
}

.ring-hw-select {
  width: 100%;
  background: rgba(6, 20, 46, 0.95);
  color: #ecfeff;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 0.4rem;
  padding: 0.2rem 0.3rem;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.ring-hw-select:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

.proscenic-hw-led-bar {
  padding: 0.5rem 0.6rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(5, 16, 38, 0.94) 0%, rgba(2, 8, 20, 0.98) 100%);
  border: 1px solid rgba(0, 229, 255, 0.32);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.proscenic-hw-hero-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.85rem;
  background: radial-gradient(circle at 28% 50%, rgba(0, 229, 255, 0.12) 0%, rgba(3, 10, 26, 0.88) 72%);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.proscenic-hw-robot-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.22));
}

@keyframes proscenicSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes proscenicSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.proscenic-spin-fast {
  animation: proscenicSpin 1.1s linear infinite;
}

.proscenic-spin-fast-rev {
  animation: proscenicSpinRev 1.1s linear infinite;
}

.proscenic-spin-slow {
  animation: proscenicSpin 2.4s linear infinite;
}

.proscenic-spin-slow-rev {
  animation: proscenicSpinRev 2.4s linear infinite;
}

.proscenic-spin-lidar {
  animation: proscenicSpin 1.8s linear infinite;
}

/* ============================================================================
   PHASE 13.11: 3D SMART APPLIANCES, 5-FACE VOLUMETRIC WIREFRAMES & HUD BILLBOARDS
   ============================================================================ */

.house-3d-scene.hide-3d-appliances .room-3d-appliances-layer {
  display: none !important;
}

.room-3d-appliances-layer,
.room-3d-furniture-layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 20;
}

.appliance-3d-anchor,
.furniture-3d-anchor,
.app3d-volume-box,
.app3d-face {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.appliance-3d-anchor {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(2px + var(--app-z-offset, 0px)));
  pointer-events: auto;
  cursor: pointer;
  z-index: 25;
}

.house-3d-scene.appliance-edit-active .appliance-3d-anchor {
  cursor: grab;
}

.house-3d-scene.appliance-edit-active .appliance-3d-anchor:active {
  cursor: grabbing;
}

.appliance-3d-anchor.app3d-hidden-preview .app3d-face,
.appliance-3d-anchor.app3d-hidden-preview .app3d-floor-halo {
  opacity: 0.42;
}

.app3d-floor-halo {
  position: absolute;
  width: calc(var(--app-w, 20px) + 18px);
  height: calc(var(--app-d, 20px) + 18px);
  transform: translate(-50%, -50%) translateZ(0.5px);
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.25) 0%, transparent 72%);
  pointer-events: auto;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.appliance-3d-anchor:hover .app3d-floor-halo,
.appliance-3d-anchor.app3d-selected .app3d-floor-halo {
  border: 1.5px dashed #00f0ff;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.52) 0%, rgba(0, 195, 255, 0.12) 72%);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.9);
  transform: translate(-50%, -50%) translateZ(1px) scale(1.18);
}

/* CRITICAL 3D RULE: Never apply filter, opacity < 1, or overflow != visible to .app3d-volume-box or .appliance-3d-anchor, as CSS Transforms L2 forces any filtered/translucent container to flatten its 3D children into 2D! */
.app3d-volume-box {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d !important;
  filter: none !important;
  pointer-events: auto;
}

.appliance-3d-anchor:hover .app3d-face,
.appliance-3d-anchor.app3d-selected .app3d-face {
  border-color: #00f5ff;
  box-shadow:
    0 0 14px rgba(0, 240, 255, 0.78),
    inset 0 0 10px rgba(0, 240, 255, 0.35);
}

.app3d-face {
  position: absolute;
  box-sizing: border-box;
  background: linear-gradient(160deg, rgba(4, 22, 54, 0.88), rgba(2, 10, 28, 0.92));
  border: 1.25px solid rgba(0, 215, 255, 0.78);
  box-shadow:
    0 0 8px rgba(0, 205, 255, 0.28),
    inset 0 0 8px rgba(0, 205, 255, 0.18);
  backface-visibility: visible;
  pointer-events: auto;
}

/* Top Face sits at Z = +H */
.app3d-face-top {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(var(--app-h, 24px));
}

/* Front (South) Face stands straight UP from bottom edge to Z = +H */
.app3d-face-front {
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--app-h, 24px);
  transform-origin: bottom center;
  transform: rotateX(-90deg);
}

/* Back (North) Face stands straight UP from top edge to Z = +H (Right-Side Up: y=0 at Z=+H, y=H at Z=0) */
.app3d-face-back {
  left: 0;
  bottom: 100%;
  width: 100%;
  height: var(--app-h, 24px);
  transform-origin: bottom center;
  transform: rotateX(-90deg);
}

/* Left (West) Face stands straight UP from left edge to Z = +H (width = --app-d depth, height = --app-h vertical height) */
.app3d-face-left {
  left: 0;
  bottom: 0;
  width: var(--app-d, 20px);
  height: var(--app-h, 24px);
  transform-origin: bottom left;
  transform: rotateZ(-90deg) rotateX(-90deg);
  background: linear-gradient(90deg, rgba(6, 30, 72, 0.94), rgba(3, 14, 36, 0.96));
}

/* Right (East) Face stands straight UP from right edge to Z = +H (width = --app-d depth, height = --app-h vertical height) */
.app3d-face-right {
  right: 0;
  bottom: 0;
  width: var(--app-d, 20px);
  height: var(--app-h, 24px);
  transform-origin: bottom right;
  transform: rotateZ(90deg) rotateX(-90deg);
  background: linear-gradient(270deg, rgba(6, 30, 72, 0.94), rgba(3, 14, 36, 0.96));
}

/* Live State Volumetric Color Palettes */
.app3d-state-running .app3d-face,
.app3d-state-charging .app3d-face {
  border-color: rgba(52, 211, 153, 0.92);
  background: linear-gradient(160deg, rgba(6, 48, 54, 0.9), rgba(3, 22, 34, 0.94));
  box-shadow:
    0 0 12px rgba(16, 185, 129, 0.55),
    inset 0 0 10px rgba(16, 185, 129, 0.28);
}

.app3d-state-running .app3d-floor-halo,
.app3d-state-charging .app3d-floor-halo {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.48) 0%, transparent 72%);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
}

.app3d-state-paused .app3d-face {
  border-color: rgba(251, 191, 36, 0.92);
  background: linear-gradient(160deg, rgba(58, 36, 8, 0.88), rgba(26, 16, 4, 0.92));
  box-shadow:
    0 0 12px rgba(245, 158, 11, 0.5),
    inset 0 0 8px rgba(245, 158, 11, 0.25);
}

.app3d-state-paused .app3d-floor-halo {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.42) 0%, transparent 72%);
}

.app3d-state-boiling .app3d-face,
.app3d-state-heating .app3d-face {
  border-color: rgba(251, 146, 60, 0.96);
  background: linear-gradient(160deg, rgba(68, 24, 10, 0.9), rgba(32, 10, 6, 0.94));
  box-shadow:
    0 0 15px rgba(249, 115, 22, 0.72),
    inset 0 0 10px rgba(249, 115, 22, 0.35);
}

.app3d-state-boiling .app3d-floor-halo,
.app3d-state-heating .app3d-floor-halo {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.58) 0%, rgba(245, 158, 11, 0.16) 55%, transparent 75%);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.65);
}

.app3d-state-tv-on .app3d-face,
.app3d-state-switch-on .app3d-face {
  border-color: #00f5ff;
  background: linear-gradient(160deg, rgba(6, 38, 78, 0.92), rgba(3, 18, 44, 0.95));
  box-shadow:
    0 0 14px rgba(0, 240, 255, 0.68),
    inset 0 0 10px rgba(0, 240, 255, 0.32);
}

.app3d-state-switch-on .app3d-floor-halo,
.app3d-state-tv-on .app3d-floor-halo {
  background: radial-gradient(circle, rgba(0, 240, 255, 0.52) 0%, rgba(0, 195, 255, 0.14) 55%, transparent 75%);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.55);
}

.app3d-state-alert .app3d-face {
  border-color: #fb7185;
  background: linear-gradient(160deg, rgba(76, 12, 30, 0.92), rgba(36, 6, 16, 0.95));
  box-shadow:
    0 0 16px rgba(244, 63, 94, 0.8),
    inset 0 0 10px rgba(244, 63, 94, 0.4);
}

.app3d-state-alert .app3d-floor-halo {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.62) 0%, transparent 74%);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.75);
}

.app3d-state-idle .app3d-face {
  border-color: rgba(0, 195, 255, 0.56);
  opacity: 0.88;
}

/* 3D Hardware Animations (Washer/Dryer Drum, Dishwasher Spray, Kettle Steam, Vacuum LiDAR) */
@keyframes spin-3d-drum {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes wave-3d-spray {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2.2px);
  }
}

@keyframes rise-3d-steam {
  0%, 100% {
    transform: translateY(0.5px);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes pulse-3d-lidar {
  0% {
    transform: scale(0.85);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.app3d-spinning-drum {
  animation: spin-3d-drum 1.35s linear infinite;
}

.app3d-water-wave {
  animation: wave-3d-spray 1.2s ease-in-out infinite;
}

.app3d-rising-steam {
  animation: rise-3d-steam 0.95s ease-in-out infinite;
}

.app3d-lidar-pulse {
  transform-origin: center;
  animation: pulse-3d-lidar 1.4s ease-out infinite;
}

/* Vertical 3D Leader Line connecting Appliance Top to Staggered Floating HUD Badge (Shown on Hover / Selected) */
.app3d-hud-leader {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: calc(var(--hud-z, 42px) - var(--app-h, 24px) - var(--app-z-offset, 0px));
  background: linear-gradient(to top, rgba(0, 229, 255, 0.25), rgba(0, 240, 255, 0.85));
  transform-origin: top center;
  transform: translate3d(-0.5px, 0px, calc(var(--app-h, 24px) + var(--app-z-offset, 0px))) rotateX(90deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.appliance-3d-anchor:hover .app3d-hud-leader,
.appliance-3d-anchor.app3d-selected .app3d-hud-leader {
  opacity: 1;
}

/* Counter-Rotated Floating 3D Live Status & Telemetry Billboard (Hidden until Hover or Selected) */
.app3d-hud-billboard {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  transform:
    translate(-50%, -50%)
    translateZ(var(--hud-z, 42px))
    rotateZ(calc(-1 * var(--scene-yaw, -28deg)))
    rotateX(calc(-1 * var(--scene-pitch, 62deg)));
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6.5px;
  border-radius: 9999px;
  background: rgba(2, 10, 26, 0.94);
  border: 1px solid rgba(0, 229, 255, 0.72);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 215, 255, 0.35);
  color: #f8fafc;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease, box-shadow 0.16s ease;
  will-change: transform, opacity;
}

.appliance-3d-anchor:hover .app3d-hud-billboard,
.appliance-3d-anchor.app3d-selected .app3d-hud-billboard {
  opacity: 1;
  pointer-events: auto;
  border-color: #00f5ff;
  background: rgba(5, 24, 58, 0.98);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.8);
  z-index: 40;
}

.app3d-hud-name {
  color: #e2e8f0;
  font-weight: 800;
}

.app3d-hud-metric {
  color: #67e8f9;
  font-weight: 800;
}

.app3d-quick-power-btn {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0.5px 3.5px;
  border-radius: 9999px;
  background: rgba(0, 229, 255, 0.28);
  border: 1px solid rgba(0, 240, 255, 0.8);
  color: #ffffff;
  font-size: 7.5px;
  cursor: pointer;
}

.appliance-3d-anchor:hover .app3d-quick-power-btn {
  display: inline-flex;
}

.app3d-quick-power-btn:hover {
  background: #00f0ff;
  color: #030816;
}

/* Highlight Pulse on Blueprint Card when Clicked from 3D Floorplan */
@keyframes pulse3DTargetCard {
  0%, 100% {
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.75), inset 0 0 18px rgba(0, 240, 255, 0.35);
    border-color: #00f5ff;
  }
  50% {
    box-shadow: 0 0 42px rgba(52, 211, 153, 0.95), inset 0 0 26px rgba(0, 240, 255, 0.55);
    border-color: #34d399;
  }
}

.card-3d-target-highlight {
  animation: pulse3DTargetCard 1.1s ease-in-out 3;
}

/* ============================================================================
   PHASE 13.11B: INTERACTIVE LINE-BY-LINE WALL DRAWING, DOORS, WINDOWS,
   OPEN WALLS, WATERTIGHT SHADED ROOM POLYGONS & 3D WALL EXTRUSION
   ============================================================================ */

/* Active CAD Drafting Canvas Outline */
.house-3d-scene.cad-draw-active .floor-layer {
  background:
    radial-gradient(circle, rgba(0, 229, 255, 0.22) 1px, transparent 1px),
    rgba(3, 12, 32, 0.72);
  background-size: 20px 20px;
  border: 1.5px solid rgba(0, 229, 255, 0.55);
  box-shadow:
    0 0 28px rgba(0, 215, 255, 0.22),
    inset 0 0 24px rgba(0, 195, 255, 0.14);
}

/* 3D Extruded Freeform Drawn Wall Plane (Stands straight UP from Z = +1.2px to Z = +122.8px so it never splits the Z=0 floor plane or Z=124 roof plane in Chromium's 3D BSP tree!) */
.cad-3d-wall-segment {
  position: absolute;
  left: 0;
  top: 0;
  height: 121.6px;
  transform-origin: 0 0;
  transform-style: flat;
  backface-visibility: visible;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 229, 255, 0.24) 0%,
    rgba(0, 180, 255, 0.11) 50%,
    rgba(103, 232, 249, 0.26) 100%
  );
  border-top: 1.6px solid rgba(0, 235, 255, 0.85);
  border-bottom: 2px solid #00f5ff;
  border-left: none;
  border-right: none;
  box-shadow:
    0 0 10px rgba(0, 225, 255, 0.24),
    inset 0 0 10px rgba(0, 225, 255, 0.14);
}

.cad-3d-wall-segment.cad-join-left-none {
  border-left: 1.5px solid rgba(0, 235, 255, 0.85);
}

.cad-3d-wall-segment.cad-join-right-none {
  border-right: 1.5px solid rgba(0, 235, 255, 0.85);
}

.house-3d-scene.hide-3d-walls .cad-3d-wall-segment {
  display: none !important;
}

/* Open Wall / Archway: Completely open in 3D (only shown in 2D Draw Mode so room is watertight without extra 3D lines) */
.cad-3d-wall-segment.cad-seg-open_wall {
  display: none !important;
}

/* Door Segment in 3D: Portal opening from floor (0px) to 86px with 38px overhead lintel */
.cad-3d-wall-segment.cad-seg-door {
  background: transparent;
  border-top: none;
  border-bottom: none;
  box-shadow: none;
}

.cad-3d-door-portal {
  position: absolute;
  left: 0;
  width: 100%;
  top: 0;
  height: 86px;
  border-left: 1.8px solid #00f5ff;
  border-right: 1.8px solid #00f5ff;
  border-bottom: 1.8px solid #67e8f9;
  background: rgba(2, 10, 26, 0.18);
}

.cad-3d-door-lintel {
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 215, 255, 0.20),
    rgba(103, 232, 249, 0.26)
  );
  border-bottom: 2px solid #00f5ff;
}

/* Window Segment in 3D: Full-width glazed window pane from 36px to 94px with seamless wall above & below */
.cad-3d-window-pane {
  position: absolute;
  left: 0;
  width: 100%;
  top: 36px;
  height: 58px;
  border: 1.8px solid #67e8f9;
  background:
    linear-gradient(
      135deg,
      rgba(103, 232, 249, 0.34) 0%,
      rgba(0, 210, 255, 0.14) 50%,
      rgba(103, 232, 249, 0.32) 100%
    );
  box-shadow:
    0 0 12px rgba(0, 240, 255, 0.45),
    inset 0 0 8px rgba(103, 232, 249, 0.3);
}

.cad-3d-window-mullion {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.4px;
  background: rgba(165, 243, 252, 0.85);
  transform: translateX(-50%);
}

/* Shaded Watertight Room Floating Vertical Billboard Badge (Hovers & Stands Upright in Room Centers) */
.cad-watertight-room-badge {
  position: absolute;
  transform-style: flat;
  backface-visibility: visible;
  transform:
    translate(-50%, -50%)
    translateZ(44px)
    rotateZ(calc(-1 * var(--scene-yaw, -28deg)))
    rotateX(calc(-1 * var(--scene-pitch, 60deg)));
  pointer-events: auto;
  cursor: pointer;
  z-index: 25;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cad-watertight-room-badge:hover {
  transform:
    translate(-50%, -50%)
    translateZ(48px)
    rotateZ(calc(-1 * var(--scene-yaw, -28deg)))
    rotateX(calc(-1 * var(--scene-pitch, 60deg)))
    scale(1.06);
}

/* Subtle 3D Vertical Laser Pedestal Pin from Room Center Floor (Z=0) up to Floating Room Badge (Z=44px) */
.cad-room-center-pin {
  position: absolute;
  width: 1.5px;
  height: 42px;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotateX(-90deg);
  background: linear-gradient(
    to top,
    rgba(0, 240, 255, 0.15) 0%,
    rgba(0, 240, 255, 0.85) 100%
  );
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.65);
  pointer-events: none;
  z-index: 20;
}

.house-3d-scene.cad-draw-active .cad-room-center-pin {
  display: none !important;
}

.house-3d-scene.cad-draw-active .cad-watertight-room-badge {
  transform: translate(-50%, -50%) translateZ(4px);
}

/* ============================================================================
   BOTTOM-CENTER FLOATING VOICE COMMAND & SPEECH TEACHING MIC BUTTON
   ============================================================================ */

.voice-mic-main-btn {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  background: radial-gradient(circle at 35% 30%, rgba(0, 240, 255, 0.38), rgba(3, 14, 38, 0.96) 72%);
  border: 2px solid #00f0ff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 0 22px rgba(0, 240, 255, 0.65),
    inset 0 0 12px rgba(0, 240, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.voice-mic-main-btn:hover {
  transform: scale(1.07);
  box-shadow:
    0 0 30px rgba(0, 245, 255, 0.9),
    inset 0 0 16px rgba(0, 245, 255, 0.45);
}

.voice-mic-main-btn:active {
  transform: scale(0.95);
}

.voice-mic-main-btn.voice-mic-listening {
  border-color: #34d399;
  background: radial-gradient(circle at 35% 30%, rgba(16, 185, 129, 0.55), rgba(3, 28, 24, 0.96) 72%);
  box-shadow:
    0 0 32px rgba(16, 185, 129, 0.95),
    inset 0 0 16px rgba(52, 211, 153, 0.5);
}

.voice-mic-main-btn.voice-mic-teach-ready {
  border-color: #fbbf24;
  box-shadow:
    0 0 26px rgba(245, 158, 11, 0.8),
    inset 0 0 14px rgba(251, 191, 36, 0.35);
}

.voice-mic-ring {
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(52, 211, 153, 0.8);
  opacity: 0;
  pointer-events: none;
}

@keyframes voiceMicSonar {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.voice-mic-listening .voice-mic-ring-1 {
  animation: voiceMicSonar 1.4s ease-out infinite;
}

.voice-mic-listening .voice-mic-ring-2 {
  animation: voiceMicSonar 1.4s ease-out 0.7s infinite;
}






