:root {
  --ink: #172d27;
  --muted: #687770;
  --paper: #f8faf6;
  --panel: rgba(247, 250, 246, .80);
  --line: rgba(193, 204, 197, .72);
  --green: #284d46;
  --mint: #dce9df;
  --orange: #c96f4b;
  --red: #a94736;
  --yellow: #c99e42;
  --panel-width: clamp(390px, 28.58vw, 480px);
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--ink);
  background: #efe7da;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
svg { display: block; }

.shell, .body, .stage, #viewport {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
/* Offscreen tools must not scroll the vehicle and navigation when focused. */
.stage { overflow: clip; }
.shell {
  background:
    linear-gradient(rgba(247,241,230,.12),rgba(247,241,230,.12)),
    #efe7da url("./assets/komorebi-bg-v1.jpg") center / cover no-repeat;
}
html[data-embedded="true"],
html[data-embedded="true"] body,
html[data-embedded="true"] .shell { background: transparent; }

html[data-desktop="fixed"],
html[data-desktop="fixed"] body {
  overflow: hidden;
  background: transparent;
}
html[data-desktop="fixed"] #app {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}
html[data-desktop="fixed"] .shell {
  position: relative;
  inset: auto;
  width: 1680px;
  height: 945px;
  background: transparent;
  zoom: var(--desktop-scale);
}

#viewport {
  isolation: isolate;
  background: transparent;
}
#viewport canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.frameless-brand {
  position: absolute;
  z-index: 26;
  left: 39px;
  top: 51px;
  display: grid;
  place-items: center;
  width: 69px;
  height: 69px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 50%;
  background: rgba(248,250,246,.86);
  box-shadow: 0 15px 34px rgba(38,58,49,.19);
  backdrop-filter: blur(18px);
  pointer-events: none;
}
.frameless-brand span {
  color: #153b32;
  font: 600 28px/1 Georgia, serif;
  letter-spacing: -.06em;
}

nav {
  position: absolute;
  z-index: 24;
  top: 59px;
  left: 50%;
  display: flex;
  width: min(1124px, calc(100% - 556px));
  height: 65px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 23px;
  background: rgba(248,250,246,.86);
  box-shadow: 0 15px 36px rgba(38,58,49,.16);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}
nav button[data-workspace] {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-width: 0;
  min-height: 51px;
  padding: 7px 16px;
  border-radius: 15px;
  background: transparent;
  color: #1f3b34;
  white-space: nowrap;
}
nav button[data-workspace]:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 11px;
  width: 1px;
  height: 29px;
  background: rgba(153,169,160,.58);
}
nav button[data-workspace].active {
  background: var(--mint);
}
nav button[data-workspace].active::after { display: none; }
nav button[data-workspace] i {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  font-style: normal;
}
nav button[data-workspace] svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav button[data-workspace] span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
}
.nav-short { display: none; }
.mobile-nav-toggle { display: none; }

.chrome-actions {
  position: absolute;
  z-index: 27;
  top: 62px;
  right: 39px;
  display: flex;
  gap: 10px;
}
.chrome-actions > button {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 50%;
  background: rgba(248,250,246,.86);
  color: #29483f;
  box-shadow: 0 13px 31px rgba(38,58,49,.16);
  backdrop-filter: blur(18px);
  font-size: 22px;
}
.chrome-actions > button:disabled { opacity: 1; cursor: default; }
.more-menu {
  position: absolute;
  top: 66px;
  right: 0;
  width: 188px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 15px;
  background: rgba(248,250,246,.94);
  box-shadow: 0 14px 34px rgba(38,58,49,.2);
  backdrop-filter: blur(20px);
}
.more-menu[hidden] { display: none; }
.more-menu button { width: 100%; padding: 10px; border-radius: 9px; background: transparent; text-align: left; }
.more-views { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.more-menu .more-views button { color: #294b42; text-align: center; }

.view-title {
  position: absolute;
  z-index: 3;
  left: 45px;
  top: 166px;
  pointer-events: none;
}
.view-title #view-kicker { display: none; }
.view-title strong {
  display: block;
  color: #1d2f2a;
  font: 600 28px/1.15 Georgia, serif;
  letter-spacing: -.025em;
}
.view-title small { display: block; margin-top: 5px; color: #61726b; font-size: 14px; }
.view-tools, .view-help { display: none !important; }

.stage > aside {
  position: absolute;
  z-index: 18;
  top: 18.2vh;
  right: 42px;
  bottom: 13.3vh;
  display: flex;
  flex-direction: column;
  width: var(--panel-width);
  min-height: 0;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 24px 67px rgba(37,55,47,.20);
  backdrop-filter: blur(24px) saturate(.84);
  transform: translateX(calc(100% + 72px));
  transition: transform .22s ease;
}
.shell.panel-open .stage > aside { transform: translateX(0); }
.panel-edge-close {
  position: absolute;
  z-index: 4;
  left: -30px;
  top: 170px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 80px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.8);
  border-right: 0;
  border-radius: 17px 0 0 17px;
  background: rgba(247,250,246,.86);
  color: #18342c;
  box-shadow: -9px 10px 24px rgba(37,55,47,.13);
  backdrop-filter: blur(18px);
}
.panel-edge-close::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(2px) rotate(45deg);
}
.panel-chrome {
  position: absolute;
  z-index: 2;
  top: 19px;
  right: 18px;
  display: flex;
  min-height: 40px;
  padding: 0;
  background: transparent;
}
.panel-chrome > strong { display: none; }
.panel-chrome div { display: flex; gap: 8px; }
.panel-chrome button {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #17322b;
  font-size: 29px;
}
.panel-chrome button:hover { background: rgba(237,242,237,.7); }
.panel-chrome button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#panel-content {
  flex: 1;
  min-height: 0;
  padding: 31px 26px 30px;
  overflow: auto;
  scrollbar-width: none;
}
#panel-content::-webkit-scrollbar { display: none; }
#panel-content > .eyebrow { margin: 0 100px 10px 6px !important; font-size: 11px !important; letter-spacing: .18em !important; }
#panel-content > h1 { margin: 0 100px 23px 6px; color: #19332b; font: 600 37px/1 Georgia, serif; }
#panel[data-workspace="vehicle"] #panel-content > .lead,
#panel[data-workspace="vehicle"] #panel-content > .primary,
#panel[data-workspace="vehicle"] .vehicle-inspect { display: none; }

.panel-toggle {
  position: absolute;
  z-index: 12;
  right: 28px;
  top: 50%;
  display: grid;
  place-items: center;
  align-items: center;
  width: 58px;
  min-height: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 50%;
  background: rgba(248,250,246,.9);
  color: #284d46;
  box-shadow: 0 12px 30px rgba(37,55,47,.18);
  backdrop-filter: blur(18px);
  transform: translateY(-50%);
}
.panel-toggle-icon { display: grid; place-items: center; width: 24px; height: 24px; }
.panel-toggle-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.panel-toggle #panel-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell.panel-open .panel-toggle { opacity: 0; pointer-events: none; }

h1 { margin: 4px 0 5px; font: 600 30px/1.08 Georgia, serif; }
h2 { margin: 22px 0 10px; font-size: 16px; }
.eyebrow { color: #64776f !important; font-size: 9px !important; font-weight: 700 !important; letter-spacing: .16em !important; text-transform: uppercase; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.control-section {
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 12px;
  background: rgba(251,252,248,.68);
  box-shadow: 0 5px 18px rgba(51,70,62,.06);
  overflow: hidden;
}
.control-section:first-of-type { margin-top: 0; }
.control-section > summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 65px;
  padding: 9px 18px;
  list-style: none;
  color: #172e28;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.control-section > summary::-webkit-details-marker,
.mini-control > summary::-webkit-details-marker { display: none; }
.control-section > summary i,
.mini-control > summary i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; font-style: normal; }
.control-section > summary svg,
.mini-control > summary svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.control-section > summary span,
.mini-control > summary span { flex: 1; }
.control-section > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1.8px solid #17322b;
  border-bottom: 1.8px solid #17322b;
  transform: translateY(-2px) rotate(45deg);
  transform-origin: center;
}
.control-section[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.control-section[open] { padding-bottom: 16px; }
.control-section > summary ~ * { margin-left: 19px; margin-right: 19px; }
.body-section > h2 { margin: 3px 19px 10px; font-size: 14px; font-weight: 500; }
.colour-tools { display: grid; grid-template-columns: repeat(6,1fr); align-items: center; gap: 13px; margin: 0 19px 16px !important; padding-bottom: 17px; border-bottom: 1px solid #d8dfda; }
.colour-tools button, .custom-colour { width: 52px; height: 52px; margin: 0 !important; border: 0; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.colour-tools button.active { box-shadow: 0 0 0 3px #fbfcf8, 0 0 0 5px #18372f; }
/* the colour wheel sits after the preset paints */
.compact-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 0 19px !important; }
.mini-control { margin: 0; padding: 0; border: 1px solid #fff; border-radius: 11px; background: rgba(251,252,248,.78); box-shadow: 0 4px 14px rgba(51,70,62,.06); overflow: hidden; }
.mini-control > summary { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 9px 14px; list-style: none; font-size: 14px; font-weight: 500; cursor: pointer; }
.mini-control > summary::after { content: "›"; display: grid; place-items: center; width: 16px; height: 24px; font-size: 22px; line-height: 1; }
.mini-control[open] { grid-column: 1/-1; padding-bottom: 12px; }
.mini-control[open] > summary::after { content: "−"; font-size: 18px; }
.mini-control > summary ~ * { margin-left: 12px; margin-right: 12px; }

.notice { margin: 17px 0; padding: 12px 14px; border-left: 3px solid var(--yellow); border-radius: 0 8px 8px 0; background: #f2eee0; }
.notice b { font-size: 13px; }
.notice p, details p { color: var(--muted); font-size: 11px; line-height: 1.45; }
.notice a { display: inline-block; margin-top: 7px; color: var(--ink); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.primary { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-top: 24px; padding: 14px 16px; border-radius: 9px; background: var(--green); color: white; font-size: 13px; font-weight: 700; }
.object-list { display: grid; gap: 7px; }
.object-list button { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid transparent; border-radius: 8px; background: #eeeee7; text-align: left; }
.object-list button.active { border-color: #adc0b4; background: var(--mint); }
.object-list button > i { flex: none; width: 27px; height: 27px; border: 1px solid rgba(0,0,0,.06); border-radius: 6px; }
.object-list button span { font-size: 12px; font-weight: 700; }
.object-list button small { display: block; margin-top: 3px; color: #79827e; font-size: 10px; font-weight: 400; }
.inspector { margin: 17px 0; padding: 16px; border: 1px solid #ced7cf; border-radius: 11px; background: #f3f5ef; }
.inspector label { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin: 15px 0; color: var(--muted); font-size: 11px; }
.inspector output { color: var(--ink); font-weight: 700; }
input[type="range"] { grid-column: 1/-1; width: 100%; accent-color: var(--orange); }
.danger-text { padding: 5px 0; background: transparent; color: var(--red); font-size: 11px; text-decoration: underline; }
.dimension-readout { display: flex; gap: 6px; margin: 9px 0; }
.dimension-readout span { flex: 1; padding: 7px 5px; border: 1px solid #d3d9d2; border-radius: 7px; background: #fff; text-align: center; font-size: 10px; font-weight: 700; }
.support-note { margin: 0 0 11px; padding: 8px 9px; border-left: 3px solid #5e8879; background: #e4ece6; color: #3f5e54; font-size: 11px; }
.gesture-note, .fine { color: var(--muted); font-size: 10px; line-height: 1.45; }
.flow { display: grid; gap: 5px; margin: 15px 0; }
.flow div { display: grid; grid-template-columns: 1fr 18px 1fr; align-items: center; padding: 8px 10px; border-radius: 7px; background: #eef0e9; font-size: 10px; }
.flow i { color: var(--orange); text-align: center; }
.toggle { display: flex !important; align-items: center !important; gap: 9px !important; }
.toggle input { display: none; }
.toggle span { position: relative; width: 31px; height: 18px; border-radius: 10px; background: #b9c0bc; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { left: 15px; }
.metric-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 18px 0; }
.metric-strip div { padding: 10px 8px; border-radius: 8px; background: #e7ebe5; }
.metric-strip span, .summary-card span { display: block; color: var(--muted); font-size: 9px; }
.metric-strip strong { display: block; margin-top: 4px; font-size: 15px; }
.trip-verdict { margin-bottom: 18px; padding: 14px; border-radius: 9px; }
.trip-verdict.bad { background: #f2dcd7; color: #743326; }
.trip-verdict.warn { background: #f4ead0; color: #755a1d; }
.trip-verdict.good { background: #dceade; color: #285532; }
.timeline { display: flex; align-items: end; gap: 5px; height: 145px; padding: 0 2px; border-bottom: 1px solid #bfc6c0; }
.day { display: grid; flex: 1; grid-template-rows: 13px 105px 17px; gap: 3px; text-align: center; font-size: 8px; }
.day > div { display: flex; align-items: end; overflow: hidden; border-radius: 3px 3px 0 0; background: #e9ece7; }
.day i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: #53766b; }
.day.reserve i { background: #d0a54a; }
.day.empty i { background: #b34f3e; }
.issues { display: grid; gap: 9px; }
.issues article { display: flex; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.summary-card { padding: 13px 0; border-bottom: 1px solid var(--line); }
.summary-card strong, .summary-card small { display: block; }
.summary-card strong { margin: 5px 0; font-size: 14px; }
.summary-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }

#resize-overlays { position: absolute; z-index: 7; inset: 0; overflow: hidden; pointer-events: none; }
.resize-handle { position: absolute; left: 0; top: 0; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; box-shadow: none; pointer-events: auto; touch-action: none; }
.resize-handle::before { content: ""; position: absolute; inset: 9px; border: 2px solid #f5f2e9; border-radius: 5px; background: var(--green); box-shadow: 0 2px 7px rgba(37,55,46,.25); }
.resize-handle[data-kind="axis"] { width: 56px; height: 40px; }
.resize-handle[data-kind="axis"]::before { inset: 9px 1px; border: 0; border-radius: 0; background: var(--green); clip-path: polygon(0 50%,20% 0,20% 30%,80% 30%,80% 0,100% 50%,80% 100%,80% 70%,20% 70%,20% 100%); filter: drop-shadow(0 2px 3px rgba(37,55,46,.25)); }
.resize-handle[data-kind="axis"][data-axis="x"]::before { background: #c96f4b; }
.resize-handle[data-kind="axis"][data-axis="y"]::before { background: #5f8277; }
.resize-handle[data-kind="axis"][data-axis="z"]::before { background: #637e96; }
.resize-handle[data-facing="back"] { z-index: 1; opacity: .28; }
.resize-handle[data-facing="front"], .resize-handle:hover, .resize-handle[data-state="active"], .resize-handle[data-state="anchor"] { z-index: 2; opacity: 1; }

.transform-tools { position: absolute; z-index: 9; right: 16px; top: 50%; display: flex; flex-direction: column; gap: 13px; transform: translateY(-50%); pointer-events: none; }
.transform-tools[hidden] { display: none; }
.mode-tools, .edit-actions { display: flex; flex-direction: column; gap: 8px; }
.edit-actions { padding-top: 5px; border-top: 1px solid rgba(40,77,70,.18); }
.transform-tools button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #bac8bf; border-radius: 50%; background: rgba(248,247,240,.93); color: #36594f; box-shadow: 0 4px 14px rgba(35,54,45,.14); backdrop-filter: blur(9px); pointer-events: auto; }
.transform-tools button.active { border-color: var(--green); background: var(--green); color: #fff; }
.transform-tools button.confirm { border-color: #97b0a4; background: #d9e4dc; color: #183c32; }
.transform-tools svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan-nudges { position: absolute; right: 54px; bottom: 0; display: grid; grid-template-columns: repeat(2,38px); gap: 6px; }

@media (max-width: 1320px) and (min-width: 761px) {
  .frameless-brand { left: 2.32vw; top: 5.4vh; width: 4.11vw; height: 4.11vw; }
  .frameless-brand span { font-size: 1.67vw; }
  nav { top: 3.51vw; width: 66.9vw; height: 3.87vw; padding: .42vw .71vw; border-radius: 1.37vw; }
  nav button[data-workspace] { min-height: 3.04vw; gap: .6vw; padding: .3vw .65vw; border-radius: .9vw; }
  nav button[data-workspace] i, nav button[data-workspace] svg { width: 1.9vw; height: 1.9vw; }
  nav button[data-workspace] span { font-size: .72vw; }
  .chrome-actions { top: 3.69vw; right: 2.32vw; gap: .6vw; }
  .chrome-actions > button { width: 3.39vw; height: 3.39vw; font-size: 1.3vw; }
  .view-title { left: 2.68vw; top: 9.88vw; }
  .view-title strong { font-size: 1.67vw; }
  .view-title small { font-size: .83vw; }
  .stage > aside { right: 2.5vw; }
  .panel-edge-close { left: -1.8vw; top: 10.12vw; width: 1.9vw; height: 4.76vw; font-size: 1.8vw; }
  .panel-chrome { top: 1.05vw; right: .98vw; }
  .panel-chrome button { width: 2.25vw; height: 2.25vw; font-size: 1.65vw; }
  #panel-content { padding: 1.43vw 1.2vw; }
  #panel-content > .eyebrow { margin: 0 5.7vw .48vw .24vw !important; font-size: .48vw !important; }
  #panel-content > h1 { margin: 0 5.7vw 1.1vw .24vw; font-size: 1.67vw; }
  .control-section { margin-top: .36vw; border-radius: .6vw; }
  .control-section > summary { min-height: 2.92vw; gap: .6vw; padding: .42vw .83vw; font-size: .72vw; }
  .control-section > summary i, .mini-control > summary i { width: 1.55vw; height: 1.55vw; }
  .control-section > summary svg, .mini-control > summary svg { width: 1.43vw; height: 1.43vw; }
  .control-section[open] { padding-bottom: .72vw; }
  .control-section > summary ~ * { margin-left: .83vw; margin-right: .83vw; }
  .body-section > h2 { margin: .12vw .83vw .48vw; font-size: .66vw; }
  .colour-tools { gap: .54vw; margin: 0 .83vw .72vw !important; padding-bottom: .78vw; }
  .colour-tools button { width: 2.32vw; height: 2.32vw; }
  .compact-option-grid { gap: .66vw; margin: 0 .83vw !important; }
  .mini-control > summary { min-height: 2.92vw; gap: .42vw; padding: .42vw .6vw; font-size: .66vw; }
}

@media (max-width: 760px) {
  html[data-input="mouse"] .frameless-brand { left: 18px; top: 18px; width: 52px; height: 52px; }
  html[data-input="mouse"] .frameless-brand span { font-size: 21px; }
  html[data-input="mouse"] .chrome-actions { top: 18px; right: 18px; gap: 8px; }
  html[data-input="mouse"] .chrome-actions > button { width: 52px; height: 52px; font-size: 18px; }
  html[data-input="mouse"] nav { top: 82px; left: 18px; right: 18px; width: auto; height: 56px; padding: 6px 8px; border-radius: 18px; transform: none; }
  html[data-input="mouse"] nav button[data-workspace] { gap: 5px; min-height: 44px; padding: 5px 7px; }
  html[data-input="mouse"] nav button[data-workspace] i,
  html[data-input="mouse"] nav button[data-workspace] svg { width: 22px; height: 22px; }
  html[data-input="mouse"] nav button[data-workspace] span { font-size: 9px; }
  html[data-input="mouse"] .view-title { left: 20px; top: 154px; }
  html[data-input="mouse"] .view-title strong { font-size: 19px; }
  html[data-input="mouse"] .view-title small { font-size: 11px; }
  html[data-input="mouse"] .stage > aside { top: 148px; right: 15px; bottom: 15px; width: min(300px,44vw); }
  html[data-input="mouse"] .panel-edge-close { left: -24px; top: 118px; width: 26px; height: 64px; font-size: 24px; }
  html[data-input="mouse"] .panel-chrome { top: 12px; right: 12px; }
  html[data-input="mouse"] .panel-chrome button { width: 30px; height: 30px; font-size: 22px; }
  html[data-input="mouse"] #panel-content { padding: 22px 18px 24px; }
  html[data-input="mouse"] #panel-content > .eyebrow { margin-right: 72px !important; font-size: 8px !important; }
  html[data-input="mouse"] #panel-content > h1 { margin-right: 72px; font-size: 27px; }
  html[data-input="mouse"] .control-section > summary { min-height: 48px; gap: 8px; padding: 6px 11px; font-size: 11px; }
  html[data-input="mouse"] .colour-tools { gap: 7px; margin-inline: 11px !important; }
  html[data-input="mouse"] .colour-tools button { width: 32px; height: 32px; }
  html[data-input="mouse"] .compact-option-grid { gap: 8px; margin-inline: 11px !important; }
  html[data-input="mouse"] .mini-control > summary { min-height: 45px; padding: 6px 8px; font-size: 10px; }
  html[data-input="mouse"] .panel-toggle { top: 50%; right: 18px; bottom: auto; width: 54px; min-height: 54px; height: 54px; padding: 0; border-radius: 50%; transform: translateY(-50%); }
}

@media (max-width: 760px) {
  html[data-input="touch"] .shell { --mobile-nav-height: 96px; --mobile-panel-height: min(34dvh, 320px); }
  html[data-input="touch"] .frameless-brand { left: 18px; top: max(18px,env(safe-area-inset-top)); width: 52px; height: 52px; }
  html[data-input="touch"] .frameless-brand span { font-size: 21px; }
  html[data-input="touch"] .chrome-actions { top: max(18px,env(safe-area-inset-top)); right: 18px; gap: 9px; }
  html[data-input="touch"] .chrome-actions > button { width: 52px; height: 52px; font-size: 20px; }
  html[data-input="touch"] #redo { display: none; }
  html[data-input="touch"] nav { top: auto; left: 10px; right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); width: auto; height: var(--mobile-nav-height); padding: 8px 10px 10px; border-radius: 17px; opacity: 0; pointer-events: none; transform: translateY(calc(100% + 24px)); transition: transform .2s ease, opacity .16s ease; }
  html[data-input="touch"] .shell.mobile-nav-open nav { opacity: 1; pointer-events: auto; transform: translateY(0); }
  html[data-input="touch"] nav button[data-workspace] { flex-direction: column; gap: 5px; min-height: 74px; padding: 7px 3px; border-radius: 14px; }
  html[data-input="touch"] nav button[data-workspace]::after { display: none; }
  html[data-input="touch"] nav button[data-workspace] i,
  html[data-input="touch"] nav button[data-workspace] svg { width: 30px; height: 30px; }
  html[data-input="touch"] nav button[data-workspace] span { font-size: 12px; }
  html[data-input="touch"] .nav-full { display: none; }
  html[data-input="touch"] .nav-short { display: block; }
  html[data-input="touch"] .mobile-nav-toggle {
    position: absolute;
    z-index: 25;
    left: 50%;
    bottom: max(12px,env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translateX(-50%);
    transition: bottom .2s ease, opacity .15s ease;
  }
  html[data-input="touch"] .mobile-nav-toggle span {
    width: 11px;
    height: 11px;
    border-left: 2px solid #29483f;
    border-top: 2px solid #29483f;
    filter: drop-shadow(0 1px 2px rgba(255,255,255,.9));
    transform: translateY(3px) rotate(45deg);
  }
  html[data-input="touch"] .shell.mobile-nav-open .mobile-nav-toggle { bottom: calc(var(--mobile-nav-height) + max(18px,env(safe-area-inset-bottom))); }
  html[data-input="touch"] .shell.mobile-nav-open .mobile-nav-toggle span { transform: translateY(-3px) rotate(225deg); }
  html[data-input="touch"] .shell.panel-open .mobile-nav-toggle { opacity: 0; pointer-events: none; }
  html[data-input="touch"] .view-title { display: none; }
  html[data-input="touch"] .panel-toggle { top: auto; left: 50%; right: auto; bottom: max(60px,calc(env(safe-area-inset-bottom) + 52px)); display: flex; width: auto; min-height: 54px; height: auto; flex-direction: row; gap: 9px; padding: 10px 28px; border-right: 1px solid rgba(255,255,255,.78); border-radius: 28px; transform: translateX(-50%); white-space: nowrap; transition: bottom .2s ease, opacity .15s ease; }
  html[data-input="touch"] .panel-toggle #panel-toggle-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: nowrap; }
  html[data-input="touch"] .shell.mobile-nav-open .panel-toggle { bottom: calc(var(--mobile-nav-height) + max(62px,env(safe-area-inset-bottom))); }
  html[data-input="touch"] .stage > aside { top: auto; left: 9px; right: 9px; bottom: max(10px,env(safe-area-inset-bottom)); width: auto; height: var(--mobile-panel-height); max-height: var(--mobile-panel-height); border-radius: 20px; transform: translateY(calc(100% + 46px)); box-shadow: 0 -14px 40px rgba(37,55,47,.18); }
  html[data-input="touch"] .shell.panel-open .stage > aside { transform: translateY(0); }
  html[data-input="touch"] .shell.panel-open #viewport { bottom: calc(var(--mobile-panel-height) + max(20px,env(safe-area-inset-bottom))); }
  html[data-input="touch"] .panel-edge-close, html[data-input="touch"] #panel-pin { display: none; }
  html[data-input="touch"] .panel-chrome { top: 6px; right: 10px; }
  html[data-input="touch"] .panel-chrome::before { content: none; }
  html[data-input="touch"] #panel-content { padding: 22px 15px 20px; }
  html[data-input="touch"] #panel-content > .eyebrow { font-size: 10px !important; }
  html[data-input="touch"] #panel-content > h1 { font-size: 28px; }
  html[data-input="touch"] .control-section > summary { min-height: 58px; padding: 8px 14px; font-size: 15px; }
  html[data-input="touch"] .colour-tools { grid-template-columns: repeat(6,1fr); gap: 7px; }
  html[data-input="touch"] .colour-tools button { width: 38px; height: 38px; }
  html[data-input="touch"] .mini-control > summary { min-height: 56px; font-size: 14px; }
  html[data-input="touch"] .choice-grid button,
  html[data-input="touch"] .surface-grid button,
  html[data-input="touch"] .exterior-add button { min-height: 46px; font-size: 13px; }
  html[data-input="touch"] .vehicle-setup label,
  html[data-input="touch"] .surface-guidance,
  html[data-input="touch"] .gesture-note,
  html[data-input="touch"] .fine { font-size: 12px; }
  html[data-input="touch"] .object-list button span { font-size: 14px; }
  html[data-input="touch"] .object-list button small { font-size: 12px; }
  html[data-input="touch"] .resize-handle { width: 52px; height: 52px; }
  html[data-input="touch"] .resize-handle[data-kind="axis"] { width: 68px; height: 56px; }
  html[data-input="touch"] .transform-tools { top: auto; right: max(12px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); transform: none; }
  html[data-input="touch"] .transform-tools button { width: 52px; height: 52px; }
  html[data-input="touch"][data-editing="true"] nav,
  html[data-input="touch"][data-editing="true"] .mobile-nav-toggle,
  html[data-input="touch"][data-editing="true"] .stage > aside { display: none; }
  html[data-input="touch"][data-editing="true"] #viewport { bottom: 0; }
}
