body.step2-remake {
  --guided-green: #3f6f32;
  --guided-green-dark: #2f5825;
  --guided-green-soft: #f1f6ef;
  --guided-ink: #202421;
  --guided-text: #4f554f;
  --guided-muted: #8a908b;
  --guided-line: #e6e9e5;
  --guided-bg: #ffffff;
  --guided-soft: #fafbf9;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--guided-ink);
  background: var(--guided-bg);
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

body.step2-remake *,
body.step2-remake *::before,
body.step2-remake *::after {
  box-sizing: border-box;
}

body.step2-remake button,
body.step2-remake textarea {
  font: inherit;
}

body.step2-remake .progress,
body.step2-remake .thumbs,
body.step2-remake .icp-footer {
  display: none !important;
}

.step2-page {
  min-height: 100vh;
  background: #fff;
}

.guided-header {
  position: relative;
  z-index: 20;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 38px;
  border-bottom: 1px solid var(--guided-line);
  background: rgba(255, 255, 255, 0.98);
}

.guided-brand,
.guided-header h1,
.guided-header-actions a,
.guided-header-actions button {
  color: var(--guided-ink);
  text-decoration: none;
}

.guided-brand {
  justify-self: start;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.guided-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.guided-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
}

.guided-header-actions button,
.guided-header-actions a {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.guided-header-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5e665f;
}

.guided-header-actions button:hover,
.guided-header-actions a:hover {
  color: var(--guided-green);
}

.guided-workspace {
  height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 240px minmax(500px, 1fr) minmax(500px, 580px);
  grid-template-rows: minmax(0, 1fr) 88px;
  background: #fff;
}

.guided-step-rail {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  padding: 40px 26px 30px 34px;
  border-right: 1px solid var(--guided-line);
  background: #fbfcfa;
  overflow-y: auto;
}

.guided-step {
  position: relative;
  width: 100%;
  min-height: 145px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--guided-ink);
  background: transparent;
  text-align: left;
}

button.guided-step {
  cursor: pointer;
}

.guided-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 48px;
  bottom: 14px;
  width: 1px;
  background: #cdd2cd;
}

.guided-step.is-done:not(:last-child)::after {
  background: var(--guided-green);
}

.guided-step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d8ddd8;
  border-radius: 50%;
  color: #767d77;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
}

.guided-step-index i {
  display: none;
  font-size: 18px;
}

.guided-step-copy {
  min-width: 0;
  padding-top: 5px;
}

.guided-step-copy strong,
.guided-step-copy small {
  display: block;
}

.guided-step-copy strong {
  color: #4d544e;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 650;
}

.guided-step-copy small {
  max-width: 140px;
  margin-top: 7px;
  color: #9aa09b;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.guided-step.is-active .guided-step-index {
  color: #fff;
  border-color: var(--guided-green);
  background: var(--guided-green);
  box-shadow: 0 0 0 5px rgba(63, 111, 50, 0.08);
}

.guided-step.is-active .guided-step-copy strong,
.guided-step.is-active .guided-step-copy small {
  color: var(--guided-green-dark);
}

.guided-step.is-done:not(.is-active) .guided-step-index {
  color: #fff;
  border-color: var(--guided-green);
  background: var(--guided-green);
}

.guided-step.is-done:not(.is-active) .guided-step-index b {
  display: none;
}

.guided-step.is-done:not(.is-active) .guided-step-index i {
  display: block;
}

.guided-step.is-locked,
.guided-confirm-step:not(.is-ready) {
  opacity: 0.64;
}

.guided-confirm-step.is-ready .guided-step-index {
  color: var(--guided-green);
  border-color: var(--guided-green);
  background: var(--guided-green-soft);
}

.guided-materials {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  padding: 38px 34px 30px;
  overflow-y: auto;
}

.guided-material-heading {
  position: relative;
  max-width: 690px;
  margin: 0 auto 28px;
}

.guided-material-heading p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--guided-green);
  font-size: 12px;
  font-weight: 650;
}

.guided-material-heading h2 {
  margin: 0;
  color: var(--guided-ink);
  font-size: clamp(25px, 2vw, 32px);
  line-height: 1.28;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.guided-material-heading > span {
  display: block;
  margin-top: 10px;
  color: #747b75;
  font-size: 14px;
  line-height: 1.7;
}

.materials-summary {
  position: absolute;
  right: 0;
  top: 4px;
  color: #7f867f;
  font-size: 12px;
  font-weight: 600;
}

.materials-layout {
  max-width: 690px;
  margin: 0 auto;
}

.material-panel {
  display: none;
}

.material-panel.is-active {
  display: block;
}

.material-panel-head {
  display: none;
}

.material-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 28px;
}

.material-option {
  position: relative;
  min-width: 0;
  display: block;
  padding: 0;
  border: 0;
  color: var(--guided-ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.material-option-thumb {
  width: 100%;
  aspect-ratio: 1.17 / 1;
  display: block;
  overflow: hidden;
  border: 1px solid #eceeeb;
  border-radius: 12px;
  background-color: #f4f5f3;
  background-image: var(--material-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.material-option:hover .material-option-thumb {
  border-color: #cbd4ca;
  transform: translateY(-2px);
}

.material-option > span:not(.material-option-thumb) {
  display: block;
  padding: 11px 6px 0;
}

.material-option strong,
.material-option small {
  display: block;
}

.material-option strong {
  color: var(--guided-ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

.material-option small {
  margin-top: 3px;
  color: #747b75;
  font-size: 13px;
  line-height: 1.5;
}

.material-option > i {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--guided-green);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(47, 88, 37, 0.22);
}

.material-option.selected .material-option-thumb {
  border: 2px solid var(--guided-green);
  box-shadow: 0 0 0 3px rgba(63, 111, 50, 0.08);
}

.material-option.selected > i {
  display: grid;
}

[data-category="ceiling"][data-material="gypsum"] { --material-img: url("step2-sequential/mat-gypsum-board.png?v=20260723guided1"); }
[data-category="ceiling"][data-material="none"] { --material-img: url("step2-sequential/mat-no-ceiling.png?v=20260723guided1"); }
[data-category="ceiling"][data-material="wood"] { --material-img: url("step2-sequential/mat-ceiling-wood.png?v=20260723guided1"); }
[data-category="ceiling"][data-material="integrated"] { --material-img: url("step2-sequential/mat-integrated-ceiling.png?v=20260723guided1"); }
[data-category="wall"][data-material="paint"] { --material-img: url("step2-sequential/mat-art-paint.png?v=20260723guided1"); }
[data-category="wall"][data-material="wallpaper"] { --material-img: url("step2-sequential/mat-wallpaper-linen.png?v=20260723guided1"); }
[data-category="wall"][data-material="wood-panel"] { --material-img: url("step2-sequential/mat-wood-panel.png?v=20260723guided1"); }
[data-category="wall"][data-material="brick"] { --material-img: url("step2-sequential/mat-brick.png?v=20260723guided1"); }
[data-category="floor"][data-material="wood"] { --material-img: url("step2-sequential/mat-oak-floor.png?v=20260723guided1"); }
[data-category="floor"][data-material="tile"] { --material-img: url("step2-sequential/mat-ceramic-tile.png?v=20260723guided1"); }
[data-category="floor"][data-material="marble"] { --material-img: url("step2-sequential/mat-marble.png?v=20260723guided1"); }
[data-category="floor"][data-material="concrete"] { --material-img: url("step2-sequential/mat-microcement.png?v=20260723guided1"); }

.guided-preview {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  padding: 40px 38px 24px 24px;
  border-left: 1px solid #f1f2f0;
  overflow-y: auto;
}

.step2-upload-area,
.step2-stage-shell {
  position: relative;
  width: 100%;
}

#dropzone.dropzone {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe4dc;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.step2-room-placeholder,
.dropzone-preview,
.dropzone-preview img {
  width: 100%;
  height: 100%;
  display: block;
}

.step2-room-placeholder,
.dropzone-preview img {
  object-fit: cover;
  object-position: center;
}

.dropzone-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.dropzone-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--guided-ink);
  transform: translate(-50%, -50%);
}

.dropzone-hint i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: var(--guided-green);
  background: var(--guided-green-soft);
  font-size: 25px;
}

.dropzone-hint strong {
  font-size: 15px;
  font-weight: 650;
}

.dropzone-hint small {
  color: var(--guided-muted);
  font-size: 12px;
  font-weight: 400;
}

.stage-material-overlay {
  display: none;
}

.guided-change-image {
  position: absolute;
  z-index: 7;
  right: 12px;
  top: 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #fff;
  background: rgba(26, 31, 27, 0.62);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.guided-change-image[hidden] {
  display: none;
}

.guided-selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.guided-summary-item {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 5px;
  padding: 0 10px;
  text-align: center;
}

.guided-summary-item + .guided-summary-item {
  border-left: 1px solid var(--guided-line);
}

.guided-summary-item span {
  color: #7c837d;
  font-size: 12px;
}

.guided-summary-item strong {
  max-width: 100%;
  color: var(--guided-ink);
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.guided-summary-item i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #b8bdb9;
  font-size: 12px;
}

.guided-summary-item.is-done i {
  background: var(--guided-green);
}

.guided-note-panel {
  position: relative;
  display: none;
  margin-top: 22px;
}

body[data-material-step="ceiling"] .guided-note-panel[data-note-panel="ceiling"],
body[data-material-step="wall"] .guided-note-panel[data-note-panel="wall"],
body[data-material-step="floor"] .guided-note-panel[data-note-panel="floor"] {
  display: block;
}

.guided-note-panel label {
  display: block;
  margin-bottom: 9px;
  color: #404641;
  font-size: 13px;
  font-weight: 650;
}

.material-note-input {
  width: 100%;
  height: 92px;
  display: block;
  resize: none;
  padding: 12px 14px 26px;
  border: 1px solid #dfe3df;
  border-radius: 8px;
  color: var(--guided-ink);
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
}

.material-note-input::placeholder {
  color: #b1b6b2;
}

.material-note-input:focus {
  border-color: var(--guided-green);
  box-shadow: 0 0 0 3px rgba(63, 111, 50, 0.08);
}

.guided-note-panel > span {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #a7aca8;
  font-size: 11px;
}

.guided-footer {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 38px 12px 34px;
  border-top: 1px solid var(--guided-line);
  background: rgba(255, 255, 255, 0.98);
}

.guided-footer-state {
  display: none;
}

.guided-footer .btn {
  appearance: none;
  min-height: 58px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.guided-footer .btn-secondary {
  grid-column: 1;
  justify-self: start;
  min-width: 150px;
  padding: 0 18px;
  border: 0;
  color: #394039;
  background: transparent;
  text-align: left;
}

.guided-footer .btn-primary {
  grid-column: 3;
  min-width: 344px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 30px;
  border: 1px solid var(--guided-green);
  color: #fff;
  background: var(--guided-green);
  box-shadow: none;
}

.guided-footer .btn-primary:hover:not(:disabled) {
  border-color: var(--guided-green-dark);
  background: var(--guided-green-dark);
}

.guided-footer .btn-primary:disabled {
  color: #fff;
  border-color: #aab5a7;
  background: #aab5a7;
  cursor: not-allowed;
  opacity: 0.75;
}

body.step2-remake button:focus-visible,
body.step2-remake a:focus-visible,
body.step2-remake textarea:focus-visible,
body.step2-remake .dropzone:focus-visible {
  outline: 3px solid rgba(63, 111, 50, 0.25);
  outline-offset: 3px;
}

body.is-renovation-upload .guided-step-rail,
body.is-renovation-upload .guided-materials,
body.is-renovation-upload .guided-selection-summary,
body.is-renovation-upload .guided-note-panel {
  display: none !important;
}

body.is-renovation-upload .guided-preview {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  padding: 40px;
}

body.is-renovation-upload .step2-upload-area {
  width: min(900px, 100%);
}

body.is-renovation-upload #dropzone.dropzone {
  aspect-ratio: 16 / 9;
}

body.is-renovation-upload .guided-footer {
  grid-template-columns: 1fr auto;
}

body.is-renovation-upload .guided-footer .btn-secondary {
  grid-column: 1;
}

body.is-renovation-upload .guided-footer .btn-primary {
  grid-column: 2;
}

@media (max-width: 1180px) {
  body.step2-remake {
    overflow-y: auto;
  }

  .guided-workspace {
    height: auto;
    min-height: calc(100vh - 76px);
    grid-template-columns: 1fr minmax(360px, 430px);
    grid-template-rows: auto auto 86px;
  }

  .guided-step-rail {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--guided-line);
    overflow: visible;
  }

  .guided-step {
    min-height: 50px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
  }

  .guided-step:not(:last-child)::after {
    display: none;
  }

  .guided-step-copy {
    padding: 0;
  }

  .guided-step-copy small {
    display: none;
  }

  .guided-materials {
    grid-column: 1;
    grid-row: 2;
    overflow: visible;
  }

  .guided-preview {
    grid-column: 2;
    grid-row: 2;
    overflow: visible;
  }

  .guided-footer {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: 1fr auto;
  }

  .guided-footer .btn-secondary {
    grid-column: 1;
  }

  .guided-footer .btn-primary {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .guided-header {
    height: 66px;
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .guided-header h1 {
    position: absolute;
    left: 50%;
    font-size: 18px;
    transform: translateX(-50%);
  }

  .guided-header-actions button span,
  .guided-header-actions a {
    display: none;
  }

  .guided-header-actions {
    gap: 0;
  }

  .guided-workspace {
    min-height: calc(100vh - 66px);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .guided-step-rail {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    padding: 12px 14px;
  }

  .guided-step {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }

  .guided-step-copy strong {
    font-size: 13px;
  }

  .guided-materials {
    grid-column: 1;
    grid-row: 2;
    padding: 28px 18px 24px;
  }

  .guided-material-heading {
    margin-bottom: 22px;
  }

  .materials-summary {
    position: static;
    margin-top: 8px;
  }

  .material-options {
    gap: 20px 12px;
  }

  .material-option strong {
    font-size: 15px;
  }

  .material-option small {
    font-size: 12px;
  }

  .guided-preview {
    grid-column: 1;
    grid-row: 3;
    padding: 12px 18px 28px;
    border-left: 0;
    border-top: 1px solid var(--guided-line);
  }

  #dropzone.dropzone {
    aspect-ratio: 16 / 10;
  }

  .guided-footer {
    grid-column: 1;
    grid-row: 4;
    position: sticky;
    bottom: 0;
    grid-template-columns: auto 1fr;
    height: auto;
    padding: 10px 14px;
  }

  .guided-footer .btn-secondary {
    grid-column: 1;
    min-width: 116px;
  }

  .guided-footer .btn-primary {
    grid-column: 2;
    min-width: 0;
    width: 100%;
    padding: 0 16px;
  }
}

@media (max-width: 520px) {
  .guided-brand {
    font-size: 17px;
  }

  .guided-header h1 {
    display: none;
  }

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

  .material-option-thumb {
    aspect-ratio: 1.45 / 1;
  }

  .guided-selection-summary {
    margin-top: 15px;
  }

  .guided-summary-item {
    padding: 0 6px;
  }
}
