@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750&display=swap");
:root {
  --paper: #f6f5f1;
  --ink: #272c28;
  --muted: #7e827b;
  --line: #e2e3dc;
  --green: #536753;
  --serif: Georgia, "Times New Roman", serif;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #738573;
  outline-offset: 3px;
}
button {
  border: 0;
  background: transparent;
}
input {
  font: inherit;
  color: inherit;
  min-width: 0;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 3px;
  font-weight: 650;
}
.brand-mark {
  font-family: var(--serif);
  font-size: 48px;
  letter-spacing: -5px;
  font-weight: 400;
  margin-top: -10px;
  width: 44px;
  color: #536653;
}
.brand small {
  display: block;
  letter-spacing: 1.8px;
  font-size: 8px;
  font-weight: 500;
  margin-top: 5px;
  color: var(--muted);
}
.scope {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #777e75;
  letter-spacing: 0.2px;
}
.chrome-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(
    140deg,
    #727d83,
    #f8fbfd 35%,
    #a5adb2 55%,
    #f1f3f2 70%,
    #6c797d
  );
  border: 1px solid #b3b9b7;
}
.scope-divider {
  padding: 0 6px;
  color: #c6c9c2;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.header-actions > span {
  font-size: 10px;
  color: #898c85;
}
.button {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: background 0.15s;
}
.button:hover {
  background: #eeefe9;
}
.button.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.button.dark:hover {
  background: #435145;
}
.button.dark span {
  font-size: 17px;
}
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  max-width: 1920px;
  margin: 0 auto;
  min-height: calc(100dvh - 88px);
}
.preview-section {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.area-bar {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 76px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: #858b80;
}
.areas {
  display: flex;
  gap: 5px;
}
.areas button {
  font-size: 11px;
  padding: 9px 16px;
  border-radius: 4px;
  color: #878b82;
}
.areas button.active {
  background: #e5e9df;
  color: #475945;
}
.areas button:hover {
  background: #ebeee5;
}
.preview-wrap {
  position: relative;
  flex: 1;
  min-height: 500px;
  background: #e8e6e0;
  overflow: hidden;
}
.preview-heading {
  position: absolute;
  top: 27px;
  left: 30px;
  pointer-events: none;
}
.preview-heading h1 {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: -1px;
  margin: 8px 0;
}
.preview-heading p {
  font-size: 11px;
  color: #7d8176;
  margin: 0;
}
.preview-heading .eyebrow {
  color: #818b79;
}
#viewport {
  position: absolute;
  inset: 0;
}
#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.view-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 28px;
  right: 25px;
}
.segmented {
  display: flex;
  background: #fbfcf8df;
  border: 1px solid #e0e4da;
  border-radius: 5px;
  padding: 3px;
  gap: 2px;
}
.segmented button {
  border-radius: 3px;
  font-size: 11px;
  padding: 8px 14px;
  color: #7f877b;
  white-space: nowrap;
}
.segmented button.active {
  background: #52634f;
  color: white;
  box-shadow: 0 1px 3px #27382518;
}
.button.glass {
  background: #fbfcf8df;
  font-size: 10px;
  padding: 12px 13px;
  border-color: #e0e4da;
}
.button.glass[aria-pressed="true"] {
  color: #fff;
  background: #536753;
  border-color: #536753;
}
.scene-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #68715f;
  background: #f7f8f0dc;
  padding: 8px 10px;
  border-radius: 4px;
}
.verified-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6f8767;
}
.scene-hint {
  position: absolute;
  right: 24px;
  bottom: 27px;
  font-size: 9px;
  color: #7c8174;
}
.loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fafbf5ec;
  padding: 14px 18px;
  border: 1px solid #dbe0d5;
  border-radius: 7px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  max-width: 85%;
  z-index: 3;
}
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid #ccd4c6;
  border-top-color: #536753;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.selection-strip {
  background: #fafaf7;
  padding: 18px 28px 14px;
  border-top: 1px solid var(--line);
  min-height: 142px;
}
.strip-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}
.strip-heading > span:last-child {
  font-size: 9px;
  color: #9b9e96;
}
.selected-items {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 5px;
  scrollbar-width: thin;
}
.item-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #e2e5db;
  border-radius: 5px;
  padding: 5px 9px 5px 4px;
  min-width: 135px;
  text-align: left;
}
.item-chip.active {
  border-color: #72816b;
  background: #f2f5ed;
}
.item-chip img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.item-chip strong {
  font-size: 9px;
  font-weight: 500;
  display: block;
  line-height: 1.3;
  max-width: 105px;
}
.item-chip small {
  font-size: 8px;
  color: #969b8e;
  display: block;
  margin-top: 3px;
}
.assembly-note {
  font-size: 9px;
  color: #828a7a;
  margin: 7px 0 0;
  line-height: 1.5;
}
.assembly-note.warning {
  color: #a37639;
}
.sidebar {
  border-left: 1px solid var(--line);
  background: #fafaf7;
  height: calc(100dvh - 88px);
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
}
.panel-tabs {
  display: flex;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  gap: 26px;
  flex-shrink: 0;
}
.panel-tabs > button {
  font-size: 12px;
  color: #91958a;
  border-bottom: 2px solid transparent;
  padding: 0;
  position: relative;
}
.panel-tabs > button.active {
  border-color: #54674c;
  color: #46563e;
  font-weight: 600;
}
.panel-tabs > button span {
  font-size: 8px;
  background: #e7ecdf;
  padding: 2px 5px;
  margin-left: 5px;
  border-radius: 4px;
}
.control-panel {
  padding: 22px 22px 0;
}
.panel-intro h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.panel-intro p {
  font-size: 10px;
  color: #92978a;
  line-height: 1.6;
  margin: 0 0 20px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f1eb;
  border: 1px solid #e4e6df;
  border-radius: 5px;
  padding: 8px 10px;
}
.search-wrap span {
  font-size: 21px;
  line-height: 16px;
  color: #91978a;
}
.search-wrap input {
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 10px;
}
.search-wrap input::placeholder {
  color: #a2a797;
}
.filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 12px 0 17px;
}
.filters button {
  font-size: 9px;
  color: #88917f;
  border: 1px solid #e2e6d9;
  border-radius: 12px;
  padding: 5px 9px;
  white-space: nowrap;
}
.filters button.active {
  background: #e5ebdc;
  color: #526346;
  border-color: #d4dec8;
}
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.product-card {
  border: 1px solid #e1e5d9;
  border-radius: 6px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.product-photo {
  width: 100%;
  height: 115px;
  object-fit: contain;
  display: block;
  padding: 13px;
  mix-blend-mode: multiply;
}
.product-photo-button {
  display: block;
  padding: 0;
  width: 100%;
  background: linear-gradient(#f6f7f1, #f4f5ee);
  position: relative;
}
.product-photo-button::after {
  content: "↗";
  position: absolute;
  top: 7px;
  right: 9px;
  color: #a9af9e;
  font-size: 12px;
}
.product-card.active {
  border-color: #86967c;
  box-shadow: 0 0 0 1px #86967c33;
}
.product-info {
  padding: 10px;
}
.product-info h3 {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 550;
  margin: 0 0 4px;
}
.product-info p {
  font-size: 8px;
  line-height: 1.5;
  color: #939b87;
  margin: 0;
  min-height: 24px;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.article {
  font-size: 8px;
  color: #a6ad9b;
  letter-spacing: 0.3px;
}
.add-product {
  width: 25px;
  height: 25px;
  border: 1px solid #dbe3d0;
  border-radius: 50%;
  background: #eff3e9;
  color: #5e7152;
  font-size: 17px;
  padding: 0;
  line-height: 1;
}
.add-product:hover {
  background: #dfe8d3;
}
.add-product.swap {
  border-radius: 4px;
  width: auto;
  font-size: 9px;
  padding: 5px 7px;
  height: 25px;
  background: #536753;
  color: white;
}
.catalog-note,
.material-note {
  font-size: 9px;
  color: #9ca48f;
  line-height: 1.7;
  margin: 16px 0 20px;
}
.empty-products {
  grid-column: 1/-1;
  padding: 25px 5px;
  font-size: 11px;
  color: #7f8c72;
}
.swap-banner {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  background: #e7eedf;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 12px;
  gap: 8px;
}
.swap-banner button {
  font-size: 9px;
  text-decoration: underline;
  color: #6a7b5c;
}
.surface-tabs {
  margin-bottom: 18px;
}
.surface-tabs button {
  flex: 1;
}
.tile-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile-option {
  position: relative;
  text-align: left;
  padding: 0;
  border: 1px solid #dce2d3;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
}
.tile-option.active {
  outline: 1px solid #718565;
  border-color: #718565;
}
.tile-option img {
  display: block;
  width: 100%;
  height: 86px;
  object-fit: cover;
}
.tile-option span {
  font-size: 10px;
  display: block;
  padding: 9px 10px;
}
.tile-option.active::after {
  content: "✓";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #536753;
  color: white;
  text-align: center;
  line-height: 19px;
  font-size: 11px;
}
.tile-size {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
.tile-size > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.tile-size label {
  font-size: 9px;
  color: #929b86;
  flex: 1;
}
.tile-size input {
  display: block;
  background: #fff;
  width: 100%;
  border: 1px solid #dce2d2;
  border-radius: 4px;
  padding: 10px;
  margin-top: 6px;
  font-size: 12px;
}
.tile-size > div > span {
  color: #adb59e;
  margin-top: 15px;
  font-size: 13px;
}
.upload-tile {
  display: flex;
  justify-content: space-between;
  border: 1px dashed #c9d2bd;
  border-radius: 5px;
  padding: 13px 12px;
  font-size: 10px;
  color: #71815f;
  margin-top: 20px;
  cursor: pointer;
}
.upload-tile input {
  display: none;
}
.product-detail {
  margin: 0 22px 22px;
  border-top: 1px solid #e0e5d8;
  padding-top: 19px;
}
.reference-photo {
  background: #f1f3eb;
  width: 100%;
  height: 175px;
  object-fit: contain;
  padding: 14px;
  border-radius: 5px;
  mix-blend-mode: multiply;
}
.reference-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.reference-heading .eyebrow {
  font-size: 8px;
}
.reference-heading a {
  font-size: 9px;
  color: #7c8d6c;
}
.product-detail h3 {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  margin: 12px 0 5px;
}
.product-detail p {
  font-size: 9px;
  line-height: 1.6;
  color: #89957b;
  margin: 0 0 12px;
}
.detail-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.detail-actions button {
  font-size: 10px;
  padding: 9px 12px;
  border: 1px solid #d8e0cd;
  border-radius: 4px;
  background: #f0f4e8;
  flex: 1;
}
.detail-actions button.remove {
  flex: 0;
  background: transparent;
  color: #9d8a76;
  border-color: #e4ddce;
}
.position-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 8px;
  color: #9ca68f;
}
.position-controls button {
  background: #f0f3e9;
  border: 1px solid #dfe6d4;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 10px;
}
.position-controls span {
  margin-right: auto;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #99a38d;
  margin-top: auto;
}
.panel-footer button {
  font-size: 9px;
  padding: 0;
  color: inherit;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #354132;
  color: #f6faed;
  box-shadow: 0 5px 30px #28392525;
  padding: 13px 20px;
  font-size: 11px;
  border-radius: 5px;
  z-index: 100;
  max-width: 90%;
  line-height: 1.5;
}
.no-webgl {
  position: absolute;
  inset: 40% 10%;
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
}
.retry-model {
  font-size: 10px;
  color: #536753;
  text-decoration: underline;
  padding: 0;
}
.preview-wrap.detail-mode .preview-heading h1 {
  font-size: 24px;
  max-width: 270px;
}
.preview-wrap.detail-mode .preview-heading p {
  max-width: 280px;
  line-height: 1.5;
}
@media (min-width: 1200px) {
  .preview-wrap {
    min-height: 610px;
  }
  .studio {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .preview-heading {
    top: 33px;
    left: 40px;
  }
  .preview-heading h1 {
    font-size: 36px;
  }
  .area-bar {
    padding: 0 40px;
  }
  .selection-strip {
    padding-left: 40px;
    padding-right: 40px;
  }
  .products {
    gap: 12px;
  }
  .product-photo {
    height: 126px;
  }
}
@media (max-width: 1000px) {
  .studio {
    grid-template-columns: minmax(0, 1fr) 304px;
  }
  .topbar {
    padding: 0 22px;
    gap: 20px;
  }
  .scope {
    font-size: 9px;
    gap: 6px;
  }
  .header-actions > span {
    display: none;
  }
  .area-bar {
    gap: 14px;
    padding: 0 20px;
  }
  .area-bar > .eyebrow {
    display: none;
  }
  .areas {
    width: 100%;
    justify-content: space-between;
  }
  .areas button {
    padding: 8px 13px;
  }
  .preview-heading {
    left: 22px;
    top: 23px;
  }
  .preview-heading h1 {
    font-size: 28px;
  }
  .view-toolbar {
    top: auto;
    right: 18px;
    bottom: 62px;
    gap: 5px;
  }
  .scene-hint {
    display: none;
  }
  .preview-wrap {
    min-height: 520px;
  }
  .control-panel {
    padding: 20px 16px 0;
  }
  .panel-tabs {
    padding: 0 16px;
    gap: 20px;
  }
  .product-detail {
    margin-left: 16px;
    margin-right: 16px;
  }
  .product-info {
    padding: 9px;
  }
  .product-photo {
    height: 105px;
    padding: 9px;
  }
  .selection-strip {
    padding: 16px 20px 12px;
  }
  .panel-intro h2 {
    font-size: 23px;
  }
  .product-info h3 {
    font-size: 9px;
  }
  .filters {
    gap: 4px;
  }
  .filters button {
    padding: 4px 8px;
  }
  .panel-footer {
    padding: 17px 16px;
  }
}
@media (max-width: 690px) {
  .topbar {
    height: 72px;
    padding: 0 16px;
    gap: 12px;
  }
  .brand {
    font-size: 14px;
    letter-spacing: 2px;
    gap: 8px;
  }
  .brand-mark {
    font-size: 41px;
    width: 35px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.4px;
  }
  .scope {
    display: none;
  }
  .button.dark {
    padding: 9px 11px;
    font-size: 10px;
    gap: 9px;
  }
  .studio {
    display: flex;
    flex-direction: column;
  }
  .area-bar {
    height: 62px;
  }
  .preview-section {
    display: block;
  }
  .preview-wrap {
    height: 65dvh;
    min-height: 470px;
    max-height: 650px;
  }
  .preview-heading {
    top: 18px;
    left: 18px;
  }
  .preview-heading h1 {
    font-size: 27px;
  }
  .preview-heading p {
    font-size: 10px;
  }
  .view-toolbar {
    bottom: 55px;
    right: 14px;
  }
  .scene-caption {
    left: 14px;
    bottom: 15px;
    font-size: 8px;
    padding: 7px;
  }
  .sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    height: auto;
    overflow: visible;
  }
  .panel-tabs {
    min-height: 62px;
    padding: 0 20px;
  }
  .control-panel {
    padding: 22px 20px 0;
  }
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .product-photo {
    height: 112px;
  }
  .product-info h3 {
    font-size: 10px;
  }
  .product-info p {
    min-height: 28px;
  }
  .product-detail {
    margin: 0 20px 22px;
  }
  .reference-photo {
    height: 240px;
  }
  .product-detail h3 {
    font-size: 14px;
  }
  .product-detail p {
    font-size: 11px;
  }
  .detail-actions button {
    font-size: 11px;
    padding: 12px;
  }
  .position-controls {
    font-size: 10px;
  }
  .position-controls button {
    padding: 8px 11px;
  }
  .tile-options {
    grid-template-columns: repeat(3, 1fr);
  }
  .tile-option img {
    height: 105px;
  }
  .selection-strip {
    min-height: 130px;
  }
  .panel-footer {
    padding: 20px;
  }
  .panel-intro p {
    font-size: 11px;
  }
  .filters button {
    font-size: 10px;
    padding: 6px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 1ms !important;
    transition: none !important;
  }
}

.photo-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9ba68e;
  background: #f0f3e8;
}
.photo-unavailable strong {
  font-size: 25px;
  font-weight: 400;
}
.photo-unavailable small {
  font-size: 8px;
}
.item-chip .photo-unavailable {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.item-chip .photo-unavailable strong {
  font-size: 12px;
}
.item-chip .photo-unavailable small {
  display: none;
}
.preview-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 155px;
  z-index: 1;
  background: linear-gradient(#f5f6edda, #f5f6ed90 55%, transparent);
  pointer-events: none;
}
.preview-heading {
  z-index: 2;
}
.view-toolbar,
.scene-caption,
.scene-hint {
  z-index: 2;
}
.loading {
  z-index: 3;
}
