@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=ZCOOL+XiaoWei&display=swap");

:root {
  --bg-deep: #102641;
  --bg-mid: #32557b;
  --bg-fade: #86678a;
  --bg-warm: #d39a75;
  --panel-dark: rgba(20, 31, 54, 0.62);
  --panel-light: rgba(250, 242, 230, 0.95);
  --line: rgba(114, 84, 58, 0.22);
  --text-main: #4a3528;
  --text-soft: #765a43;
  --gold: #e8be74;
  --copper: #cf7d5f;
  --shadow: 0 28px 64px rgba(24, 18, 20, 0.22);
  --font-sans: "Nunito", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-display: "ZCOOL XiaoWei", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 240, 206, 0.14), transparent 20%),
    radial-gradient(circle at 84% 20%, rgba(255, 216, 170, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 34%, var(--bg-fade) 64%, var(--bg-warm) 100%);
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.09) 0 1px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 250px 250px, 270px 270px, 44px 44px, 44px 44px;
}

.sky-notes {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sky-notes span {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 234, 201, 0.18);
  background: rgba(255, 248, 230, 0.08);
  color: rgba(255, 238, 212, 0.36);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
}

.sky-notes span:nth-child(1) {
  top: 11%;
  left: 2%;
}

.sky-notes span:nth-child(2) {
  top: 24%;
  right: 3%;
}

.sky-notes span:nth-child(3) {
  bottom: 14%;
  left: 8%;
}

.builder-shell {
  position: relative;
  z-index: 1;
  width: min(1020px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 92px;
}

.hero-panel,
.wizard-panel,
.result-panel {
  border-radius: 30px;
  border: 1px solid rgba(255, 236, 205, 0.22);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 26px 22px;
  background:
    radial-gradient(circle at 50% 28%, rgba(245, 201, 123, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(22, 31, 50, 0.82), var(--panel-dark));
}

.hero-kicker,
.step-kicker,
.step-counter,
.result-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: #f1c994;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
}

h1 {
  color: #fff2de;
  font-size: clamp(2.1rem, 7.4vw, 4.4rem);
  line-height: 1.06;
}

h2 {
  color: #634634;
  font-size: clamp(1.4rem, 5.3vw, 2rem);
  line-height: 1.14;
}

h3 {
  color: #5d4130;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1.14;
}

.hero-lead,
.step-hint,
textarea,
.field-wrap input,
#result-line {
  line-height: 1.75;
}

.hero-lead {
  margin: 14px 0 0;
  color: rgba(255, 239, 214, 0.88);
  max-width: 760px;
}

.wizard-panel,
.result-panel {
  margin-top: 18px;
  background: var(--panel-light);
  padding: 20px 18px;
}

.wizard-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.step-counter {
  margin-bottom: 8px;
  color: #936943;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(111, 80, 52, 0.14);
}

#progress-fill {
  display: block;
  width: 16.66%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--copper));
  box-shadow: 0 0 14px rgba(232, 190, 116, 0.38);
  transition: width 280ms ease;
}

.step-rail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}

.step-rail li {
  border: 1px solid rgba(117, 84, 58, 0.16);
  border-radius: 999px;
  min-height: 36px;
  display: grid;
  place-items: center;
  color: rgba(102, 73, 49, 0.56);
  font-size: 0.88rem;
  background: rgba(255, 249, 240, 0.76);
  transition: all 200ms ease;
}

.step-rail li.is-done {
  color: #8a5f3b;
  border-color: rgba(181, 119, 81, 0.34);
  background: rgba(250, 228, 194, 0.85);
}

.step-rail li.is-active {
  color: #fff7ea;
  border-color: rgba(197, 130, 93, 0.36);
  background: linear-gradient(160deg, rgba(215, 141, 100, 0.92), rgba(192, 106, 78, 0.92));
}

#wizard-form {
  margin-top: 16px;
}

.step-card {
  display: none;
  border: 1px solid rgba(120, 86, 59, 0.14);
  border-radius: 24px;
  padding: 18px 16px;
  background: rgba(255, 250, 241, 0.82);
  animation: card-enter 280ms ease;
}

.step-card.is-active {
  display: block;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-hint {
  margin: 10px 0 0;
  color: var(--text-soft);
}

textarea {
  margin-top: 14px;
  width: 100%;
  min-height: 180px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  color: var(--text-main);
  padding: 13px 14px;
  font: inherit;
  resize: vertical;
}

.style-grid,
.place-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.style-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.place-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.style-card,
.place-card {
  text-align: left;
  border: 1px solid rgba(122, 90, 62, 0.2);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  background: rgba(255, 251, 243, 0.82);
  color: #5f4330;
  transition: all 180ms ease;
}

.style-card strong,
.place-card strong {
  display: block;
  font-size: 1.1rem;
}

.style-card span,
.place-card span {
  display: block;
  margin-top: 6px;
  color: #7a5d48;
  line-height: 1.6;
}

.style-card:hover,
.place-card:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 130, 90, 0.35);
}

.style-card.is-active,
.place-card.is-active {
  border-color: rgba(196, 125, 84, 0.42);
  background: linear-gradient(180deg, rgba(255, 238, 211, 0.95), rgba(243, 212, 165, 0.86));
}

.field-wrap {
  display: block;
  margin-top: 12px;
}

.field-wrap span {
  display: block;
  margin-bottom: 8px;
  color: #6d4f39;
  font-weight: 700;
}

.field-wrap input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 245, 0.92);
  color: var(--text-main);
  padding: 0 12px;
  font: inherit;
}

.wizard-actions,
.result-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-btn {
  border: 0;
  border-radius: 16px;
  min-height: 50px;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.action-btn.primary {
  color: #5a3a24;
  background: linear-gradient(180deg, var(--gold), var(--copper));
}

.action-btn.secondary {
  color: #6a4a34;
  border: 1px solid rgba(121, 89, 59, 0.22);
  background: rgba(255, 249, 238, 0.9);
}

.is-hidden {
  display: none !important;
}

.result-panel h2 {
  font-size: clamp(2rem, 6.3vw, 3rem);
  color: #5f4030;
}

#result-line {
  margin: 12px 0 0;
  color: #674b36;
}

.result-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-meta span {
  border: 1px solid rgba(124, 90, 61, 0.2);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 248, 235, 0.88);
  color: #664936;
  font-size: 0.93rem;
}

@media (max-width: 900px) {
  .style-grid,
  .place-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .builder-shell {
    width: min(100% - 18px, 1020px);
    padding-top: 16px;
  }

  .hero-panel,
  .wizard-panel,
  .result-panel {
    border-radius: 22px;
  }

  .hero-panel {
    padding: 20px 16px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.1rem);
    line-height: 1.08;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: clamp(1.86rem, 10vw, 2.28rem);
  }

  .wizard-panel,
  .result-panel {
    padding: 14px 12px;
  }

  .step-rail {
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
    margin-right: -2px;
    scrollbar-width: thin;
  }

  .step-rail li {
    min-height: 34px;
  }

  .step-card {
    border-radius: 18px;
    padding: 14px 12px;
  }

  textarea {
    min-height: 148px;
  }

  .action-btn {
    width: 100%;
  }

  .sky-notes {
    display: none;
  }
}
