:root {
  --bg: #f5efe7;
  --bg-soft: #fbf8f3;
  --card: rgba(255, 252, 247, 0.94);
  --line: #d9cab8;
  --line-strong: #c4a57d;
  --text: #2d2319;
  --muted: #77695c;
  --accent: #ba7a32;
  --accent-soft: #f5e0c3;
  --accent-dark: #8a541b;
  --success: #2f8d61;
  --danger: #b94c4c;
  --shadow: 0 20px 60px rgba(90, 60, 28, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(186, 122, 50, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(80, 122, 92, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

.hero {
  margin-bottom: 20px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.workspace-panel {
  background: var(--card);
  border: 1px solid rgba(217, 202, 184, 0.92);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
}

.step-progress {
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(186, 122, 50, 0.12);
  color: var(--accent-dark);
  border: 1px solid rgba(186, 122, 50, 0.24);
  font-size: 13px;
  text-align: center;
}

.banner {
  display: none;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(47, 141, 97, 0.08);
  border: 1px solid rgba(47, 141, 97, 0.22);
  color: var(--success);
}

.step-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.step {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff8ef;
  color: var(--muted);
  font-size: 12px;
}

.step.done {
  background: rgba(47, 141, 97, 0.08);
  border-color: rgba(47, 141, 97, 0.2);
  color: var(--success);
}

.step.active {
  background: linear-gradient(135deg, var(--accent), #dfaa67);
  color: white;
  border-color: transparent;
}

.guided-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 22px;
  align-items: start;
}

.wizard-zone {
  position: relative;
}

.guide-card {
  position: sticky;
  top: 18px;
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(47, 141, 97, 0.42);
  background: linear-gradient(180deg, rgba(252,255,252,0.98), rgba(239,248,243,0.96));
  box-shadow:
    0 18px 40px rgba(47, 141, 97, 0.08),
    0 0 0 0 rgba(47, 141, 97, 0.22);
  animation: guidePulse 2.8s ease-in-out infinite;
}

.guide-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.guide-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.guide-card p,
.guide-note,
.guide-example {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.guide-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(47, 141, 97, 0.18);
}

.guide-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.guide-note {
  margin-top: 16px;
}

.step-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-card {
  position: relative;
  border: 1px solid rgba(217, 202, 184, 0.88);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.96);
  padding: 24px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-card.dimmed {
  opacity: 1;
  filter: none;
}

.field-card.active {
  opacity: 1;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(186, 122, 50, 0.12);
  transform: translateY(-1px);
}

.field-card.active::after {
  content: none;
}

.field-card > * {
  position: relative;
  z-index: 1;
}

@keyframes guidePulse {
  0%, 100% {
    box-shadow:
      0 18px 40px rgba(47, 141, 97, 0.08),
      0 0 0 0 rgba(47, 141, 97, 0.22);
  }
  50% {
    box-shadow:
      0 18px 40px rgba(47, 141, 97, 0.12),
      0 0 0 10px rgba(47, 141, 97, 0.05);
  }
}

.field-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-title {
  margin: 0;
  font-size: 18px;
}

.field-description {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.field-tip {
  font-size: 12px;
  color: var(--accent-dark);
  background: rgba(186, 122, 50, 0.08);
  border: 1px solid rgba(186, 122, 50, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.location-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.location-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-result {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(47, 141, 97, 0.18);
  background: rgba(255, 255, 255, 0.84);
  padding: 12px 14px;
  cursor: pointer;
}

.location-result strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--text);
}

.location-result span,
.location-loading {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.location-loading {
  padding: 6px 2px;
}

.location-map {
  height: 290px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(47, 141, 97, 0.22);
  background: rgba(255, 255, 255, 0.6);
}

.location-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--success);
  font-weight: 600;
}

.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf9;
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  font-size: 14px;
}

.field:disabled,
.textarea:disabled,
.select:disabled,
.combo-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.mini-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn,
.btn-secondary,
.btn-danger {
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}

.btn {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #dfaa67);
  color: white;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-danger {
  border: 1px solid rgba(185, 76, 76, 0.3);
  background: transparent;
  color: var(--danger);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row-card {
  border: 1px solid rgba(217, 202, 184, 0.88);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 253, 249, 0.94);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-title strong {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

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

.review-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(217, 202, 184, 0.88);
}

.review-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.combo-box {
  position: relative;
}

.combo-input {
  padding-right: 46px;
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(186, 122, 50, 0.12);
  color: var(--accent-dark);
  cursor: pointer;
}

.combo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(217, 202, 184, 0.92);
  background: rgba(255, 251, 246, 0.98);
  box-shadow: 0 18px 40px rgba(91, 62, 28, 0.14);
}

.combo-menu.open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.combo-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf9;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.combo-option:hover {
  border-color: rgba(186, 122, 50, 0.24);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,224,195,0.7));
}

.combo-empty,
.combo-option small {
  font-size: 12px;
  color: var(--muted);
}

.combo-empty {
  padding: 12px 14px;
}

@media (max-width: 980px) {
  .guided-layout {
    grid-template-columns: 1fr;
  }

  .guide-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace-panel {
    padding: 20px;
  }

  .grid-two,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .section-title,
  .footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Responsive Mobile/Tablet ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .guided-layout {
    grid-template-columns: 1fr;
  }
  .guide-card {
    display: none;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .shell {
    padding: 16px 14px 60px;
  }
  .workspace-panel {
    padding: 18px 16px;
    border-radius: 20px;
  }
  .hero h1 {
    font-size: clamp(28px, 8vw, 48px);
  }
  .step-strip {
    gap: 6px;
  }
  .footer-actions {
    flex-direction: column;
    gap: 10px;
  }
  .footer-actions .inline-actions {
    width: 100%;
  }
  .btn, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .panel-head {
    flex-direction: column;
  }
  .step-progress {
    align-self: flex-start;
  }
  .workspace-panel {
    padding: 14px 12px;
    border-radius: 16px;
  }
  .hero {
    margin-bottom: 14px;
  }
}

@media (max-width: 900px) {
  .hero {
    display: none;
  }
}

@media (max-width: 900px) {
  .step-progress {
    display: none;
  }
}

/* ── Mobile Compact Layout ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .shell { padding: 10px 10px 40px; }
  
  .workspace-panel { padding: 14px 12px; border-radius: 18px; }
  
  .panel-head { margin-bottom: 10px; }
  .panel-head h2 { font-size: 20px; }
  .panel-head p { font-size: 12px; }

  /* Step strip smaller */
  .step-strip { gap: 5px; margin-bottom: 12px; }
  .step { padding: 6px 10px; font-size: 11px; border-radius: 20px; }

  /* Field cards compact */
  .field-card { padding: 12px 12px; border-radius: 14px; }
  .field-label { font-size: 10px; }
  .field-title { font-size: 16px; margin-bottom: 2px; }
  
  /* Hide description when not active - show only title */
  .field-card.dimmed .field-description { display: none; }
  .field-card.dimmed .field-tip { display: none; }
  
  /* Compact field-top */
  .field-top { margin-bottom: 8px; }
  .field-top > div:first-child { flex: 1; }
  
  /* Smaller inputs */
  .field { padding: 9px 12px; font-size: 14px; border-radius: 10px; }
  .textarea { padding: 9px 12px; font-size: 14px; border-radius: 10px; min-height: 70px; }

  /* Footer buttons side by side */
  .footer-actions { flex-direction: row !important; gap: 8px; margin-top: 14px; }
  .footer-actions .inline-actions { flex: 1; }
  #prevBtn { flex: 1; }
  #nextBtn, #submitBtn { width: 100%; }
  .btn, .btn-secondary { padding: 11px 16px; font-size: 14px; border-radius: 12px; }

  /* Map smaller */
  .location-map { height: 180px !important; }

  /* Grid two = single column */
  .grid-two { grid-template-columns: 1fr; gap: 8px; }

  /* Mini hint smaller */
  .mini-hint { font-size: 11px; }
}

/* ── Sticky footer buttons on mobile ──────────────────────────────────────── */
@media (max-width: 600px) {
  .footer-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-soft, #fbf8f3);
    padding: 10px 0 16px;
    margin-top: 16px;
    z-index: 10;
    border-top: 1px solid var(--line, #d9cab8);
  }
}

/* ── Hide elements on mobile ───────────────────────────────────────────── */
@media (max-width: 600px) {
  #step-summary { display: none; }
  .step-strip { display: none; }
  .field-label { display: none; }
  .field-tip { display: none; }
}
