/* ============================================================
   NOAR Balkon Konfigurator - premium app shell
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy-950: #0d0d0c;
  --navy-900: #171716;
  --navy-800: #25221d;
  --navy-700: #3d3428;
  --blue-100: #efe0c3;
  --blue-50: #fbf4e8;
  --mint-700: #a98045;
  --mint-500: #d8bf8e;
  --sand-600: #b48a4f;
  --sand-300: #d9bd88;
  --sand-100: #f5e8d0;
  --logo-sand: #D1BC94;
  --ink: #1d1a16;
  --muted: #6e6458;
  --faint: #a2927c;
  --line: #e6d5b6;
  --line-strong: #d4b77f;
  --surface: #fffaf2;
  --surface-soft: #fbf3e6;
  --stage: #eee3d0;
  --shadow-sm: 0 2px 8px rgba(23, 23, 22, .08);
  --shadow-md: 0 12px 32px rgba(23, 23, 22, .12);
  --shadow-lg: 0 24px 70px rgba(23, 23, 22, .18);
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --topbar-h: 56px;
  --sidebar-w: 360px;
  --ease: 180ms cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--stage);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  background: var(--logo-sand);
  border-bottom: 1px solid rgba(23, 23, 22, .14);
  z-index: 50;
}

.topbar-logo {
  min-width: 260px;
  display: flex;
  align-items: center;
  color: var(--navy-900);
  text-decoration: none;
}

.brand-logo-img {
  display: block;
  width: min(236px, 26vw);
  max-height: 46px;
  border-radius: 8px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--navy-900);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-name {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.brand-sub {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

.topbar-title {
  padding-left: 18px;
  border-left: 1px solid rgba(23, 23, 22, .18);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 13px;
}

.topbar-legal {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-legal a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: color var(--ease), background var(--ease);
}

.topbar-legal a:hover {
  background: rgba(255, 250, 242, .34);
  color: var(--navy-900);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.ghost-btn,
.tool-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 13px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), border-color var(--ease), background var(--ease);
}

.ghost-btn:hover,
.tool-btn:hover {
  border-color: var(--line-strong);
  background: var(--blue-50);
  transform: translateY(-1px);
}

.app {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: calc(100vh - var(--topbar-h));
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow: hidden;
  z-index: 20;
}

.drawer-grip,
.drawer-close {
  display: none;
}

.sidebar-inner {
  height: 100%;
  overflow-y: auto;
  padding: 28px 20px 120px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar-inner::-webkit-scrollbar { width: 8px; }
.sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.welcome {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.welcome h1 {
  font-size: 27px;
  font-weight: 800;
  color: var(--navy-900);
}

.welcome p {
  max-width: 290px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.step {
  margin-top: 28px;
}

.step--facade {
  margin-top: 22px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.step-number {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--mint-700);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.step-head h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-900);
}

.field {
  margin-bottom: 16px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--navy-900);
  font-size: 12.5px;
  font-weight: 800;
}

.hint {
  color: var(--faint);
  font-weight: 600;
  font-size: 11.5px;
}

.stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 7px;
}

.stepper-btn {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--blue-50);
  color: var(--navy-800);
  border: 1px solid var(--line);
  transition: background var(--ease), transform var(--ease);
}

.stepper-btn:hover {
  background: var(--blue-100);
}

.stepper-btn:active {
  transform: scale(.97);
}

.stepper-value {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.stepper-value input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.unit {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.seg {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.seg-btn {
  height: 39px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--navy-800);
  font-weight: 800;
  transition: background var(--ease), color var(--ease), transform var(--ease), border-color var(--ease);
}

.seg-btn:hover:not(:disabled) {
  border-color: var(--mint-500);
  transform: translateY(-1px);
}

.seg-btn.is-active {
  color: white;
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.seg-btn:disabled {
  opacity: .35;
}

.floor-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.floor-chip {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--navy-800);
  font-size: 13px;
  font-weight: 800;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.floor-chip:hover {
  border-color: var(--mint-500);
  transform: translateY(-1px);
}

.floor-chip.is-active {
  background: var(--sand-100);
  border-color: var(--mint-500);
  color: var(--navy-900);
}

.floor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.floor-chip.is-active .floor-dot {
  background: var(--mint-700);
  border-color: var(--mint-700);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.opt-card {
  position: relative;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.opt-card:hover {
  border-color: var(--mint-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.opt-card.is-active {
  border-color: var(--mint-700);
  background: #fbf4e8;
  box-shadow: 0 0 0 3px rgba(169, 128, 69, .18);
}

.opt-thumb {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8ec 0%, #f2e3c9 100%);
}

.opt-thumb svg {
  width: 100%;
  height: 100%;
}

.opt-label {
  display: block;
  color: var(--navy-900);
  font-size: 12.5px;
  font-weight: 800;
}

.opt-desc {
  display: block;
  min-height: 30px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
}

.check,
.check-mini {
  position: absolute;
  display: none;
  place-items: center;
  background: var(--navy-900);
  color: white;
  box-shadow: var(--shadow-sm);
}

.check {
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.check-mini {
  top: 5px;
  right: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.opt-card.is-active .check,
.custom-color-card.is-active .check,
.swatch.is-active .check-mini {
  display: grid;
}

.check svg,
.check-mini svg {
  width: 12px;
  height: 12px;
  stroke-width: 3.5;
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.swatch {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 54px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.swatch:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.swatch.is-active {
  border-color: var(--navy-900);
  box-shadow: 0 0 0 3px rgba(169, 128, 69, .22);
}

.swatch-tag {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  display: block;
  padding: 3px 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, .88);
  color: var(--navy-900);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.custom-color-field {
  margin-top: 4px;
}

.custom-color-card {
  position: relative;
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 42px 12px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy-900);
  text-align: left;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.custom-color-card:hover {
  border-color: var(--mint-500);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.custom-color-card.is-active {
  border-color: var(--mint-700);
  background: #fbf4e8;
  box-shadow: 0 0 0 3px rgba(169, 128, 69, .18);
}

.custom-color-icon {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(29, 29, 31, .92) 0 34%, transparent 34%),
    linear-gradient(135deg, #f5f5f1 0 50%, #cdb38b 50% 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45);
}

.custom-color-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}

.custom-color-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

.custom-color-panel {
  margin-top: 10px;
}

.custom-color-panel textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  padding: 10px 11px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
}

.custom-color-panel textarea:focus {
  border-color: var(--mint-700);
  box-shadow: 0 0 0 3px rgba(169, 128, 69, .16);
}

.input-hint {
  margin-top: 5px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  text-align: right;
}

.extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.extra-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.extra-toggle:hover:not(:disabled) {
  border-color: var(--mint-500);
  transform: translateY(-1px);
}

.extra-toggle:disabled {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(217, 189, 136, 0.38);
  color: rgba(23, 23, 22, 0.48);
  transform: none;
}

.extra-toggle:disabled .extra-icon {
  color: rgba(23, 23, 22, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

.extra-toggle.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: white;
}

.extra-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--navy-900);
  border: 1px solid var(--line);
}

.extra-toggle.is-active .extra-icon {
  color: white;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
}

.sidebar-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
}

.mobile-legal {
  display: none;
}

.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, .56) 0%, rgba(239, 224, 195, .7) 45%, rgba(218, 199, 163, .86) 100%),
    var(--stage);
  isolation: isolate;
}

.canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#threeCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 460px at 48% 45%, transparent 0%, transparent 68%, rgba(23, 23, 22, .12) 100%),
    linear-gradient(90deg, rgba(239, 224, 195, .62) 0%, transparent 24%, transparent 78%, rgba(239, 224, 195, .72) 100%);
}

.stage-top {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 26px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 16px;
  z-index: 5;
  pointer-events: none;
}

.stage-top > * {
  pointer-events: auto;
}

.stage-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-toolbar {
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(212, 183, 127, .84);
  background: rgba(255, 250, 242, .86);
  box-shadow: 0 10px 28px rgba(23, 23, 22, .12);
  backdrop-filter: blur(12px);
}

.view-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(212, 183, 127, .72);
  background: rgba(255, 250, 242, .78);
  color: var(--navy-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.view-btn:hover {
  transform: translateY(-1px);
  border-color: var(--sand-600);
  background: white;
  box-shadow: var(--shadow-sm);
}

.view-btn:active {
  transform: translateY(0);
}

.view-btn svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.25;
}

.meter-pill {
  display: flex;
  align-items: stretch;
  gap: 13px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.meter-block {
  display: grid;
  align-content: center;
  line-height: 1.1;
}

.meter-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.meter-value {
  margin-top: 4px;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 800;
}

.meter-sep {
  width: 1px;
  background: var(--line);
}

.live-chip {
  position: absolute;
  top: 112px;
  right: 27px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-700);
  box-shadow: 0 0 0 0 rgba(169, 128, 69, .6);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(169, 128, 69, .6); }
  70% { box-shadow: 0 0 0 9px rgba(169, 128, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(169, 128, 69, 0); }
}

.undo-pill {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: opacity var(--ease), transform var(--ease);
}

.undo-pill:hover:not(:disabled) {
  transform: translateY(-1px);
}

.undo-pill:disabled {
  opacity: .48;
}

.summary-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 6;
  width: 326px;
  padding: 20px;
  border-radius: 0;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.summary-card--mobile {
  display: none;
}

.summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.summary-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.summary-toggle:focus-visible {
  outline: 3px solid rgba(169, 128, 69, .28);
  outline-offset: 4px;
  border-radius: 12px;
}

.summary-chevron {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--mint-700);
  transition: transform var(--ease), background var(--ease), border-color var(--ease);
}

.summary-toggle:hover .summary-chevron {
  border-color: var(--line-strong);
  background: var(--surface);
}

.summary-chevron svg {
  width: 18px;
  height: 18px;
  transition: transform var(--ease);
}

.summary-toggle[aria-expanded="false"] .summary-chevron svg {
  transform: rotate(-90deg);
}

.summary-card.is-collapsed .summary-head {
  margin-bottom: 0;
}

.summary-body[hidden] {
  display: none;
}

.summary-title {
  color: var(--navy-900);
  font-size: 15px;
  font-weight: 800;
}

.summary-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.summary-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-of-type {
  border-bottom: 0;
}

.summary-row dt,
.summary-row dd {
  margin: 0;
}

.summary-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-row dd {
  color: var(--navy-900);
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}

.summary-row--note {
  display: block;
}

.summary-row--note dt {
  margin-bottom: 3px;
}

.summary-row--note dd {
  text-align: left;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.price-card {
  margin: 0 0 14px;
  padding: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.price-kicker {
  color: var(--mint-700);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.price-total {
  margin-top: 2px;
  color: var(--navy-900);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
}

.price-tax {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.price-breakdown {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.price-line strong {
  flex: 0 0 auto;
  color: var(--navy-900);
  font-weight: 800;
}

.price-line--discount,
.price-line--discount strong {
  color: var(--mint-700);
}

.price-note {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.35;
}

.primary-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--navy-900);
  color: white;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(23, 23, 22, .22);
}

.primary-btn:disabled {
  opacity: .82;
  background: #8d8374;
  box-shadow: none;
}

.mobile-toggle,
.drawer-backdrop {
  display: none;
}

body.is-fullscreen .topbar {
  display: none;
}

body.is-fullscreen .app {
  inset: 0;
  height: 100vh;
}

body.is-fullscreen .stage-top {
  top: 18px;
}

body.modal-open {
  overflow: hidden;
}

.request-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 23, 22, .48);
  backdrop-filter: blur(10px);
}

.request-modal[hidden] {
  display: none;
}

.request-dialog {
  width: min(620px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.request-kicker {
  margin: 0 0 3px;
  color: var(--mint-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-head h2 {
  color: var(--navy-900);
  font-size: 22px;
}

.request-close {
  display: grid;
}

.request-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 800;
}

.form-field--small {
  max-width: 210px;
}

.form-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  padding: 9px 11px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.form-field input:focus {
  border-color: var(--mint-700);
  box-shadow: 0 0 0 3px rgba(169, 128, 69, .16);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.consent-row input {
  margin-top: 2px;
}

.consent-row a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.request-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.request-status.is-pending {
  color: var(--mint-700);
}

.request-status.is-success {
  color: #24724a;
}

.request-status.is-error {
  color: #a33a2e;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.request-actions .primary-btn {
  width: auto;
  margin-top: 0;
  padding: 0 16px;
}

.file-mode-notice {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(238, 227, 208, 0.86);
  backdrop-filter: blur(10px);
}

.file-mode-card {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 24px 70px rgba(23, 23, 22, 0.18);
  color: var(--ink);
}

.file-mode-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.15;
}

.file-mode-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.file-mode-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.file-mode-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.file-mode-card code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(180, 130, 64, 0.12);
  color: var(--ink);
}

@media (max-width: 1180px) {
  :root { --sidebar-w: 340px; }
  .summary-card { width: 300px; }
}

@media (max-width: 960px) {
  body {
    overflow: hidden;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar-logo {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-logo-img {
    width: min(236px, 62vw);
    max-height: 42px;
  }

  .brand-name {
    font-size: 12px;
  }

  .brand-sub,
  .topbar-title {
    display: none;
  }

  .topbar-legal {
    gap: 2px;
  }

  .topbar-legal a {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .ghost-btn {
    min-height: 36px;
    padding: 8px 10px;
  }

  .app {
    display: block;
    height: calc(100svh - var(--topbar-h));
  }

  .stage {
    height: 100%;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(78svh, 720px);
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -24px 70px rgba(23, 23, 22, .22);
    transform: translateY(105%);
    transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
    z-index: 40;
  }

  body.drawer-open .sidebar {
    transform: translateY(0);
  }

  .drawer-grip {
    display: block;
    width: 46px;
    height: 23px;
    margin: 0 auto -4px;
    padding: 9px 0;
    border-radius: 999px;
    background: transparent;
  }

  .drawer-grip::before {
    content: "";
    display: block;
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: var(--line-strong);
  }

  .drawer-grip:focus-visible {
    outline: 3px solid rgba(169, 128, 69, .28);
    outline-offset: 2px;
  }

  .drawer-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--blue-50);
    color: var(--navy-900);
  }

  .sidebar-inner {
    padding: 12px 18px 110px;
  }

  .welcome h1 {
    font-size: 22px;
  }

  .welcome p {
    max-width: none;
  }

  .stage-top {
    top: 14px;
    left: 12px;
    right: 12px;
    justify-content: center;
    align-items: flex-start;
  }

  .view-toolbar {
    max-width: calc(100vw - 24px);
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .view-toolbar::-webkit-scrollbar {
    display: none;
  }

  .view-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .view-btn svg {
    width: 20px;
    height: 20px;
  }

  .meter-pill {
    min-height: 40px;
    padding: 7px 10px;
  }

  .live-chip {
    top: auto;
    right: 16px;
    bottom: 386px;
  }

  .summary-card--stage {
    display: none;
  }

  .summary-card--mobile {
    position: static;
    display: block;
    width: auto;
    margin: 18px 0 24px;
    padding: 14px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .summary-head {
    margin-bottom: 8px;
  }

  .summary-sub,
  .summary-row:nth-child(3),
  .summary-row:nth-child(5) {
    display: none;
  }

  .summary-row {
    padding: 6px 0;
  }

  .undo-pill {
    display: none;
  }

  .mobile-toggle {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 45;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--navy-900);
    color: white;
    font-weight: 800;
    font-size: 13.5px;
    box-shadow: var(--shadow-lg);
    transform: translateX(-50%);
  }

  body.drawer-open .mobile-toggle {
    background: var(--mint-700);
    opacity: 0;
    pointer-events: none;
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    z-index: 35;
    pointer-events: none;
    background: rgba(23, 23, 22, 0);
    transition: background var(--ease);
  }

  body.drawer-open .drawer-backdrop {
    pointer-events: auto;
    background: rgba(23, 23, 22, .34);
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 56px;
  }

  .topbar-actions .ghost-btn {
    font-size: 0;
    width: 42px;
    padding: 0;
  }

  .topbar-legal {
    display: none;
  }

  .mobile-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    margin-top: 18px;
  }

  .mobile-legal a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
  }

  .stage-top {
    flex-direction: row;
  }

  .meter-pill {
    background: rgba(255, 255, 255, .76);
  }

  .live-chip {
    bottom: 360px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .opt-card {
    min-height: 132px;
    padding: 9px;
  }

  .opt-desc {
    display: none;
  }

  .floor-picker,
  .extras {
    grid-template-columns: 1fr;
  }

  .swatch-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .swatch {
    min-height: 48px;
  }

  .summary-card--mobile {
    margin-bottom: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field--small {
    max-width: none;
  }

  .request-actions {
    flex-direction: column-reverse;
  }

  .request-actions .ghost-btn,
  .request-actions .primary-btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .sidebar-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stepper {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .seg {
    gap: 5px;
  }

  .summary-card--mobile {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
