:root {
  color-scheme: light;
  --bg: #f3f5ef;
  --panel: #ffffff;
  --ink: #17221b;
  --muted: #5d675f;
  --line: #dbe2dc;
  --brand: #176b4b;
  --brand-dark: #0f4b34;
  --accent: #d6803f;
  --soft: #edf6ef;
  --sand: #fff7ec;
  --warning: #8a5a00;
  --warning-bg: #fff5dd;
  --shadow: 0 18px 50px rgba(22, 45, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(90deg, rgba(9, 22, 15, 0.7) 0%, rgba(9, 22, 15, 0.3) 46%, rgba(9, 22, 15, 0.08) 100%),
    url("assets/travel-nature-dog-bg.png") center / cover fixed;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(243, 245, 239, 0.3) 0%, rgba(243, 245, 239, 0.08) 34%, rgba(243, 245, 239, 0.28) 100%),
    radial-gradient(circle at 18% 20%, rgba(255, 247, 236, 0.5), transparent 30%);
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  letter-spacing: 0;
}

.header-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-links a {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
}

.header-links a:hover {
  text-decoration: underline;
}

.header-note {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.planner-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.planner-panel {
  padding: 28px;
}

.planner-panel--locked .wizard-actions {
  display: none;
}

.locked-state {
  min-height: 220px;
  display: grid;
  align-content: center;
  padding: 24px;
  border: 1px solid rgba(23, 107, 75, 0.16);
  border-radius: 8px;
  background: var(--soft);
}

.locked-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.locked-actions a {
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: none;
}

.locked-actions a:hover {
  text-decoration: underline;
}

.result-panel {
  align-self: stretch;
  min-height: 560px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.result-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(23, 107, 75, 0.08);
  pointer-events: none;
}

.topbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  max-width: 640px;
  letter-spacing: 0;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.5rem;
}

.progress-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.progress-track {
  margin: 26px 0 30px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece7;
}

#progress-bar {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #3e9468);
  transition: width 180ms ease;
}

.question-copy {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

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

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option span {
  display: block;
  min-height: 58px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.option input:checked + span {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(23, 107, 75, 0.12);
}

.field-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 50px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 12px 26px rgba(23, 107, 75, 0.24);
}

.primary:hover {
  background: var(--brand-dark);
}

.secondary {
  background: #eef2ef;
  color: var(--ink);
}

.secondary:disabled {
  opacity: 0.45;
  cursor: default;
}

.visual-card {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 75, 52, 0.92), rgba(29, 112, 79, 0.86)),
    var(--brand-dark);
  color: #fff;
  overflow: hidden;
}

.route-map {
  position: relative;
  height: 155px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 14px);
}

.route-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-map path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 10;
}

.pin {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.pin-a {
  left: 9%;
  top: 69%;
}

.pin-b {
  left: 50%;
  top: 33%;
}

.pin-c {
  right: 8%;
  top: 63%;
}

.trip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.trip-chips span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
  font-weight: 800;
}

.empty-state,
.result-card {
  margin-top: 24px;
}

.site-description {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.result-card {
  display: grid;
  gap: 16px;
}

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

.metric {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid rgba(23, 107, 75, 0.1);
}

.metric strong {
  display: block;
  font-size: 1.4rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

.notice {
  padding: 14px;
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning);
  line-height: 1.5;
}

.route-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.route-list li {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choices-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.choices-box strong {
  display: block;
  margin-bottom: 12px;
}

.choices-box dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.choices-box div {
  display: grid;
  grid-template-columns: minmax(95px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
}

.choices-box dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.choices-box dd {
  margin: 0;
  font-weight: 700;
}

.cta-box {
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #102418, #173f2c);
  color: #fff;
}

.cta-box p {
  margin: 8px 0 0;
  color: #d7e5db;
  line-height: 1.45;
}

.cta-box a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: none;
}

.cta-box a:hover {
  background: #edf6ef;
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, rgba(9, 22, 15, 0.32) 0%, rgba(9, 22, 15, 0.1) 38%, rgba(9, 22, 15, 0.36) 100%),
      url("assets/travel-nature-dog-bg.png") 64% center / cover fixed;
  }

  .site-header {
    padding-top: 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 16px 0;
  }

  .result-panel {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: min(100% - 20px, 1180px);
  }

  .header-note {
    display: none;
  }

  .header-links {
    gap: 0;
  }

  .app-shell {
    width: min(100% - 20px, 1180px);
  }

  .planner-panel,
  .result-panel {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
  }

  .option-grid,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .choices-box div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  h1 {
    font-size: 2rem;
  }
}
