:root {
  --navy: #1b212d;
  --navy-2: #262e3d;
  --navy-3: #39435a;
  --gold: #9b7746;
  --gold-strong: #866639;
  --gold-ink: #7a5a2f;
  --gold-soft: #efe4d2;
  --paper: #f7f6f2;
  --card: #ffffff;
  --ink: #232a36;
  --muted: #5d6470;
  --line: #e2ded5;
  --line-strong: #cfc8ba;
  --ok: #3d6b4e;
  --error: #a3352b;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: Inter, "Helvetica Neue", Arial, system-ui, sans-serif;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgba(27, 33, 45, 0.06), 0 8px 24px -12px rgba(27, 33, 45, 0.22);
  --header: 60px;
  --trust: 36px;
  /* vh first: browsers without small-viewport units would drop the whole value. */
  --stage-h: clamp(220px, 38vh, 380px);
  color-scheme: light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--stage-h) + 56px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  caret-color: var(--gold);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
::selection {
  background: var(--gold-soft);
  color: var(--navy);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}
h2 {
  font: 400 clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem) / 1.08 var(--serif);
  letter-spacing: -0.01em;
  color: var(--navy);
}
h2 em,
.why h2 em {
  font-style: italic;
  color: var(--gold-ink);
}
h3 {
  font: 600 0.95rem/1.3 var(--sans);
  color: var(--navy);
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
button:disabled {
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--card);
  padding: 10px 14px;
  border-radius: var(--r-s);
  box-shadow: var(--shadow);
}
.skip:focus {
  top: 12px;
}
[hidden] {
  display: none !important;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* --- Buttons --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}
.btn:hover {
  border-color: var(--navy);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--gold-strong);
  border-color: var(--gold-strong);
  color: #fff;
}
.btn.primary:hover {
  background: #73562f;
  border-color: #73562f;
}
.btn.dark {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn.dark:hover {
  background: var(--navy-3);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover {
  background: rgba(27, 33, 45, 0.05);
}
.btn.block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
}
.link {
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding: 0 4px;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-s);
  color: inherit;
}

/* --- Header ---------------------------------------------------------------------------- */
.site-header {
  height: var(--header);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-left));
  position: relative;
  z-index: 30;
}
.brand img {
  display: block;
  height: 44px;
  width: auto;
}
.header-ctas {
  display: none;
}
.header-mobile {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-mobile .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.hdr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-s);
  color: #e9ebef;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms var(--ease);
}
.hdr .icon {
  width: 18px;
  height: 18px;
  color: #d9b77f;
}
.hdr:hover {
  background: rgba(255, 255, 255, 0.08);
}
.hdr.primary {
  background: var(--gold-strong);
  color: #fff;
  font-weight: 600;
}
.hdr.primary .icon {
  color: #fff;
}
.hdr.primary:hover {
  background: #a07c4b;
}
.hdr.compact {
  padding: 0 14px;
}
.hdr.tel {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  line-height: 1.15;
  font-weight: 650;
  font-size: 1rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hdr.tel small {
  font-size: 0.72rem;
  font-weight: 500;
  color: #c3c8d1;
}
body.menu-open .header-ctas {
  display: flex;
  position: absolute;
  top: var(--header);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 12px 16px 16px;
  background: var(--navy);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.45);
}
body.menu-open .header-ctas .hdr {
  min-height: 48px;
  font-size: 1rem;
}
body.menu-open .header-ctas .hdr.tel {
  padding: 6px 14px;
}

/* Trust bar */
.trust {
  display: flex;
  gap: 24px;
  align-items: center;
  height: var(--trust);
  padding: 0 16px;
  background: var(--navy-2);
  color: #d6dae1;
  font-size: 0.8125rem;
  overflow: hidden;
  white-space: nowrap;
}
.trust > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.trust > *:nth-child(n + 3) {
  display: none;
}
.trust .icon {
  width: 16px;
  height: 16px;
  color: #d9b77f;
}
.trust .long {
  display: none;
}
.trust strong {
  color: #fff;
  font-weight: 600;
}
.stars {
  color: #f2c94c;
  letter-spacing: 1px;
}

/* --- Studio (mobile first: sticky 3D, steps below) ------------------------------------- */
.studio {
  display: block;
}
.stage-col {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
}
.stage {
  position: relative;
  height: var(--stage-h);
  background: linear-gradient(#cfdde6, #eef1ea);
  overflow: hidden;
  touch-action: none;
}
#viewer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
#viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
.stage-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 0.875rem;
  transition: opacity 300ms var(--ease);
}
.stage.ready .stage-loading {
  opacity: 0;
  pointer-events: none;
}
.view-switch {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}
.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.view-switch .icon {
  width: 17px;
  height: 17px;
}
.view-switch span:not(.icon) {
  display: none;
}
.view-switch button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}
.view-switch button:hover:not([aria-pressed="true"]) {
  color: var(--navy);
  background: rgba(27, 33, 45, 0.06);
}
.stage-tools {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}
.stage-tools button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--navy);
}
.stage-tools button:hover,
.stage-tools button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}
.stage-tools .icon {
  width: 19px;
  height: 19px;
}
.size-chip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: var(--r-s);
  background: rgba(27, 33, 45, 0.86);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.size-chip span {
  display: none;
  font-weight: 400;
  color: #c9ced7;
  margin-left: 4px;
}
.follow .long {
  display: none;
}
.follow {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.follow input {
  accent-color: var(--gold-strong);
  width: 16px;
  height: 16px;
}
.hint {
  display: none;
}
.no-webgl .view-switch,
.no-webgl .stage-tools,
.no-webgl .follow {
  display: none;
}
.viewer-fallback {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
}
.viewer-fallback svg {
  width: min(320px, 70vw);
  margin: auto;
}
.viewer-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}
.callout {
  position: absolute;
  left: 0;
  top: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(27, 33, 45, 0.5);
  opacity: 0;
  transition: opacity 250ms var(--ease);
}
.callout::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: var(--navy);
  transform: translateX(-50%) rotate(45deg);
}
.callout.show {
  opacity: 1;
  animation: callout-in 450ms var(--ease);
}
@keyframes callout-in {
  from {
    margin-top: 8px;
  }
  to {
    margin-top: 0;
  }
}
.dims {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.dims path {
  stroke: var(--navy);
  stroke-width: 1.5;
  fill: none;
}
.dims text {
  fill: var(--navy);
  font: 600 12px var(--sans);
}
.dims text.soft {
  fill: var(--muted);
  font-weight: 500;
  font-size: 11px;
}
.stage-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.history {
  display: flex;
}
.history button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-s);
  color: var(--navy);
}
.history button:hover:not(:disabled) {
  background: rgba(27, 33, 45, 0.06);
}
.history button:disabled {
  opacity: 0.35;
}
.save-state {
  display: none;
  font-size: 0.75rem;
  color: var(--muted);
  margin-right: auto;
}
.bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--r-s);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}
.bar-btn:first-of-type {
  margin-left: auto;
}
.bar-btn:hover {
  background: rgba(27, 33, 45, 0.06);
}

/* Panel */
.panel {
  background: var(--card);
  outline: none;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: sticky;
  top: calc(var(--stage-h) + 49px);
  z-index: 15;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.step-l {
  white-space: nowrap;
}
.step-n {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step-n .icon {
  width: 14px;
  height: 14px;
}
.step.current {
  color: var(--navy);
  font-weight: 650;
  border-bottom-color: var(--gold);
}
.step.current .step-n {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.step.done .step-n {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--gold-ink);
}
.step:hover:not(.current) {
  color: var(--navy);
}
.step-body {
  padding: 20px 16px 28px;
  outline: none;
}
.step-head {
  margin-bottom: 20px;
}
.step-head p {
  margin-top: 8px;
  color: var(--muted);
}
.step-head .ref {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}
.group {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.group > h3 {
  margin-bottom: 12px;
}
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Uses */
.uses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.use {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 74px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}
.use .icon {
  width: 24px;
  height: 24px;
}
.use:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.use.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.use.selected .icon {
  color: #e2c38f;
}

/* Options */
.opts {
  display: grid;
  gap: 8px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.opt:hover {
  border-color: var(--line-strong);
}
.opt.selected {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.opt-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.opt-text strong {
  font-weight: 600;
  color: var(--navy);
}
.opt-text small,
.switch small,
.counter small {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 650;
  vertical-align: 2px;
  white-space: nowrap;
}
.tick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: transparent;
  flex: none;
}
.tick .icon {
  width: 14px;
  height: 14px;
}
.opt.selected .tick {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--r-s);
  object-fit: cover;
  flex: none;
  background-color: #eee;
  background-position: center;
}
.door-thumb {
  padding: 6px;
  background: #eef1f0;
  fill: #c9d6da;
  stroke: var(--navy);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.pulse {
  animation: pulse 900ms var(--ease);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(155, 119, 70, 0.55), inset 0 0 0 1px var(--navy);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(155, 119, 70, 0), inset 0 0 0 1px var(--navy);
  }
}

/* Swatches */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.swatch {
  display: grid;
  gap: 6px;
  padding: 4px 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}
.swatch img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
}
.swatch.selected {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.note {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Switches and counters */
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.switch:last-child {
  border-bottom: 0;
}
.switch-text {
  display: grid;
  gap: 3px;
  flex: 1;
}
.switch-text strong {
  font-weight: 600;
  color: var(--navy);
}
.switch-note {
  color: var(--gold-ink) !important;
  font-weight: 500;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.track {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #cfd2d6;
  position: relative;
  flex: none;
  transition: background 150ms var(--ease);
}
.track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 200ms var(--ease);
}
.switch input:checked + .track {
  background: var(--navy);
}
.switch input:checked + .track::after {
  transform: translateX(18px);
}
.switch input:focus-visible + .track {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.switch.is-disabled {
  cursor: not-allowed;
}
.switch.is-disabled .track {
  opacity: 0.45;
}
.switch.pulse,
.counter.pulse,
.slider.pulse {
  animation: glow 900ms var(--ease);
  border-radius: var(--r-m);
}
@keyframes glow {
  from {
    background: rgba(155, 119, 70, 0.16);
  }
  to {
    background: transparent;
  }
}
.sub {
  margin: 0 0 6px;
  padding: 4px 14px;
  border-radius: var(--r-m);
  background: var(--paper);
}
.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.counter > span {
  display: grid;
  gap: 2px;
}
.counter strong {
  font-weight: 600;
  color: var(--navy);
}
.counter-ctl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.counter-ctl button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--navy);
  background: var(--card);
}
.counter-ctl button:hover:not(:disabled) {
  border-color: var(--navy);
}
.counter-ctl button:disabled {
  opacity: 0.35;
}
.counter-ctl output {
  min-width: 28px;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Size */
.units {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.units button {
  min-width: 44px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.units button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}
.slider {
  padding: 8px 0 10px;
}
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.slider-head label {
  font-weight: 600;
  color: var(--navy);
}
.slider-head output {
  font: 400 1.75rem/1 var(--serif);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.slider-head output span {
  font: 500 0.875rem var(--sans);
}
.slider-head output small {
  margin-left: 8px;
  font: 500 0.8125rem var(--sans);
  color: var(--muted);
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.slider-row button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--navy);
  flex: none;
}
.slider-row button:disabled {
  opacity: 0.35;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 44px;
  background: transparent;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--navy) var(--fill), #dcd8cf var(--fill));
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--navy) var(--fill), #dcd8cf var(--fill));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
  box-shadow: 0 2px 6px rgba(27, 33, 45, 0.25);
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
}
.slider-ends {
  display: flex;
  justify-content: space-between;
  padding: 0 52px;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.presets button {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.presets strong {
  font-weight: 650;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.presets small {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}
.presets button.selected {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.insight {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--r-m);
  background: var(--paper);
  font-size: 0.875rem;
  color: var(--muted);
}
.insight .icon {
  color: var(--gold);
}
.insight strong {
  color: var(--navy);
}

/* Proof points */
.proof {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.proof li {
  display: flex;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--ink);
}
.proof .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--gold);
}
.complete {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--r-m);
  background: #edf3ee;
  color: #24402f;
  font-size: 0.9rem;
}
.complete .icon {
  color: var(--ok);
}

/* Footer of the panel: fixed on phones */
.panel-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px -14px rgba(27, 33, 45, 0.35);
}
.panel-foot .btn.primary {
  margin-left: auto;
  flex: 1;
  max-width: 260px;
}
.price-chip {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.price-chip strong {
  color: var(--navy);
}
.price-chip .icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

/* Forms */
.form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.row {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.field label,
.field legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0;
}
.opt-label {
  font-weight: 400;
  color: var(--muted);
}
.field input,
.field select,
.field textarea,
#share-url {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--card);
  font-size: 16px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #767b84;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.field [aria-invalid="true"] {
  border-color: var(--error);
}
.err {
  font-size: 0.8125rem;
  color: var(--error);
  font-weight: 500;
}
.err:empty {
  display: none;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  min-height: 44px;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--navy);
  flex: none;
}
.fine {
  font-size: 0.8125rem;
  color: var(--muted);
}
.form-error {
  padding: 12px;
  border-radius: var(--r-s);
  background: #f8e9e6;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 500;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
}
.chip input {
  position: absolute;
  opacity: 0;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.chip input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.chip input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.alt {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.alt a {
  font-weight: 600;
  color: var(--navy);
}

/* Summary */
.summary {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.summary > div {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 12px;
  border-bottom: 1px solid var(--line);
}
.summary > div:last-child {
  border-bottom: 0;
}
.summary dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.summary dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--navy);
}

/* Price */
.reveal {
  animation: rise 600ms var(--ease) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.price-card {
  padding: 22px 20px;
  border-radius: var(--r-l);
  background: var(--navy) radial-gradient(120% 140% at 100% 0%, #39435a 0%, transparent 60%);
  color: #fff;
  animation: rise 700ms 80ms var(--ease) both;
}
.price-label {
  font-size: 0.875rem;
  color: #d4d8df;
  font-weight: 500;
}
.price {
  font: 400 clamp(2.75rem, 2.2rem + 2vw, 3.5rem) / 1 var(--serif);
  margin: 6px 0 8px;
  font-variant-numeric: tabular-nums;
}
.price-sub {
  font-size: 0.875rem;
  color: #d4d8df;
}
.price-decor {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.875rem;
  color: #e7e9ee;
}
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.cta-grid .btn {
  font-size: 0.875rem;
  padding: 10px 12px;
  text-align: left;
  justify-content: flex-start;
}
.cta-grid .btn:nth-child(-n + 2) {
  grid-column: 1 / -1;
  justify-content: center;
  font-size: 0.95rem;
}
.cta-grid .btn .icon {
  color: inherit;
}
.cta-grid .btn:not(.primary):not(.dark) .icon {
  color: var(--gold);
}
.breakdown {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 4px 14px;
}
.soft-label {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}
.breakdown summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.breakdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.breakdown th {
  text-align: left;
  font-weight: 400;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.breakdown td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding: 7px 0 7px 12px;
  border-top: 1px solid var(--line);
}
.breakdown tfoot th,
.breakdown tfoot td {
  font-weight: 650;
  color: var(--navy);
  border-top: 2px solid var(--navy);
}
.breakdown tr.soft th,
.breakdown tr.soft td {
  font-weight: 400;
  color: var(--muted);
  border-top: 0;
  padding-top: 0;
}
.next-steps {
  margin: 20px 0 14px;
}
.next-steps h3 {
  margin-bottom: 8px;
}
.next-steps ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}
.next-steps strong {
  color: var(--navy);
}
.price ~ * {
  font-variant-numeric: tabular-nums;
}
.step-body > .summary {
  margin-top: 16px;
}

/* --- Below the studio ------------------------------------------------------------------ */
.why,
.process,
.faq {
  padding: 56px 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.why {
  display: grid;
  gap: 32px;
}
.why-copy > p {
  margin: 16px 0 24px;
  color: var(--muted);
  max-width: 60ch;
}
.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.why-list li {
  display: grid;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--gold);
}
.why-list strong {
  color: var(--navy);
}
.why-list span {
  color: var(--muted);
  font-size: 0.95rem;
}
.why-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.why-photos {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.why-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-m);
}
.why-photos img:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 1;
  aspect-ratio: 16 / 9;
}
.why-photos img:not(:nth-child(2)) {
  aspect-ratio: 3 / 4;
}
.why-photos figcaption {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--muted);
}
.process {
  border-top: 1px solid var(--line);
}
.process h2,
.faq h2 {
  margin-bottom: 24px;
}
.process ol {
  list-style: none;
  counter-reset: p;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.process li {
  counter-increment: p;
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}
.process li::before {
  content: counter(p);
  font: 400 1.75rem/1 var(--serif);
  color: var(--gold-ink);
  margin-bottom: 6px;
}
.process strong {
  color: var(--navy);
}
.process span {
  color: var(--muted);
  font-size: 0.95rem;
}
.faq {
  border-top: 1px solid var(--line);
  max-width: 860px;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.faq details p {
  padding: 0 0 18px;
  color: var(--muted);
  max-width: 70ch;
}
.site-footer {
  background: var(--navy);
  color: #cfd3da;
  padding: 32px 16px calc(32px + 76px);
  display: grid;
  gap: 10px;
  justify-items: start;
  font-size: 0.875rem;
}
.site-footer a {
  color: #fff;
}
.site-footer .small {
  font-size: 0.8125rem;
  color: #aab1bd;
}

/* Dialogs, toast, tour */
dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: var(--r-l);
  padding: 28px 22px 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(15, 20, 30, 0.55);
  overflow: auto;
}
dialog::backdrop {
  background: rgba(15, 20, 30, 0.6);
}
dialog[open] {
  animation: dialog-in 300ms var(--ease);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
dialog h2 {
  padding-right: 40px;
}
dialog .lead {
  margin: 8px 0 4px;
  color: var(--muted);
}
.dialog-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
}
.dialog-close:hover {
  background: rgba(27, 33, 45, 0.06);
}
#share label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
  font-size: 0.875rem;
}
#share .btn {
  margin-top: 12px;
}
.done {
  display: grid;
  gap: 12px;
  text-align: center;
  justify-items: center;
}
.done > .icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 50%;
  background: #edf3ee;
  color: var(--ok);
}
.done h2 {
  padding: 0;
}
.photo-dialog {
  width: min(980px, calc(100vw - 24px));
}
.photo-dialog img {
  display: block;
  width: 100%;
  max-height: 68vh;
  max-height: 68dvh;
  object-fit: contain;
  margin-top: 14px;
  border-radius: var(--r-m);
  background: #eceae4;
}
.photo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.photo-bar p {
  flex: 1;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.photo-bar .icon-btn {
  border: 1px solid var(--line-strong);
  color: var(--navy);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: var(--r-s);
  background: var(--navy);
  color: #fff;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
}
.tour {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
}
.tour-hole {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15, 20, 30, 0.62);
  transition: all 350ms var(--ease);
  pointer-events: none;
}
.tour-card {
  position: fixed;
  padding: 20px;
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.5);
  transition: left 350ms var(--ease), top 350ms var(--ease);
}
.tour-card h2 {
  font-size: 1.5rem;
  margin: 4px 0 8px;
}
.tour-card p {
  color: var(--muted);
}
.tour-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-ink) !important;
  font-variant-numeric: tabular-nums;
}
.tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 8px;
}
.tour-actions span {
  display: flex;
  gap: 6px;
}
.tour-actions .btn {
  min-height: 44px;
  padding: 8px 14px;
}
.noscript {
  padding: 24px;
  text-align: center;
}

/* --- Tablet and up -------------------------------------------------------------------- */
@media (min-width: 640px) {
  .view-switch span:not(.icon) {
    display: inline;
  }
  .size-chip span,
  .follow .long {
    display: inline;
  }
  .trust .long {
    display: inline;
  }
  .trust .short {
    display: none;
  }
  .trust > *:nth-child(3) {
    display: inline-flex;
  }
  .uses {
    grid-template-columns: repeat(6, 1fr);
  }
  .use {
    font-size: 0.8125rem;
  }
  .row.two {
    grid-template-columns: 1fr 1fr;
  }
  .opts.two {
    grid-template-columns: 1fr 1fr;
  }
  .presets {
    grid-template-columns: repeat(4, 1fr);
  }
  .price-chip {
    display: flex;
  }
  .save-state {
    display: inline;
  }
  .step {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    font-size: 0.8125rem;
  }
  .step-body {
    padding: 24px 24px 32px;
  }
  .process ol {
    grid-template-columns: repeat(3, 1fr);
  }
  .why-photos img:nth-child(2) {
    aspect-ratio: 16 / 8;
  }
}
@media (min-width: 768px) {
  :root {
    --stage-h: clamp(300px, 46vh, 460px);
  }
}

/* --- Desktop: full-height studio ------------------------------------------------------ */
@media (min-width: 1024px) {
  :root {
    --header: 68px;
    --trust: 38px;
  }
  body {
    padding-bottom: 0;
  }
  .header-mobile {
    display: none;
  }
  .header-ctas,
  body.menu-open .header-ctas {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 0;
    box-shadow: none;
    background: none;
  }
  .header-ctas .hdr.primary {
    order: -1;
    margin-right: 6px;
  }
  .header-ctas .hdr.tel {
    margin-left: 10px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
  }
  .site-header {
    padding: 0 24px;
  }
  .brand img {
    height: 50px;
  }
  .trust {
    justify-content: center;
    gap: 32px;
  }
  .trust > *:nth-child(n) {
    display: inline-flex;
  }
  .studio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    height: calc(100vh - var(--header) - var(--trust));
    height: calc(100dvh - var(--header) - var(--trust));
    min-height: 620px;
    max-height: 960px;
    border-bottom: 1px solid var(--line);
  }
  .stage-col {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
  }
  .stage {
    flex: 1;
    height: auto;
    min-height: 0;
  }
  .view-switch {
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
  }
  .stage-tools {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
  }
  .size-chip {
    left: 14px;
    bottom: 14px;
    font-size: 0.875rem;
    padding: 8px 12px;
  }
  .follow {
    right: 14px;
    bottom: 14px;
  }
  .hint {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(27, 33, 45, 0.7);
    pointer-events: none;
  }
  .stage[data-view="inside"] .hint::after {
    content: "";
  }
  .stage-bar {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    padding: 6px 14px;
  }
  .panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--line);
  }
  .steps {
    position: static;
    flex: none;
  }
  .step-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 26px 28px 28px;
  }
  .uses {
    grid-template-columns: repeat(3, 1fr);
  }
  .use {
    flex-direction: row;
    justify-content: center;
    min-height: 52px;
    font-size: 0.875rem;
  }
  .use .icon {
    width: 20px;
    height: 20px;
  }
  .presets {
    grid-template-columns: 1fr 1fr;
  }
  .panel-foot {
    position: static;
    flex: none;
    box-shadow: none;
    padding: 12px 20px;
  }
  .panel-foot .btn.primary {
    flex: none;
    max-width: none;
  }
  .price-chip {
    margin: 0 auto;
  }
  .toast {
    bottom: 24px;
  }
  .why {
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 56px;
    padding: 88px 32px;
  }
  .process,
  .faq {
    padding: 72px 32px;
  }
  .process ol {
    grid-template-columns: repeat(6, 1fr);
  }
  .site-footer {
    padding: 36px 32px;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 32px;
  }
  .site-footer img {
    grid-row: span 2;
  }
  html {
    scroll-padding-top: 16px;
  }
}
@media (min-width: 1024px) and (max-width: 1239px) {
  .header-ctas .hdr:not(.primary):not(.tel) .icon {
    display: none;
  }
  .header-ctas .hdr {
    padding: 0 10px;
  }
  .header-ctas a[data-cta="consultation"] {
    display: none;
  }
}
@media (min-width: 1440px) {
  .studio {
    grid-template-columns: minmax(0, 1fr) 480px;
  }
}
@media (hover: none) {
  .hint {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* The desktop panel is narrow: step labels sit under their numbers. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .step {
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
  }
}

@supports (height: 1svh) {
  :root {
    --stage-h: clamp(220px, 38svh, 380px);
  }
  @media (min-width: 768px) {
    :root {
      --stage-h: clamp(300px, 46svh, 460px);
    }
  }
}
/* <dialog> fallback for browsers without it (iOS before 15.4): see app.js dialogShim. */
dialog.shim {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 90;
  margin: 0;
}
dialog.shim:not([open]) {
  display: none;
}
.shim-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 89;
  background: rgba(15, 20, 30, 0.6);
}

/* Vector fallback and context recovery (viewer.js) */
#viewer.svg-mode {
  background: linear-gradient(#cfdde6, #e7ece4 40%, #9fb37f 40.5%, #8ba56b);
}
#viewer svg.svg-room {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent !important;
}
.stage.svg-dusk,
#viewer.svg-dusk {
  background: linear-gradient(#0d1a33, #28385c 45%, #6c5b78 72%, #c98f6b);
}
.mode-chip {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 58px;
  max-width: min(340px, calc(100% - 70px));
  pointer-events: auto;
}
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.mode-toggle span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font: italic 600 0.6875rem/1 Georgia, serif;
}
.mode-panel {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
  border-radius: var(--r-m);
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  color: var(--ink);
  max-height: calc(var(--stage-h) - 110px);
  overflow: auto;
}
.mode-panel .btn {
  min-height: 40px;
  font-size: 0.8125rem;
}
.mode-ref {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mode-ref:empty {
  display: none;
}
.mode-diag {
  margin: 0;
  padding: 8px;
  border-radius: var(--r-s);
  background: #f1f1ee;
  font: 0.6875rem/1.45 ui-monospace, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
#viewer.context-lost::after {
  content: "Reloading the 3D view…";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: var(--r-s);
  background: rgba(27, 33, 45, 0.88);
  color: #fff;
  font-size: 0.875rem;
}
@media (min-width: 1024px) {
  .mode-chip {
    left: 14px;
    top: 14px;
  }
  .mode-panel {
    max-height: 60vh;
  }
}
