.build-guide {
  color: var(--ink);
  background: #edf3f5;
  border-block: 1px solid #c2d1d9;
}
.guide-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 12px 0 clamp(22px, 2.3vw, 35px);
}
.guide-heading h2 { font-size: clamp(54px, 6.25vw, 105px); }
.guide-heading p { max-width: 350px; font-size: 15px; line-height: 1.5; color: #405766; }
.stage-guide { border: 1px solid #aebfc8; box-shadow: 0 10px 28px #152d3d0c; scroll-margin-top: 12px; }
.stage-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #f8fbfc; }
.stage-tabs a {
  display: flex; position: relative; align-items: center; justify-content: center; gap: 12px;
  min-height: 62px; padding: 10px; font: 800 clamp(20px, 2.05vw, 32px)/1 var(--display);
  border-right: 1px solid #bacad3; color: #315364;
}
.stage-tabs a:last-child { border-right: none; }
.stage-tabs a small { font: 500 11px var(--mono); color: #537082; }
.stage-tabs a:hover { background: #e2eff5; }
.stage-tabs a[aria-selected=true] { background: #16394c; color: white; }
.stage-tabs a[aria-selected=true]::after { position: absolute; content: ''; inset: auto 0 0; height: 3px; background: #42baf1; }
.stage-tabs a[aria-selected=true] small { color: #8edbff; }
.stage-tabs a:focus-visible { outline-offset: -4px; z-index: 1; outline-color: #159cea; }
.stage-panel { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(255px, 1fr); background: #fff; border-top: 1px solid #aebfc8; }
.stage-panel[hidden],.stage-guide [hidden] { display: none; }
.stage-figure { background: #102b40; color: #f2f8fb; min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.sheet-tools {
  min-height: 42px; padding: 6px clamp(14px, 1.85vw, 27px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid #3a5666; background: #123044;
}
.sheet-tools>span:first-child {
  font: 500 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: #c4e0ed;
}
.sheet-tools a,.photo-subject { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.25; }
.sheet-tools a { min-height: 28px; color: #eff9ff; text-decoration: underline; text-underline-offset: 4px; }
.sheet-tools a .icon { width: 13px; height: 13px; }
.plan-picture,.field-picture { display: block; }
.plan-drawing { display: grid; align-items: center; flex: 1; background: #102b40; }
.room-map { position: relative; container: room-sheet / size; }
.plan-drawing .room-map { width: 100%; aspect-ratio: 744/418; }
.plan-picture img { width: 100%; height: auto; aspect-ratio: 744/418; }
.map-instruction { display: inline-flex; gap: 7px; align-items: center; }
.map-instruction .icon { width: 16px; height: 16px; color: #84dbff; }
.room-link {
  position: absolute; display: grid; place-items: center;
  left: calc(var(--rx) * 100% / 744); top: calc(var(--ry) * 100% / 418);
  width: calc(var(--rw) * 100% / 744); height: calc(var(--rh) * 100% / 418);
  color: #fff; border-radius: 2px; touch-action: manipulation;
}
.room-label {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  gap: .38em; padding: .32em .48em; border: 1px solid #76b5d0; border-radius: 4px;
  background: #123246; color: #f4faff; box-shadow: 0 1px 3px #05182466;
  font: 650 clamp(9px, 1.7cqw, 15px)/1.14 Inter, sans-serif;
}
.room-label .icon { width: 1em; height: 1em; color: #8fe2ff; }
.room-link:is(:hover,:focus-visible) { background: #85dfff21; box-shadow: inset 0 0 0 1.5px #9ee5ff; }
.room-link:focus-visible { outline: 2px solid white; outline-offset: -3px; }
.room-link:is(:hover,:focus-visible) .room-label { background: #c2edff; color: #123246; border-color: #fff; }
.room-link:is(:hover,:focus-visible) .room-label .icon { color: inherit; }
@container room-sheet (orientation: landscape) {
  .room-link[data-room-name="Utility"] .room-label,
  .room-link[data-room-name="Dining"] .room-label { align-self: start; margin-top: 5%; }
  .room-link[data-room-name="Living"] .room-label { align-self: end; margin-bottom: 15%; }
}
@container room-sheet (orientation: portrait) {
  /* The tall SVG maps each point (x, y) to (391 - y, x - 53). */
  .room-link {
    left: calc((391 - var(--ry) - var(--rh)) * 100% / 371); top: calc((var(--rx) - 53) * 100% / 654);
    width: calc(var(--rh) * 100% / 371); height: calc(var(--rw) * 100% / 654);
  }
  .room-label { font-size: clamp(9px, 3.5cqw, 16px); }
}
@container room-sheet (max-width: 510px) and (orientation: landscape) {
  .room-label { gap: .2em; padding: .3em; }
  .room-label .icon { display: none; }
}
@container room-sheet (max-width: 340px) and (orientation: landscape) {
  .room-label { padding-inline: 1px; }
}
.sheet-key,.photo-choices {
  display: flex; align-items: center; gap: 16px; min-height: 51px; padding: 5px clamp(12px,1.85vw,26px);
  border-top: 1px solid #3a5666; background: #123044;
}
.air-controls { display: flex; flex-wrap: wrap; gap: 3px; }
.air-controls button,.photo-choices button {
  background: transparent; border: 1px solid transparent; color: #d5eaf4; font: 600 12px Inter,sans-serif;
  display: inline-flex; gap: 8px; align-items: center; min-height: 35px; padding: 6px 10px;
}
.air-controls button[aria-pressed=true],.photo-choices button[aria-pressed=true] {
  background: #24485d; color: #fff; border-color: #75a5bd;
}
.air-controls button:hover,.photo-choices button:hover { background: #214559; }
.line-key { display: inline-block; width: 20px; height: 0; border-top: 3px solid #59d9ff; }
.return-key { border-top: 3px dashed #ff9385; }
.stage-notes { align-self: center; min-width: 0; padding: clamp(25px, 3.7vw, 64px); }
.stage-notes h3 { color: #16394c; font-size: clamp(33px, 3.4vw, 57px); line-height: .98; letter-spacing: -.028em; margin: 0 0 14px; }
.stage-notes>p, .part-note p, .detail-note p { color: #415969; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.55; }
.stage-notes .route-title,.detail-note h4 { color: #254e64; font: 700 15px/1.3 Inter,sans-serif; margin: 22px 0 7px; padding-top: 18px; border-top: 1px solid #c7d6dd; }
.stage-notes .route-description { font-size: 14px; }
.photo-board, .photo-overview, .photo-closeup { position: relative; }
.field-picture img,.photo-closeup img { width: 100%; aspect-ratio: 1200/780; height: auto; object-fit: cover; }
.photo-closeup img { object-position: center; }
.spot {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%);
  border: 2px solid #f4fcff; border-radius: 50%; width: 33px; height: 33px; padding: 0;
  box-shadow: 0 1px 6px #132a37b3; font: 600 13px var(--mono); color: #fff; background: #163b50;
}
.spot::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.spot[aria-pressed=true] { background: #9ce0ff; color: #0c2c3d; box-shadow: 0 0 0 3px #183647bd; }
.part-list { display: grid; gap: 12px; margin-top: 20px; }
.part-note { border-left: 2px solid #c9d7de; padding: 0 0 1px 12px; }
.part-note:has(button[aria-pressed=true]) { border-color: #1589c2; }
.part-note button {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 2px 0; text-align: left;
  color: #1d4053; font-size: 14px; font-weight: 750;
}
.part-note button span {
  display: grid; place-items: center; border: 1px solid #95acbb; border-radius: 100%; width: 23px; height: 23px;
  font: 500 11px var(--mono);
}
.part-note button[aria-pressed=true] span { background: #153c51; color: #fff; border-color: #153c51; }
.part-note p { font-size: 13px; margin-top: 5px; }
.choice-dot { width: 6px; height: 6px; border-radius: 50%; background: #93aab7; }
[aria-pressed=true]>.choice-dot { background: #80d2ff; }
.photo-choices { gap: 4px; }
.guide-footer { display: flex; gap: 12px 24px; align-items: baseline; justify-content: space-between; margin-top: 21px; }
.guide-footer p,.guide-footer .text-link { font-size: 14px; }
.guide-footer p { color: #425e6e; line-height: 1.5; }
.stage-guide:not(.enhanced) :is(.air-controls,.photo-choices,.spot) { display: none; }
.full-detail { display: block; padding: 10px; color: #fff; text-decoration: underline; }
@media(min-width: 1600px) {
  .stage-panel { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); }
}
@media(max-width: 880px) {
  .guide-heading { gap: 24px; }
  .guide-heading h2 { font-size: clamp(46px,6.7vw,62px); }
  .guide-heading p { max-width: 280px; font-size: 14px; }
  .stage-panel { grid-template-columns: minmax(0, 1.65fr) minmax(200px, 1fr); }
  .stage-notes { padding: 22px; }
  .stage-notes h3 { font-size: 31px; }
  .part-list { gap: 10px; margin-top: 14px; }
  .stage-tabs a { min-height: 50px; }
  .header-actions { gap: 14px; }
}
@media(max-width: 700px) {
  .stage-panel { grid-template-columns: 1fr; }
  .guide-heading { display: block; }
  .guide-heading p { max-width: 440px; margin-top: 14px; }
  .stage-notes { padding: 23px 20px 25px; }
  .guide-footer { display: block; }
  .guide-footer .text-link { margin-top: 7px; }
}
@media(max-width: 620px) {
  .guide-heading h2 { font-size: clamp(40px, 10.6vw, 63px); }
  .guide-heading p { margin-top: 11px; }
  .stage-tabs a { flex-direction: column; align-items: flex-start; gap: 5px; padding: 11px; font-size: 21px; }
  .stage-tabs a small { font-size: 9px; }
  .sheet-tools { min-height: 41px; }
  .sheet-tools a { min-height: 34px; }
  .air-controls button,.photo-choices button { min-height: 40px; padding-inline: 6px; font-size: 11px; gap: 5px; }
  .sheet-key { order: 1; border-top: 0; border-bottom: 1px solid #36576b; padding-block: 2px; min-height: 45px; }
  .plan-drawing { order: 2; }
  .plan-drawing .room-map,.plan-picture img { aspect-ratio: 371/654; }
  .field-picture img,.photo-closeup img { aspect-ratio: 1; }
  .photo-closeup img { object-fit: contain; background: #0e293b; }
  .spot { left: var(--mx); top: var(--my); }
  .line-key { width: 14px; border-top-width: 2px; }
  .part-note button { min-height: 36px; }
}
