.builder-page {
  background: var(--paper);
  min-height: 100vh;
}

.builder-back {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.builder-main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 70px 32px 100px;
}

.builder-heading {
  margin-bottom: 50px;
  max-width: 720px;
}

.builder-heading h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 18px;
}

.builder-heading > p:last-child {
  color: rgba(23, 54, 74, 0.68);
  line-height: 1.7;
  max-width: 58ch;
}

.builder-layout {
  align-items: start;
  display: grid;
  gap: 64px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
}

.builder-controls {
  border-top: 1px solid var(--line);
}

.builder-step {
  border-bottom: 1px solid var(--line);
  padding: 30px 0 34px;
}

.step-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.step-number {
  color: var(--accent);
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding-top: 6px;
}

.step-heading h2 {
  font-size: 1.5rem;
  line-height: 1.1;
}

.step-heading p {
  color: rgba(23, 54, 74, 0.6);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 5px;
}

.builder-page .hint {
  color: rgba(23, 54, 74, 0.55);
}

.builder-page .picker-grid,
.builder-page .search {
  max-width: none;
}

.builder-page .picker-card {
  background: var(--cream);
  border-color: rgba(23, 54, 74, 0.13);
}

.builder-page .picker-card:hover,
.builder-page .picker-card.active {
  background: var(--cream-dark);
  border-color: var(--ink);
}

.builder-page .picker-card svg path {
  fill: var(--ink);
}

.builder-styles {
  justify-content: flex-start;
}

.builder-page .style-note {
  margin: 13px 0 0 44px;
}

.color-options {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, 1fr);
}

.color-option {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 0.77rem;
  font-weight: 600;
  gap: 10px;
  padding: 11px 12px;
}

.color-option:hover,
.color-option.active {
  border-color: var(--ink);
}

.color-option.active {
  background: var(--cream);
}

.color-dot {
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(23, 54, 74, 0.25);
  flex: 0 0 25px;
  height: 25px;
  pointer-events: none;
  width: 25px;
}

.size-control select {
  appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2317364a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid rgba(23, 54, 74, 0.25);
  border-radius: 3px;
  color: var(--ink);
  font-size: 0.9rem;
  min-width: 220px;
  padding: 14px 42px 14px 15px;
}

.order-step .preview-actions {
  display: block;
}

.order-step .solid-btn {
  min-width: 260px;
  padding: 16px 22px;
}

.order-step .solid-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.order-note,
.preview-caption {
  color: rgba(23, 54, 74, 0.54);
  font-size: 0.7rem;
  line-height: 1.5;
  margin-top: 10px;
}

.builder-preview {
  box-shadow: var(--shadow);
  top: 100px;
}

.builder-page #size-label {
  display: none;
}

.preview-caption {
  margin: -3px 0 0;
  text-align: center;
}

.builder-footer {
  max-width: 1180px;
}

@media (max-width: 820px) {
  .builder-main {
    padding-top: 52px;
  }

  .builder-layout {
    gap: 44px;
    grid-template-columns: 1fr;
  }

  .builder-preview {
    grid-row: 1;
    position: static;
  }

  .builder-controls {
    grid-row: 2;
  }
}

@media (max-width: 560px) {
  .builder-page {
    padding-bottom: 0;
  }

  .builder-main {
    padding: 42px 20px 70px;
  }

  .builder-heading {
    margin-bottom: 34px;
  }

  .builder-heading h1 {
    font-size: 3.1rem;
  }

  .builder-layout {
    gap: 32px;
  }

  .builder-preview {
    padding: 12px;
  }

  .builder-step {
    padding: 26px 0 30px;
  }

  .color-options {
    grid-template-columns: 1fr;
  }

  .size-control select,
  .order-step .solid-btn {
    width: 100%;
  }

  .builder-footer {
    display: flex;
  }
}
