#demo-2d {
  --room-surface: #253124;
  --room-hover: #364434;
  --room-rule: #586755;
  --room-accent: #ffaf72;
  height: auto;
  background: #303b2c;
  scroll-margin-top: 20px;
}
#demo-2d [hidden] { display: none !important; }
#demo-2d .build-sticky {
  position: static;
  display: block;
  height: auto;
  padding: clamp(36px, 6vw, 88px) 0;
  overflow: visible;
}
#demo-2d .build-container {
  width: min(1180px, calc(100% - 64px));
  padding: 0;
  margin: 0 auto;
}
#demo-2d .build-head { gap: 12px 24px; margin-bottom: 22px; flex-wrap: wrap; }
#demo-2d .build-head h2 { font-size: clamp(31px, 4vw, 52px); }
#demo-2d .build-kicker { display: inline; }
#demo-2d .skip-demo { color: #f4d3b5; font-size: 13px; margin: 0; }
#demo-2d .skip-demo:hover { color: #fff4de; }
#demo-2d .build-content {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) minmax(0, 3fr);
  align-items: start;
  gap: 20px;
}
.build-steps {
  grid-area: 1 / 1;
  list-style: none;
  padding: 6px;
  margin: 0;
  border: 1px solid var(--room-rule);
  background: var(--room-surface);
  border-radius: 14px;
}
.build-steps li + li { border-top: 1px solid var(--room-rule); }
.build-steps li:has([aria-current="step"]) { background: var(--room-hover); border-radius: 6px; }
.build-steps button {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f7f4ea;
  font-weight: 700;
  line-height: 1.25;
  padding: 10px;
  cursor: pointer;
}
.build-steps button:hover { background: var(--room-hover); }
.build-steps button:disabled { cursor: default; }
.build-number {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  height: 25px;
  border-radius: 6px;
  color: #c6d5be;
  background: #ffffff12;
  font: 700 12px/1 monospace;
}
[aria-current="step"] .build-number { background: var(--room-accent); color: #293323; }
.build-step-detail { margin: 0; padding: 0 12px 12px 51px; color: #e0e7da; font-size: 13px; line-height: 1.4; }
#demo-2d :is(a, button):focus-visible { outline: 2px solid var(--room-accent); outline-offset: 3px; }
#demo-2d .build-canvas {
  grid-area: 1 / 2;
  display: grid;
  place-items: stretch;
  align-content: start;
  gap: 0;
  padding: clamp(12px, 2vw, 22px);
  margin: 0;
  border-radius: 15px;
  background: #ede8da;
  color: #293323;
  overflow: visible;
}
.build-plan-head, #demo-2d figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.build-plan-head strong { font-size: 14px; }
#demo-2d .build-counter { color: #625540; font: 700 13px/1 monospace; }
#demo-2d .build-progress { margin: 12px 0 4px; }
#demo-2d .build-progress i { background: #b5b8a6; }
#demo-2d .build-progress i.on { background: #a25726; }
.build-drawing { display: grid; place-items: center; }
#demo-2d .build-canvas svg {
  width: 100%;
  max-width: 610px;
  height: clamp(265px, 43svh, 420px);
}
#demo-2d figcaption { min-height: 33px; color: #4c5647; font-size: 12px; }
#demo-2d .build-price { font-size: 12px; }
#demo-2d .build-price:hover { background: #ffb783; }
#demo-2d .build-price:focus-visible { outline-color: #703c1f; }
#demo-2d .build-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 13px;
}
#demo-2d .build-bottom span { font-size: 13px; }
.build-scroll-hint { display: none; }
.build-controls { display: flex; gap: 8px; }
.build-controls button {
  border: 1px solid #a2ad9a;
  border-radius: 20px;
  padding: 7px 13px;
  color: #f7f4ea;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}
.build-controls button:hover:not([aria-disabled="true"]) { background: var(--room-hover); }
.build-controls button[aria-disabled="true"] { opacity: .6; cursor: default; }

@media (min-width: 900px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  #demo-2d[data-ready] { height: calc(100svh + 240svh); }
  #demo-2d[data-ready] .build-sticky {
    position: sticky;
    top: 0;
    display: grid;
    place-items: center;
    height: 100svh;
    padding: 20px 0;
  }
  #demo-2d .build-scroll-hint { display: block; }
  #demo-2d .build-mobile-status { display: none; }
}
@media (width < 900px) {
  #demo-2d .build-container { width: calc(100% - 28px); }
  #demo-2d .build-content { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #demo-2d :is(.build-steps, .build-canvas, .build-bottom) { grid-area: auto; }
  #demo-2d .build-canvas svg { height: auto; max-height: min(44svh, 405px); }
  #demo-2d .build-bottom { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #demo-2d :is(.build-object, .build-progress i) { transition: none; }
}

.hero-example {
  margin: 0;
  padding: clamp(12px, 2vw, 22px);
  min-width: 0;
  border: 1px solid #d9dccb;
  border-radius: 18px;
  background: #e5e8d8;
}
.hero-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}
.hero-example-header > span {
  color: #46513e;
  background: #f8faf1;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
}
.hero-example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, .29fr);
  gap: 10px;
  align-items: center;
}
.hero-example-layout > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #faf7ee;
}
.hero-product {
  display: grid;
  gap: 4px;
  align-self: center;
  padding: 10px;
  border-radius: 8px;
  color: #293323;
  background: #fffcf5;
}
.hero-product-label, .hero-example figcaption { font-size: 12px; color: #4d5945; }
.hero-product-width { font-size: 19px; font-weight: 700; }
.hero-product-check { font-size: 12px; color: #425d3d; }
.hero-example figcaption { margin-top: 9px; }
.build-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
.build-finish {
  padding: 8px 13px;
  border: 1px solid #b5c0ab;
  border-radius: 20px;
  background: transparent;
  color: #f7f4ea;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.build-finish:hover:not([aria-disabled="true"]) { background: var(--room-hover); }
.build-finish[aria-disabled="true"] { opacity: .65; cursor: default; }

@media (max-width: 800px) {
  .hero-example-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-product { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .hero-product-width { grid-area: 1 / 2 / 3 / 3; }
  .hero-product-check { grid-column: 1 / -1; }
}

@media (width < 900px) and (min-height: 590px) and (prefers-reduced-motion: no-preference) {
  #demo-2d[data-ready] { height: calc(100svh + 180svh); }
  #demo-2d[data-ready] .build-sticky {
    position: sticky;
    top: 0;
    display: grid;
    align-items: center;
    height: 100svh;
    padding-block: 12px 72px;
  }
  #demo-2d[data-ready] .build-head { margin-bottom: 10px; }
  #demo-2d[data-ready] .build-head h2 { font-size: clamp(27px, 6vw, 38px); }
  #demo-2d[data-ready] .build-content { gap: 8px; }
  #demo-2d[data-ready] .build-canvas svg { max-height: min(30svh, 280px); }
  #demo-2d[data-ready] .build-scroll-hint { display: block; flex-basis: 100%; }
  #demo-2d[data-ready] .build-mobile-status { flex: 1 1 110px; }
  #demo-2d[data-ready] .build-steps {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 3px;
  }
  #demo-2d[data-ready] .build-steps li { min-width: 0; border: 0; }
  #demo-2d[data-ready] .build-steps button {
    min-height: 42px;
    justify-content: center;
    position: relative;
    padding: 2px;
  }
  #demo-2d[data-ready] :is(.build-steps button span:last-child, .build-step-detail) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  #demo-2d[data-ready] .build-number { flex: 0 1 27px; }
}
