.hln-house-visual {
  position: relative;
}

.hln-3d-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,253,246,.98), rgba(246,242,232,.82) 42%, rgba(226,232,219,.84) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease;
}

.hln-house-visual-3d-ready > .hln-3d-stage {
  opacity: 1;
  pointer-events: auto;
}

.hln-house-visual-3d-ready > svg {
  opacity: 0;
  pointer-events: none;
}

.hln-house-visual-3d-ready > .hln-hotspot,
.hln-house-visual-3d-ready > .hln-zone {
  z-index: 6;
}

.hln-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.hln-3d-canvas:active {
  cursor: grabbing;
}

.hln-3d-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #66706a;
  font-size: 12px;
  letter-spacing: .01em;
  background: linear-gradient(180deg, rgba(249,248,244,.86), rgba(243,241,235,.78));
}

.hln-3d-stage.is-ready .hln-3d-loading {
  display: none;
}

.hln-3d-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(65,105,122,.16);
  border-top-color: #41697a;
  border-radius: 50%;
  animation: hln3dSpin .8s linear infinite;
}

@keyframes hln3dSpin {
  to { transform: rotate(360deg); }
}

.hln-3d-toolbar {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 7;
  display: flex;
  gap: 6px;
}

.hln-3d-toolbar button {
  min-height: 36px;
  border: 1px solid rgba(28,36,33,.10);
  border-radius: 999px;
  padding: 7px 11px;
  color: #56615b;
  background: rgba(251,250,246,.86);
  box-shadow: 0 5px 18px rgba(28,34,31,.06);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.hln-3d-toolbar button:hover,
.hln-3d-toolbar button.is-active {
  color: #315b4a;
  border-color: rgba(63,116,92,.26);
  background: rgba(223,233,226,.92);
}

.hln-3d-hint {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 7;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  border-radius: 999px;
  color: #737b76;
  background: rgba(251,250,246,.78);
  border: 1px solid rgba(28,36,33,.08);
  backdrop-filter: blur(10px);
  font-size: 10px;
  pointer-events: none;
}

.hln-3d-fallback-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  max-width: 220px;
  padding: 10px 12px;
  border: 1px solid rgba(28,36,33,.09);
  border-radius: 12px;
  background: rgba(251,250,246,.92);
  color: #66706a;
  box-shadow: 0 6px 18px rgba(28,34,31,.05);
}

.hln-3d-fallback-note span,
.hln-3d-fallback-note small {
  display: block;
}

.hln-3d-fallback-note span {
  color: #2f3834;
  font-size: 11px;
  font-weight: 650;
}

.hln-3d-fallback-note small {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
}

.hln-house-visual-home.hln-house-visual-3d-ready .hln-hotspot {
  background: rgba(251,250,246,.90);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px rgba(28,34,31,.08);
}

.hln-house-visual-renovation.hln-house-visual-3d-ready .hln-zone {
  background: rgba(251,250,246,.91);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px rgba(28,34,31,.08);
}

.hln-3d-stage[data-hln-3d-selected="wall"]::after,
.hln-3d-stage[data-hln-3d-selected="roof"]::after,
.hln-3d-stage[data-hln-3d-selected="windows"]::after,
.hln-3d-stage[data-hln-3d-selected="floor"]::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(63,116,92,.14);
  pointer-events: none;
}

@media (max-width: 760px) {
  .hln-3d-toolbar {
    top: 10px;
    right: 10px;
  }

  .hln-3d-toolbar button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .hln-3d-hint {
    bottom: 9px;
    font-size: 9px;
  }

  .hln-house-visual-3d-ready > .hln-hotspot,
  .hln-house-visual-3d-ready > .hln-zone {
    z-index: 7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hln-3d-stage,
  .hln-3d-spinner {
    transition: none !important;
    animation: none !important;
  }
}

.hln-house-visual-3d-ready > .hln-3d-stage::before {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 28%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(90,110,82,.10), rgba(90,110,82,0) 68%);
  filter: blur(10px);
}

.hln-3d-stage.is-ready .hln-3d-canvas {
  filter: saturate(.96) contrast(1.015);
}

.hln-3d-hotspots {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.hln-3d-hotspot {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #274a3c;
  transition: opacity .18s ease;
}

.hln-3d-hotspot-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(251,250,246,.96);
  border: 2px solid rgba(63,116,92,.88);
  box-shadow:
    0 0 0 5px rgba(251,250,246,.70),
    0 3px 12px rgba(25,35,30,.20);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.hln-3d-hotspot-label {
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%) translateY(-2px);
  width: max-content;
  max-width: 112px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(28,36,33,.10);
  background: rgba(251,250,246,.92);
  color: #45514b;
  box-shadow: 0 6px 18px rgba(28,34,31,.08);
  backdrop-filter: blur(10px);
  font-size: 10px;
  line-height: 1.1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.hln-3d-hotspot:focus-visible {
  outline: 2px solid rgba(65,105,122,.62);
  outline-offset: 2px;
}

.hln-3d-hotspot:focus-visible .hln-3d-hotspot-label,
.hln-3d-hotspot.is-selected .hln-3d-hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

.hln-3d-hotspot.is-selected .hln-3d-hotspot-dot {
  transform: scale(1.18);
  background: #3f745c;
  border-color: #f7f5ef;
}

.hln-3d-hotspot.is-contextual {
  opacity: .58;
}

.hln-3d-stage.is-interacting .hln-3d-hotspot-label {
  opacity: 0;
}

.hln-3d-stage.is-beauty .hln-3d-hint {
  opacity: .82;
}

@media (hover: hover) and (pointer: fine) {
  .hln-3d-hotspot:hover .hln-3d-hotspot-label {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
  }

  .hln-3d-hotspot:hover .hln-3d-hotspot-dot {
    transform: scale(1.16);
  }
}

@media (max-width: 760px) {
  .hln-3d-hotspot-label {
    font-size: 9px;
    max-width: 96px;
  }

  .hln-3d-hotspot-dot {
    width: 10px;
    height: 10px;
    box-shadow:
      0 0 0 4px rgba(251,250,246,.72),
      0 3px 10px rgba(25,35,30,.18);
  }
}

.hln-3d-variant-switcher {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 8;
  display: flex;
  gap: 6px;
  max-width: calc(100% - 170px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.hln-3d-variant-switcher::-webkit-scrollbar {
  display: none;
}

.hln-3d-variant-switcher[hidden] {
  display: none;
}

.hln-3d-variant-switcher button,
.hln-3d-variant-switcher a {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(28,36,33,.10);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(251,250,246,.88);
  color: #5e6862;
  box-shadow: 0 5px 18px rgba(28,34,31,.06);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.hln-3d-variant-switcher button,
.hln-3d-variant-switcher a.is-active {
  color: #315b4a;
  background: rgba(223,233,226,.94);
  border-color: rgba(63,116,92,.30);
}

@media (max-width: 760px) {
  .hln-3d-variant-switcher {
    left: 10px;
    top: 10px;
    max-width: calc(100% - 154px);
  }

  .hln-3d-variant-switcher button,
.hln-3d-variant-switcher a {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 9px;
  }
}

/* The 3D house is the primary object, not an illustration trapped inside a card. */
.hln-house-board-3d-ready {
  overflow: visible;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hln-house-board-3d-ready .hln-board-label {
  border-bottom: 0 !important;
  padding-left: 4px;
  padding-right: 4px;
  background: transparent;
}

.hln-house-board-3d-ready .hln-board-foot {
  border-top-color: transparent;
  background: transparent;
  padding-left: 4px;
  padding-right: 4px;
}

.hln-house-board-3d-ready .hln-house-visual {
  min-height: 500px;
  padding: 0;
  overflow: visible;
}

.hln-house-board-3d-ready .hln-3d-stage {
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 64%, rgba(210,207,197,.18), rgba(247,245,239,0) 48%),
    transparent;
}

@media (max-width: 980px) {
  .hln-house-board-3d-ready .hln-house-visual {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .hln-house-board-3d-ready {
    margin-left: -14px;
    margin-right: -14px;
  }

  .hln-house-board-3d-ready .hln-board-label,
  .hln-house-board-3d-ready .hln-board-foot {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hln-house-board-3d-ready .hln-house-visual {
    min-height: 410px;
  }
}

@media (max-width: 520px) {
  .hln-house-board-3d-ready .hln-house-visual {
    min-height: 390px;
  }
}


/* Final House semantic authoring mode (?author3d=1) */
.hln-3d-stage.is-authoring .hln-3d-hint {
  opacity: 0;
  pointer-events: none;
}

.hln-3d-hotspot.is-authoring {
  touch-action: none;
  cursor: grab;
}

.hln-3d-hotspot.is-authoring:active {
  cursor: grabbing;
}

.hln-3d-author-panel {
  position: absolute;
  right: 14px;
  top: 64px;
  z-index: 12;
  width: min(324px, calc(100% - 28px));
  max-height: calc(100% - 78px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(35, 48, 42, .12);
  border-radius: 18px;
  background: rgba(250, 249, 245, .94);
  box-shadow: 0 18px 54px rgba(24, 34, 29, .14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #26332d;
}

.hln-3d-author-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.hln-3d-author-panel > header div {
  display: grid;
  gap: 2px;
}

.hln-3d-author-panel > header strong {
  font-size: 13px;
  line-height: 1.2;
}

.hln-3d-author-panel > header small,
.hln-3d-author-panel > header > span,
.hln-3d-author-panel > p {
  font-size: 9px;
  line-height: 1.35;
  color: #6b756f;
}

.hln-3d-author-panel > header > span {
  max-width: 112px;
  text-align: right;
}

.hln-3d-author-parts {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.hln-3d-author-parts::-webkit-scrollbar {
  display: none;
}

.hln-3d-author-parts button,
.hln-3d-author-actions button {
  border: 1px solid rgba(38, 51, 45, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #45514b;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 10px;
  cursor: pointer;
}

.hln-3d-author-parts button.is-active {
  background: #315d49;
  color: #fff;
  border-color: #315d49;
}

.hln-3d-author-controls {
  display: grid;
  gap: 8px;
}

.hln-3d-author-controls section {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .56);
  border: 1px solid rgba(38, 51, 45, .07);
}

.hln-3d-author-controls h4 {
  margin: 0 0 2px;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #66716b;
}

.hln-3d-author-controls label {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 8px;
}

.hln-3d-author-controls label > span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 9px;
  color: #505c56;
}

.hln-3d-author-controls output {
  font-variant-numeric: tabular-nums;
  color: #26332d;
}

.hln-3d-author-controls input[type="range"] {
  width: 100%;
  accent-color: #315d49;
}

.hln-3d-author-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.hln-3d-author-panel > p {
  margin: 8px 2px 0;
}

@media (max-width: 760px) {
  .hln-3d-author-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    max-height: 49%;
    border-radius: 16px;
  }

  .hln-3d-author-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .hln-3d-author-controls label {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .hln-3d-author-controls section {
    padding: 7px;
  }
}


/* Mobile authoring: keep the house visible; expand controls only on demand. */
.hln-3d-author-toggle {
  border: 1px solid rgba(38, 51, 45, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #45514b;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.hln-3d-author-status {
  display: block;
  margin: -4px 0 8px;
  font-size: 9px;
  line-height: 1.3;
  color: #6b756f;
}

@media (max-width: 760px) {
  .hln-house-visual.is-authoring-3d {
    min-height: min(68vh, 620px) !important;
  }

  .hln-3d-stage.is-authoring .hln-3d-toolbar {
    top: 8px;
    right: 8px;
  }

  .hln-3d-author-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    max-height: 48%;
    padding: 10px;
    border-radius: 16px;
    transition: max-height .18s ease, padding .18s ease, background .18s ease;
  }

  .hln-3d-author-panel > header {
    align-items: center;
    margin-bottom: 6px;
  }

  .hln-3d-author-panel > header > span {
    display: none;
  }

  .hln-3d-author-status {
    margin: 0 2px 7px;
  }

  .hln-3d-author-panel.is-collapsed {
    max-height: 112px;
    overflow: hidden;
    background: rgba(250,249,245,.90);
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-author-status,
  .hln-3d-author-panel.is-collapsed .hln-3d-author-controls,
  .hln-3d-author-panel.is-collapsed .hln-3d-author-actions,
  .hln-3d-author-panel.is-collapsed > p {
    display: none;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-author-parts {
    padding-bottom: 0;
  }

  .hln-3d-author-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hln-3d-author-controls section {
    padding: 8px;
  }

  .hln-3d-author-controls label {
    grid-template-columns: 58px 1fr;
    gap: 8px;
  }
}


.hln-3d-mesh-inspector {
  display: grid;
  gap: 7px;
  margin: 0 0 9px;
  padding: 9px;
  border: 1px solid rgba(38,51,45,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.58);
}

.hln-3d-mesh-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hln-3d-mesh-inspector-head strong {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #59645e;
}

.hln-3d-mesh-inspector-head button,
.hln-3d-mesh-buttons button {
  border: 1px solid rgba(38,51,45,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #3f4d46;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  padding: 7px 9px;
  cursor: pointer;
}

.hln-3d-mesh-buttons {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.hln-3d-mesh-buttons::-webkit-scrollbar {
  display: none;
}

.hln-3d-mesh-buttons button {
  min-width: 42px;
  font-weight: 700;
}

.hln-3d-mesh-buttons button.is-off {
  opacity: .45;
  text-decoration: line-through;
  background: rgba(235,232,226,.72);
}

.hln-3d-mesh-inspector small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6c756f;
  font-size: 9px;
  line-height: 1.3;
}

@media (max-width: 760px) {
  .hln-3d-author-panel.is-collapsed {
    max-height: 156px;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-author-parts {
    display: none;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-mesh-inspector {
    margin-bottom: 0;
  }
}


.hln-3d-layer-inspector {
  display: grid;
  gap: 7px;
  margin: 0 0 9px;
  padding: 9px;
  border: 1px solid rgba(38,51,45,.08);
  border-radius: 13px;
  background: rgba(246,249,246,.72);
}

.hln-3d-layer-inspector small {
  color: #6c756f;
  font-size: 9px;
  line-height: 1.3;
}

.hln-3d-layer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hln-3d-layer-buttons button,
.hln-3d-layer-inspector [data-author-layer-all-off] {
  border: 1px solid rgba(38,51,45,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.80);
  color: #3f4d46;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
}

.hln-3d-layer-buttons button.is-on {
  color: #fff;
  background: #315d49;
  border-color: #315d49;
  box-shadow: 0 5px 14px rgba(49,93,73,.18);
}

@media (max-width: 760px) {
  .hln-3d-author-panel.is-collapsed {
    max-height: 150px;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-mesh-inspector {
    display: none;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-layer-inspector {
    margin-bottom: 0;
    padding: 7px 8px;
  }

  .hln-3d-author-panel.is-collapsed .hln-3d-layer-inspector small {
    display: none;
  }
}


.hln-3d-compass {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 7;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(31,45,38,.10);
  border-radius: 50%;
  background: rgba(251,250,246,.82);
  box-shadow: 0 7px 22px rgba(27,37,32,.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  color: #5c6962;
  font-size: 8px;
  font-style: normal;
}

.hln-3d-compass b,
.hln-3d-compass span,
.hln-3d-compass i,
.hln-3d-compass em {
  position: absolute;
  font-style: normal;
  font-weight: 800;
}

.hln-3d-compass b { left: 50%; top: 4px; transform: translateX(-50%); color: #315d49; }
.hln-3d-compass i { left: 50%; bottom: 4px; transform: translateX(-50%); }
.hln-3d-compass span { right: 5px; top: 50%; transform: translateY(-50%); }
.hln-3d-compass em { left: 5px; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .hln-3d-compass {
    left: 10px;
    bottom: 10px;
    width: 48px;
    height: 48px;
  }

  .hln-3d-stage.is-authoring .hln-3d-compass {
    bottom: 164px;
  }
}


/* In the product the house is visual feedback, not a CAD toolbar. */
.hln-3d-stage:not(.is-authoring) [data-hln-3d-explode] {
  display: none;
}
