html:has(body.cfg-app) {
  height: 100svh;
  overflow: hidden;
}
.cfg-app {
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}
.cfg-app .site-footer {
  display: none;
}
.cfg-hero {
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 6px) 0 6px;
}
.cfg-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 40px);
}
.cfg-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 280px;
  gap: 14px;
  height: calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px) - 78px);
  max-height: calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px) - 78px);
  min-height: 0;
  padding-bottom: 12px;
}
.cfg-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  background: #10100f;
  overflow: hidden;
  touch-action: none;
}
.cfg-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.cfg-stage canvas[hidden] {
  display: none;
}
.cfg-stage-price {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font: 700 16px/1 var(--font-ui);
  color: var(--brass);
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid var(--line);
  padding: 8px 12px;
  pointer-events: none;
}
.cfg-interiors {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 52px;
  display: flex;
  gap: 6px;
  z-index: 2;
  overflow-x: auto;
  overscroll-behavior: contain;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.cfg-interiors[hidden] {
  display: none;
}
.cfg-interiors::-webkit-scrollbar {
  display: none;
}
.cfg-room {
  flex: 0 0 auto;
  width: 46px;
  height: 68px;
  padding: 0;
  border: 1px solid var(--line);
  background: #0b0b0c;
  cursor: pointer;
  overflow: hidden;
}
.cfg-room img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cfg-room.is-on,
.cfg-views button.is-on {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}
.cfg-room-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-size: 22px;
}
.cfg-opt-thumb {
  width: 28px;
  height: 40px;
  object-fit: cover;
  flex: 0 0 auto;
}
.cfg-views {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}
.cfg-views #cfg3dViews {
  display: contents;
}
.cfg-views #cfg3dViews[hidden] {
  display: none;
}
.cfg-views button,
.cfg-tab,
.cfg-opt,
.cfg-model,
.cfg-side .btn {
  font: 600 12px/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cfg-views button,
.cfg-tab {
  background: rgba(11, 11, 12, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 10px;
  cursor: pointer;
}
.cfg-views button:hover,
.cfg-tab:hover,
.cfg-opt:hover,
.cfg-model:hover {
  border-color: var(--brass);
  color: var(--brass);
}
.cfg-left,
.cfg-side {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.cfg-side {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cfg-app .float-contact {
  display: none;
}
.cfg-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 10px;
  flex: 0 0 auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.cfg-tabs::-webkit-scrollbar {
  display: none;
}
.cfg-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}
.cfg-tab.is-on,
.cfg-opt.is-on,
.cfg-model.is-on {
  border-color: var(--brass);
  color: var(--brass);
  background: rgba(196, 165, 116, 0.08);
}
.cfg-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}
.cfg-panel:not(:has(.cfg-models)) {
  overflow: auto;
  overscroll-behavior: contain;
}
.cfg-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}
.cfg-tools input,
.cfg-tools select {
  flex: 1;
  background: #0b0b0c;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px;
}
.cfg-models {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) transparent;
}
.cfg-models::-webkit-scrollbar {
  width: 6px;
}
.cfg-models::-webkit-scrollbar-thumb {
  background: rgba(196, 165, 116, 0.45);
}
.cfg-model {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #0a0908;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 6px 8px 6px 6px;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  flex: 0 0 auto;
}
.cfg-model-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050504;
  width: 64px;
  height: 128px;
  flex: 0 0 64px;
  padding: 4px;
}
.cfg-model-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.cfg-model-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px 2px 2px 0;
  min-width: 0;
  flex: 1;
}
.cfg-model-name {
  font-size: 11px;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cfg-model b {
  color: var(--brass);
  font-weight: 600;
}
.cfg-model small {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 10px;
}
.cfg-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.cfg-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #0b0b0c;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px;
  cursor: pointer;
}
.cfg-opt em {
  margin-left: auto;
  color: var(--brass);
  font-style: normal;
}
.cfg-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  display: inline-block;
}
.cfg-slider {
  display: block;
  margin-bottom: 16px;
}
.cfg-slider span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
}
.cfg-slider input {
  width: 100%;
  accent-color: var(--brass);
}
.cfg-hint,
.cfg-note,
.cfg-lead,
.cfg-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.cfg-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin: 0 0 8px;
}
.cfg-side h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 4px;
}
.cfg-total {
  font-size: 34px;
  color: var(--brass);
  margin: 6px 0 10px;
  letter-spacing: 0.02em;
}
.cfg-lines,
.cfg-summary {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.cfg-lines li,
.cfg-summary li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.cfg-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.cfg-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev);
  border: 1px solid var(--brass);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 40;
}
.cfg-fail {
  padding: 40px;
  text-align: center;
}
@media (max-width: 1080px) {
  .cfg-hero {
    display: none;
  }
  .cfg-shell {
    grid-template-columns: 1fr;
    margin-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    height: calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px));
    max-height: calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px));
    padding-bottom: 0;
    gap: 0;
  }
  .cfg-stage {
    order: 1;
    height: 55%;
    min-height: 0;
    border-left: 0;
    border-right: 0;
  }
  .cfg-side {
    display: none;
  }
  .cfg-left {
    order: 2;
    height: 45%;
    min-height: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .cfg-models {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
    scroll-snap-type: none;
    padding: 0 2px 8px;
  }
  .cfg-model {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .cfg-model-pic {
    width: 72px;
    height: 144px;
    flex: 0 0 64px;
    flex-basis: 72px;
    min-height: 144px;
    max-height: none;
    padding: 4px;
  }
  .cfg-model-name {
    font-size: 13px;
  }
  .cfg-interiors {
    left: 8px;
    right: 8px;
    bottom: 46px;
  }
  .cfg-room {
    width: 40px;
    height: 58px;
  }
  .cfg-views {
    left: 8px;
    bottom: 8px;
    right: 8px;
  }
  .cfg-views button {
    padding: 7px 8px;
    font-size: 11px;
  }
}
@media (max-width: 640px) {
  .cfg-model-pic {
    width: 76px;
    height: 152px;
    flex-basis: 76px;
  }
  .cfg-total {
    font-size: 28px;
  }
}
