:root {
  --ink:#172019;
  --muted:#828b82;
  --line:#e8eae4;
  --paper:#fafbf8;
  --white:#fff;
  --green:#335841;
  --bright:#b8d782;
  --lime:#d4e9a9;
  --wood:#bd8854;
  --shadow:0 14px 42px #20322312
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'DM Sans',sans-serif;
  font-size:13px;
  -webkit-font-smoothing:antialiased
}

.topbar {
  height:64px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 32px;
  background:#fbfcf9;
  position:sticky;
  top:0;
  z-index:10
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--ink);
  font:700 22px Manrope,sans-serif;
  letter-spacing:-1.4px
}

.brand-dot {
  color:#8cab64
}

.brand-mark {
  width:25px;
  height:24px;
  position:relative;
  display:flex;
  align-items:end;
  gap:3px;
  padding:2px
}

.brand-mark i {
  display:block;
  width:5px;
  background:#607c53;
  transform:skewY(-28deg);
  border-radius:1px
}

.brand-mark i:nth-child(1) {
  height:10px
}

.brand-mark i:nth-child(2) {
  height:16px
}

.brand-mark i:nth-child(3) {
  height:21px
}

.top-center {
  font-size:9px;
  letter-spacing:1.3px;
  font-weight:700;
  color:#4b594c;
  display:flex;
  align-items:center;
  gap:9px
}

.status-dot,.save-state i,.live-tag i,.live-pulse {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#86a870;
  display:inline-block
}

.top-sep {
  color:#c9cec5
}

.muted {
  color:#9da49a
}

.help-button {
  background:transparent;
  border:0;
  color:#4c574e;
  font:400 12px 'DM Sans';
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer
}

.help-icon {
  width:18px;
  height:18px;
  border:1px solid #cbd1c8;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:11px
}

.app-shell {
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  min-height:calc(100vh - 64px)
}

.sidebar {
  border-right:1px solid var(--line);
  background:#fff;
  min-width:0
}

.side-scroll {
  padding:28px 26px 22px;
  position:sticky;
  top:64px;
  max-height:calc(100vh - 64px);
  overflow-y:auto;
  scrollbar-width:thin
}

.eyebrow {
  font:700 9px 'DM Sans';
  letter-spacing:1.15px;
  color:#7e897e
}

.eyebrow>span {
  color:#92a77a;
  margin-right:8px
}

.sidebar h1 {
  font:600 29px/1.18 Manrope,sans-serif;
  letter-spacing:-1.3px;
  margin:16px 0 9px
}

.sidebar h1 em {
  font-style:normal;
  color:#74885f
}

.intro {
  color:#858d84;
  font-size:12px;
  line-height:1.6;
  margin:0 0 26px;
  max-width:260px
}

.section-block {
  border-top:1px solid #edf0eb;
  padding:19px 0 18px
}

.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:13px
}

.section-heading h2 {
  font:700 12px 'DM Sans';
  margin:0;
  letter-spacing:-.1px
}

.optional,.unit-tag {
  font:700 8px 'DM Sans';
  letter-spacing:.9px;
  color:#9ca499
}

.preset-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px
}

.preset-card {
  height:80px;
  background:#fff;
  border:1px solid #e7eae4;
  border-radius:7px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  color:#3d493e;
  font:600 10px 'DM Sans';
  transition:.16s
}

.preset-card:hover {
  border-color:#a8b79c
}

.preset-card.active {
  background:#f5f8f1;
  border-color:#789067;
  box-shadow:inset 0 0 0 1px #789067
}

.preset-card small {
  font-size:9px;
  color:#999f97;
  font-weight:400
}

.preset-icon {
  width:24px;
  height:20px;
  position:relative;
  display:block;
  border-bottom:2px solid #839878;
  margin-bottom:1px
}

.preset-icon i {
  position:absolute;
  bottom:0;
  width:3px;
  height:13px;
  background:#839878;
  border-radius:1px
}

.icon-free i:nth-child(1) {
  left:1px
}

.icon-free i:nth-child(2) {
  left:19px
}

.icon-free:before,.icon-free:after,.icon-wall:before,.icon-corner:before {
  content:'';
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:#839878;
  top:4px
}

.icon-free:after {
  top:8px;
  opacity:.6
}

.icon-free i:nth-child(3),.icon-free i:nth-child(4) {
  display:none
}

.icon-wall {
  border:0;
  border-right:2px solid #c7cec1;
  width:24px
}

.icon-wall:before {
  top:5px;
  left:4px
}

.icon-wall i:first-child {
  left:5px
}

.icon-wall i:nth-child(2) {
  left:19px
}

.icon-wall:after {
  content:'';
  position:absolute;
  left:4px;
  bottom:0;
  width:17px;
  height:2px;
  background:#839878
}

.icon-corner {
  border:0;
  border-right:2px solid #c7cec1;
  border-top:2px solid #c7cec1;
  width:21px;
  height:17px
}

.icon-corner:before {
  top:4px;
  left:6px
}

.icon-corner i:first-child {
  left:7px
}

.icon-corner i:nth-child(2) {
  left:19px
}

.measure-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:12px 0 4px
}

.measure-row label {
  font-size:11px;
  color:#354136;
  font-weight:600
}

.measure-row label span {
  display:block;
  color:#a0a69e;
  font-size:9px;
  font-weight:400;
  margin-top:3px
}

.number-wrap {
  height:30px;
  width:73px;
  display:flex;
  align-items:center;
  border:1px solid #e4e8e0;
  border-radius:5px;
  background:#fff;
  padding:0 8px
}

.number-wrap:focus-within {
  border-color:#809472;
  box-shadow:0 0 0 2px #dfe8d6
}

.number-wrap input {
  width:100%;
  border:0;
  outline:0;
  background:none;
  color:#233126;
  font:600 12px 'DM Sans';
  font-variant-numeric:tabular-nums;
  padding:0
}

.number-wrap b {
  font:400 10px 'DM Sans';
  color:#9ba397
}

.range {
  width:100%;
  height:13px;
  margin:1px 0 7px;
  appearance:none;
  background:transparent;
  display:block;
  cursor:pointer
}

.range::-webkit-slider-runnable-track {
  height:3px;
  border-radius:3px;
  background:linear-gradient(to right,#7d956c 0%,#7d956c var(--fill,50%),#e6eae2 var(--fill,50%),#e6eae2 100%)
}

.range::-moz-range-track {
  height:3px;
  border-radius:3px;
  background:#e6eae2
}

.range::-moz-range-progress {
  height:3px;
  background:#7d956c
}

.range::-webkit-slider-thumb {
  appearance:none;
  width:11px;
  height:11px;
  border-radius:50%;
  background:#fff;
  border:2px solid #6d865e;
  margin-top:-4px;
  box-shadow:0 1px 3px #1112
}

.range::-moz-range-thumb {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#fff;
  border:2px solid #6d865e
}

.height-row {
  margin-top:13px
}

.field-label {
  font-size:10px;
  color:#788177;
  display:block;
  margin-bottom:6px
}

.select-wrap {
  position:relative
}

.select-wrap select {
  width:100%;
  height:34px;
  border:1px solid #e4e8e0;
  border-radius:5px;
  background:#fff;
  appearance:none;
  padding:0 30px 0 10px;
  font:400 11px 'DM Sans';
  color:#3d493f;
  outline:none;
  cursor:pointer
}

.select-wrap select:focus {
  border-color:#809472
}

.chevron {
  position:absolute;
  right:11px;
  top:7px;
  color:#8c9687;
  pointer-events:none;
  font-size:16px
}

.spacing-row {
  margin-top:14px
}

.notice {
  background:#f5f7f2;
  border:1px solid #edf0e9;
  padding:9px 10px;
  border-radius:5px;
  display:flex;
  gap:8px;
  color:#747e72;
  font-size:9px;
  line-height:1.5;
  margin-top:8px;
  transition:.2s
}

.notice strong {
  color:#536447;
  font-size:9px
}

.notice-icon {
  color:#87a16f;
  font-size:15px
}

.notice.hidden {
  display:none
}

.side-foot {
  padding-top:14px;
  border-top:1px solid #edf0eb;
  color:#90988d;
  font-size:9px;
  display:flex;
  align-items:center;
  gap:6px
}

.wood-chip {
  width:9px;
  height:9px;
  background:#ba8755;
  border-radius:2px
}

.foot-dot {
  color:#c4c9c0
}

.workspace {
  min-width:0;
  padding:0 30px 18px
}

.workspace-bar {
  height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line)
}

.breadcrumbs {
  font-size:10px;
  color:#a0a69e;
  letter-spacing:.4px
}

.breadcrumbs b {
  margin:0 9px;
  color:#d2d6cf
}

.breadcrumbs strong {
  color:#435044;
  font-weight:600;
  letter-spacing:0
}

.bar-actions {
  display:flex;
  align-items:center;
  gap:15px
}

.save-state {
  font-size:9px;
  color:#90998f;
  display:flex;
  align-items:center;
  gap:6px
}

.save-state i {
  width:5px;
  height:5px
}

.icon-button {
  border:1px solid #e3e7df;
  background:#fff;
  color:#687464;
  width:27px;
  height:27px;
  border-radius:5px;
  font-size:17px;
  cursor:pointer
}

.viewer {
  height:min(61vw,520px);
  min-height:410px;
  max-height:520px;
  background:#eef0e9;
  position:relative;
  overflow:hidden;
  border:1px solid #e3e7de;
  border-radius:8px;
  margin-top:16px;
  box-shadow:0 4px 20px #26332608;
  touch-action:none
}

.viewer canvas {
  width:100%;
  height:100%;
  display:block;
  cursor:grab
}

.viewer canvas.dragging {
  cursor:grabbing
}

.viewer-wash {
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(ellipse at 48% 47%,#ffffff00 30%,#dfe5d83d 100%)
}

.scene-label {
  position:absolute;
  left:19px;
  top:17px;
  display:flex;
  gap:9px;
  align-items:center
}

.live-pulse {
  width:7px;
  height:7px;
  box-shadow:0 0 0 3px #91aa7722
}

.scene-label strong {
  display:block;
  font-size:8px;
  letter-spacing:1px;
  color:#586252
}

.scene-label small {
  display:block;
  color:#949b90;
  font-size:9px;
  margin-top:4px
}

.view-controls {
  position:absolute;
  top:15px;
  right:17px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px
}

.view-cube {
  width:38px;
  height:38px;
  border:0;
  background:transparent;
  position:relative;
  cursor:pointer
}

.cube-front {
  position:absolute;
  z-index:2;
  inset:10px 7px 4px;
  background:#fff;
  border:1px solid #b6c1ad;
  display:grid;
  place-items:center;
  color:#66745c;
  font:700 9px Manrope;
  transform:skewY(0deg)
}

.cube-top {
  position:absolute;
  z-index:3;
  top:2px;
  left:7px;
  width:24px;
  height:12px;
  transform:skewX(-45deg);
  background:#e2e9da;
  border:1px solid #b6c1ad
}

.cube-side {
  position:absolute;
  z-index:1;
  right:1px;
  top:11px;
  width:8px;
  height:19px;
  background:#cad5c1;
  transform:skewY(45deg);
  border:1px solid #b6c1ad
}

.quick-views {
  display:flex;
  flex-direction:column;
  gap:3px;
  background:#ffffffbf;
  border:1px solid #e4e8e0;
  border-radius:5px;
  padding:3px
}

.quick-views button {
  border:0;
  background:transparent;
  border-radius:3px;
  color:#8a9387;
  font:700 8px 'DM Sans';
  width:29px;
  height:20px;
  cursor:pointer
}

.quick-views button:hover,.quick-views button.selected {
  background:#e8eee1;
  color:#4f6745
}

.zoom-controls {
  position:absolute;
  right:18px;
  bottom:59px;
  width:27px;
  display:flex;
  flex-direction:column;
  align-items:center;
  background:#ffffffc9;
  border:1px solid #e4e8e0;
  border-radius:5px;
  overflow:hidden
}

.zoom-controls button {
  width:25px;
  height:25px;
  border:0;
  background:transparent;
  font-size:16px;
  color:#718068;
  cursor:pointer
}

.zoom-controls span {
  width:14px;
  border-top:1px solid #eaede7
}

.drag-hint {
  position:absolute;
  left:18px;
  bottom:18px;
  color:#899286;
  font-size:9px;
  background:#ffffffa6;
  padding:6px 9px;
  border-radius:4px
}

.drag-hint span {
  font-size:12px;
  color:#687960;
  margin-right:4px
}

.drag-hint i {
  font-style:normal;
  margin:0 4px;
  color:#c4c9c0
}

.live-card {
  position:absolute;
  right:58px;
  bottom:16px;
  width:324px;
  background:#ffffffed;
  border:1px solid #e3e8de;
  border-radius:7px;
  box-shadow:0 5px 18px #26332612;
  padding:12px 14px 10px;
  backdrop-filter:blur(6px)
}

.live-card-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:8px;
  letter-spacing:.8px;
  color:#7e897c;
  font-weight:700
}

.live-tag {
  background:#f0f4eb;
  border-radius:20px;
  padding:4px 7px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#718467;
  font:700 7px 'DM Sans';
  letter-spacing:.5px
}

.live-tag i {
  width:5px;
  height:5px
}

.live-dimensions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:12px 0 10px
}

.live-dimensions div small {
  display:block;
  color:#a2a99e;
  font-size:7px;
  letter-spacing:.5px;
  margin-bottom:4px
}

.live-dimensions strong {
  font:700 15px Manrope;
  color:#2f3d31;
  letter-spacing:-.4px
}

.live-dimensions strong i {
  font:400 9px 'DM Sans';
  color:#929b8f;
  font-style:normal
}

.sum-x {
  font-size:10px;
  color:#c0c6bc;
  margin-top:11px
}

.live-card-bottom {
  border-top:1px solid #edf0eb;
  padding-top:8px;
  display:flex;
  justify-content:space-between;
  color:#828c7d;
  font-size:8px
}

.live-card-bottom b {
  color:#495c40;
  font-size:10px
}

.live-card-bottom .wall-summary {
  color:#9ba398
}

.dimension-label {
  position:absolute;
  pointer-events:none;
  color:#53634d;
  font:700 9px 'DM Sans';
  letter-spacing:.15px
}

.dimension-label span {
  background:#f9fbf4d9;
  border:1px solid #e3e9db;
  padding:4px 6px;
  border-radius:4px;
  box-shadow:0 2px 5px #2433220b
}

.dimension-label i {
  display:block;
  position:absolute;
  background:#85967566
}

.width-label {
  left:43%;
  top:68%
}

.width-label i {
  width:115px;
  height:1px;
  left:50%;
  top:13px;
  transform:rotate(-1deg)
}

.depth-label {
  left:61%;
  top:54%
}

.depth-label i {
  width:80px;
  height:1px;
  left:25px;
  top:22px;
  transform:rotate(48deg)
}

.height-label {
  left:28%;
  top:39%
}

.height-label i {
  height:76px;
  width:1px;
  left:21px;
  top:16px
}

.corner-note {
  position:absolute;
  right:14px;
  top:88px;
  font-size:8px;
  color:#969d92;
  display:flex;
  align-items:center;
  gap:5px
}

.corner-note span {
  border:1px solid #c6cec0;
  border-radius:50%;
  width:12px;
  height:12px;
  display:grid;
  place-items:center;
  font-size:8px
}

.shopping {
  padding:26px 1px 0
}

.shopping-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:15px
}

.shopping-head .eyebrow {
  margin-bottom:8px
}

.shopping-head h2 {
  font:700 19px Manrope;
  letter-spacing:-.7px;
  margin:0;
  display:flex;
  align-items:center;
  gap:10px
}

.shopping-head h2 .live-tag {
  vertical-align:middle
}

.shopping-head p {
  font-size:10px;
  color:#8a9388;
  margin:5px 0 0
}

.shopping-actions {
  display:flex;
  gap:8px
}

.shopping-actions button {
  height:33px;
  padding:0 11px;
  border-radius:5px;
  font:600 10px 'DM Sans';
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:7px
}

.copy-button {
  border:1px solid #dde3d9;
  background:#fff;
  color:#5d695a
}

.whatsapp-button {
  border:1px solid #365d42;
  background:#365d42;
  color:#fff
}

.button-arrow {
  font-size:12px;
  margin-left:3px
}

.materials-grid {
  display:grid;
  grid-template-columns:1.05fr 1fr 1fr;
  gap:10px
}

.material-card {
  border:1px solid #e7eae4;
  background:#fff;
  border-radius:7px;
  min-width:0;
  overflow:hidden
}

.material-title {
  display:flex;
  align-items:center;
  padding:12px 12px 10px;
  border-bottom:1px solid #f0f2ed;
  gap:8px
}

.material-icon {
  width:27px;
  height:27px;
  border-radius:5px;
  background:#f5f4ed;
  color:#93825e;
  display:grid;
  place-items:center;
  font-size:14px;
  flex-shrink:0
}

.metal-icon {
  background:#f0f3ef;
  color:#778778
}

.screw-icon {
  background:#f4f2ee;
  color:#92836d
}

.material-title h3 {
  font:700 10px 'DM Sans';
  margin:0;
  color:#394439
}

.material-title small {
  display:block;
  font-size:7px;
  color:#a0a69c;
  letter-spacing:.45px;
  margin-top:4px;
  white-space:nowrap
}

.card-count {
  margin-left:auto;
  white-space:nowrap;
  color:#a0a69a;
  font:700 7px 'DM Sans';
  letter-spacing:.4px
}

.material-list {
  padding:2px 12px
}

.material-row {
  min-height:36px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #f2f3ef;
  gap:6px
}

.material-row:last-child {
  border-bottom:0
}

.material-row .item-name {
  font-size:9px;
  color:#5e695d;
  line-height:1.3
}

.material-row .item-name small {
  display:block;
  font-size:8px;
  color:#a2a89f;
  margin-top:2px
}

.item-qty {
  white-space:nowrap;
  font:700 10px Manrope;
  color:#475540
}

.item-qty small {
  font:400 8px 'DM Sans';
  color:#959e91
}

.material-foot {
  height:26px;
  background:#fafbf8;
  padding:7px 12px;
  color:#a0a69b;
  font-size:8px;
  border-top:1px solid #f0f2ed
}

.shopping-note {
  display:flex;
  align-items:center;
  gap:9px;
  color:#959c92;
  font-size:9px;
  padding:11px 2px 6px
}

.shopping-note>span:first-child {
  font-size:13px;
  color:#91a37b
}

.shopping-note strong {
  color:#64705f;
  font-weight:600
}

.shopping-note button {
  margin-left:auto;
  border:0;
  background:transparent;
  color:#708565;
  font:600 9px 'DM Sans';
  white-space:nowrap;
  cursor:pointer
}

footer {
  border-top:1px solid #e9ece6;
  margin-top:16px;
  padding-top:11px;
  display:flex;
  justify-content:space-between;
  color:#a1a79e;
  font-size:8px
}

footer span:first-child {
  font:700 8px Manrope;
  letter-spacing:.8px;
  color:#86907f
}

footer i {
  font-style:normal;
  color:#b6c590
}

.toast {
  position:fixed;
  z-index:20;
  bottom:24px;
  left:50%;
  transform:translate(-50%,20px);
  opacity:0;
  pointer-events:none;
  background:#26392b;
  color:white;
  padding:11px 16px;
  border-radius:6px;
  box-shadow:var(--shadow);
  font-size:11px;
  transition:.2s
}

.toast.show {
  transform:translate(-50%,0);
  opacity:1
}

dialog {
  width:min(420px,calc(100vw - 32px));
  border:1px solid #e2e8dd;
  border-radius:10px;
  padding:30px;
  background:#fff;
  color:var(--ink);
  box-shadow:0 20px 70px #15251c30
}

dialog::backdrop {
  background:#14201770;
  backdrop-filter:blur(3px)
}

.dialog-close {
  position:absolute;
  right:16px;
  top:12px;
  border:0;
  background:none;
  font-size:23px;
  color:#7d887a;
  cursor:pointer
}

.dialog-ok {
  background:#365d42;
  color:white;
  border:0;
  border-radius:5px;
  padding:10px 17px;
  margin-top:8px;
  cursor:pointer;
  font:600 11px 'DM Sans'
}

dialog h2 {
  font:700 22px Manrope;
  letter-spacing:-.6px;
  margin:17px 0 9px
}

dialog p {
  font-size:12px;
  line-height:1.7;
  color:#778174;
  margin:0 0 12px
}

@media(max-width:1120px) {
  .app-shell {
    grid-template-columns:305px minmax(0,1fr)
  }
  .side-scroll {
    padding-left:20px;
    padding-right:20px
  }
  .workspace {
    padding:0 20px 16px
  }
  .viewer {
    min-height:390px
  }
  .live-card {
    width:300px;
    right:49px
  }
  .materials-grid {
    grid-template-columns:1fr 1fr
  }
  .material-card:last-child {
    grid-column:span 2
  }
  .material-card:last-child .material-list {
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:16px
  }
  .material-card:last-child .material-foot {
    height:auto
  }
}

@media(max-width:760px) {
  .topbar {
    height:56px;
    padding:0 16px
  }
  .top-center {
    display:none
  }
  .app-shell {
    display:flex;
    flex-direction:column
  }
  .sidebar {
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .side-scroll {
    position:static;
    max-height:none;
    padding:22px 18px 15px
  }
  .sidebar h1 {
    font-size:26px
  }
  .intro {
    margin-bottom:18px
  }
  .model-section {
    padding-top:15px
  }
  .preset-card {
    height:70px
  }
  .dimensions-section {
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:15px
  }
  .dimensions-section .section-heading {
    grid-column:span 2
  }
  .dimensions-section .measure-row {
    margin:7px 0 2px
  }
  .dimensions-section .range {
    margin-bottom:5px
  }
  .height-row {
    grid-column:1
  }
  .dimensions-section #heightRange {
    grid-column:1
  }
  .structure-section {
    padding-bottom:12px
  }
  .side-foot {
    display:none
  }
  .workspace {
    padding:0 12px 15px
  }
  .workspace-bar {
    height:46px
  }
  .viewer {
    height:470px;
    min-height:400px;
    margin-top:11px
  }
  .scene-label {
    left:12px;
    top:13px
  }
  .view-controls {
    right:9px;
    top:10px
  }
  .live-card {
    left:10px;
    right:10px;
    bottom:48px;
    width:auto
  }
  .drag-hint {
    left:12px;
    bottom:14px
  }
  .zoom-controls {
    right:11px;
    bottom:116px
  }
  .corner-note {
    top:75px;
    right:10px;
    max-width:165px;
    text-align:right;
    justify-content:end
  }
  .width-label {
    left:35%;
    top:61%
  }
  .depth-label {
    left:66%;
    top:52%
  }
  .height-label {
    left:19%;
    top:35%
  }
  .shopping {
    padding-top:20px
  }
  .shopping-head {
    display:block
  }
  .shopping-head h2 {
    font-size:18px
  }
  .shopping-head p {
    line-height:1.5
  }
  .shopping-actions {
    margin-top:12px
  }
  .shopping-actions button {
    flex:1;
    justify-content:center
  }
  .materials-grid {
    grid-template-columns:1fr
  }
  .material-card:last-child {
    grid-column:auto
  }
  .material-card:last-child .material-list {
    display:block
  }
  .shopping-note {
    align-items:flex-start;
    line-height:1.5
  }
  .shopping-note button {
    align-self:center
  }
  footer {
    margin-top:12px
  }
  .height-row {
    grid-column:auto
  }
  .dimensions-section .section-heading {
    grid-column:span 2
  }
}

@media(max-width:390px) {
  .side-scroll {
    padding-left:15px;
    padding-right:15px
  }
  .workspace {
    padding-left:9px;
    padding-right:9px
  }
  .live-dimensions strong {
    font-size:13px
  }
  .live-card {
    padding:10px
  }
  .material-title {
    padding-left:9px;
    padding-right:9px
  }
  .material-list {
    padding-left:9px;
    padding-right:9px
  }
  .unit-tag {
    font-size:7px
  }
}

.kit-recommendation {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:12px;
  padding:13px 15px;
  border:1px solid #e5e9df;
  border-radius:7px;
  background:#f7f9f4
}

.kit-recommendation h3 {
  margin:0 0 4px;
  font:700 11px 'DM Sans';
  color:#3b4939
}

.kit-recommendation p {
  margin:0;
  color:#7e887b;
  font-size:9px;
  line-height:1.5
}

.kit-recommendation a {
  flex-shrink:0;
  color:#536b48;
  font:700 9px 'DM Sans';
  text-decoration:none;
  border:1px solid #d8e0d1;
  border-radius:5px;
  background:#fff;
  padding:8px 10px
}

.kit-recommendation a:hover {
  border-color:#8ca17b
}

@media(max-width:760px) {
  .kit-recommendation {
    align-items:flex-start;
    flex-direction:column;
    gap:10px
  }
  .kit-recommendation a {
    align-self:flex-start
  }
}

.kit-links {
  display:flex;
  align-items:center;
  gap:7px;
  flex-shrink:0
}

.kit-recommendation .kit-links a {
  white-space:nowrap
}

@media(max-width:760px) {
  .kit-links {
    flex-wrap:wrap
  }
}

.kit-recommendation {
  align-items:center
}

.kit-images {
  display:flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto
}

.kit-product-image {
  width:88px;
  height:88px;
  object-fit:contain;
  flex:0 0 88px;
  border:1px solid #e8ebe5;
  border-radius:6px;
  background:#fff;
  padding:4px
}

.kit-recommendation .kit-alternative-image {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  border:0;
  background:transparent;
  padding:0
}

.kit-alternative-image .kit-product-image {
  width:76px;
  height:76px;
  flex-basis:76px
}

.kit-alternative-image span {
  font:600 8px 'DM Sans';
  color:#536b48
}

.kit-recommendation-copy {
  flex:1;
  min-width:0
}

.kit-recommendation .kit-recommendation-copy h3 {
  margin:0 0 4px;
  font:700 11px 'DM Sans';
  color:#3b4939
}

.kit-recommendation .kit-recommendation-copy p {
  margin:0;
  color:#7e887b;
  font-size:9px;
  line-height:1.5
}

@media(max-width:760px) {
  .kit-recommendation {
    flex-direction:row;
    align-items:center
  }
  .kit-product-image {
    width:64px;
    height:64px;
    flex-basis:64px
  }
  .kit-alternative-image .kit-product-image {
    width:58px;
    height:58px;
    flex-basis:58px
  }
  .kit-recommendation-copy {
    flex:1
  }
  .kit-links {
    flex-basis:100%
  }
}

/* Lista de compra: categorías plegables y kit integrado en la misma sección. */
.material-card>summary,.kit-recommendation>summary {
  list-style:none;
  cursor:pointer;
  user-select:none
}

.material-card>summary::-webkit-details-marker,.kit-recommendation>summary::-webkit-details-marker {
  display:none
}

.material-card>summary:focus-visible,.kit-recommendation>summary:focus-visible {
  outline:2px solid #90a77e;
  outline-offset:-3px
}

.material-card:not([open])>.material-title {
  border-bottom:0
}

.card-chevron {
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:grid;
  place-items:center;
  border:1px solid #e2e7de;
  border-radius:50%;
  color:#7c8976;
  transition:transform .18s ease
}

.card-chevron:before {
  content:'⌄';
  font:600 13px 'DM Sans';
  line-height:1;
  transform:translateY(-2px)
}

.material-card[open]>.material-title .card-chevron,.kit-recommendation[open]>.kit-recommendation-title .card-chevron {
  transform:rotate(180deg)
}

.kit-recommendation {
  grid-column:1/-1;
  display:block;
  align-self:start;
  margin:0;
  padding:0;
  overflow:hidden;
  border:1px solid #e5e9df;
  border-radius:7px;
  background:#f7f9f4
}

.kit-recommendation-title {
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px
}

.kit-icon {
  color:#748568
}

.kit-recommendation-heading {
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0
}

.kit-recommendation-heading small {
  font:700 7px 'DM Sans';
  letter-spacing:.7px;
  color:#99a293
}

.kit-recommendation-heading strong {
  font:700 10px 'DM Sans';
  color:#3b4939
}

.kit-base-label {
  margin-left:auto;
  padding:5px 8px;
  border-radius:20px;
  background:#fff3cf;
  color:#8d6b16;
  font:700 8px 'DM Sans';
  white-space:nowrap
}

.kit-recommendation-body {
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 13px;
  border-top:1px solid #e9ede5;
  background:#fff
}

.kit-recommendation .kit-recommendation-copy {
  flex:1;
  min-width:0
}

.kit-recommendation .kit-recommendation-copy p {
  margin:0;
  color:#7e887b;
  font-size:9px;
  line-height:1.5
}

.kit-recommendation .kit-links {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  flex-shrink:0
}

@media(max-width:760px) {
  .kit-recommendation-body {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:10px
  }
  .kit-recommendation .kit-links {
    grid-column:1/-1;
    flex-direction:row;
    flex-wrap:wrap
  }
  .kit-recommendation-title {
    padding:10px
  }
  .kit-base-label {
    font-size:7px
  }
}

/* Herrajes y fijaciones comparten una tarjeta con subtítulos internos. */
.materials-grid {
  grid-template-columns:1.05fr 1fr
}

.material-title>div {
  flex:1;
  min-width:0
}

.material-subsection+.material-subsection {
  margin-top:7px;
  padding-top:8px;
  border-top:1px solid #edf0eb
}

.material-subtitle {
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 12px 3px
}

.material-subtitle h4 {
  margin:0;
  color:#576455;
  font:700 8px 'DM Sans'
}

.material-subtitle .card-count {
  margin-left:auto
}

@media(max-width:760px) {
  .materials-grid {
    grid-template-columns:1fr
  }
}

/* En escritorio, las tres tarjetas principales quedan alineadas en una fila. */
.materials-grid {
  grid-template-columns:1fr 1fr 1fr
}

.kit-recommendation {
  grid-column:auto
}

.kit-recommendation-body {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px
}

.kit-recommendation .kit-images {
  max-width:100%;
  flex-wrap:wrap
}

.kit-recommendation .kit-links {
  width:100%;
  flex-direction:row;
  align-items:flex-start;
  flex-wrap:wrap
}

@media(max-width:1120px) {
  .materials-grid {
    grid-template-columns:1fr 1fr
  }
  .kit-recommendation {
    grid-column:1/-1
  }
  .kit-recommendation-body {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center
  }
  .kit-recommendation .kit-links {
    grid-column:1/-1;
    width:auto
  }
}

@media(max-width:760px) {
  .materials-grid {
    grid-template-columns:1fr
  }
  .kit-recommendation {
    grid-column:auto
  }
  .kit-recommendation-body {
    display:grid;
    grid-template-columns:auto minmax(0,1fr)
  }
  .kit-recommendation .kit-links {
    grid-column:1/-1
  }
}

/* Indicador discreto y uniforme para todos los desplegables. */
.card-chevron {
  width:18px;
  height:18px;
  flex:0 0 18px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#70816a
}

.card-chevron:before {
  content:'';
  width:7px;
  height:7px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg)
}

.material-card>.material-title {
  border-bottom:1px solid #f0f2ed
}

.project-status {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
  min-width:0
}

/* El kit sugerido muestra la imagen completa y una acción principal clara. */
#kitRecommendation {
  border-color:#ead995;
  background:#fffdf5
}

#kitRecommendation .kit-recommendation-title {
  align-self:stretch;
  box-sizing:border-box;
  width:100%;
  justify-content:flex-start;
  text-align:left;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 12px 10px;
  background:#fff9e5
}

#kitRecommendation .kit-recommendation-heading {
  flex:1;
  min-width:120px
}

#kitRecommendation .kit-recommendation-heading strong {
  font-size:13px;
  line-height:1.35
}

#kitRecommendation .kit-recommendation-heading small {
  font-size:8px
}

#kitRecommendation .kit-base-label {
  margin-left:0;
  font-size:9px
}

#kitRecommendation .kit-recommendation-body {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  padding:14px
}

#kitRecommendation .kit-preview {
  display:block;
  position:relative;
  width:100%;
  padding:0;
  overflow:hidden;
  border:1px solid #e8ebe5;
  border-radius:8px;
  background:#f5f5f3;
  cursor:zoom-in
}

#kitRecommendation .kit-preview .kit-product-image {
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1;
  max-height:320px;
  object-fit:contain;
  border:0;
  border-radius:0;
  padding:0
}

#kitRecommendation .kit-preview span {
  display:block;
  padding:7px;
  font:400 10px 'DM Sans',sans-serif;
  color:#52604c;
  background:#fff
}

#kitRecommendation .kit-preview:hover {
  border-color:#d5a600
}

#kitRecommendation .kit-preview:focus-visible,#kitRecommendation a:focus-visible,#kitImageClose:focus-visible {
  outline:3px solid #bd8c00;
  outline-offset:3px
}

#kitRecommendation .kit-recommendation-copy p {
  font-size:11px;
  line-height:1.5;
  color:#727b6f
}

#kitRecommendation .kit-recommendation-copy .kit-configuration {
  margin-bottom:4px;
  font-weight:600;
  color:#344330;
  text-transform:capitalize
}

#kitRecommendation .kit-links {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px
}

#kitRecommendation .kit-links .kit-store-button {
  display:block;
  text-align:center;
  padding:12px 10px;
  border-color:#fcc006;
  background:#fcc006;
  color:#172019;
  font-size:12px;
  font-weight:700;
  border-radius:6px
}

#kitRecommendation .kit-links .kit-store-button:hover {
  background:#e5ad00;
  border-color:#e5ad00
}

#kitRecommendation .kit-links a:not(.kit-store-button) {
  text-align:center;
  font-size:10px
}

#kitImageDialog {
  position:fixed;
  box-sizing:border-box;
  width:min(760px,calc(100vw - 32px));
  max-width:760px;
  max-height:90vh;
  padding:20px;
  border:0;
  border-radius:12px;
  overflow:auto
}

#kitImageDialog::backdrop {
  background:rgba(20,28,21,.7)
}

#kitImageDialog h2 {
  margin:0 36px 14px 0;
  font:600 16px 'DM Sans',sans-serif;
  color:#344330
}

#kitImageFull {
  display:block;
  width:100%;
  max-height:74vh;
  object-fit:contain
}

#kitImageClose {
  position:absolute;
  right:10px;
  top:10px;
  width:32px;
  height:32px;
  border:1px solid #dfe4db;
  border-radius:50%;
  background:#fff;
  font-size:24px;
  cursor:pointer
}

@media(min-width:761px) and (max-width:1120px) {
  #kitRecommendation .kit-recommendation-body {
    display:grid;
    grid-template-columns:minmax(180px,240px) 1fr;
    align-items:center
  }
  #kitRecommendation .kit-preview {
    grid-row:1/3
  }
  #kitRecommendation .kit-links {
    grid-column:2
  }
}

/* Lectura de la lista de compra: texto más grande y contraste reforzado. */
.shopping-head p {
  font-size:12px;
  line-height:1.5;
  color:#596456
}

.material-title {
  flex-wrap:wrap;
  row-gap:6px
}

.material-title h3 {
  font-size:13px;
  line-height:1.35;
  color:#293628
}

.material-title small {
  font-size:9px;
  line-height:1.45;
  color:#626d5e;
  white-space:normal;
  letter-spacing:.2px
}

.card-count {
  font-size:10px;
  color:#626d5e;
  letter-spacing:.1px
}

.material-subtitle {
  padding-top:8px;
  padding-bottom:6px;
  flex-wrap:wrap
}

.material-subtitle h4 {
  font-size:11px;
  line-height:1.4;
  color:#354330
}

.material-row {
  align-items:flex-start;
  gap:8px;
  padding:9px 0;
  flex-wrap:wrap
}

.material-row .item-name {
  flex:1 1 120px;
  min-width:0;
  font-size:12px;
  line-height:1.45;
  color:#364332
}

.material-row .item-name small {
  font-size:11px;
  line-height:1.45;
  color:#626d5e;
  margin-top:4px
}

.material-row .item-qty {
  margin-left:auto;
  max-width:100%;
  font-size:12px;
  line-height:1.45;
  color:#293628;
  white-space:normal;
  text-align:right
}

.material-row .item-qty small {
  font-size:11px;
  line-height:1.45;
  color:#596456
}

.material-foot {
  height:auto;
  min-height:30px;
  font-size:11px;
  line-height:1.5;
  color:#626d5e;
  padding:9px 12px
}

.shopping-note {
  font-size:12px;
  line-height:1.5;
  color:#596456;
  flex-wrap:wrap
}

.shopping-note>span:nth-child(2) {
  flex:1 1 220px
}

.shopping-note strong {
  color:#354330
}

.shopping-note #detailsButton {
  font-size:12px;
  color:#795900
}

#kitRecommendation .kit-recommendation-copy p {
  font-size:12px;
  color:#596456;
  line-height:1.5
}

#kitRecommendation .kit-recommendation-heading small {
  font-size:10px;
  color:#62604c
}

#kitRecommendation .kit-base-label {
  font-size:10px;
  color:#705300
}

#kitRecommendation .kit-preview span,#kitRecommendation .kit-links a:not(.kit-store-button) {
  font-size:11px
}

#kitImageDescription .kit-catalog-description {
  margin:12px 0;
  padding:12px 0;
  border-top:1px solid #e7eae4;
  border-bottom:1px solid #e7eae4
}

#kitImageDescription .kit-catalog-description h4 {
  margin:0 0 7px;
  font-size:12px;
  color:#293628
}

#kitImageDescription .kit-catalog-description ul {
  margin:0 0 10px;
  padding-left:18px;
  font-size:12px;
  line-height:1.5;
  color:#364332
}

#kitImageDescription .kit-catalog-description li+li {
  margin-top:3px
}

#kitImageDescription .kit-catalog-description p+p {
  margin-top:7px
}

#kitImageDescription .kit-description-source {
  display:inline-block;
  margin-top:8px;
  padding:0;
  border:0;
  background:transparent;
  font-size:10px;
  line-height:1.4;
  text-decoration:underline;
  color:#596456
}

#kitImageDescription p {
  font-size:12px;
  line-height:1.5;
  color:#596456;
  margin:0
}

/* Vista ampliada compacta: imagen y contenido lado a lado. */
#kitImageDialog {
  width:min(980px,calc(100vw - 32px));
  max-width:980px;
  max-height:90vh;
  padding:24px;
  gap:16px 24px;
  grid-template-columns:minmax(0,1.6fr) minmax(230px,1fr);
  align-items:center
}

#kitImageDialog[open] {
  display:grid
}

#kitImageDialog h2 {
  grid-column:1/-1;
  margin:0 36px 0 0;
  line-height:1.4
}

#kitImageFull {
  width:100%;
  height:auto;
  max-height:calc(90vh - 110px);
  object-fit:contain;
  min-width:0
}

#kitImageDescription {
  min-width:0
}

#kitImageDescription .kit-catalog-description {
  margin:0;
  padding:0;
  border:0
}

#kitImageDescription .kit-catalog-description h4 {
  font-size:15px;
  margin-bottom:10px
}

#kitImageDescription .kit-catalog-description ul {
  font-size:13px;
  line-height:1.5;
  margin-bottom:12px
}

@media(max-width:600px) {
  #kitImageDialog {
    width:calc(100vw - 20px);
    padding:16px;
    grid-template-columns:minmax(0,1fr);
    gap:12px
  }
  #kitImageDialog h2 {
    font-size:14px
  }
  #kitImageFull {
    max-height:32vh
  }
  #kitImageDescription .kit-catalog-description h4 {
    font-size:13px;
    margin-bottom:6px
  }
  #kitImageDescription .kit-catalog-description ul {
    font-size:12px;
    margin-bottom:8px
  }
}

/* Descripción ampliada del producto junto a la imagen. */
#kitImageDialog {
  width:min(1120px,calc(100vw - 32px));
  max-width:1120px;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,1fr);
  gap:14px 28px
}

#kitImageDescription .kit-catalog-description h4 {
  margin:14px 0 6px;
  font-size:13px;
  line-height:1.4
}

#kitImageDescription .kit-catalog-description h4:first-child {
  margin-top:0
}

#kitImageDescription .kit-catalog-description ul {
  font-size:12px;
  line-height:1.5;
  margin-bottom:0
}

#kitImageDescription .kit-description-caption {
  margin-top:12px;
  font-size:10px;
  color:#626d5e
}

@media(max-width:760px) {
  #kitImageDialog {
    grid-template-columns:minmax(0,1fr);
    padding:16px;
    gap:12px
  }
  #kitImageFull {
    max-height:32vh
  }
}

.rafter-direction-control {
  margin:14px 0 6px
}

.rafter-direction-control[hidden] {
  display:none
}

.rafter-direction-control label {
  display:block;
  margin-bottom:7px;
  font-size:12px;
  font-weight:600;
  color:#354330
}

.rafter-direction-control select {
  width:100%;
  padding:10px 12px;
  border:1px solid #dfe4db;
  border-radius:5px;
  background:#fff;
  color:#354330;
  font:400 12px 'DM Sans',sans-serif;
  cursor:pointer
}

.rafter-direction-control select:focus-visible {
  outline:2px solid #fcc006;
  outline-offset:2px
}

.wood-copy-actions {
  padding:10px 12px 4px
}

#copyWoodList {
  width:100%;
  padding:9px 12px;
  border:1px solid #dfe4db;
  border-radius:5px;
  background:#fff;
  color:#354330;
  font:600 12px 'DM Sans',sans-serif;
  cursor:pointer
}

#copyWoodList:hover {
  background:#fff9e6;
  border-color:#fcc006
}

#copyWoodList:focus-visible {
  outline:2px solid #fcc006;
  outline-offset:2px
}

.slope-controls {
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #e7eae4
}

.slope-controls .measure-row {
  margin-top:0
}

.slope-note {
  font-size:11px;
  line-height:1.45;
  color:#626d5e;
  margin:10px 0 6px
}

.slope-heights {
  font-size:12px;
  line-height:1.5;
  font-weight:600;
  color:#354330;
  margin:0;
  padding:10px;
  background:#fff9e6;
  border-radius:5px
}

.rafter-direction-control select:disabled {
  cursor:default;
  opacity:.65
}

/* Mantener la aclaración fuera de la columna de botones de vistas. */
.scene-label {
  right:80px
}

.corner-note {
  left:19px;
  right:80px;
  top:62px;
  max-width:none;
  justify-content:flex-start;
  text-align:left;
  align-items:flex-start;
  gap:6px;
  font-size:10px;
  line-height:1.45;
  color:#697363;
  pointer-events:none
}

.corner-note span {
  flex:0 0 13px;
  width:13px;
  height:13px;
  margin-top:1px
}

@media(max-width:760px) {
  .scene-label {
    right:65px
  }
  .corner-note {
    left:12px;
    right:65px;
    top:59px;
    max-width:none;
    justify-content:flex-start;
    text-align:left;
    font-size:9px
  }
}

.live-slope-summary {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px 12px;
  padding:10px;
  margin:0 0 10px;
  background:#fff9e6;
  border:1px solid #f1e4b3;
  border-radius:5px
}

.live-slope-summary[hidden] {
  display:none
}

.live-slope-summary small {
  display:block;
  font-size:8px;
  line-height:1.4;
  color:#62604c;
  font-weight:600;
  margin-bottom:3px
}

.live-slope-summary strong {
  font:700 16px Manrope,sans-serif;
  color:#2f3d31
}

.live-slope-summary strong i {
  font:400 10px 'DM Sans',sans-serif;
  font-style:normal;
  color:#626d5e
}

.live-slope-summary>span {
  grid-column:1/-1;
  font-size:10px;
  color:#705300
}

.live-slope-summary .slope-rise {
  font:700 11px 'DM Sans',sans-serif;
  color:#705300;
  white-space:nowrap
}

/* Résumé junto al visor, fuera del área de dibujo. */
.live-card {
  position:static;
  left:auto;
  right:auto;
  bottom:auto;
  width:100%;
  margin:10px 0 0;
  padding:12px 14px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px 20px;
  backdrop-filter:none;
  box-shadow:none;
  background:#fff
}

.live-card-top,.live-card-bottom {
  grid-column:1/-1
}

.live-dimensions {
  grid-column:1/-1;
  margin:0;
  gap:10px
}

.live-card.has-slope .live-dimensions {
  grid-column:1;
  align-self:center
}

.live-slope-summary {
  grid-column:2;
  grid-row:2;
  margin:0;
  padding:8px;
  gap:4px 10px
}

.live-slope-summary strong {
  font-size:14px
}

.live-card-bottom {
  padding-top:8px
}

.zoom-controls {
  bottom:52px
}

.fit-view-button {
  padding:7px 10px;
  border:1px solid #dfe4db;
  border-radius:5px;
  background:#fff;
  color:#354330;
  font:600 11px 'DM Sans',sans-serif;
  cursor:pointer;
  white-space:nowrap
}

.fit-view-button:hover {
  border-color:#fcc006;
  background:#fff9e6
}

.fit-view-button:focus-visible {
  outline:2px solid #fcc006;
  outline-offset:2px
}

.measure-row label .height-label-text {
  display:inline;
  color:inherit;
  font-size:inherit;
  line-height:inherit
}

.fixed-slope-direction {
  margin:0;
  font-size:12px;
  font-weight:600;
  color:#354330
}

.fixed-slope-direction[hidden],#slopeLowEnd[hidden] {
  display:none
}

@media(max-width:600px) {
  .live-card {
    gap:10px;
    padding:11px
  }
  .live-card.has-slope .live-dimensions {
    grid-column:1/-1
  }
  .live-slope-summary {
    grid-column:1/-1;
    grid-row:auto
  }
  .drag-hint {
    right:48px;
    font-size:8px
  }
  .fit-view-button {
    font-size:10px;
    padding:7px 8px
  }
}

.workspace-bar {
  height:auto;
  min-height:54px;
  gap:10px;
  flex-wrap:wrap;
  padding-top:10px;
  padding-bottom:10px
}

.bar-actions {
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px
}

@media(max-width:600px) {
  .bar-actions {
    gap:6px
  }
  .reset-design-button {
    font-size:10px
  }
}

/* Resumen en la esquina del visor, con el zoom por encima. */
.viewer .live-card {
  position:absolute;
  left:auto;
  right:16px;
  bottom:16px;
  width:min(324px,calc(100% - 32px));
  margin:0;
  padding:11px 13px;
  gap:8px;
  background:#ffffffed;
  box-shadow:0 5px 18px #26332612;
  backdrop-filter:blur(6px)
}

.viewer .live-card .live-dimensions,.viewer .live-card.has-slope .live-dimensions {
  grid-column:1/-1
}

.viewer .live-slope-summary {
  grid-column:1/-1;
  grid-row:auto
}

.viewer .zoom-controls {
  right:16px;
  bottom:calc(var(--summary-height,150px) + 28px)
}

@media(max-width:600px) {
  .viewer .live-card {
    right:10px;
    bottom:44px;
    width:min(300px,calc(100% - 20px));
    padding:9px 11px;
    gap:7px
  }
  .viewer .zoom-controls {
    right:10px;
    bottom:calc(var(--summary-height,150px) + 56px)
  }
}

/* La tarjeta se adapta sin desplazar el centro del diseño. */
.viewer .live-card {
  width:clamp(250px,38%,310px);
  max-width:calc(100% - 32px);
  padding:10px 12px
}

.viewer .live-card.compact-summary {
  width:260px;
  padding:9px 10px;
  gap:6px
}

.viewer .live-card.compact-summary .live-card-top {
  font-size:7px;
  letter-spacing:.4px
}

.viewer .live-card.compact-summary .live-dimensions {
  gap:6px
}

.viewer .live-card.compact-summary .live-dimensions strong {
  font-size:14px
}

.viewer .live-card.compact-summary .live-dimensions small {
  font-size:7px;
  letter-spacing:0
}

.viewer .live-card.compact-summary .live-slope-summary {
  padding:6px;
  gap:4px 8px
}

.viewer .live-card.compact-summary .live-slope-summary strong {
  font-size:13px
}

.viewer .live-card.compact-summary .live-slope-summary small {
  font-size:7px
}

.viewer .live-card.compact-summary .live-card-bottom {
  font-size:7px;
  padding-top:6px;
  flex-wrap:wrap;
  gap:4px
}

@media(max-width:600px) {
  .viewer .live-card,.viewer .live-card.compact-summary {
    width:250px;
    max-width:calc(100% - 20px)
  }
}

.foundation-legend {
  grid-column:1/-1;
  font-size:9px;
  line-height:1.4;
  color:#626d5e
}

.foundation-legend[hidden] {
  display:none
}

/* Acciones al pie y alineadas entre las tarjetas de materiales. */
.materials-grid>.material-card {
  display:flex;
  flex-direction:column
}

.card-copy-actions {
  margin-top:auto;
  padding:12px;
  border-top:1px solid #edf0eb
}

.card-copy-actions button {
  width:100%;
  min-height:39px;
  padding:10px 12px;
  border:1px solid #dfe4db;
  border-radius:5px;
  background:#fff;
  color:#354330;
  font:600 12px 'DM Sans',sans-serif;
  cursor:pointer
}

.card-copy-actions button:hover {
  background:#fff9e6;
  border-color:#fcc006
}

.card-copy-actions button:focus-visible {
  outline:2px solid #fcc006;
  outline-offset:2px
}

#kitRecommendation {
  align-self:stretch;
  display:flex;
  flex-direction:column
}

#kitRecommendation .kit-recommendation-body {
  flex:1
}

#kitRecommendation .kit-links {
  margin-top:auto
}

/* Tarjetas con altura natural: los botones siguen al contenido. */
.materials-grid {
  align-items:start
}

.materials-grid>.material-card,#kitRecommendation {
  align-self:start;
  height:auto;
  min-height:0
}

.materials-grid .card-copy-actions,#kitRecommendation .kit-links {
  margin-top:0
}

#kitRecommendation .kit-recommendation-body {
  flex:0 1 auto
}

/* Maderas y herrajes apilados a la izquierda; kit a la derecha. */
.materials-grid {
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:12px;
  align-items:start
}

.materials-left-stack {
  display:grid;
  gap:12px;
  min-width:0;
  align-content:start
}

.materials-left-stack>.material-card {
  display:flex;
  flex-direction:column;
  grid-column:auto;
  min-width:0;
  height:auto
}

.materials-left-stack .material-list {
  display:block
}

.materials-grid #kitRecommendation {
  grid-column:auto;
  align-self:start
}

.materials-grid #kitRecommendation .kit-recommendation-body {
  display:flex;
  flex-direction:column;
  align-items:stretch
}

@media(max-width:760px) {
  .materials-grid {
    grid-template-columns:minmax(0,1fr)
  }
}

/* Herrajes y fijaciones en dos columnas dentro de la misma tarjeta. */
.materials-left-stack>.combined-hardware-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:start
}

.combined-hardware-card>.material-title,.combined-hardware-card>.card-copy-actions {
  grid-column:1/-1
}

.combined-hardware-card>.material-subsection {
  min-width:0;
  margin:0;
  padding:8px 0 0;
  border-top:0
}

.combined-hardware-card>.material-subsection+.material-subsection {
  margin:0;
  padding-top:8px;
  border-top:0;
  border-left:1px solid #edf0eb
}

.combined-hardware-card .material-foot {
  font-size:10px
}

@media(max-width:480px) {
  .materials-left-stack>.combined-hardware-card {
    grid-template-columns:minmax(0,1fr)
  }
  .combined-hardware-card>.material-subsection+.material-subsection {
    border-left:0;
    border-top:1px solid #edf0eb
  }
}

/* Fotos de producto junto a los herrajes y sus fijaciones. */
.material-row.has-product-image {
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:5px 9px;
  align-items:start
}

.material-product-image {
  display:block;
  grid-column:1;
  grid-row:1/3;
  width:48px;
  height:48px;
  object-fit:contain;
  background:#fff;
  border:1px solid #edf0eb;
  border-radius:5px
}

.material-row.has-product-image .item-name {
  grid-column:2;
  grid-row:1;
  min-width:0
}

.material-row.has-product-image .item-qty {
  grid-column:2;
  grid-row:2;
  justify-self:end;
  margin:0
}

@media(min-width:761px) and (max-width:1120px) {
  .material-row.has-product-image {
    grid-template-columns:40px minmax(0,1fr);
    gap:5px 7px
  }
  .material-product-image {
    width:40px;
    height:40px
  }
}

/* Ilustraciones aportadas para elegir el punto de partida. */
.preset-card {
  height:auto;
  min-height:148px;
  padding:9px 4px;
  gap:6px;
  justify-content:flex-start
}

.preset-illustration {
  display:block;
  width:100%;
  max-width:82px;
  height:82px;
  object-fit:contain;
  mix-blend-mode:multiply;
  flex:0 0 82px
}

.preset-card>span {
  line-height:1.3
}

.preset-card small {
  line-height:1.35;
  text-align:center
}

@media(max-width:760px) {
  .preset-card {
    height:auto;
    min-height:148px
  }
}

.quick-views {
  min-width:62px
}

.quick-views button {
  width:100%;
  min-width:60px;
  padding-left:5px;
  padding-right:5px;
  font-size:9px
}

.spacing-note {
  font-size:10px;
  line-height:1.45;
  color:#626d5e;
  margin:6px 0 0
}

.save-state {
  flex-wrap:wrap;
  line-height:1.4
}

.save-state.save-unavailable {
  color:#806325
}

.save-state.save-unavailable i {
  background:#aa8331
}

.view-controls {
  right:12px
}

.column-video-link {
  display:inline-flex;
  align-items:center;
  min-height:32px;
  margin-top:6px;
  color:#705300;
  font:600 12px/1.45 'DM Sans',sans-serif;
  text-decoration:underline;
  text-underline-offset:3px
}

.column-video-link:hover {
  color:#293628
}

.column-video-link:focus-visible {
  outline:2px solid #b88a00;
  outline-offset:3px;
  border-radius:3px
}

@media(max-width:760px) {
  .column-video-link {
    min-height:44px;
    font-size:13px
  }
}
.material-store-link {
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #c7cec1;
  text-underline-offset: 3px;
}
.material-store-link > span {
  color: #795900;
  white-space: nowrap;
}
.material-store-link:hover {
  color: #795900;
  text-decoration-color: currentColor;
}
.material-store-link:focus-visible {
  outline: 2px solid #b88a00;
  outline-offset: 3px;
  border-radius: 3px;
}
@media (max-width: 760px) {
  .material-store-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
  }
}

/* Optional explanation beside the rafter spacing control. */
.spacing-label-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.field-help-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #705300;
  font: 700 13px 'DM Sans', sans-serif;
  cursor: pointer;
}
.field-help-button::before {
  content: '';
  position: absolute;
  width: 19px;
  height: 19px;
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
}
.field-help-button:hover,
.field-help-button[aria-expanded="true"] {
  background: #fff0bd;
}
.field-help-button:focus-visible {
  outline: 2px solid #b88a00;
  outline-offset: 2px;
}
.field-help-text {
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff9e6;
  color: #52604c;
}
.field-help-text[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .field-help-button {
    width: 44px;
    height: 44px;
  }
}

/* Readability, recovery and purchase review. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.preset-card small, .measure-row label span, .base-option small,
.rafter-toggle-row small, .live-card .live-dimensions small,
.live-card .live-card-bottom, .live-card .wall-summary,
.material-title small, .save-state {
  color: #566150;
}
.preset-card small, .measure-row label span, .base-option small,
.rafter-toggle-row small { font-size: 11px; line-height: 1.45; }
.rafter-toggle-row strong { font-size: 12px; }
.section-heading .unit-tag, .breadcrumbs > span { color: #626d5e; }
.input-feedback { font-size: 12px; line-height: 1.5; color: #8a351f; margin: 4px 0 12px; }
.input-feedback[hidden], .design-notice[hidden] { display: none; }
.number-wrap:has([aria-invalid="true"]) { border-color: #a34726; }
.kit-order-summary { width: 100%; padding: 12px 0; border-top: 1px solid #e7eae4; }
#kitRecommendation .kit-order-summary h4 { margin: 0 0 7px; color: #293628; font-size: 13px; }
#kitRecommendation .kit-order-summary p { font-size: 12px; line-height: 1.5; color: #52604c; }
.kit-order-summary ul { margin: 8px 0; padding-left: 19px; font-size: 12px; line-height: 1.6; color: #354330; }
.kit-order-summary li + li { margin-top: 5px; }
#kitRecommendation .kit-order-summary .separate-wood { margin-top: 10px; }
.design-notice {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 25;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px);
  box-sizing: border-box; padding: 12px 14px; border: 1px solid #d9c47e; border-radius: 8px;
  background: #fff9e6; color: #354330; box-shadow: 0 4px 16px #26332618; font-size: 13px;
}
.design-notice > span { max-width: 520px; line-height: 1.5; }
.design-notice button { min-height: 44px; padding: 8px 10px; border: 1px solid #d9c47e; border-radius: 5px; background: #fff; color: #473a0c; font: 600 13px 'DM Sans',sans-serif; cursor: pointer; }
.design-notice button:last-child { min-width: 44px; font-size: 20px; border: 0; }
#dialogText > strong { display: block; margin: 15px 0 4px; color: #293628; }
#dialogText > span { display: block; }
#scene:focus-visible { outline: 3px solid #b88a00; outline-offset: -4px; }
.scene-interaction-button { display: none; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #9a7200; outline-offset: 3px; }
input { caret-color: #795900; }
input, .live-dimensions strong, .item-qty { font-variant-numeric: tabular-nums; }
::selection { background: #ffe28a; color: #172019; }

.sidebar .preset-card small, .sidebar .measure-row label span,
.sidebar .base-option small, .sidebar .rafter-toggle-row small {
  color: #566150;
  font-size: 11px;
  line-height: 1.45;
}
.viewer .live-card.compact-summary .live-dimensions small { font-size: 9px; color: #566150; }
.viewer .live-card.compact-summary .live-card-bottom { font-size: 9px; color: #566150; }

/* Review the exact quote request before opening WhatsApp. */
#whatsappPreview {
  box-sizing: border-box;
  width: min(580px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
}
#whatsappPreview h2 { margin: 0 40px 10px 0; font-size: 22px; }
#whatsappPreviewHint { margin-bottom: 16px; color: #566150; line-height: 1.5; }
#whatsappPreviewClose { min-width: 44px; min-height: 44px; right: 8px; top: 8px; }
.whatsapp-preview-message {
  padding: 16px;
  border: 1px solid #e3e8de;
  border-radius: 8px;
  background: #fafbf8;
  color: #293628;
  font: 400 14px/1.65 'DM Sans', sans-serif;
  overflow-wrap: anywhere;
}
.whatsapp-preview-gap { height: 12px; }
.whatsapp-preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.whatsapp-preview-actions button, .whatsapp-preview-actions a {
  box-sizing: border-box;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid #dfe4db;
  border-radius: 6px;
  background: #fff;
  color: #354330;
  font: 600 13px 'DM Sans', sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.whatsapp-preview-actions #whatsappContinue { background: #fcc006; border-color: #fcc006; color: #172019; }
.whatsapp-preview-actions #whatsappContinue:hover { background: #e5ad00; }
.whatsapp-preview-actions #whatsappPreviewCopy { grid-column: 1 / -1; border: 0; }
#whatsappPreview .whatsapp-preview-recipient { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: #566150; }
@media (max-width: 480px) {
  #whatsappPreview { padding: 18px 14px; }
  #whatsappPreview h2 { font-size: 20px; }
  .whatsapp-preview-message { padding: 12px; font-size: 13px; }
}
