:root {
  color-scheme: light;
  --page: #f7f6f2;
  --card: #fffefa;
  --ink: #202823;
  --muted: #5e665f;
  --line: #e3e3da;
  --green: #235548;
  --green-light: #e7eee7;
  --studio: #e9e4d8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.52 "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  min-block-size: 44px;
  color: var(--ink);
  font: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled { opacity: 0.52; cursor: default; }
button:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -3px;
}

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .page { max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 3.4vw, 42px); }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  place-content: center;
  gap: 3px;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: var(--green);
  flex: 0 0 auto;
}
.brand-mark i { height: 2px; width: 13px; background: #f4f4e9; border-radius: 2px; transform: rotate(-22deg); }
.brand-mark i:last-child { width: 8px; }
.brand { font-weight: 720; letter-spacing: 0.04em; white-space: nowrap; }
.header-divider { height: 18px; width: 1px; background: var(--line); margin-inline: 5px; }
.site-purpose { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.sample-tag {
  white-space: nowrap;
  color: var(--green);
  border: 1px solid #d3dfd3;
  background: #ecf2e9;
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 4px 10px;
}

.page { padding-bottom: 36px; }
.intro { padding-block: clamp(22px, 3.1vw, 40px) 22px; }
.intro h1 { font-size: clamp(2rem, 4vw, 3.05rem); font-weight: 680; line-height: 1.12; margin: 0; letter-spacing: -0.038em; }
.intro h1 span { margin-inline-end: 0.05em; letter-spacing: -0.065em; }
.intro p { margin: 9px 0 0; color: var(--muted); }
.showroom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(258px, 297px); gap: 18px; align-items: stretch; }
.viewer-card, .inspector { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.viewer-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.model-surface {
  position: relative;
  flex: 1 0 auto;
  min-height: clamp(450px, 60vh, 600px);
  width: 100%;
  background: radial-gradient(ellipse at 48% 38%, #f6f1e7 0%, #eae3d5 49%, #dcd5c8 100%);
  isolation: isolate;
}
.model-surface[data-mode="wireframe"] {
  background: radial-gradient(ellipse at 46% 38%, #f1f5ee 0%, #e1e8de 61%, #d4ddd2 100%);
}
.model-surface canvas, .poster { display: block; position: absolute; width: 100%; height: 100%; inset: 0; }
.model-surface canvas { z-index: 1; cursor: grab; touch-action: none; opacity: 0; }
.model-surface canvas:active { cursor: grabbing; }
.poster { object-fit: contain; }
.model-surface[data-state="ready"] canvas { opacity: 1; }
.model-surface[data-state="ready"] .poster { visibility: hidden; }
.model-surface[data-state="fallback"] canvas { display: none; }
.surface-label {
  position: absolute;
  inset: 15px auto auto 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 7px;
  background: #fffef8ed;
  color: #3b4940;
  font-size: 0.84rem;
  pointer-events: none;
}
.view-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.viewer-status {
  position: absolute;
  z-index: 3;
  bottom: 15px;
  left: 16px;
  right: 16px;
  width: fit-content;
  margin: 0 auto;
  padding: 7px 12px;
  border-radius: 7px;
  background: #fffef8ee;
  color: var(--ink);
  font-size: 0.87rem;
}
.model-surface[data-state="ready"] .viewer-status { display: none; }
.measure-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: none; }
.model-surface[data-mode="dimensions"][data-state="ready"] .measure-labels { display: block; }
.measure-labels span {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: #16443a;
  background: #fffff6;
  border: 1px solid #91ad9e;
  padding: 3px 7px;
  border-radius: 5px;
  box-shadow: 0 2px 7px #18291d18;
  font-size: 0.82rem;
  font-weight: 650;
}
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 13px; gap: 8px; border-top: 1px solid var(--line); }
.camera-controls { display: flex; gap: 3px; }
.camera-controls button, .reset { padding-inline: 13px; border-radius: 8px; font-size: 0.9rem; white-space: nowrap; }
.camera-controls button[aria-pressed="true"] { background: var(--green-light); color: var(--green); font-weight: 680; }
.camera-controls button:hover, .reset:hover { background: #eef0e9; }
.reset { color: var(--green); }

.inspector { padding: 17px 20px 14px; min-width: 0; }
.panel-section { padding-block: 16px; border-bottom: 1px solid var(--line); }
.panel-section:first-child { padding-top: 2px; }
.panel-section:last-child { border: 0; padding-bottom: 2px; }
.panel-section h2 { margin: 0 0 9px; font-size: 1rem; font-weight: 680; letter-spacing: 0.02em; }
.segmented, .parts, .fabrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.segmented { padding: 3px; background: #f0f1eb; border-radius: 10px; gap: 2px; }
.segmented button { border-radius: 7px; font-size: 0.9rem; color: #475347; }
.segmented button[aria-pressed="true"] { color: white; font-weight: 650; background: var(--green); }
.segmented button[aria-pressed="false"]:hover { background: #e4e9e0; }
.parts button {
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}
.parts button:hover, .parts button[aria-pressed="true"] { border-color: #a3b7a8; color: var(--green); background: var(--green-light); }
.fabrics button {
  padding: 4px 0 5px;
  background: #f7f7f1;
  border: 1px solid #efefe7;
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 58px;
  font-size: 0.79rem;
}
.fabrics button:hover, .fabrics button[aria-pressed="true"] { border-color: #8fae9b; color: var(--green); background: #edf1e9; }
.swatch { display: inline-block; width: 19px; height: 19px; border-radius: 50%; border: 1px solid #0002; }
.swatch.oat { background: #c6aa8e; }
.swatch.moss { background: #657467; }
.swatch.graphite { background: #55545a; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.section-title span { font-size: 0.8rem; color: var(--muted); }
.dimensions {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 10px;
}
.dimensions dt { font-size: 0.85rem; color: var(--muted); }
.dimensions dd { margin: 1px 0 0; font-size: 1.16rem; font-weight: 690; font-variant-numeric: tabular-nums; }
.dimension-note { margin: 11px 0 0; color: var(--muted); font-size: 0.8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
  .showroom { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .inspector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .panel-section:first-child { padding-top: 16px; }
  .panel-section:nth-child(3) { border-bottom: 0; }
  .model-surface { min-height: clamp(350px, 59vw, 480px); }
}

@media (max-width: 480px) {
  .header-inner { min-height: 56px; }
  .identity { gap: 7px; }
  .header-divider { margin-inline: 1px; }
  .site-purpose { font-size: 0.76rem; }
  .brand-mark { width: 26px; height: 26px; }
  .brand { font-size: 0.91rem; }
  .sample-tag { padding-inline: 7px; font-size: 0.73rem; }
  .intro { padding-bottom: 17px; }
  .intro p { font-size: 0.94rem; }
  .viewer-card, .inspector { border-radius: 14px; }
  .model-surface { min-height: clamp(268px, 86vw, 374px); }
  .viewer-toolbar { padding-inline: 7px; gap: 2px; }
  .camera-controls button, .reset { padding-inline: 8px; font-size: 0.82rem; }
  .camera-controls { gap: 1px; }
  .inspector { padding: 2px 14px 13px; grid-template-columns: minmax(0, 1fr); }
  .panel-section:nth-child(3) { border-bottom: 1px solid var(--line); }
  .dimensions { column-gap: 6px; }
}
