/* SOLMARA — M2 unit explorer layout. App-shell page: NO document scroll
   (pane screenshots stay reliable; panel scrolls internally). */

body.explorer-page { overflow: hidden; height: 100svh; }

.explorer-page .badge { margin-inline-start: auto; }
body.kiosk .navlink { display: none; }

.ex-layout {
  display: grid;
  grid-template-columns: 1fr 408px;
  height: 100svh;
  padding-top: 0;
}

/* ---------- stage ---------- */
.ex-stage {
  position: relative;
  background: linear-gradient(180deg, #5b8fbc 0%, #d9e6ee 58%, #1a6182 100%);
}
#model {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none;
  opacity: 0; transition: opacity 1s ease;
}
#model.ready { opacity: 1; }

.legend {
  position: absolute; inset-inline-start: 18px; bottom: 16px;
  display: flex; gap: 8px;
}
.chip {
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 99px;
  background: rgba(7, 16, 25, .6); color: var(--sand);
  display: inline-flex; align-items: center; gap: 7px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.chip.st-available { color: #7fe0d7; } .chip.st-available::before { background: #2ea8a0; }
.chip.st-reserved  { color: #ecc989; } .chip.st-reserved::before  { background: #d4a24e; }
.chip.st-sold      { color: #8f9cb8; } .chip.st-sold::before      { background: #55627e; }

.slice-ctl {
  position: absolute; inset-inline-end: 16px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(7, 16, 25, .55); border: 1px solid rgba(239,230,214,.14);
  border-radius: 12px; padding: 12px 10px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.slice-ctl label { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim, #8b93a7); writing-mode: vertical-rl; transform: rotate(180deg); color: rgba(239,230,214,.6); }
/* `direction: rtl` here orients the SLIDER (low at the bottom) — it is not a
   language direction and must not be flipped when the document goes RTL. It is
   declared explicitly, so it never inherits from <html dir>. */
.slice-ctl input[type=range] {
  writing-mode: vertical-lr; direction: rtl;
  width: 22px; height: 180px; accent-color: var(--gold);
}
.slice-ctl output { font-size: 11px; font-weight: 600; color: var(--gold); }

.zoom-ctl { position: absolute; inset-inline-start: 18px; top: 84px; display: flex; flex-direction: column; gap: 8px; }
.zoom-ctl button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(239,230,214,.25);
  background: rgba(7, 16, 25, .55); color: var(--sand); font-size: 19px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.zoom-ctl button:hover { border-color: var(--gold); color: var(--gold); }

#vista-hud[hidden] { display: none; }
#vista-hud {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  background: rgba(7, 16, 25, .72); border: 1px solid rgba(212,162,78,.5);
  border-radius: 12px; padding: 12px 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
#vista-line { font-family: var(--serif); font-size: 17px; color: var(--shell); white-space: nowrap; }
#vista-hud button {
  border: 1px solid rgba(239,230,214,.35); background: none; color: var(--sand);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 99px; padding: 8px 14px; cursor: pointer;
}
#vista-hud button:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- panel — editorial, not boxed ---------- */
.ex-panel {
  position: relative;
  border-inline-start: none;
  background: linear-gradient(90deg, rgba(9, 14, 22, .55) 0%, rgba(9, 14, 22, .96) 9%, rgba(9, 14, 22, .98) 100%);
  display: flex; flex-direction: column;
  padding: 86px 28px 14px;
  overflow-y: auto;
}
/* vista mode: the view takes the whole stage, model controls step aside */
body.vista .ex-layout { grid-template-columns: 1fr 0; }
body.vista .ex-panel,
body.vista .legend,
body.vista .slice-ctl,
body.vista .zoom-ctl { display: none; }
#vista-hud button { white-space: nowrap; }

.panel-head .ex-sub {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: rgba(239,230,214,.72); margin-top: 6px; line-height: 1.5;
}
.res-count { margin-top: 12px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.src-note { color: #7fe0d7; }

/* filters: quiet text controls, gold underline when active */
.filters { margin-top: 16px; padding: 16px 0 12px; border-top: 1px solid rgba(239,230,214,.12); border-bottom: 1px solid rgba(239,230,214,.12); }
.fgroup { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; margin-bottom: 10px; }
.fgroup i {
  font-style: normal; width: 86px; flex: none;
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(239,230,214,.45);
}
.fchip {
  font-size: 13px; font-weight: 500; color: rgba(239,230,214,.66);
  background: none; border: none; padding: 8px 5px; cursor: pointer;
  border-bottom: 1px solid transparent;
  letter-spacing: .02em; min-width: 24px;
  transition: color .2s, border-color .2s;
}
.fchip:hover { color: var(--shell); }
.fchip.on { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.avail-toggle { display: flex; gap: 9px; align-items: center; font-size: 12px; color: rgba(239,230,214,.66); cursor: pointer; letter-spacing: .02em; }
.avail-toggle input { accent-color: var(--gold); }

/* unit list: a ledger, not a card grid.
   min-height reserves the space so the async fill never shifts layout (CLS). */
.unit-list { display: block; padding: 4px 0 14px; min-height: 62svh; }
.unit-row {
  display: flex; align-items: baseline; gap: 14px;
  width: 100%; text-align: start;
  background: none; border: none;
  border-bottom: 1px solid rgba(239,230,214,.09);
  border-inline-start: 2px solid transparent;
  padding-block: 13px; padding-inline: 12px 10px; margin: 0;
  cursor: pointer; color: var(--sand); font-family: var(--sans);
  transition: background .2s, border-color .2s;
}
.unit-row:hover { background: rgba(239,230,214,.035); border-inline-start-color: rgba(212,162,78,.55); }
.unit-row.sel { background: rgba(212,162,78,.07); border-inline-start-color: var(--gold); }
.ur-code {
  font-family: var(--serif); font-weight: 500; font-size: 21px;
  color: var(--shell); flex: none; width: 58px; letter-spacing: .03em;
}
.unit-row.sel .ur-code { color: var(--gold); }
.ur-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ur-meta { font-size: 12px; color: rgba(239,230,214,.62); letter-spacing: .03em; }
.ur-tags { display: flex; gap: 12px; align-items: center; }
.ur-st { font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.ur-st s { text-decoration: none; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.ur-st.st-available { color: #7fe0d7; } .ur-st.st-available s { background: #2ea8a0; }
.ur-st.st-reserved  { color: #ecc989; } .ur-st.st-reserved s  { background: #d4a24e; }
.ur-st.st-sold      { color: #8f9cb8; } .ur-st.st-sold s      { background: #55627e; }
.ur-held { font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #7fe0d7; }
.ur-price { flex: none; font-size: 14px; font-weight: 600; color: var(--shell); letter-spacing: .02em; }
.ur-st { font-size: 10.5px; }
.panel-foot { font-size: 11.5px; }

/* ---------- detail sheet — an editorial fact sheet ---------- */
.detail {
  position: sticky; bottom: 0; margin-top: auto;
  background: linear-gradient(180deg, rgba(13,21,32,.97), #0b121d);
  border: none; border-top: 1px solid rgba(212,162,78,.55);
  border-radius: 0; padding: 22px 6px 18px;
  box-shadow: 0 -30px 60px rgba(3,8,14,.65);
}
.d-close {
  position: absolute; top: 14px; inset-inline-end: 6px;
  background: none; border: none; color: rgba(239,230,214,.55);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.d-close:hover { color: var(--shell); }
.d-head { display: flex; align-items: baseline; gap: 16px; }
.d-head h2 { font-family: var(--serif); font-weight: 400; font-size: 44px; color: var(--shell); line-height: 1; letter-spacing: .02em; }
.d-price { margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(239,230,214,.1); }
.d-price b { font-family: var(--serif); font-size: 24px; color: var(--gold); font-weight: 500; letter-spacing: .01em; }
.d-psf { font-size: 12px; color: rgba(239,230,214,.5); margin-inline-start: 10px; }
.d-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 14px; margin: 16px 0; }
.d-meta i { display: block; font-style: normal; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: rgba(239,230,214,.42); margin-bottom: 3px; }
.d-meta b { font-size: 15px; color: var(--shell); font-weight: 500; }
/* white architectural sheet */
.plan-card {
  background: #fff; border-radius: 8px;
  padding: 14px 14px 10px; margin: 8px 0 12px;
  box-shadow: 0 10px 34px rgba(3, 8, 14, .45);
}
.plan { width: 100%; display: block; }
.plan .pl-name { fill: #1b2530; font-size: 9px; font-family: var(--sans); font-weight: 600; text-anchor: middle; letter-spacing: .12em; text-transform: uppercase; }
.plan .pl-area { fill: #7a8490; font-size: 8px; font-family: var(--sans); text-anchor: middle; letter-spacing: .04em; }
.plan .pl-title { fill: #1b2530; font-size: 10px; font-family: var(--sans); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.plan .pl-north { fill: #1b2530; font-size: 8.5px; font-family: var(--sans); font-weight: 600; }
.plan .pl-note { fill: #9aa3ad; font-size: 7.5px; font-family: var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.d-sold-note { font-size: 13px; color: #8f9cb8; font-style: italic; margin-bottom: 8px; font-family: var(--serif); }
.d-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.btn-small { margin-top: 0; padding: 12px 20px; font-size: 11px; border: none; cursor: pointer; }
.detail .btn-ghost { padding: 12px 20px; font-size: 11px; border-color: rgba(239,230,214,.25); }

.panel-foot { margin-top: 14px; font-size: 10px; color: rgba(239,230,214,.4); }

/* ---------- M3: launch day ---------- */
.live-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.sim-btn {
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(239,230,214,.6); background: none;
  border: 1px dashed rgba(239,230,214,.3); border-radius: 99px;
  padding: 5px 12px; cursor: pointer;
}
.sim-btn:hover { color: var(--gold); border-color: var(--gold); }
.sim-btn.live {
  color: #7fe0d7; border: 1px solid #2ea8a0;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(46,168,160,.35); } 50% { box-shadow: 0 0 0 6px rgba(46,168,160,0); } }
.res-today {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
}
.res-today::before { content: '●'; color: #7fe0d7; margin-inline-end: 6px; font-size: 9px; }

#toasts {
  position: absolute; inset-inline-start: 18px; bottom: 58px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  opacity: 0; transform: translateX(-14px);
  transition: opacity .35s ease, transform .35s ease;
  background: rgba(7, 16, 25, .78);
  border: 1px solid rgba(212,162,78,.45);
  border-radius: 10px; padding: 9px 14px;
  font-size: 12.5px; color: var(--sand);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.toast.in { opacity: 1; transform: none; }
.toast b { font-family: var(--serif); font-size: 15px; margin-inline-end: 4px; color: var(--shell); }
.toast span { color: rgba(239,230,214,.6); }
.toast.t-sold { border-color: rgba(85, 98, 126, .7); }

.uc-held {
  margin-top: 5px; font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #7fe0d7;
}

/* ---------- M3: reserve drawer ---------- */
#reserve-root[hidden] { display: none; }
.rv-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(3, 8, 14, .68);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rv-card {
  position: fixed; z-index: 41; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(490px, calc(100vw - 28px));
  max-height: min(88svh, 720px); overflow-y: auto;
  background: linear-gradient(180deg, #101927, #0b121d);
  border: 1px solid rgba(212,162,78,.35); border-radius: 18px;
  padding: 30px 30px 26px;
  box-shadow: 0 40px 120px rgba(3,8,14,.75);
}
.rv-card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--shell); margin: 10px 0 16px; letter-spacing: .01em; }
.rv-close { position: absolute; top: 12px; inset-inline-end: 14px; background: none; border: none;
  color: rgba(239,230,214,.6); font-size: 22px; cursor: pointer; line-height: 1; }
.rv-dots { display: flex; gap: 7px; }
.rv-dots span { width: 26px; height: 3px; border-radius: 2px; background: rgba(239,230,214,.18); }
.rv-dots span.on { background: var(--gold); }
.rv-dots span.done { background: rgba(212,162,78,.5); }
.rv-unit {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 6px 2px 14px; margin-bottom: 4px;
  background: none; border: none;
  border-bottom: 1px solid rgba(239,230,214,.12);
}
.rv-unit b { font-family: var(--serif); font-size: 26px; font-weight: 400; color: var(--shell); }
.rv-unit span { font-size: 11.5px; color: rgba(239,230,214,.65); }
.rv-unit i { font-style: normal; margin-inline-start: auto; font-weight: 600; color: var(--gold); font-size: 14px; }
.rv-label { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(239,230,214,.55); margin: 14px 0 7px; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rv-chips button {
  font-size: 12.5px; font-weight: 600; color: rgba(239,230,214,.8);
  background: none; border: 1px solid rgba(239,230,214,.25);
  border-radius: 9px; padding: 9px 13px; cursor: pointer;
}
.rv-chips button.on { border-color: var(--gold); color: var(--gold); background: rgba(212,162,78,.12); }
.rv-note { font-size: 12px; color: rgba(239,230,214,.6); margin-top: 16px; line-height: 1.55; }
.rv-cta { width: 100%; margin-top: 14px; text-align: center; border: none; cursor: pointer; }
.rv-cta[disabled] { opacity: .35; cursor: not-allowed; transform: none !important; box-shadow: none; }
.rv-slot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--sand);
  padding: 10px 14px; margin: 4px 0 10px;
  border: 1px dashed rgba(212,162,78,.5); border-radius: 10px;
}
.rv-slot b { color: var(--gold); }
.rv-slot button { background: none; border: none; color: #7fe0d7; font-size: 12px;
  font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: .08em; }
.rv-field { display: block; margin-bottom: 10px; }
.rv-field span { display: block; font-size: 10px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(239,230,214,.55); margin-bottom: 5px; }
.rv-field input, .rv-field textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(239,230,214,.06); border: 1px solid rgba(239,230,214,.2);
  border-radius: 8px; color: var(--shell); font-size: 14.5px; font-family: var(--sans);
  padding: 10px 12px; resize: vertical;
}
.rv-field input:focus, .rv-field textarea:focus { outline: none; border-color: var(--gold); }
.rv-fine { font-size: 10.5px; color: rgba(239,230,214,.45); line-height: 1.5; margin-top: 8px; }
.rv-err { min-height: 16px; font-size: 12px; color: #ff8a8a; margin-top: 8px; }
.rv-check {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #0d1520; font-weight: 700;
  background: linear-gradient(120deg, #7fe0d7, #2ea8a0);
  margin: 8px 0 4px;
}
.rv-confirm-line { font-size: 15px; color: var(--sand); margin-bottom: 12px; }
.rv-slot.done { border-style: solid; }
.rv-confirm-sub { font-size: 12.5px; color: rgba(239,230,214,.6); margin: 12px 0 4px; line-height: 1.55; }
.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rv-actions .rv-cta { width: auto; flex: 1; margin-top: 0; }
.rv-actions .btn-ghost { border-radius: 2px; }

/* ---------- M4: Sol, the concierge ---------- */
#cg-fab {
  position: fixed; inset-inline-end: 428px; bottom: 18px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--deep);
  cursor: pointer; padding: 0; overflow: visible;
  box-shadow: 0 14px 40px rgba(3,8,14,.55);
  transition: transform .25s;
}
#cg-fab:hover { transform: translateY(-2px) scale(1.04); }
#cg-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.cg-fab-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-family: var(--serif); font-size: 26px; color: var(--gold); }
.cg-dot {
  position: absolute; top: 1px; inset-inline-end: 1px; width: 12px; height: 12px;
  border-radius: 50%; background: #2ea8a0; border: 2px solid var(--deep);
  animation: live-pulse 2.2s ease-in-out infinite;
}
#cg-fab.open .cg-dot { display: none; }

#cg-panel {
  position: fixed; inset-inline-end: 428px; bottom: 84px; z-index: 31;
  width: min(370px, calc(100vw - 24px));
  height: min(520px, calc(100svh - 120px));
  display: flex; flex-direction: column;
  background: #0c141f;
  border: 1px solid rgba(212,162,78,.45); border-radius: 16px;
  box-shadow: 0 30px 90px rgba(3,8,14,.65);
  overflow: hidden;
}
#cg-panel[hidden] { display: none; }
#cg-panel header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; position: static;
  background: rgba(239,230,214,.04);
  border-bottom: 1px solid rgba(239,230,214,.1);
}
#cg-panel header img, .cg-ava-fallback {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--gold); flex: none;
}
.cg-ava-fallback { display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 19px; color: var(--gold); background: var(--deep); }
#cg-panel header b { display: block; font-family: var(--serif); font-size: 18px; color: var(--shell); line-height: 1.1; }
#cg-panel header i { font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(239,230,214,.55); }
#cg-panel header div { flex: 1; min-width: 0; }
#cg-voice, #cg-close {
  background: none; border: 1px solid rgba(239,230,214,.25); border-radius: 9px;
  color: rgba(239,230,214,.55); width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
#cg-voice.on { color: var(--gold); border-color: rgba(212,162,78,.6); }
#cg-voice:not(.on) .w1, #cg-voice:not(.on) .w2 { opacity: .2; }

#cg-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cg-m p {
  font-size: 13.5px; line-height: 1.55; padding: 10px 13px; border-radius: 13px;
  max-width: 88%; width: fit-content;
}
.cg-m.sol p { background: rgba(239,230,214,.07); color: var(--sand); border-end-start-radius: 4px; }
.cg-m.me { display: flex; justify-content: flex-end; }
.cg-m.me p { background: rgba(212,162,78,.16); border: 1px solid rgba(212,162,78,.35);
  color: var(--shell); border-end-end-radius: 4px; margin-inline-start: auto; }
.cg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cg-chips button {
  font-size: 11.5px; font-weight: 600; color: #7fe0d7;
  background: rgba(46,168,160,.08); border: 1px solid rgba(46,168,160,.45);
  border-radius: 99px; padding: 6px 12px; cursor: pointer;
}
.cg-chips button:hover { background: rgba(46,168,160,.18); }
.cg-dots { display: flex; gap: 4px; }
.cg-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(239,230,214,.5);
  animation: cg-b 1.2s ease-in-out infinite; }
.cg-dots span:nth-child(2) { animation-delay: .15s; }
.cg-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes cg-b { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

#cg-panel footer {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(239,230,214,.1);
}
#cg-input {
  flex: 1; min-width: 0;
  background: rgba(239,230,214,.06); border: 1px solid rgba(239,230,214,.2);
  border-radius: 10px; color: var(--shell); font-size: 13.5px; font-family: var(--sans);
  padding: 10px 12px;
}
#cg-input:focus { outline: none; border-color: var(--gold); }
#cg-mic, #cg-send {
  flex: none; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(239,230,214,.25); background: none; color: var(--sand);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
#cg-send { background: linear-gradient(120deg, #e3b566, var(--gold)); color: var(--ink); border: none; font-weight: 700; }
#cg-mic.rec { color: #ff8a8a; border-color: #ff8a8a; animation: live-pulse 1.2s infinite; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .ex-layout { grid-template-columns: 1fr; grid-template-rows: 46svh 1fr; }
  .ex-stage { min-height: 0; }
  .ex-panel { border-inline-start: none; border-top: 1px solid rgba(239,230,214,.12); padding: 16px 14px; }
  .slice-ctl { inset-inline-end: 10px; padding: 8px 7px; }
  .slice-ctl input[type=range] { height: 110px; }
  .zoom-ctl { top: auto; bottom: 52px; inset-inline-start: 12px; }
  .legend { inset-inline-start: 12px; bottom: 12px; }
  .ur-code { width: 48px; font-size: 18px; }
  .ur-price { font-size: 12.5px; }
  .d-meta { grid-template-columns: repeat(2, 1fr); }
  .d-head h2 { font-size: 34px; }
  #vista-hud { width: calc(100% - 24px); justify-content: space-between; padding: 10px 12px; }
  #vista-line { font-size: 14px; white-space: normal; }
  #cg-fab { inset-inline-end: 14px; bottom: 14px; width: 50px; height: 50px; }
  #cg-panel { inset-inline: 12px; width: auto; bottom: 74px; height: min(480px, calc(100svh - 90px)); }
}

/* ---------- RTL (ar · he · yi) ----------
   The 3D canvas is unaffected — only the HTML overlay chrome mirrors. The
   grid, flex and logical properties above do that on their own; these three
   are the ones that cannot. */

/* The panel moves to the left under RTL (grid columns follow inline
   direction), so its soft fade edge has to move with it. */
[dir="rtl"] .ex-panel {
  background: linear-gradient(270deg, rgba(9, 14, 22, .55) 0%, rgba(9, 14, 22, .96) 9%, rgba(9, 14, 22, .98) 100%);
}

/* Toasts stack at the inline-start edge and slide in from off-screen; the
   offset is a physical transform, so it flips by hand. `.toast.in` already
   resets to none, which is direction-agnostic. */
[dir="rtl"] .toast { transform: translateX(14px); }

/* The send glyph is an arrow, so it points the wrong way once the chat runs
   right-to-left. Mirroring the glyph is right where rotating the layout is
   not — it is a direction, not a label. */
[dir="rtl"] #cg-send { transform: scaleX(-1); }

/* Vertical writing rotates a whole Arabic or Hebrew run 90°, which neither
   script does. Lay the label flat and let it wrap to two short lines instead
   — the control sits at the edge of a large stage and can afford the width. */
[dir="rtl"] .slice-ctl label {
  writing-mode: horizontal-tb; transform: none;
  max-width: 66px; text-align: center; line-height: 1.25;
}
