#house-tour-3d,
#house-tour-3d * {
  box-sizing: border-box;
}

#house-tour-3d {
  margin: 0;
  overflow: hidden;
  background: #f7f8f5;
  color: #1b302d;
  font-family: Arial, Helvetica, sans-serif;
  line-height: normal;
}

#house-tour-3d button,
#house-tour-3d a {
  -webkit-tap-highlight-color: transparent;
}

#house-tour-3d button {
  font: inherit;
  cursor: pointer;
}

#house-tour-3d button:focus-visible,
#house-tour-3d a:focus-visible {
  outline: 3px solid #d39643;
  outline-offset: 4px;
}

#house-tour-3d > header {
  height: 88px;
  padding: 0 38px;
  border-bottom: 1px solid #dce1da;
  display: flex;
  align-items: center;
  gap: 28px;
  background: #fff;
}

#house-tour-3d .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 21px;
}

#house-tour-3d .mark {
  font-size: 32px;
}

#house-tour-3d .download {
  margin-left: auto;
  background: #1b3730;
  border: 0;
  border-radius: 6px;
  color: #fff;
  padding: 13px 18px;
  font-size: 14px;
}

#house-tour-3d > main {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 640px;
  height: min(760px, calc(100vh - 100px));
}

#house-tour-3d aside {
  padding: 35px 30px 20px;
  background: #fff;
  overflow: auto;
  position: relative;
  z-index: 2;
}

#house-tour-3d .eyebrow,
#house-tour-3d .section-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #758579;
  font-weight: 700;
}

#house-tour-3d h1 {
  font-family: Georgia, serif;
  font-size: 47px;
  line-height: 1.04;
  font-weight: 400;
  margin: 18px 0;
  color: #1b302d;
}

#house-tour-3d .intro {
  font-size: 14px;
  line-height: 1.6;
  color: #66736c;
  margin: 0 0 30px;
}

#house-tour-3d .section-label {
  font-size: 10px;
  margin-bottom: 13px;
}

#house-tour-3d nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#house-tour-3d .room {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #53675d;
}

#house-tour-3d .room .num {
  font-size: 11px;
  color: #94a197;
}

#house-tour-3d .room .arrow {
  margin-left: auto;
}

#house-tour-3d .room.active {
  background: #eaf0e8;
  border-color: #dce6d9;
  color: #223e30;
}

#house-tour-3d .room:hover {
  background: #f1f4ee;
}

#house-tour-3d .reference {
  margin-top: 24px;
}

#house-tour-3d .reference button {
  padding: 0;
  border: 0;
  width: 100%;
  height: 135px;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: #e9eee7;
}

#house-tour-3d .reference img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#house-tour-3d .reference span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: left;
  color: #fff;
  background: linear-gradient(transparent, #000a);
  font-size: 12px;
  padding: 20px 12px 10px;
}

#house-tour-3d .viewer {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: #e9eee7;
}

#house-tour-3d #canvas-wrap {
  position: absolute;
  inset: 0;
}

#house-tour-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#house-tour-3d .view-top {
  position: absolute;
  top: 25px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

#house-tour-3d .view-top > * {
  pointer-events: auto;
}

#house-tour-3d .segmented {
  display: flex;
  background: #ffffffdc;
  padding: 5px;
  border: 1px solid #dfe5dd;
  border-radius: 8px;
  box-shadow: 0 4px 12px #263a2810;
}

#house-tour-3d .segmented button {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 14px;
  color: #6a796d;
}

#house-tour-3d .segmented button.active {
  color: #fff;
  background: #2b483a;
}

#house-tour-3d .square {
  border: 1px solid #dfe5dd;
  border-radius: 6px;
  background: #fff;
  width: 40px;
  height: 40px;
  font-size: 24px;
}

#house-tour-3d .scene-caption {
  position: absolute;
  top: 100px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

#house-tour-3d #view-label {
  font-family: Georgia, serif;
  font-size: 25px;
}

#house-tour-3d #mode-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #748171;
}

#house-tour-3d #labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#house-tour-3d .pin {
  position: absolute;
  pointer-events: auto;
  border: 1px solid #ffffff80;
  background: #fffffff0;
  color: #304b38;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  box-shadow: 0 3px 12px #22332215;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

#house-tour-3d .view-bottom {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 15px;
}

#house-tour-3d .hint {
  font-size: 12px;
  color: #64765f;
  background: #ffffffe0;
  border-radius: 5px;
  padding: 12px 14px;
}

#house-tour-3d .zoom {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px #0001;
}

#house-tour-3d .zoom button {
  background: #fff;
  border: 0;
  width: 40px;
  height: 38px;
  font-size: 22px;
}

#house-tour-3d .zoom button + button {
  border-top: 1px solid #eee;
}

#house-tour-3d .walk-controls {
  position: absolute;
  bottom: 100px;
  right: 25px;
  text-align: center;
}

#house-tour-3d .walk-controls button {
  width: 44px;
  height: 44px;
  margin: 2px;
  border: 1px solid #bac7ba;
  border-radius: 8px;
  background: #ffffffdf;
  font-size: 23px;
  touch-action: none;
}

#house-tour-3d #error {
  position: absolute;
  inset: 30%;
  background: #fff;
  padding: 20px;
  line-height: 1.6;
}

#house-tour-3d [hidden] {
  display: none !important;
}

#house-tour-3d #reference-dialog {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
}

#house-tour-3d #reference-dialog::backdrop {
  background: #11251bc9;
}

#house-tour-3d #reference-dialog img {
  display: block;
  max-width: 80vw;
  max-height: 80vh;
}

#house-tour-3d #reference-dialog button {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  width: 38px;
  height: 38px;
  font-size: 26px;
}

@media (max-width: 900px) {
  #house-tour-3d > header {
    height: 68px;
    padding: 0 20px;
  }

  #house-tour-3d > main {
    grid-template-columns: 240px minmax(0, 1fr);
    height: min(680px, calc(100vh - 80px));
  }

  #house-tour-3d aside {
    padding: 24px 20px;
  }

  #house-tour-3d h1 {
    font-size: 40px;
  }

  #house-tour-3d .segmented button {
    padding: 9px 12px;
  }

  #house-tour-3d .view-top {
    left: 16px;
    right: 16px;
  }
}

@media (max-width: 640px) {
  #house-tour-3d > header {
    height: 64px;
  }

  #house-tour-3d .brand {
    font-size: 18px;
  }

  #house-tour-3d > main {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
    min-height: 0;
  }

  #house-tour-3d .viewer {
    height: 65vh;
    min-height: 410px;
  }

  #house-tour-3d aside {
    padding: 22px 20px;
  }

  #house-tour-3d .eyebrow,
  #house-tour-3d h1,
  #house-tour-3d .intro,
  #house-tour-3d .reference,
  #house-tour-3d .section-label {
    display: none;
  }

  #house-tour-3d nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  #house-tour-3d .room {
    padding: 12px 8px;
    font-size: 13px;
  }

  #house-tour-3d .room:first-child {
    grid-column: 1 / -1;
  }

  #house-tour-3d .scene-caption {
    top: 87px;
    left: 20px;
  }

  #house-tour-3d #view-label {
    font-size: 22px;
  }

  #house-tour-3d .view-top {
    top: 16px;
  }

  #house-tour-3d .view-bottom {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }

  #house-tour-3d .hint {
    max-width: 250px;
    font-size: 11px;
    line-height: 1.5;
  }

  #house-tour-3d .pin {
    font-size: 10px;
    padding: 6px 8px;
  }

  #house-tour-3d .walk-controls {
    right: 16px;
  }

  #house-tour-3d .download {
    font-size: 12px;
    padding: 11px;
  }
}