.ant-wall-tool {
  --ant-accent: #c49a58;
  --ant-ink: #1e2225;
  --ant-muted: #6f7479;
  --ant-border: #e4e2dd;
  --ant-surface: #f7f6f3;
  margin: 28px 0 22px;
  border: 1px solid var(--ant-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(24, 27, 29, .08);
  color: var(--ant-ink);
  container-type: inline-size;
  overflow: hidden;
}

.ant-wall-tool,
.ant-wall-tool * {
  box-sizing: border-box;
}

.ant-wall-tool__header {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--ant-border);
  background: linear-gradient(135deg, #f8f6f0 0%, #fff 58%, #f3eee3 100%);
}

.ant-wall-tool__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #8b6a35;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ant-wall-tool__header h2 {
  margin: 0 0 7px;
  color: var(--ant-ink);
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 750;
  line-height: 1.15;
}

.ant-wall-tool__header p {
  max-width: 700px;
  margin: 0;
  color: var(--ant-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ant-wall-tool__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
}

.ant-wall-tool__controls,
.ant-wall-tool__visual {
  min-width: 0;
}

.ant-wall-tool__product {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid var(--ant-border);
  border-radius: 14px;
  background: var(--ant-surface);
}

.ant-wall-tool__product img {
  width: 54px;
  height: 54px;
  border: 1px solid #e7e5e0;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
}

.ant-wall-tool__product div {
  min-width: 0;
}

.ant-wall-tool__product span,
.ant-wall-tool__product strong {
  display: block;
}

.ant-wall-tool__product span {
  margin-bottom: 3px;
  color: var(--ant-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ant-wall-tool__product strong {
  overflow: hidden;
  color: var(--ant-ink);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ant-wall-tool__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ant-wall-tool__fields label > span:first-child,
.ant-wall-tool__choice legend {
  display: block;
  margin: 0 0 7px;
  color: #404448;
  font-size: 12px;
  font-weight: 750;
}

.ant-wall-tool__input-wrap {
  position: relative;
  display: block;
}

.ant-wall-tool__input-wrap input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 47px 0 14px;
  border: 1px solid #d8d6d1;
  border-radius: 11px;
  background: #fff;
  color: var(--ant-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ant-wall-tool__input-wrap input:focus {
  border-color: var(--ant-accent);
  box-shadow: 0 0 0 3px rgba(196, 154, 88, .16);
}

.ant-wall-tool__input-wrap b {
  position: absolute;
  top: 50%;
  right: 13px;
  color: #85898c;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.ant-wall-tool__choice {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.ant-wall-tool__choice > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ant-wall-tool__choice--waste > div {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ant-wall-tool__choice label {
  display: block;
  margin: 0;
  cursor: pointer;
}

.ant-wall-tool__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ant-wall-tool__choice label > span {
  display: flex;
  min-height: 42px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #dad8d3;
  border-radius: 10px;
  background: #fff;
  color: #555a5e;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.ant-wall-tool__choice input:checked + span {
  border-color: var(--ant-accent);
  background: #fbf7ef;
  box-shadow: inset 0 0 0 1px var(--ant-accent);
  color: #634a27;
}

.ant-wall-tool__choice input:focus-visible + span {
  outline: 3px solid rgba(196, 154, 88, .22);
  outline-offset: 2px;
}

.ant-icon-vertical,
.ant-icon-horizontal {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .8;
}

.ant-icon-vertical {
  background: repeating-linear-gradient(90deg, transparent 0 3px, currentColor 3px 4px);
}

.ant-icon-horizontal {
  background: repeating-linear-gradient(0deg, transparent 0 3px, currentColor 3px 4px);
}

.ant-wall-tool__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.ant-wall-tool__specs span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f0ed;
  color: #666b6f;
  font-size: 10px;
  font-weight: 700;
}

.ant-wall-tool__visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border-radius: 16px;
  background: #f1f0ed;
}

@container (min-width: 720px) {
  .ant-wall-tool__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  }
}

@container (max-width: 719px) {
  .ant-wall-tool__visual {
    min-height: 350px;
  }
}

.ant-wall-tool__wall-wrap {
  --ant-wall-ratio: 1.55;
  position: relative;
  width: calc(100% - 34px);
  max-width: 430px;
  margin: 18px auto 27px;
  aspect-ratio: var(--ant-wall-ratio);
}

.ant-wall-tool__wall {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 5px;
  background: linear-gradient(135deg, #e5e2dc, #f4f2ed);
  box-shadow: 0 14px 28px rgba(31, 34, 35, .16), inset 0 -22px 30px rgba(0, 0, 0, .06);
  transition: aspect-ratio .2s ease;
}

.ant-wall-tool__wall::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, .17), transparent 42%, rgba(0, 0, 0, .1));
  content: '';
  pointer-events: none;
}

.ant-wall-tool__wall.is-ready {
  background: repeating-linear-gradient(
    90deg,
    var(--ant-panel-base) 0 14px,
    var(--ant-panel-mid) 14px 16px,
    var(--ant-panel-base) 16px 25px,
    var(--ant-panel-channel) 25px 30px
  );
}

.ant-wall-tool__wall.is-ready.is-horizontal {
  background: repeating-linear-gradient(
    0deg,
    var(--ant-panel-base) 0 14px,
    var(--ant-panel-mid) 14px 16px,
    var(--ant-panel-base) 16px 25px,
    var(--ant-panel-channel) 25px 30px
  );
}

.ant-wall-tool__wall > span {
  position: relative;
  z-index: 1;
  max-width: 80%;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
  color: #34383a;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.ant-wall-tool__measure {
  position: absolute;
  color: #696e71;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .02em;
}

.ant-wall-tool__measure--width {
  right: 0;
  bottom: -20px;
  left: 0;
  text-align: center;
}

.ant-wall-tool__measure--width::before,
.ant-wall-tool__measure--height::before {
  position: absolute;
  background: #a4a5a3;
  content: '';
}

.ant-wall-tool__measure--width::before {
  top: -5px;
  right: 0;
  left: 0;
  height: 1px;
}

.ant-wall-tool__measure--height {
  top: 50%;
  right: -37px;
  width: 72px;
  text-align: center;
  transform: translateY(-50%) rotate(-90deg);
}

.ant-wall-tool__measure--height::before {
  top: -5px;
  right: 0;
  left: 0;
  height: 1px;
}

.ant-wall-tool__result {
  padding: 15px 16px;
  border: 1px solid #dfd8ca;
  border-radius: 13px;
  background: #fff;
}

.ant-wall-tool__result-label {
  display: block;
  margin-bottom: 2px;
  color: #777b7e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ant-wall-tool__result strong {
  display: block;
  color: var(--ant-ink);
  font-size: 27px;
  line-height: 1.1;
}

.ant-wall-tool__result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 9px;
  color: #666b6f;
  font-size: 10px;
  font-weight: 650;
}

.ant-wall-tool__result small {
  display: block;
  margin-top: 8px;
  color: #8b6a35;
  font-size: 10px;
  font-weight: 750;
}

.ant-wall-tool__notice {
  margin: 10px 2px 0;
  color: #74787b;
  font-size: 10px;
  line-height: 1.45;
}

.ant-wall-tool__notice.is-warning {
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff6e8;
  color: #855d22;
  font-weight: 700;
}

@media (max-width: 820px) {
  .ant-wall-tool__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ant-wall-tool__visual {
    min-height: 350px;
  }
}

@media (max-width: 520px) {
  .ant-wall-tool {
    margin: 22px -2px 18px;
    border-radius: 17px;
  }

  .ant-wall-tool__header,
  .ant-wall-tool__layout {
    padding: 19px;
  }

  .ant-wall-tool__header h2 {
    font-size: 21px;
  }

  .ant-wall-tool__fields {
    grid-template-columns: 1fr;
  }

  .ant-wall-tool__choice label > span {
    min-height: 44px;
  }

  .ant-wall-tool__visual {
    min-height: 330px;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ant-wall-tool *,
  .ant-wall-tool *::before,
  .ant-wall-tool *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
