/* ============================================================================
   Tour chrome. The A-Frame canvas fills the window; everything here layers
   on top of it. Every value comes from css/tokens.css.
   ========================================================================== */

/* The tour is a fixed, non-scrolling viewport: the panorama fills the window
   and the chrome floats on top. The marketing site scrolls normally, which is
   why these live here and not in base.css. */
html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Stops iOS from selecting text while you drag to look around. */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Inputs are the one place the visitor does need selection back. */
input, textarea, select { -webkit-user-select: text; user-select: text; }

/* ------------------------------------------------------------------ gate  */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--wash-top) 0%, var(--bg) 62%, var(--wash-deep) 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gate.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.gate__inner { max-width: 460px; }

.gate__eyebrow {
  margin: 0 0 14px;
  font-size: var(--text-overline);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.gate__title {
  margin: 0 0 14px;
  font-size: clamp(34px, 8vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.gate__sub {
  margin: 0 0 34px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.gate__note {
  margin: 22px 0 0;
  font-size: var(--text-body-sm);
  color: var(--ink-mute);
}

/* The gate is the only screen shown before #controls appears, so it carries
   its own language toggle — Foundations flagged an English-first visitor
   meeting a Kiswahili gate with no way out of it. */
.gate__lang {
  position: fixed;
  top: calc(var(--inset) + var(--safe-t));
  right: var(--inset);
}

/* ------------------------------------------------------------------ fade  */

.fade {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg-deep);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

/* ---------------------------------------------------------------- loader  */

.loader {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  width: min(420px, calc(100vw - 48px));
}

/* The slow-connection prompt is a decision, not a status line, so it dims the
   room behind it. A preview frame may already have landed by then, and the
   copy is unreadable straight over a sunlit photograph. */
.loader--blocking::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--scrim);
  opacity: 0.88;
}

.loader__ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader__text {
  font-size: var(--text-body-sm);
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

/* T1/T2 swap the spinner for a determinate bar once byte progress is known. */
.loader__title {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
  font-size: var(--text-body-sm);
  color: var(--ink-mute);
}

.loader__body {
  margin: 0;
  font-size: var(--text-body-md);
  line-height: 1.65;
  text-align: center;
  color: var(--ink-dim);
}

.loader__actions { display: flex; gap: var(--space-xs); align-items: center; }

.progress {
  width: 100%;
  height: 4px;
  background: var(--control);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* ------------------------------------------------------------ room label  */

.room-label {
  position: fixed;
  z-index: 50;
  top: calc(var(--inset) + var(--safe-t));
  left: var(--inset);
  padding: 9px var(--inset);
  font-size: var(--text-label-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(var(--blur-chrome));
  -webkit-backdrop-filter: blur(var(--blur-chrome));
  pointer-events: none;
}

/* -------------------------------------------------------------- controls  */

.controls {
  position: fixed;
  z-index: 50;
  top: calc(var(--inset) + var(--safe-t));
  right: var(--inset);
  display: flex;
  gap: 9px;
}

/* The tool chips are part of the cluster on desktop. The wrapper only becomes
   a box at the narrow breakpoint, where it relocates. */
.tools { display: contents; }

.enquire {
  position: fixed;
  z-index: 50;
  right: var(--inset);
  bottom: calc(20px + var(--safe-b));
}

/* -------------------------------------------------------------- room bar  */

.room-bar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  padding: 7px;
  max-width: calc(100vw - 28px);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(var(--blur-chrome));
  -webkit-backdrop-filter: blur(var(--blur-chrome));
  box-shadow: var(--shadow);
}

.room-bar::-webkit-scrollbar { display: none; }

.room-bar__btn {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px var(--inset);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.room-bar__btn:hover { color: var(--ink); background: var(--control-subtle); }

.room-bar__btn.is-active {
  color: var(--ink-inverse);
  background: var(--ink);
}

/* Past about eight rooms the bar stops being a bar. tour.js swaps it for the
   drawer and leaves this one button in its place. */
.room-bar__more { color: var(--ink); }

/* ------------------------------------------------------------- info card  */

.info-card {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 34px));
  padding: 30px 30px 32px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
  box-shadow: var(--shadow);
}

.info-card--error { border-color: var(--border-error); }

.info-card__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.info-card__close:hover { color: var(--ink); background: var(--control); }

.info-card__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-card-title);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.info-card__body {
  margin: 0;
  font-size: var(--text-body-md);
  line-height: 1.65;
  color: var(--ink-dim);
}

/* =========================================================================
   Modal panel — the shared shell behind the floorplan, share sheet,
   settings, enquiry form and every blocking dialog.
   ========================================================================= */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--scrim);
  opacity: 0.55;
}

.panel {
  position: fixed;
  z-index: 120;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: var(--space-lg);
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
}

.panel:focus { outline: none; }

.panel--wide   { width: min(620px, calc(100vw - 32px)); }
.panel--share  { width: min(480px, calc(100vw - 32px)); }

/* The enquiry form docks to the right edge on desktop so the room stays
   visible while you fill it in — you are enquiring about what you can see. */
.panel--dock {
  left: auto;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  width: min(436px, calc(100vw - 32px));
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.panel__title {
  flex: 1 1 0;
  margin: 0;
  font-size: var(--text-card-title);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  font-family: inherit;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.panel__close:hover { color: var(--ink); background: var(--control); }

.panel__body {
  margin: 0;
  font-size: var(--text-body-md);
  line-height: 1.65;
  color: var(--ink-dim);
}

.panel__divider {
  height: 1px;
  background: var(--border-subtle);
}

.panel__actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

/* A dialog opens on an icon rather than a title, so the eye lands on the
   subject before the sentence. */
.panel__badge {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--accent-subtle);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.panel__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.overline {
  margin: 0;
  font-size: var(--text-overline);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ------------------------------------------------------- form controls   */

.choice {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  min-height: var(--control-md);
  padding: 8px 0;
  font-size: var(--text-body-md);
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
}

.choice input { position: absolute; opacity: 0; pointer-events: none; }

/* The explanation under a settings toggle — currently only the privacy one,
   which has to say where the data goes before the switch means anything. */
.choice__note {
  margin: 2px 0 0 44px;
  font-size: var(--text-body-sm);
  line-height: 1.5;
  color: var(--ink-mute);
}

.choice__mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: var(--control);
  border: 1px solid var(--stroke-strong);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.choice--radio .choice__mark { border-radius: 50%; }
.choice--check .choice__mark { border-radius: var(--radius-xs); }

.choice input:checked + .choice__mark {
  background: var(--accent);
  border-color: var(--accent);
}

/* The dot and the tick are drawn rather than shipped as assets so they
   inherit --accent and stay crisp at any zoom. */
.choice--radio input:checked + .choice__mark {
  background:
    radial-gradient(circle, var(--ink-inverse) 0 3.5px, transparent 4px),
    var(--accent);
}

.choice--check input:checked + .choice__mark {
  background-image:
    linear-gradient(45deg, transparent 44%, var(--ink-inverse) 44%, var(--ink-inverse) 56%, transparent 56%),
    linear-gradient(-45deg, transparent 56%, var(--ink-inverse) 56%, var(--ink-inverse) 68%, transparent 68%);
  background-size: 10px 10px, 10px 10px;
  background-position: 1px 5px, 5px 1px;
  background-repeat: no-repeat;
}

.choice input:focus-visible + .choice__mark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Immediate-effect switch: no Save button anywhere near it. */
.choice--toggle .choice__mark {
  width: 44px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--control);
  border: 1px solid var(--stroke-strong);
  position: relative;
}

.choice--toggle .choice__mark::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-dim);
  transition: transform 0.18s ease, background 0.18s ease;
}

.choice--toggle input:checked + .choice__mark {
  background: var(--accent);
  border-color: var(--accent);
}

.choice--toggle input:checked + .choice__mark::after {
  transform: translateX(18px);
  background: var(--ink-inverse);
}

.chip-row { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.chip {
  height: var(--control-sm);
  padding: 0 var(--space-sm);
  font-family: inherit;
  font-size: var(--text-label-md);
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--control);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip.is-active {
  color: var(--ink-inverse);
  background: var(--ink);
  border-color: transparent;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--ink-dim);
}

.field__input {
  height: var(--control-md);
  padding: 0 var(--space-md);
  font-family: inherit;
  font-size: var(--text-body-md);
  color: var(--ink);
  background: var(--control-subtle);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
}

.field__input::placeholder { color: var(--ink-faint); }
.field__input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

select.field__input {
  appearance: none;
  -webkit-appearance: none;
  /* Chevron drawn with gradients: no asset, and it tints with the text. */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px;
  background-position: right 20px center, right 14px center;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field__hint {
  font-size: var(--text-body-sm);
  color: var(--ink-mute);
}

/* -------------------------------------------------------------- alert    */

.alert {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--status-info-bg);
  border: 1px solid var(--status-info-border);
  border-radius: var(--radius-md);
}

.alert__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--status-info-fg);
}

.alert__title {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-body-md);
  font-weight: 600;
  line-height: 1.6;
  color: var(--status-info-fg);
}

.alert__body {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: 1.55;
  color: var(--ink-dim);
}

/* -------------------------------------------------------------- toast    */

/* Transient, and it never blocks the layout — anything that must be
   acknowledged is an .alert or a .panel instead. */
.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: calc(92px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: min(420px, calc(100vw - 32px));
  padding: 0 var(--space-md);
  height: 48px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur-chrome));
  -webkit-backdrop-filter: blur(var(--blur-chrome));
}

.toast__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.toast__text {
  flex: 1 1 auto;
  font-size: var(--text-label-md);
  color: var(--ink);
}

.toast__action {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: var(--text-label-md);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 4px;
}

/* A one-line status strip pinned under the top chrome. */
.status-strip {
  position: fixed;
  z-index: 55;
  left: 0;
  right: 0;
  top: calc(72px + var(--safe-t));
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.status-strip span {
  padding: 8px var(--space-md);
  font-size: var(--text-body-sm);
  color: var(--ink-dim);
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(var(--blur-chrome));
  -webkit-backdrop-filter: blur(var(--blur-chrome));
}

/* ------------------------------------------------------------ floorplan  */

.floorplan {
  position: relative;
  width: 100%;
  /* The plan is authored on a 560x340 grid in rooms.js; this keeps that
     aspect while the panel itself is free to shrink on a phone. */
  aspect-ratio: 560 / 340;
  background: var(--control-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.floorplan__room {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 0 6px;
  font-family: inherit;
  font-size: var(--text-label-md);
  font-weight: 600;
  text-align: center;
  color: var(--ink-faint);
  background: var(--control);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-xs);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.floorplan__room:hover { color: var(--ink); background: var(--control-hover); }

.floorplan__room.is-current {
  color: var(--accent);
  background: var(--accent-subtle);
  border: 2px solid var(--accent);
  cursor: default;
}

.floorplan__you {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.legend {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: var(--text-body-md);
  color: var(--ink-mute);
}

.legend__item { display: flex; align-items: center; gap: 6px; }

.legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stroke-strong);
}
.legend__dot--here { background: var(--accent); }

/* ---------------------------------------------------------- share sheet  */

.link-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  height: var(--control-md);
  padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-md);
  background: var(--control);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
}

.link-row__url {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  line-height: 1.5;
  color: var(--ink);
}

.qr-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md);
  background: var(--control-subtle);
  border-radius: var(--radius-md);
}

/* The QR is drawn to a canvas at runtime, so the white plate has to exist
   even before there is anything on it. */
.qr-row__code {
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qr-row__code canvas { display: block; width: 92px; height: 92px; }

.qr-row__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-start;
  min-width: 0;
}

.qr-row__title {
  margin: 0;
  font-size: var(--text-body-md);
  font-weight: 600;
  line-height: 1.6;
}

.qr-row__body {
  margin: 0;
  font-size: var(--text-body-md);
  line-height: 1.65;
  color: var(--ink-dim);
}

/* ------------------------------------------------------- spec / listings  */

.spec {
  padding: var(--space-md);
  background: var(--control-subtle);
  border-radius: var(--radius-md);
}

.spec__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 6px 0;
  font-size: var(--text-label-md);
  color: var(--ink-dim);
}

.spec__row + .spec__row { border-top: 1px solid var(--border-subtle); }
.spec__val { color: var(--ink-faint); white-space: nowrap; }
.spec__val--ok { color: var(--status-ok-fg); }

.tips { margin: 0; padding: 0; list-style: none; }

.tips li {
  display: flex;
  gap: var(--space-xs);
  padding: 3px 0;
  font-size: var(--text-body-md);
  line-height: 1.6;
  color: var(--ink-dim);
}

.tips li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.mono-block {
  padding: var(--space-sm) var(--space-md);
  background: var(--control-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  line-height: 1.8;
  color: var(--ink-faint);
  word-break: break-all;
}

/* --------------------------------------------------------- property card  */

.prop {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  background: var(--control-subtle);
  border-radius: var(--radius-md);
}

.prop__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 42px;
  border-radius: var(--radius-xs);
  background: var(--control);
  background-size: cover;
  background-position: center;
}

.prop__name {
  margin: 0;
  font-size: var(--text-label-md);
  font-weight: 600;
}

.prop__meta {
  margin: 2px 0 0;
  font-size: var(--text-body-sm);
  color: var(--ink-mute);
}

.agent {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  background: var(--control-subtle);
  border-radius: var(--radius-md);
}

.agent__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  display: grid;
  place-items: center;
  font-size: var(--text-label-md);
  font-weight: 700;
  color: var(--accent);
}

/* ------------------------------------------------------------ room drawer */

/* Past eight rooms a horizontal pill bar scrolls more than it navigates, so
   the full set moves into a bottom sheet with thumbnails. */
.drawer {
  position: fixed;
  z-index: 120;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62vh;
  overflow-y: auto;
  padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + var(--safe-b));
  background: var(--panel);
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-overlay);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.drawer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

.drawer__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: 0;
  background: transparent;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer__thumb {
  position: relative;
  aspect-ratio: 216 / 110;
  border-radius: var(--radius-sm);
  background: var(--control-subtle);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.drawer__card.is-active .drawer__thumb { border: 2px solid var(--accent); }
.drawer__card.is-active .drawer__name  { color: var(--accent); }

.drawer__name {
  font-size: var(--text-label-md);
  font-weight: 600;
  color: var(--ink);
}

.drawer__chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  font-size: var(--text-mono-sm);
  color: var(--ink-mute);
  background: var(--scrim);
  border-radius: var(--radius-xs);
}

/* ------------------------------------------------------------ coach marks */

.coach {
  position: fixed;
  inset: 0;
  z-index: 115;
  background: rgba(0, 0, 0, 0.55);
}

.coach__centre {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  width: min(520px, calc(100vw - 48px));
}

.coach__ring {
  width: 96px;
  height: 96px;
  border: 1px solid var(--stroke-strong);
  border-radius: 50%;
}

.coach__title {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.coach__sub {
  margin: 0;
  font-size: var(--text-body-md);
  color: var(--ink-dim);
}

/* Amber so they read as annotation rather than as part of the interface. */
.coach__tip {
  position: absolute;
  max-width: 240px;
  padding: 10px var(--space-sm);
  font-size: var(--text-label-md);
  line-height: 1.45;
  color: var(--ink-inverse);
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.coach__tip--controls { top: 74px;  right: var(--space-lg); }
.coach__tip--marker   { top: 52%;   left: var(--space-lg); }
.coach__tip--rooms    { bottom: 76px; left: 50%; transform: translateX(-34%); }

.coach__skip {
  position: absolute;
  left: var(--space-lg);
  bottom: calc(var(--space-lg) + var(--safe-b));
}

/* ------------------------------------------------------------- debug HUD  */

.debug-hud {
  position: fixed;
  z-index: 140;
  left: var(--inset);
  bottom: calc(20px + var(--safe-b));
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  background: var(--scrim);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  pointer-events: none;
  line-height: 1.5;
}

.debug-hud em {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-style: normal;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 620px) {
  .debug-hud { bottom: auto; top: calc(70px + var(--safe-t)); left: var(--inset); }
  .info-card { padding: 26px 22px 28px; }

  /* Every panel becomes a bottom sheet: thumb-reachable, and it stops a tall
     form from being pinned to the middle of a short screen. */
  .panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    padding-bottom: calc(var(--space-lg) + var(--safe-b));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .panel--dock { right: 0; transform: none; }

  /* Reversed so the primary action, which sits on the right of a dialog's
     button pair, ends up on top when the pair stacks. */
  .panel__actions { flex-direction: column-reverse; align-items: stretch; }
  .panel__actions .btn { width: 100%; }

  /* .btn--grow shares a row equally. Once the row stacks, that same
     flex-basis:0 applies down the column instead and collapses every button
     to its text height — 20px, less than half the 44px touch target. */
  .panel__actions .btn--grow { flex: 0 0 auto; }

  /* A row of equal-weight choices is ordered by preference, not by emphasis,
     so it must not be flipped — WhatsApp leads for a reason. */
  .panel__actions--equal { flex-direction: column; }

  .qr-row { flex-direction: column; align-items: flex-start; }
  .coach__tip--marker { left: var(--space-md); max-width: 200px; }
  .coach__tip--controls { right: var(--space-md); max-width: 200px; }

  /* Six chips and a room name do not fit across 390px. The top-right keeps
     the three the Figma draws — EN, VR, ? — and the tools drop to a cluster
     above the room bar, which is easier to reach one-handed anyway. */
  .tools {
    display: flex;
    gap: 7px;
    position: fixed;
    left: var(--space-sm);
    bottom: calc(82px + var(--safe-b));
  }

  .controls   { right: var(--space-sm); gap: 7px; }
  .room-label { left: var(--space-sm); max-width: 48vw;
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Same shelf as the tools, opposite end. */
  .enquire {
    right: var(--space-sm);
    bottom: calc(82px + var(--safe-b));
  }

  /* Clear of both. */
  .toast { bottom: calc(146px + var(--safe-b)); }
}

/* Settings offers this, and the OS-level preference is honoured without it. */
@media (prefers-reduced-motion: reduce) {
  .fade { transition-duration: 0.01ms; }
  .loader__ring { animation-duration: 3s; }
}

body.is-reduced .fade { transition-duration: 0.01ms; }

/* A-Frame injects its own VR button; we supply a styled one instead. */
.a-enter-vr, .a-enter-ar, .a-orientation-modal { display: none !important; }

/* ============================================================================
   04 · Enquiry — the error state, the booking flow, and the three handoffs.
   ============================================================================

   Everything here is a sheet over the panorama, so it inherits .panel and the
   dark mode it already resolves in. Only what section 04 adds is below; the
   Alert, Spec, Progress, Chip, Agent and Prop blocks it uses are the ones the
   tour already had.
   ========================================================================== */

/* ------------------------------------------------------------ form errors */

/* The Text Field's rule: error REPLACES the helper line rather than adding a
   second one, so a form does not grow as it is filled in wrongly. */
.field__err { font-size: var(--text-body-sm); line-height: 1.55; color: var(--status-danger-fg); }
.field__input.is-bad { border-color: var(--border-error); border-width: 2px; }
.field__input.is-bad + .field__hint { display: none; }

.consent { margin-top: var(--space-sm); padding: var(--space-xs); border: 1px solid transparent; border-radius: var(--radius-md); }
.consent.is-bad { background: var(--status-danger-bg); border-color: var(--border-error); }
.consent .choice { padding-top: 0; }

.alert--danger { background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.alert--danger .alert__dot { background: var(--status-danger-fg); }
.alert--danger .alert__title { color: var(--status-danger-fg); }
.alert--warn { background: var(--status-warn-bg); border-color: var(--status-warn-border); }
.alert--warn .alert__dot { background: var(--status-warn-fg); }
.alert--warn .alert__title { color: var(--status-warn-fg); }

/* ------------------------------------------------------------- sending  */

.skel { display: flex; flex-direction: column; gap: var(--space-xs); margin: var(--space-md) 0; }
.skel__line { height: 14px; background: var(--control-subtle); border-radius: var(--radius-xs); }
@media (prefers-reduced-motion: no-preference) {
  .skel__line { animation: skel-pulse 1.6s ease-in-out infinite; }
}
@keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --------------------------------------------------------------- sent  */

.waitlist { margin-top: var(--space-md); }
.ticks-dark { margin: var(--space-xs) 0 0; padding: 0; list-style: none; }
.ticks-dark li { display: flex; gap: var(--space-xs); padding: 4px 0; font-size: var(--text-body-md); line-height: 1.6; color: var(--ink-dim); }
.ticks-dark li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* A column of equal-weight actions, most-recommended first. Unlike
   .panel__actions this never reverses: the order is the recommendation. */
.stack { display: flex; flex-direction: column; gap: var(--space-xs); margin-top: var(--space-md); }

/* The row the enquiry sheet grows so E5, E8 and E9 can be reached at all. */
.orrow { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border-subtle); }
.orrow__label { font-size: var(--text-body-sm); color: var(--ink-faint); }

/* ------------------------------------------------------- booking flow  */

.panel__step { flex: 0 0 auto; margin-left: auto; padding-right: var(--space-sm); font-size: var(--text-body-sm); color: var(--ink-faint); }

.cal__nav { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.cal__month { flex: 1 1 auto; margin: 0; text-align: center; font-size: var(--text-body-md); font-weight: 600; }
.cal__arrow {
  width: var(--control-sm);
  height: var(--control-sm);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cal__arrow:hover { background: var(--control); }
.cal__arrow:disabled { opacity: 0.35; cursor: default; }

.cal__heads, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__heads span { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-faint); }

/* 44px rows: the whole month has to stay thumb-sized on a phone. */
.cal__day {
  height: 44px;
  font-family: inherit;
  font-size: var(--text-body-md);
  color: var(--ink);
  background: var(--control);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.cal__day:hover { border-color: var(--stroke-strong); }
.cal__day[disabled] { background: none; border-color: transparent; color: var(--ink-faint); opacity: 0.35; cursor: default; }
.cal__day.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink-inverse); font-weight: 600; }
.cal__day--pad { visibility: hidden; }
.cal__day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chosen { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--control-subtle); border-radius: var(--radius-md); font-size: var(--text-body-md); font-weight: 600; }
.chosen span { flex: 1 1 auto; }
.chosen__change { font-family: inherit; font-size: var(--text-label-md); font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; }
.chosen__change:hover { text-decoration: underline; }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); margin-top: var(--space-xs); }
.slot {
  height: 44px;
  font-family: inherit;
  font-size: var(--text-body-md);
  color: var(--ink);
  background: var(--control);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.slot:hover { border-color: var(--stroke-strong); }
.slot[disabled] { opacity: 0.35; cursor: default; }
.slot.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink-inverse); font-weight: 600; }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------- handoffs  */

.agent__avatar--lg { width: 56px; height: 56px; font-size: var(--text-heading-sm); }

.msg { margin-top: var(--space-md); padding: var(--space-md); background: var(--status-ok-bg); border-radius: var(--radius-md); }
.msg__body { margin: var(--space-xs) 0 0; padding: var(--space-sm); font-size: var(--text-body-md); line-height: 1.65; white-space: pre-wrap; background: var(--panel); border-radius: var(--radius-md); }

.bignum { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); margin: var(--space-md) 0; padding: var(--space-lg) var(--space-md); background: var(--control-subtle); border-radius: var(--radius-md); }
.bignum__value { margin: 0; font-size: clamp(26px, 7vw, 34px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }

/* ------------------------------------------------------- calculator  */

.range { margin-bottom: var(--space-sm); }
.range__bounds { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--ink-dim); }
.range input[type="range"] { width: 100%; margin-top: 6px; accent-color: var(--accent); }

.result { margin-top: var(--space-md); padding: var(--space-md); background: var(--accent-subtle); border-radius: var(--radius-md); }
.result__value { margin: var(--space-xs) 0 var(--space-sm); font-size: clamp(26px, 7vw, 34px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; color: var(--accent); }
.result .spec__row:first-of-type { border-top: 1px solid var(--border-subtle); }

/* The calculator is the tallest sheet in the file — 792px against a 900px
   frame. On a short window it scrolls inside itself rather than off-screen. */
#calc-panel, #date-panel { max-height: calc(100vh - 48px); overflow-y: auto; }

@media (max-width: 420px) {
  .slots { grid-template-columns: repeat(3, 1fr); }
  .orrow { gap: 6px; }
}
