:root {
  --bg: #dfe7ee;
  --panel: rgba(255, 255, 255, 0.92);
  --ink: #1f2a33;
  --muted: #5b6873;
  --accent: #b5562c;
  --line: rgba(31, 42, 51, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

#viewport { position: fixed; inset: 0; touch-action: none; }
#viewport canvas { display: block; }

.bar {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08); max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center;
}
.brand { font-weight: 700; letter-spacing: 0.02em; }
.views { display: flex; background: #eef1f4; border-radius: 9px; padding: 2px; }
.views button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; font: inherit; color: var(--muted); cursor: pointer;
}
.views button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.toggles { display: flex; gap: 12px; color: var(--muted); }
.toggles label { display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.toggles label.disabled { opacity: 0.4; pointer-events: none; }

.hint {
  position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  color: var(--muted); font-size: 12px; white-space: nowrap; max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis;
}
button.primary, #btn-exit {
  border: 0; border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff;
}
#btn-exit { background: #33414c; }
.walk-ui { display: none; align-items: center; gap: 8px; }
.goto { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.goto select { font: inherit; padding: 5px 6px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); max-width: 46vw; }

body.walking .views, body.walking .toggles, body.walking #btn-walk { display: none; }
body.walking .walk-ui { display: flex; }

/* crosshair dot in walk mode */
body.walking #viewport::after {
  content: ""; position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none;
}

.lock-hint {
  display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, 24px); pointer-events: none;
  background: rgba(20, 28, 34, 0.72); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
body.walking:not(.touch):not(.mouse-locked):not(.no-lock) .lock-hint { display: block; }
body.mouse-locked .bar { opacity: 0.55; }

.joystick {
  position: fixed; left: max(22px, env(safe-area-inset-left)); bottom: max(54px, calc(env(safe-area-inset-bottom) + 44px));
  width: 120px; height: 120px; border-radius: 50%; display: none; place-items: center; touch-action: none;
  background: rgba(255, 255, 255, 0.28); border: 2px solid rgba(255, 255, 255, 0.7); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.joystick .knob { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25); pointer-events: none; }
body.walking.touch .joystick { display: grid; }

.room-panel {
  position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px));
  width: 300px; max-height: calc(100vh - 140px); overflow: auto; padding: 14px 16px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.room-panel[hidden] { display: none; }
.room-panel h3 { margin: 0 28px 2px 0; font-size: 17px; }
.room-panel .sub { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.room-panel .close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #eef1f4; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted);
}
.room-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.room-panel dt { color: var(--muted); }
.room-panel dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.room-panel dd span, .room-panel li span { font-weight: 400; color: var(--muted); }
.room-panel dd em { display: block; font-weight: 400; font-style: normal; font-size: 12px; color: var(--muted); }
.room-panel h4 { margin: 12px 0 4px; font-size: 13px; }
.room-panel ul { margin: 0; padding-left: 18px; }
.room-panel li { margin: 2px 0; }
.room-panel .none { margin: 0; color: var(--muted); }

.dim-label {
  background: #c4581f; color: #fff; border-radius: 5px; padding: 1px 6px; font-size: 12px; font-weight: 700;
  white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .room-panel { left: 8px; right: 8px; width: auto; bottom: max(44px, calc(env(safe-area-inset-bottom) + 38px)); max-height: 45vh; }
  body.walking.touch .room-panel { bottom: 190px; }
}

/* ---------------------------------------------------------------- design tools */
.dock {
  position: fixed; right: max(10px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; padding: 5px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.dock button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; padding: 7px 2px 5px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer;
}
.dock button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.dock button:hover { background: #eef1f4; color: var(--ink); }
.dock button.on { background: var(--accent); color: #fff; }

.design-panel {
  position: fixed; right: calc(max(10px, env(safe-area-inset-right)) + 84px); top: 50%; transform: translateY(-50%);
  width: 320px; max-height: calc(100vh - 150px); overflow: auto; padding: 14px 16px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.design-panel[hidden] { display: none; }
.design-panel h3 { margin: 0 28px 8px 0; font-size: 17px; }
.design-panel h4 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.design-panel .close, .room-panel .close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #eef1f4; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted);
}
.design-panel .help { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.design-panel button { font: inherit; cursor: pointer; }
.design-panel .row { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.design-panel .row.gap { margin-top: 8px; }
.design-panel input[type=color] { width: 40px; height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; }
.design-panel input:not([type]) , .design-panel #save-name { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.design-panel .wide, .design-panel #save-as, .design-panel .filebtn {
  display: block; text-align: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.design-panel .wide { width: 100%; margin-top: 10px; }
.design-panel #save-as { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }
.design-panel .danger, .selection-bar .danger { color: #b3261e; }

.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.sw { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); background: var(--c); padding: 0; }
.sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.current { margin-top: 10px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chip { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.2); display: inline-block; }

.finishes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fin { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; font-size: 12px; }
.fin.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.fin .prev { width: 34px; height: 34px; border-radius: 5px; flex: none; background-size: 200%; }

.catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.catalog button { display: flex; flex-direction: column; align-items: flex-start; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.catalog button:hover { border-color: var(--accent); }
.catalog b { font-size: 13px; }
.catalog span { font-size: 11px; color: var(--muted); }

.saves { list-style: none; margin: 10px 0 0; padding: 0; }
.saves li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.saves li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.saves li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saves li small { color: var(--muted); font-size: 11px; }
.saves li button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 9px; }
.saves li.none { color: var(--muted); border: 0; }

.selection-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px));
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px 12px; padding: 8px 10px 8px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); max-width: calc(100vw - 20px);
}
.selection-bar[hidden] { display: none; }
.selection-bar .info { display: flex; flex-direction: column; line-height: 1.2; }
.selection-bar .size { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.selection-bar .len { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.selection-bar .len[hidden] { display: none; }
.selection-bar .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.selection-bar button.move { font-weight: 700; border-color: var(--accent); color: var(--accent); }
.selection-bar button.move.on { background: var(--accent); color: #fff; }
.selection-bar button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px; cursor: pointer; }

.toast {
  position: fixed; left: 50%; top: 84px; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  background: #26323b; color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100vw - 24px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .dock { top: auto; bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px)); transform: none; }
  .dock button { width: 52px; padding: 6px 2px 4px; font-size: 10px; }
  .design-panel { left: 8px; right: 76px; width: auto; top: auto; transform: none; bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px)); max-height: 48vh; }
  .selection-bar { bottom: auto; top: 96px; }
  body.walking.touch .dock { bottom: 190px; }
}

/* ---------------------------------------------------------------- cost tab */
button.secondary { border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; background: #fff; color: var(--ink); }
body.walking #btn-cost { display: none; }
body.costing .dock, body.costing .hint, body.costing .room-panel, body.costing .selection-bar, body.costing .design-panel { display: none; }
.cost { position: fixed; inset: 0; z-index: 20; background: rgba(20, 28, 34, 0.35); overflow: auto; padding: max(12px, env(safe-area-inset-top)) 12px 24px; }
.cost[hidden] { display: none; }
.cost-inner { max-width: 1180px; margin: 0 auto; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); padding: 18px 20px 22px; }
.cost-head { display: flex; gap: 12px; align-items: flex-start; }
.cost-head h2 { margin: 0 0 4px; font-size: 20px; }
.cost-head .lede { margin: 0; color: var(--muted); font-size: 13px; max-width: 760px; }
.cost-close { margin-left: auto; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef1f4; font-size: 20px; cursor: pointer; color: var(--muted); }
.cost-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 16px 0 12px; }
.cost-totals .grand { grid-column: span 2; }
.cost-head h2 .variant { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: #eef1f4; color: var(--muted); font-size: 13px; font-weight: 600; vertical-align: 2px; }
.cost-totals > div { background: #f5f7f9; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cost-totals span { font-size: 12px; color: var(--muted); }
.cost-totals b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cost-totals .grand { background: #fbefe8; border-color: #efc9b4; }
.cost-totals .grand b { font-size: 21px; color: #8e3f1c; }
.cost-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.cost-tools .spacer { flex: 1; }
.cost-tools button, .cost-tabs button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; color: var(--ink); }
.cost-tools button[data-act="xlsx"], .cost-tools button[data-act="pdf"] { font-weight: 600; }
.cost-tools button:disabled { opacity: 0.6; cursor: progress; }
.seg { display: flex; align-items: center; gap: 4px; }
.seg span { color: var(--muted); margin-right: 4px; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cost-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 12px 0 0; }
.cost-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 8px 10px; }
.cost-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.cost-body { padding-top: 10px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cost-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: #fff; }
.cost-tbl td { padding: 5px 8px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; }
.cost-tbl td:first-child { min-width: 170px; }
.cost-tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost-tbl .b { font-weight: 600; }
.cost-tbl tr.cat td { background: #f5f7f9; font-weight: 700; font-size: 12px; color: var(--ink); padding-top: 8px; }
.cost-tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); padding-top: 8px; }
.cost-tbl input { width: 96px; text-align: right; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fffdf5; }
.cost-tbl .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.2); vertical-align: -2px; margin-right: 6px; }
.fine { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.assume { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.assume fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; }
.assume legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.assume label { display: grid; grid-template-columns: 1fr 80px 92px; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.assume input { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; text-align: right; background: #fffdf5; }
.assume em { font-style: normal; color: var(--muted); font-size: 12px; }
.cost-body h3 { font-size: 14px; margin: 16px 0 6px; }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.notes li { margin: 3px 0; }
@media (max-width: 760px) {
  .cost { padding: 0; }
  .cost-inner { border-radius: 0; min-height: 100%; padding: 14px 12px 20px; }
  .cost-totals { grid-template-columns: 1fr 1fr; }
  .cost-head h2 .variant { display: block; margin: 4px 0 0; width: fit-content; }
  .cost-totals .grand { grid-column: 1 / -1; }
  .cost-tools .spacer { display: none; }
}

.loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 16px; color: var(--muted); pointer-events: none; }

.room-label {
  background: rgba(255, 255, 255, 0.88); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; pointer-events: none;
}

@media (max-width: 560px) {
  .bar { gap: 6px; padding: 6px; }
  .brand { display: none; }
  .views button { padding: 6px 8px; font-size: 13px; }
  .hint { font-size: 11px; }
}

/* ---------------------------------------------------------------- floors + facade style */
.bar .floors { background: #eef1f4; border-radius: 9px; padding: 2px; gap: 0; }
.bar .floors button { border: 0; background: transparent; padding: 7px 10px; border-radius: 7px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.bar .floors button.on { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
#btn-style b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }
body.walking .floors { display: none; }
body.costing .style-panel { display: none; }

.style-panel {
  position: fixed; left: max(12px, env(safe-area-inset-left)); top: 76px; bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px));
  width: 360px; display: flex; flex-direction: column; overflow: hidden; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}
.style-panel[hidden] { display: none; }
.style-panel header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 16px; }
.style-panel h3 { margin: 0; font-size: 17px; flex: 1; }
.style-panel .steps { display: flex; gap: 4px; }
.style-panel .steps button, .style-panel .close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef1f4; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.style-panel .close { color: var(--muted); }
.style-panel .styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px 10px; overflow: auto; flex: none; max-height: 52%; }
.style-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.style-card:hover { border-color: var(--accent); }
.style-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.style-card b { font-size: 13px; line-height: 1.2; }
.style-card b em { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: #eef1f4; font-size: 11px; color: var(--muted); }
.style-card.on b em { background: var(--accent); color: #fff; }
.style-card small { color: var(--muted); font-size: 11px; }
.sw-strip { display: inline-flex; width: 100%; height: 10px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.1); }
.sw-strip i { flex: 1; }
.style-info { border-top: 1px solid var(--line); padding: 10px 16px 14px; overflow: auto; flex: 1; font-size: 13px; }
.style-info h4 { margin: 0 0 4px; font-size: 15px; }
.style-info h4 span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 4px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; vertical-align: 1px; }
.style-info p { margin: 0 0 8px; color: var(--ink); }
.style-info h5 { margin: 8px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.style-info ul { margin: 0; padding-left: 18px; }
.style-info li { margin: 2px 0; }
.style-info .cautions li { color: #8e3f1c; }
body.styling .room-panel { display: none; }

.compare-empty { padding: 18px 4px; }
.compare-empty p { margin: 0 0 10px; color: var(--muted); }
.cost-tbl.compare td:nth-child(2) { min-width: 220px; }
.cost-tbl.compare .sw-strip { width: 46px; height: 12px; margin-right: 8px; vertical-align: -2px; }
.cost-tbl.compare tr.on td { background: #fbefe8; }
.cost-tbl.compare .up { color: #8e3f1c; }
.cost-tbl.compare .down { color: #2d6a3e; }
.cost-tbl.compare button { font: inherit; font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.fine button.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 760px) {
  .style-panel { top: auto; left: 8px; right: 8px; width: auto; max-height: 56vh; bottom: max(44px, calc(env(safe-area-inset-bottom) + 38px)); }
  .style-panel .styles { display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .style-card { flex: 0 0 132px; scroll-snap-align: start; }
  body.styling .dock { display: none; }
}
@media (max-width: 560px) {
  .bar .floors button { padding: 6px 7px; font-size: 13px; }
  #btn-style, #btn-cost, #btn-walk { padding: 6px 10px; }
}
