/* audit: layout overrides (loaded last)
   Owner: layout agent. Grid: edge margin = --pad, chrome-left = altimeter + gap, touch target >= 44px,
   primary actions bottom-left/under the title (chapter card, tray), global actions top/right (guest, orb). */
:root { --tap-min: 44px; }

/* ---------- touch targets >= 44px ---------- */
#chap .chap-play { min-height: var(--tap-min); padding-inline: 1rem 1.1rem; }
#chap ol button, #chap.long ol button { min-height: var(--tap-min); }
#chap .chap-next { min-height: var(--tap-min); }
@media (max-height: 820px) { #chap.long ol button { min-height: var(--tap-min); } }
#orb .sun { width: max(3.2rem, var(--tap-min)); height: max(3.2rem, var(--tap-min)); }
.gtag { min-height: var(--tap-min); }
.hb button { min-width: var(--tap-min); min-height: var(--tap-min); width: var(--tap-min); height: var(--tap-min); }
.pill, .pr-p, .pr-tag, .dr-panel .x, #drawer .x { min-height: var(--tap-min); }
.dr-panel > .x { width: var(--tap-min); height: var(--tap-min); }
#mbar button, #tally button { min-width: var(--tap-min); min-height: var(--tap-min); }
/* floor scale (tower lift): 14 rows can't all be 44px tall, so widen the target and pad the hit area vertically */
.lift-scale button { min-width: 48px; position: relative; }
.lift-scale button::after { content: ""; position: absolute; inset: -3px -6px; }

/* ---------- chapter card: never runs off the bottom edge, 11 items scroll inside it ---------- */
#chap, body.has-chap #chap { max-height: calc(100dvh - var(--chap-top, 14rem) - var(--pad) - .6rem - var(--safe-b)); }

/* ---------- context strip (pins, timeline, legacy): stays clear of the sun dial and orb ---------- */
#ui:has(> #orb.has-sun) #ctx { right: calc(var(--pad) + 15.5rem + var(--safe-r)); }
#ctx .strip-note { display: none; }
@media (min-width: 1500px) { #ctx .strip-note { display: block; } }

/* ---------- floor-plan unit legend must not run under the orb ---------- */
.floor-v .fp-legend { margin-right: calc(var(--pad) + 6rem); }

/* ---------- home / floor plan: say where we are (tower + floor), plan sits under the heading ---------- */
#lv-home .floor-v { padding-top: calc(var(--pad) + 4.6rem + 2.8rem); }
#lv-home .fl-head { position: absolute; left: calc(var(--pad) + 4.8rem); top: calc(var(--pad) + 4.5rem); display: flex; align-items: baseline; gap: .9rem; color: var(--ink); pointer-events: none; }
#lv-home .fl-head h2 { font-size: clamp(1.7rem, 2.4vw, 2.6rem); line-height: 1; }
#lv-home .fl-head .k { margin: 0; }
.zbtns button { width: var(--tap-min); height: var(--tap-min); }

/* ---------- price screen controls ---------- */
.pr .pill { min-height: var(--tap-min); }

/* walk map on tablets: only the current stop wears its name; the others are numbered dots (names are in the tray) */

/* segmented controls (payment plan, floor-plan levels, ...) */
.seg button { min-height: var(--tap-min); }

/* ---------- home (unit) actions: one primary (Price & plan), two shortlist actions, the rest quiet; both rows read as one group ---------- */
.u-spec .acts { gap: .6rem; }
.u-spec .acts.plus-acts { margin-top: -.5rem; }
.u-spec .acts [data-uprice] { background: var(--ink); color: var(--paper); border-color: var(--ink); order: -1; }
.u-spec .acts [data-uview], .u-spec .acts [data-uspecs], .u-spec .acts [data-hfacts], .u-spec .acts [data-hwalk], .u-spec .acts [data-tofloor] { background: transparent; border: 1px solid var(--line); box-shadow: none; }

/* ---------- while a moment plays, the moment bar owns the top centre: shortlist/compare/search step aside ---------- */
body:has(> #ui > #mbar.on) #tally { opacity: 0; visibility: hidden; pointer-events: none; }
body:has(> #ui > #mbar.on) #ui > #tally { opacity: 0; visibility: hidden; }

/* close buttons, gallery dots, walkthrough controls: 44px minimum everywhere */
.x, #ask-ov .x, #sheet .x, .sh-panel .x { min-width: var(--tap-min); min-height: var(--tap-min); }
.gal-dots button { width: var(--tap-min); height: var(--tap-min); }
.wt-btns button { min-width: var(--tap-min); min-height: var(--tap-min); }
.hc .hb button { width: var(--tap-min); height: var(--tap-min); }

/* ---------- orchestrator fixes ---------- */
/* muted site chips (Club House, Future Development): dark glass + light text */
.tchip.muted { background: var(--rd-glass-dark); border-color: rgba(255, 255, 255, .4); }
.tchip.muted b { color: #fff; }
