@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", "Manrope", Arial, sans-serif;
  color: #253f36;
  background: #f2f0e9;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #ad8c54;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
.app {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100dvh;
  min-height: 700px;
}
.sidebar {
  background: #233c35;
  color: #f4f0e5;
  padding: 32px 28px 20px;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 1.7px;
  font-weight: 600;
}
.brand small {
  display: block;
  font-size: 7px;
  letter-spacing: 2.4px;
  margin-top: 7px;
  font-weight: 400;
  color: #b9c6bb;
}
.brand-symbol {
  font-family: Georgia, serif;
  font-size: 41px;
  letter-spacing: -8px;
  line-height: 1;
  border: 1px solid #8c9e85;
  padding: 3px 10px 7px 3px;
}
.brand-symbol span {
  font-size: 24px;
}
.project {
  margin: 40px 0 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 600;
}
.project .eyebrow {
  color: #b4c2b3;
}
h1 {
  font:
    400 42px/1.12 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -1.6px;
  margin: 16px 0;
}
p {
  line-height: 1.6;
}
.project p {
  font-size: 12px;
  color: #c0cbc1;
  margin: 0;
}
.residence {
  border-top: 1px solid #52655a;
  border-bottom: 1px solid #52655a;
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 13px;
}
.residence > span:first-child {
  font-size: 8px;
  letter-spacing: 1px;
}
.residence strong {
  font-size: 24px;
  font-weight: 400;
  white-space: nowrap;
}
.residence i {
  font-size: 11px;
  font-style: normal;
  color: #c2cabc;
}
.status {
  font-size: 8px;
  line-height: 1.5;
  background: #40564a;
  border: 1px solid #5c7161;
  border-radius: 3px;
  padding: 4px 5px;
  margin-left: auto;
}
.levels {
  margin: 22px -12px 20px;
  display: grid;
  gap: 4px;
}
.levels button {
  color: #e7eade;
  display: flex;
  text-align: left;
  gap: 16px;
  align-items: center;
  width: 100%;
  border-radius: 4px;
  padding: 13px 12px;
  transition: background 0.2s;
}
.levels button:hover {
  background: #364e42;
}
.levels button.active {
  background: #e6e7d9;
  color: #253e34;
}
.num {
  font-size: 18px;
  width: 24px;
  font-weight: 400;
}
.levels button > span:nth-child(2) {
  font-size: 12px;
}
.levels small {
  font-size: 9px;
  display: block;
  margin-top: 6px;
  opacity: 0.65;
}
.arrow {
  margin-left: auto;
  font-size: 18px;
  opacity: 0.7;
}
.levels .all {
  border-top: 1px solid #52655a;
  margin-top: 6px;
  border-radius: 0;
  padding-top: 18px;
}
.material {
  display: flex;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid #52655a;
  padding-top: 20px;
}
.material img {
  width: 64px;
  height: 78px;
  object-fit: cover;
  object-position: 50% 90%;
  border-radius: 3px;
}
.material .eyebrow {
  font-size: 7px;
  color: #c2cabc;
  letter-spacing: 1.3px;
}
.material strong {
  font:
    22px Georgia,
    serif;
  display: block;
  margin-top: 6px;
}
.material p {
  font-size: 9px;
  line-height: 1.7;
  color: #c2cabc;
  margin: 6px 0 0;
}
.sidebar-foot {
  font-size: 7px;
  letter-spacing: 1.7px;
  margin-top: 26px;
  opacity: 0.65;
}
.sidebar-foot span {
  display: block;
  margin-top: 7px;
  font-size: 6px;
}
.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #faf9f4 0%, #eeeae1 80%);
}
.stage-header {
  position: absolute;
  left: 38px;
  right: 32px;
  top: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}
.stage-header .eyebrow {
  color: #778075;
}
.stage-header h2 {
  font:
    32px Georgia,
    serif;
  margin: 10px 0 0;
  font-weight: 400;
}
.header-actions {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}
.header-actions button {
  border: 1px solid #d6d8cc;
  background: #f4f3edc9;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 11px;
}
.header-actions button:last-child {
  font-size: 19px;
  padding: 6px 12px;
}
#canvas-host {
  position: absolute;
  inset: 0;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: #f1eee5;
  z-index: 2;
}
#loading strong {
  font:
    24px Georgia,
    serif;
}
#loading small {
  font-size: 11px;
  opacity: 0.7;
}
.loader {
  height: 30px;
  width: 30px;
  border: 1px solid #b7c1ad;
  border-top-color: #294539;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.model-caption {
  position: absolute;
  bottom: 169px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 1.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  pointer-events: none;
}
.dot {
  width: 5px;
  height: 5px;
  background: #708365;
  border-radius: 50%;
}
.caption-rule {
  width: 25px;
  height: 1px;
  background: #a7ad9d;
}
.toolbar {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px;
  border: 1px solid #d9dacd;
  border-radius: 7px;
  background: #fffef8ed;
  box-shadow: 0 8px 32px #35472b0a;
  white-space: nowrap;
  font-size: 11px;
  max-width: calc(100% - 32px);
}
.toolbar button {
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 4px;
}
.view-buttons {
  display: flex;
  background: #eeeee5;
  border-radius: 4px;
  padding: 3px;
  gap: 2px;
}
.view-buttons .selected {
  background: #2c473b;
  color: #f6f4e9;
}
.divider {
  height: 22px;
  width: 1px;
  background: #d9dccf;
}
.toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.toolbar input {
  accent-color: #345341;
  width: 13px;
  height: 13px;
}
.toolbar [hidden] {
  display: none;
}
.stage-footer {
  position: absolute;
  bottom: 50px;
  left: 38px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: #758171;
  gap: 20px;
}
.stage-footer a {
  color: #2c483a;
  border-bottom: 1px solid #aeb6a4;
  padding: 5px 0;
  white-space: nowrap;
}
.note {
  position: absolute;
  bottom: 20px;
  left: 38px;
  right: 25px;
  font-size: 8px;
  color: #7c8377;
  line-height: 1.5;
}
dialog {
  max-width: 660px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 28px;
  background: #f7f5ed;
  color: #253f36;
  box-shadow: 0 20px 100px #13291d66;
}
dialog::backdrop {
  background: #1b3027aa;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font:
    28px Georgia,
    serif;
  margin: 10px 0 20px;
}
dialog img {
  display: block;
  max-width: 100%;
  max-height: 62dvh;
  margin: auto;
  object-fit: contain;
}
dialog p {
  font-size: 11px;
  color: #6b7669;
}
dialog .close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 26px;
}
@media (min-height: 950px) {
  .project {
    margin-top: 65px;
  }
  .levels {
    gap: 12px;
    margin-top: 30px;
  }
  .levels button {
    padding-top: 17px;
    padding-bottom: 17px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 250px 1fr;
  }
  .sidebar {
    padding: 26px 20px 18px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar button {
    padding: 8px 6px;
  }
  .toolbar #snapshot span,
  .toolbar #reset span {
    display: none;
  }
  .project h1 {
    font-size: 37px;
  }
  .residence {
    gap: 8px;
  }
  .stage-header {
    left: 25px;
    right: 20px;
  }
  .stage-header h2 {
    font-size: 27px;
  }
  .stage-footer {
    left: 25px;
    right: 20px;
  }
}
@media (max-width: 760px) {
  .app {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100dvh;
  }
  .sidebar {
    padding: 15px 16px 0;
    flex-shrink: 0;
  }
  .brand {
    font-size: 10px;
    gap: 10px;
  }
  .brand-symbol {
    font-size: 26px;
    letter-spacing: -5px;
    padding: 0 8px 4px 1px;
  }
  .brand-symbol span {
    font-size: 15px;
  }
  .brand small {
    font-size: 5px;
    margin-top: 4px;
  }
  .project {
    position: absolute;
    right: 18px;
    top: 18px;
    margin: 0;
    text-align: right;
  }
  .project h1 {
    font-size: 17px;
    letter-spacing: 0;
    margin: 4px 0;
  }
  .project h1 br {
    display: none;
  }
  .project .eyebrow {
    font-size: 6px;
  }
  .project p,
  .residence,
  .material,
  .sidebar-foot {
    display: none;
  }
  .levels {
    display: flex;
    margin: 16px -8px 0;
    gap: 2px;
    overflow-x: auto;
  }
  .levels button {
    min-width: 90px;
    width: auto;
    gap: 7px;
    padding: 10px 9px 12px;
    border-radius: 5px 5px 0 0;
    flex: 1;
  }
  .levels .num {
    font-size: 12px;
    width: auto;
  }
  .levels button > span:nth-child(2) {
    font-size: 9px;
    white-space: nowrap;
  }
  .levels small,
  .levels .arrow {
    display: none;
  }
  .levels .all {
    border-top: 0;
    margin: 0;
    padding-top: 10px;
    min-width: 116px;
  }
  .stage {
    flex: 1;
    min-height: 0;
  }
  .stage-header {
    top: 22px;
    left: 20px;
    right: 17px;
  }
  .stage-header .eyebrow {
    font-size: 7px;
  }
  .stage-header h2 {
    font-size: 24px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions button {
    font-size: 9px;
    padding: 9px 10px;
  }
  .toolbar {
    bottom: 95px;
    gap: 7px;
    font-size: 9px;
    padding: 7px 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: max-content;
    max-width: calc(100% - 24px);
  }
  .toolbar button {
    font-size: 10px;
  }
  .toolbar label {
    font-size: 9px;
  }
  .toolbar .divider {
    display: none;
  }
  .model-caption {
    bottom: 160px;
    font-size: 6px;
    gap: 6px;
    letter-spacing: 1px;
  }
  .stage-footer {
    bottom: 55px;
    left: 16px;
    right: 16px;
    font-size: 8px;
    gap: 12px;
  }
  .stage-footer > span {
    max-width: 200px;
    line-height: 1.6;
  }
  .note {
    left: 16px;
    bottom: 15px;
    font-size: 7px;
    right: 16px;
  }
  .stage-footer a {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader {
    animation: none;
  }
  * {
    scroll-behavior: auto;
  }
}

@media (max-width: 760px) {
  .app {
    height: auto;
    min-height: 100dvh;
  }
  .stage {
    min-height: 610px;
  }
  .levels {
    scrollbar-width: none;
  }
  .levels::-webkit-scrollbar {
    display: none;
  }
  .model-caption {
    bottom: 171px;
  }
}
.model-selector {
  display: flex;
  margin-top: 18px;
  padding: 4px;
  background: #152f27;
  border-radius: 5px;
  gap: 4px;
}
.model-selector button {
  color: #ced8ca;
  flex: 1;
  padding: 9px 5px;
  border-radius: 3px;
  font-size: 10px;
}
.model-selector button.selected {
  background: #e6e7d9;
  color: #263f34;
}
@media (max-width: 760px) {
  .model-selector {
    margin: 14px 0 0;
    width: 100%;
    padding: 3px;
  }
  .model-selector button {
    padding: 7px 5px;
    font-size: 10px;
  }
  .levels {
    margin-top: 6px;
  }
  .project {
    right: 20px;
  }
  .levels button {
    min-width: 0;
    gap: 5px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .levels .all {
    min-width: 0;
  }
  .levels button > span:nth-child(2) {
    font-size: 8px;
  }
  .levels button small {
    display: none;
  }
}
.app {
  grid-template-rows: minmax(0, 1fr);
}
.sidebar {
  min-height: 0;
  overflow-y: auto;
}
.stage {
  min-height: 0;
}
@media (max-width: 760px) {
  .sidebar {
    overflow: visible;
  }
  .stage {
    min-height: 610px;
  }
}
#tour-panel[hidden],
#tour-pad[hidden] {
  display: none;
}
#tour-panel {
  position: absolute;
  z-index: 4;
  top: 100px;
  left: 28px;
  width: 320px;
  padding: 16px;
  border: 1px solid #d8d7cb;
  border-radius: 9px;
  background: #faf9f2f2;
  box-shadow: 0 8px 30px #233c351a;
  backdrop-filter: blur(12px);
}
.tour-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tour-heading strong {
  font-size: 10px;
  letter-spacing: 1.3px;
}
#tour-exit {
  font-size: 25px;
  line-height: 1;
  padding: 0 3px;
}
.tour-selects {
  display: grid;
  grid-template-columns: 1fr 85px;
  gap: 10px;
  margin: 12px 0;
}
.tour-selects label span {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.tour-selects select {
  width: 100%;
  color: #253f36;
  font: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid #c7cbbd;
  border-radius: 4px;
  background: #fff;
}
#tour-spots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#tour-spots button {
  background: #e6e8dc;
  border-radius: 4px;
  padding: 7px 8px;
  font-size: 10px;
}
#tour-spots button[aria-pressed="true"] {
  background: #29463b;
  color: #fff;
}
#tour-help {
  font-size: 10px;
  line-height: 1.6;
  margin: 10px 0 6px;
}
#tour-location {
  font-size: 10px;
  color: #536747;
}
#tour-pad {
  position: absolute;
  z-index: 4;
  right: 28px;
  bottom: 174px;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 5px;
}
#tour-pad button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #faf9f2eb;
  border: 1px solid #bcc6b5;
  font-size: 23px;
  touch-action: none;
  user-select: none;
  box-shadow: 0 2px 6px #233c3512;
}
#tour-pad button:active {
  background: #29463b;
  color: #fff;
}
#tour-pad button:first-child {
  grid-column: 2;
}
#tour-pad button:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
#tour-pad button:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
#tour-pad button:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}
.walking #canvas-host canvas {
  cursor: grab;
  touch-action: none;
  outline: none;
}
.walking #canvas-host canvas:active {
  cursor: grabbing;
}
.walking .toolbar label,
.walking .toolbar .divider {
  display: none;
}
.walking .model-caption {
  display: none;
}
.walking .stage-footer > span {
  visibility: hidden;
}
@media (max-width: 760px) {
  #tour-panel {
    top: 79px;
    left: 14px;
    width: min(310px, calc(100% - 28px));
    padding: 12px;
  }
  #tour-pad {
    right: 16px;
    bottom: 150px;
  }
  .walking .toolbar {
    gap: 5px;
  }
  .walking .toolbar button {
    font-size: 10px;
    padding: 10px 8px;
  }
}
.tour-heading strong {
  flex: 1;
}
#tour-collapse {
  font-size: 20px;
  padding: 0 4px;
}
#tour-panel.tour-compact .tour-selects,
#tour-panel.tour-compact #tour-spots,
#tour-panel.tour-compact #tour-help {
  display: none;
}
#tour-panel.tour-compact #tour-location {
  display: block;
  margin-top: 8px;
}
.area-panel {
  position: absolute;
  z-index: 4;
  top: 100px;
  right: 28px;
  width: 245px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #d6dacd;
  background: #faf9f2f2;
  box-shadow: 0 6px 20px #233c3512;
  backdrop-filter: blur(10px);
}
.area-panel[hidden],
#area-current[hidden] {
  display: none;
}
.area-panel h3 {
  font-size: 10px;
  letter-spacing: 1.3px;
  margin: 0 0 12px;
}
.area-browser > label {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
#area-unit {
  width: 100%;
  font: inherit;
  font-size: 12px;
  color: #253f36;
  background: white;
  border: 1px solid #c7cbbd;
  border-radius: 4px;
  padding: 7px;
  margin-bottom: 9px;
}
#area-room-list {
  max-height: 174px;
  overflow: auto;
}
.area-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #e1e3d7;
  font-size: 10px;
  width: 100%;
  border-radius: 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.area-row:hover, .area-row:focus-visible {
  background: #e9eee1;
  outline: 1px solid #9fad95;
}
.area-printed-unit {
  margin: 0 0 7px;
  color: #536647;
  font-size: 10px;
  line-height: 1.5;
}
.area-printed-unit[hidden] { display: none; }
.area-row strong {
  white-space: nowrap;
  font-weight: 600;
}
#area-basis {
  font-size: 9px;
  line-height: 1.5;
  margin: 10px 0 0;
  color: #68735f;
}
.area-empty {
  font-size: 11px;
}
#room-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.room-area-label {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: 145px;
  padding: 6px 10px;
  background: #fbfaf2ed;
  border: 1px solid #9fad95;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 3px 12px #233c3520;
}
.room-area-label[hidden] {
  display: none;
}
.room-area-label span {
  display: block;
  font-size: 10px;
  line-height: 1.4;
}
.room-area-label small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #68735f;
  margin-bottom: 2px;
}
.room-area-label strong {
  display: block;
  font-size: 13px;
  margin-top: 2px;
  color: #233c35;
}
.room-area-label:after {
  content: "";
  position: absolute;
  height: 9px;
  width: 1px;
  background: #7b9171;
  top: 100%;
  left: 50%;
}
.walking .area-panel {
  width: 245px;
}
.walking .area-browser {
  display: none;
}
.walking .area-panel h3 {
  margin-bottom: 7px;
}
.walking .toolbar .area-control {
  display: flex;
}
#area-current {
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .area-panel {
    top: 80px;
    right: 14px;
    width: 210px;
    padding: 11px;
  }
  #area-room-list {
    max-height: 132px;
  }
  .room-area-label {
    max-width: 120px;
    padding: 5px 7px;
  }
  .room-area-label span {
    font-size: 9px;
  }
  .room-area-label strong {
    font-size: 11px;
  }
  .walking .area-panel {
    top: auto;
    bottom: 232px;
    left: 14px;
    right: auto;
    width: 210px;
  }
}
.area-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.area-heading h3 {
  margin: 0;
}
#area-collapse {
  font-size: 19px;
  padding: 0 3px;
  line-height: 1;
}
.area-compact #area-room-list {
  display: none;
}
.walking #area-collapse {
  display: none;
}
.area-proof {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 40px);
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid #bdc8b5;
  border-radius: 12px;
  color: #253f36;
  background: #fbfaf5;
  overflow: auto;
}
.area-proof::backdrop { background: #142c22aa; }
.area-proof h2 { margin: 6px 34px 10px 0; font-size: 26px; }
.area-proof p { font-size: 12px; line-height: 1.6; }
.area-proof canvas { display: block; width: auto; max-width: 100%; height: auto; margin: 14px auto; border: 1px solid #d3dacf; background: white; }
.area-proof-close { position: absolute; right: 16px; top: 10px; font-size: 28px; padding: 4px 8px; }
.area-proof-result { font-weight: 600; }
.area-proof-formula { padding: 12px; background: #e9eee1; overflow-wrap: anywhere; }
.area-proof summary { cursor: pointer; font-size: 13px; padding: 14px 0; }
.area-proof table { width: 100%; border-collapse: collapse; font-size: 11px; }
.area-proof td, .area-proof th { text-align: left; padding: 7px; border-bottom: 1px solid #d3dacf; }
.area-proof a { color: #27656c; font-size: 12px; text-decoration: underline; }
.area-proof-sources { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 22px; }
@media (max-width: 760px) {
  .area-proof { padding: 18px; }
  .area-proof h2 { font-size: 22px; }
  .area-proof table { font-size: 9px; }
}
