/* Scroll-built house. Original drawing. Motion is transform and opacity only. */
.scroll-house {
  --sh-top: 3.5rem;
  background: #0c0c0c;
  color: #f2f2ee;
  position: relative;
}
.scroll-house-track {
  height: auto;
}
.scroll-house.is-enhanced .scroll-house-track {
  height: 230svh;
}
.scroll-house.is-flow .scroll-house-track {
  height: auto;
}
.scroll-house-sticky {
  position: relative;
  top: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: 2.35rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  gap: 0.4rem;
  z-index: 1;
}
.scroll-house.is-enhanced .scroll-house-sticky {
  position: sticky;
  top: var(--sh-top);
  height: calc(100svh - var(--sh-top));
}
.scroll-house.is-flow .scroll-house-sticky {
  position: relative;
  top: auto;
  height: auto;
}
@media (min-width: 800px) {
  .scroll-house.is-enhanced .scroll-house-track { height: 250svh; }
}
@media (min-width: 1280px) {
  .scroll-house { --sh-top: 3rem; }
}
.sh-top {
  width: min(960px, 100%);
  text-align: center;
}
.sh-kicker {
  margin: 0;
  color: #4ade80;
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sh-title {
  margin: 0.1rem 0 0;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}
.sh-dek {
  margin: 0.2rem auto 0;
  max-width: 38rem;
  color: rgba(242, 242, 238, 0.72);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.4;
}
.sh-stages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(960px, 100%);
}
.sh-stages li { margin: 0; padding: 0; }
.sh-stages button {
  appearance: none;
  margin: 0;
  padding: 0.35rem 0.7rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(242, 242, 238, 0.75);
  font: 550 0.6875rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  cursor: pointer;
}
.sh-stages button:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 3px;
}
.sh-stages button[aria-current="step"] {
  background: #4ade80;
  border-color: #4ade80;
  color: #04140c;
}
.sh-progress {
  width: min(960px, 100%);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1px;
  overflow: hidden;
}
.sh-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: #4ade80;
  transform: scaleX(0);
  transform-origin: left center;
}
.scroll-house-live {
  width: min(960px, 100%);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.scroll-house-sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  background: #f7f6f2;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(28, 25, 22, 0.08);
  touch-action: pan-y pinch-zoom;
}
.scroll-house-plan,
.scroll-house-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scroll-house.is-drawn .scroll-house-plan { visibility: hidden; }
.scroll-house-canvas { touch-action: pan-y pinch-zoom; background: #f7f6f2; }
.scroll-house.is-explore .scroll-house-canvas { touch-action: pan-y; cursor: grab; }
.scroll-house.is-explore.is-dragging .scroll-house-canvas { cursor: grabbing; }
.scroll-house-canvas:focus-visible {
  outline: 2px solid #1c1916;
  outline-offset: -3px;
}
.sh-explore {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.4rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
}
.sh-explore[hidden] { display: none; }
.sh-explore-toggle,
.sh-explore-reset,
.sh-zoom {
  pointer-events: auto;
  appearance: none;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(28, 25, 22, 0.28);
  background: rgba(239, 235, 226, 0.92);
  color: #1c1916;
  font: 650 0.875rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.sh-explore-toggle.is-on,
.sh-explore-toggle[aria-pressed="true"] {
  background: #1c1916;
  color: #efebe2;
  border-color: #1c1916;
}
.sh-explore-toggle:focus-visible,
.sh-explore-reset:focus-visible,
.sh-zoom:focus-visible {
  outline: 2px solid #166534;
  outline-offset: 2px;
}
.sh-explore-help {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sh-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.scroll-house.is-plan .sh-labels,
.scroll-house.is-upper-labels .sh-labels { opacity: 1; }
.sh-scrub-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sh-scrub-label:focus-within {
  position: static;
  width: min(960px, 100%);
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  color: rgba(242, 242, 238, 0.8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sh-scrub {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  accent-color: #4ade80;
}
.scroll-house.is-fallback .scroll-house-sheet {
  background: #efebe2 url("/assets/images/scroll-house-still.svg") center / contain no-repeat;
}
.scroll-house.is-fallback .scroll-house-canvas,
.scroll-house.is-fallback .scroll-house-plan,
.scroll-house.is-fallback .sh-labels { visibility: hidden; }
.sh-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #1c1916;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.sh-label.is-dim {
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 0.75rem;
  color: #1c1916;
}
.sh-rooms {
  width: min(960px, 100%);
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1.3;
}
.sh-rooms[hidden] { display: none; }
.scroll-house-line {
  margin: 0;
  flex: 0 0 auto;
  text-align: center;
  color: rgba(242, 242, 238, 0.86);
  font-size: 0.7875rem;
  font-weight: 400;
  line-height: 1.35;
}
.sh-hint {
  margin: 0;
  text-align: center;
  color: #4ade80;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.scroll-house.is-scrolled .sh-hint { opacity: 0; }
.scroll-house-still { display: none; width: min(960px, 100%); }
.scroll-house-still svg {
  display: block;
  width: 100%;
  height: auto;
  background: #f4efe4;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}
.scroll-house-cta {
  width: min(960px, 100%);
  text-align: center;
}
.sh-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1.1rem;
}
.sh-btn,
.sh-link {
  text-decoration: none;
}
.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #166534;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  line-height: 1.3;
  padding: 0.85rem 1.05rem;
  border-radius: 0.25rem;
  text-align: center;
}
.sh-btn:hover { background: #15803d; }
.sh-link {
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.sh-link:hover { text-decoration: underline; }
.sh-btn:focus-visible,
.sh-link:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 3px;
}
.sh-fine {
  margin: 0.4rem 0 0;
  color: rgba(242, 242, 238, 0.75);
  font-size: 0.75rem;
  font-weight: 400;
}
.scroll-house.is-late .sh-btn {
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), 0 8px 24px rgba(22, 101, 52, 0.45);
}
@media (max-height: 720px) {
  .sh-dek { display: none; }
  .scroll-house-sticky { gap: 0.28rem; padding-top: 0.45rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .sh-hint { transition: opacity 0.25s linear; }
  .sh-hint-chevron { display: inline-block; animation: sh-nudge 1.5s ease-in-out infinite; }
}
@keyframes sh-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-house-track { height: auto; }
  .scroll-house-sticky {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }
  .scroll-house-live,
  .sh-progress,
  .sh-hint { display: none; }
  .scroll-house-still { display: block; }
  .sh-stages li[data-stage="massing"],
  .sh-stages button[data-stage="massing"],
  .sh-stages li[data-stage="massing"] button {
    background: #4ade80;
    border-color: #4ade80;
    color: #04140c;
  }
}
.sh-still-img {
  aspect-ratio: 960 / 540;
  background: #efebe2 url("/assets/images/scroll-house-still.svg") center / contain no-repeat;
}
.sh-learn {
  width: min(960px, 100%);
}
.sh-learn-set {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.sh-learn-set[hidden] { display: none; }
.sh-call {
  appearance: none;
  background: transparent;
  color: #f2f2ee;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  font: 550 0.6875rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  cursor: pointer;
}
.sh-call:hover { border-color: #93c5fd; color: #fff; }
.sh-call.is-on,
.sh-call[aria-pressed="true"] {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.sh-call:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}
.sh-learn-copy {
  min-height: 4.6em;
}
.sh-learn-prompt,
.sh-note {
  margin: 0.35rem auto 0;
  max-width: 40rem;
  text-align: center;
  color: rgba(242, 242, 238, 0.9);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
}
.sh-note { display: none; }
.sh-note.is-open { display: block; }
.sh-learn-prompt.is-hidden { display: none; }
.sh-note strong { color: #fff; font-weight: 700; }
.sh-learn-aside {
  margin: 0.2rem 0 0;
  text-align: center;
  color: rgba(242, 242, 238, 0.75);
  font-size: 0.75rem;
  font-weight: 400;
}
@media (prefers-reduced-motion: reduce) {
  .sh-learn-set,
  .sh-learn-prompt,
  .sh-learn-aside { display: none; }
  .sh-note { display: block; text-align: left; margin: 0.65rem auto; }
  .sh-learn-copy { min-height: 0; }
}
@media (max-width: 640px) {
  .sh-kicker { font-size: 8px; font-weight: 550; letter-spacing: 0.03em; }
  .sh-title { font-size: 0.85rem; font-weight: 600; }
  .sh-dek { font-size: 0.75rem; font-weight: 300; line-height: 1.25; margin-top: 0.1rem; }
  .sh-stages button {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    min-height: 44px;
    min-width: 44px;
    padding: 0.15rem 0.38rem;
  }
  .sh-call {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    min-height: 44px;
    padding: 0.15rem 0.55rem;
  }
  .scroll-house-line,
  .sh-learn-prompt,
  .sh-note {
    font-size: 0.75rem;
    font-weight: 300;
    line-height: 1.3;
  }
  .sh-fine,
  .sh-learn-aside { font-size: 0.75rem; font-weight: 400; }
  .sh-btn, .sh-link { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em; }
  .sh-btn { min-height: 44px; padding: 0.4rem 0.7rem; }
  .sh-label, .sh-label.is-dim { font-size: 0.75rem; letter-spacing: 0; }
  .scroll-house-plan text { font-size: 16px; letter-spacing: 0; }
  .scroll-house-sticky {
    height: auto;
    gap: 0.18rem;
    padding: 0.3rem 0.7rem 0.4rem;
  }
  .sh-top, .sh-stages, .sh-progress, .sh-learn, .scroll-house-cta, .sh-hint { flex: 0 0 auto; }
  .scroll-house-live { flex: 0 0 auto; overflow: visible; gap: 0.15rem; }
  .scroll-house-sheet {
    flex: 0 0 auto;
    height: 50svh;
    min-height: 0;
  }
  .scroll-house-line { margin-top: 0.2rem; }
  .sh-learn { margin-top: 0.28rem; }
  .sh-learn-set { gap: 0.3rem 0.35rem; }
  .sh-learn-prompt,
  .sh-note { margin-top: 0.15rem; }
  .sh-learn-copy { min-height: 0; }
  .sh-fine { margin-top: 0.15rem; }
  .sh-hint { font-size: 0.5625rem; }
}

/* v9: every stage is explorable. Labels are buttons (tap to fly in); fixtures appear when close. */
.scroll-house.has-labels .sh-labels { opacity: 1; }
.sh-labels .sh-label {
  left: 0;
  top: 0;
  pointer-events: auto;
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  padding: 4px 6px;
  min-height: 24px;
  line-height: 1.2;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1c1916;
  text-shadow: 0 0 3px #f7f6f2, 0 0 3px #f7f6f2, 0 0 6px #f7f6f2;
  cursor: pointer;
  touch-action: pan-y;
  transition: opacity 0.22s linear;
}
.sh-labels .sh-label[hidden] { display: none; }
.sh-labels .sh-label:hover { text-decoration: underline; text-underline-offset: 2px; }
.sh-labels .sh-label:focus-visible { outline: 2px solid #166534; outline-offset: 1px; background: rgba(247, 246, 242, 0.9); }
.sh-labels .sh-label.is-dim { font-weight: 500; }
.sh-labels .sh-label.is-close { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.sh-labels .sh-label.is-fix { font-size: 0.6875rem; font-weight: 500; color: #3d3a35; letter-spacing: 0; text-transform: none; }
.sh-labels .sh-label.is-fix::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: #166534;
  vertical-align: 1px;
}
.scroll-house.is-captured .sh-labels .sh-label { touch-action: none; }
.scroll-house.is-explore .sh-explore-toggle { background: #1c1916; color: #efebe2; border-color: #1c1916; }
.sh-explore .sh-zoom { min-width: 44px; padding: 0.3rem 0.6rem; font-size: 1.125rem; line-height: 1; }
.sh-gesture {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  z-index: 3;
  max-width: calc(100% - 1rem);
  margin: 0;
  padding: 0.4rem 0.75rem;
  transform: translate(-50%, -4px);
  border-radius: 999px;
  background: rgba(28, 25, 22, 0.88);
  color: #f2f2ee;
  font: 600 0.75rem/1.35 Inter, system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sh-gesture.is-shown { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .sh-labels .sh-label, .sh-gesture { transition: none; }
}
.scroll-house.is-fallback .sh-explore,
.scroll-house.is-still .sh-explore,
.scroll-house.is-fallback .sh-gesture { display: none; }
/* Short desktop sheets: keep the explore controls compact and out of the middle of the drawing. */
@media (hover: hover) and (pointer: fine) and (max-height: 860px) {
  .sh-explore { justify-content: flex-end; }
  .sh-explore .sh-explore-toggle,
  .sh-explore .sh-explore-reset,
  .sh-explore .sh-zoom { min-height: 32px; padding: 0.25rem 0.65rem; font-size: 0.8125rem; }
  .sh-explore .sh-zoom { min-width: 32px; font-size: 1rem; }
}
