.explorer {
  width: min(94%, 1540px);
  margin: auto;
  padding-block: clamp(1.4rem, 3.2vw, 3.3rem) 2.5rem;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem 4rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 2.25rem);
}
.location {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
  color: var(--bronze);
  font: 600 .75rem/1.5 var(--sans);
  text-transform: uppercase;
  letter-spacing: .13em;
}
.location::before { content: ""; width: 2.4rem; height: 2px; background: var(--gold); }
.page-heading h1 { font-size: clamp(2.75rem, 4.9vw, 5.1rem); letter-spacing: -.045em; }
.intro { max-width: 29rem; color: var(--muted); line-height: 1.6; }
#explorer-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
#explorer-controls[aria-busy=true] :is(button, select, input) { opacity: .55; cursor: progress; }
#status { grid-column: 1 / -1; }
#status:empty { display: none; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(19rem, 26%, 25.5rem);
  grid-template-areas: "model controls" "model notes";
  grid-template-rows: auto 1fr;
  align-items: start;
}
.viewer { grid-area: model; min-width: 0; }
.camera-bar, .map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  flex-wrap: wrap;
}
.camera-bar { min-height: 4rem; border-top: 1px solid var(--line); padding: .55rem 0; }
.explorer button { border-radius: 0; }
.explorer button svg {
  display: block;
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.mode-group, .stage-picker, .camera-actions { display: flex; }
.camera-actions { align-items: center; gap: .9rem; }
.mode-group button, .reset, .expand {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  gap: .44rem;
  font: 600 .8125rem/1.4 var(--sans);
}
.mode-group button {
  background: transparent;
  border: 1px solid #c6beb1;
  color: var(--ink);
  padding: .45rem .9rem;
}
.mode-group button + button { margin-left: -1px; }
.mode-group button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: white; }
.mode-group button[aria-pressed=false]:hover, .stage-picker button:not(:disabled):hover { background: var(--cream); }
.reset, .expand { padding: .45rem .2rem; background: transparent; border: 0; color: var(--ink); }
.reset:hover, .expand:hover { color: var(--bronze); }
.scene-frame {
  position: relative;
  height: clamp(360px, 62svh, 820px);
  overflow: hidden;
  border: 1px solid #bfb8a9;
  background: #e4e4d8;
  isolation: isolate;
}
#scene {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(0deg, #24342954, #24342954), url("../construction/media/site-existing.webp") center / cover;
}
#scene[data-study=homes] {
  background: url("../assets/chagan-court-five-homes-960.webp") center / cover;
}
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#scene:focus-visible, #scene canvas:focus-visible { outline: 3px solid var(--gold); outline-offset: -4px; }
.zoom-controls, .walk-controls { position: absolute; bottom: .85rem; z-index: 3; }
.zoom-controls { right: .85rem; display: grid; gap: 1px; }
.walk-controls { left: .85rem; display: none; grid-template-columns: repeat(3, 42px); gap: 2px; }
.viewer:has([data-mode=walk][aria-pressed=true]) .walk-controls { display: grid; }
.zoom-controls button, .walk-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #9b978b;
  color: #292d25;
  background: rgb(255 253 248 / 95%);
}
.zoom-controls button:hover, .walk-controls button:hover { background: white; border-color: var(--ink); }
.zoom-controls button:focus-visible, .walk-controls button:focus-visible { position: relative; z-index: 1; }
.map-footer { padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.layers { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; padding: 0; margin: 0; border: 0; }
.layers label {
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  min-height: 38px;
  font: 600 .8125rem/1.5 var(--sans);
  cursor: pointer;
}
.layers input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--forest); }
.help { max-width: 25rem; font-size: .8125rem; }
.help summary { min-height: 38px; padding: .45rem 0; text-decoration: underline; text-underline-offset: .25em; }
.help p { color: var(--muted); margin: .4rem 0; }
.help strong { color: var(--ink); margin-inline-end: .25rem; }
#status:not(:empty), .notice { margin: .65rem 0 0; font-size: .875rem; color: var(--muted); }

.selectors, .stage-information {
  margin-left: clamp(1rem, 2.5vw, 2.5rem);
  padding-left: clamp(1rem, 2.3vw, 2.25rem);
  border-left: 1px solid var(--line);
  min-width: 0;
}
.selectors { grid-area: controls; display: grid; gap: .9rem; padding-block: .5rem 1.15rem; }
.home-lots { grid-column: 1 / -1; }
#home-views { display: flex; margin-top: .6rem; gap: .4rem; }
#home-views button { flex: 1; min-height: 38px; background: transparent; color: var(--ink); border: 1px solid var(--line); font: 600 .79rem/1.4 var(--sans); }
#home-views button[aria-pressed=true] { color: var(--forest); border-color: var(--forest); background: #e6ebe2; }
.view-location { position: absolute; top: .65rem; left: .65rem; z-index: 2; margin: 0; padding: .32rem .67rem; border: 1px solid #ffffff50; background: #16231bd9; color: #fff; font: 600 .78rem/1.5 var(--sans); pointer-events: none; }
.walk-controls button, .zoom-controls button { touch-action: none; user-select: none; -webkit-user-select: none; }
.lot-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-height: 1.65rem; }
#home-lot-label { font-size: .875rem; font-weight: 600; }
#home-lot-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
#home-lot-buttons button { min-height: 44px; padding: .3rem; border: 1px solid #b9b2a4; font: 600 .85rem/1 var(--sans); color: var(--ink); background: #fffdfa; }
#home-lot-buttons button:hover { background: var(--cream); }
#home-lot-buttons button[aria-pressed=true] { border-color: var(--forest); background: var(--forest); color: #fff; }
#read-notes, .back-to-map { display: none; }
#camera-tip { margin: .55rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.study-switch { grid-column: 1 / -1; }
.study-switch button { flex: 1; padding-inline: .55rem; white-space: nowrap; }
#features:empty { display: none; }
.layers [hidden], .explorer [hidden] { display: none !important; }
.original-house { display: block; width: fit-content; margin-top: .3rem; font-size: .84rem; }
.selectors label { display: block; margin: 0 0 .32rem; font-size: .875rem; font-weight: 600; }
.selectors select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .55rem 2rem .55rem .75rem;
  border: 1px solid #b9b2a4;
  border-radius: 0;
  background-color: #fffdfa;
  color: var(--ink);
  font: 400 .93rem/1.45 var(--sans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6' fill='none' stroke='%23433e34' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
}
.stage-picker select { flex: 1 1 auto; }
.stage-picker button {
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  padding: 0;
  min-height: 44px;
  border: 1px solid #b9b2a4;
  color: var(--ink);
  background: transparent;
}
.stage-picker button:first-child { border-right: 0; }
.stage-picker button:last-child { border-left: 0; }
.stage-picker button:disabled { opacity: .42; cursor: default; }
.stage-picker button svg { width: .9rem; height: .9rem; }
.stage-information { grid-area: notes; padding-block-start: 1.1rem; border-top: 1px solid var(--line); }
#stage-title { font-size: clamp(1.85rem, 2.5vw, 2.65rem); letter-spacing: -.035em; }
#stage-description, #detail-copy { font-size: .94rem; line-height: 1.65; margin: .65rem 0 0; }
#stage-description { color: var(--muted); }
#features { display: grid; margin-top: 1rem; }
#features > button {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: .72rem;
  text-align: left;
  min-height: 44px;
  padding: .55rem .3rem;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: 600 .875rem/1.45 var(--sans);
}
#features > button:last-child { border-bottom: 1px solid var(--line); }
#features > button:hover, #features > button[aria-pressed=true] { background: var(--cream); }
.feature-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: #233128;
  border: 1px solid #676e5d;
  background: var(--pin, #ebd5b0);
  font: 600 .8125rem/1 var(--sans);
}
.detail { margin-top: 1rem; border-left: 2px solid var(--gold); background: var(--cream); padding: 1rem; }
#detail-title { font-size: 1.5rem; letter-spacing: -.025em; }
#detail-copy { margin-top: .35rem; }
#house-dimensions { margin: .8rem 0 0; }
#house-dimensions div { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--line); }
#house-dimensions dt { color: var(--muted); font-size: .78rem; }
#house-dimensions dd { margin: 0; font-size: .82rem; font-weight: 600; white-space: nowrap; }
#source { margin: 1rem 0 .52rem; color: var(--muted); font-size: .8rem; line-height: 1.6; }
#stage-link { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; font-size: .84rem; line-height: 1.5; }
.model-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}
@media (max-width: 1090px) and (min-width: 901px) {
  .explorer { width: 96%; }
  .workspace { grid-template-columns: minmax(0, 1fr) 19rem; }
  .selectors, .stage-information { padding-left: 1rem; margin-left: 1rem; }
  .stage-picker button { flex-basis: 32px; }
}
@media (max-width: 900px) {
  .explorer { width: 92%; }
  .page-heading { display: block; }
  .intro { margin-top: .6rem; max-width: 44rem; }
  .workspace { display: flex; flex-direction: column; }
  .selectors, .stage-information { border-left: 0; margin-left: 0; padding-left: 0; }
  #read-notes, .back-to-map { display: inline-flex; align-items: center; min-height: 32px; font-size: .84rem; font-weight: 600; }
  .back-to-map { margin-top: .55rem; }
  .selectors { width: 100%; order: 0; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .75rem; padding: 0 0 1rem; }
  .viewer { order: 1; width: 100%; }
  .stage-information { order: 2; width: 100%; margin-top: 1rem; border: 0; padding: 0; }
  .scene-frame { height: clamp(300px, 53svh, 650px); }
  #features { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 1rem; }
  #features > button { border-bottom: 1px solid var(--line); border-top: 0; }
}
@media (max-width: 540px) {
  .explorer { width: 92%; padding-top: 1.1rem; }
  .page-heading { margin-bottom: .85rem; }
  .page-heading h1 { font-size: clamp(2.55rem, 10vw, 3.25rem); }
  .location { font-size: .7rem; margin-bottom: .25rem; }
  .intro { font-size: .90rem; line-height: 1.5; margin-top: .38rem; }
  .selectors { grid-template-columns: minmax(0, 1.35fr) minmax(0,.86fr); gap: .55rem; padding-bottom: .65rem; }
  .selectors label { font-size: .8rem; margin-bottom: .25rem; }
  .selectors select { font-size: 1rem; padding-left: .45rem; }
  .stage-picker button { display: none; }
  .camera-bar { min-height: 0; padding: .35rem 0; }
  .mode-group button { padding-inline: .62rem; }
  .reset, .expand { gap: .3rem; }
  .camera-actions { gap: .65rem; }
  .expand { width: 38px; }
  .expand-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .scene-frame { height: clamp(295px, 51svh, 480px); }
  .zoom-controls { right: .4rem; bottom: .4rem; }
  .walk-controls { left: .4rem; bottom: .4rem; }
  .map-footer { gap: 0 .55rem; }
  .layers { gap: .12rem .68rem; }
  .layers label, .help { font-size: .77rem; }
  .help { margin-left: auto; }
  .help[open] { width: 100%; max-width: none; margin-left: 0; }
  #features { grid-template-columns: 1fr; }
}
/* The entire workspace enters fullscreen, so stage selection stays within reach. */
.workspace:fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: max(.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
@media (min-width: 901px) {
  .workspace:fullscreen { align-items: stretch; grid-template-rows: auto minmax(0, 1fr); }
  .workspace:fullscreen .viewer { display: flex; flex-direction: column; min-height: 0; }
  .workspace:fullscreen .scene-frame { flex: 1 0 200px; height: auto; }
  .workspace:fullscreen .stage-information { overflow-y: auto; padding-right: .4rem; }
}
@media (max-width: 900px) {
  .workspace:fullscreen > *, .workspace:fullscreen .selectors, .workspace:fullscreen .stage-information { flex-shrink: 0; }
  .workspace:fullscreen .scene-frame { height: clamp(250px, 62dvh, 850px); }
}
@media print {
  .camera-bar, .zoom-controls, .walk-controls, .map-footer, .selectors, #status, .site-header { display: none; }
  .workspace { display: block; }
  .stage-information { display: block; padding: 0; border: 0; margin: 1rem 0; }
}
