:root {
  color-scheme: light;
  --bg: #faf6e8;
  --bg-strong: #f2ead7;
  --surface: rgba(255, 252, 244, 0.78);
  --surface-strong: rgba(255, 254, 248, 0.97);
  --text: #1e1b16;
  --muted: #6b665d;
  --line: rgba(40, 92, 82, 0.14);
  --accent: #1fa58e;
  --accent-strong: #167564;
  --accent-soft: #d8f0ea;
  --shadow: 0 24px 80px rgba(43, 74, 65, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 165, 142, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(165, 93, 160, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(116, 149, 97, 0.12), transparent 30%),
    linear-gradient(160deg, #fffdf8 0%, var(--bg) 46%, #f4eddc 100%);
}

.background-orb {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
  pointer-events: none;
}

.background-orb--one {
  top: -120px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(31, 165, 142, 0.42) 0%, rgba(31, 165, 142, 0) 70%);
}

.background-orb--two {
  bottom: -100px;
  left: -100px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(165, 93, 160, 0.18) 0%, rgba(165, 93, 160, 0) 72%);
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.intro-strip {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.intro-strip h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.intro-strip p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  align-items: end;
  margin-bottom: 22px;
}

.hero-copy,
.hero-aside,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 30px;
  padding: 28px;
}

.hero-copy h1,
.panel h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  max-width: 8ch;
}

.lead {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--muted);
}

.eyebrow,
.section-label,
.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-pills span,
.map-hint {
  border-radius: 999px;
  border: 1px solid rgba(22, 117, 100, 0.14);
  background: rgba(255, 255, 252, 0.62);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-pills span {
  padding: 10px 14px;
}

.hero-aside {
  display: grid;
  gap: 14px;
  border-radius: 30px;
  padding: 16px;
}

.stat-card {
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(243, 247, 237, 0.94));
  border: 1px solid rgba(22, 117, 100, 0.1);
}

.stat-card--soft {
  background: linear-gradient(180deg, rgba(253, 249, 242, 0.96), rgba(232, 242, 236, 0.92));
}

.stat-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.panel {
  border-radius: 30px;
  padding: 18px;
}

.panel--map {
  display: flex;
  flex-direction: column;
}

.panel--form {
  background: var(--surface-strong);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.map-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.map-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  white-space: nowrap;
}

.map-hint--warm {
  background: rgba(31, 165, 142, 0.1);
}

.map-zoom-button {
  appearance: none;
  border: 1px solid rgba(22, 117, 100, 0.2);
  background: rgba(255, 255, 252, 0.9);
  color: #205248;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}

.map-zoom-button:hover {
  border-color: rgba(22, 117, 100, 0.5);
  transform: translateY(-1px);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(31, 165, 142, 0.14);
}

.map {
  min-height: 560px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(69, 47, 36, 0.12);
}

.map-note {
  margin: 14px 2px 0;
  color: var(--muted);
  line-height: 1.6;
}

.map-legend {
  margin-top: 12px;
  border: 1px solid rgba(22, 117, 100, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.72);
  padding: 12px 14px;
}

.map-legend__title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 800;
}

.map-legend__items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.map-legend__point {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #57b9a5;
  border: 2px solid #167564;
}

.map-legend__line {
  width: 34px;
  height: 0;
  border-top-width: 4px;
  border-top-style: solid;
  border-radius: 999px;
}

.map-legend__line--route {
  border-top-color: #b5543e;
}

.map-legend__line--train {
  border-top-color: #000000;
}

.city-stop-label {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(22, 117, 100, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(25, 40, 37, 0.18);
  color: #19433b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
}

.city-stop-label::before {
  border-top-color: rgba(22, 117, 100, 0.45);
}

.guess-form {
  display: grid;
  gap: 16px;
}

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

.field span {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field textarea,
.field input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(22, 117, 100, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 16px 16px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

.field textarea:focus,
.field input:focus {
  border-color: rgba(31, 165, 142, 0.44);
  box-shadow: 0 0 0 4px rgba(31, 165, 142, 0.12);
}

.submit-button {
  appearance: none;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #4ba891);
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(31, 165, 142, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(31, 165, 142, 0.3);
}

.submit-button:active {
  transform: translateY(0);
}

.form-footnote {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-status {
  margin: -2px 0 0;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.form-status.is-success {
  color: #0f705f;
}

.form-status.is-error {
  color: #8d4b2b;
}

.form-disabled {
  opacity: 0.72;
}

.form-disabled .field textarea,
.form-disabled .field input,
.form-disabled .submit-button {
  cursor: not-allowed;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-pane,
.leaflet-tile,
.leaflet-tile-container {
  will-change: transform;
}

@media (max-width: 980px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 10ch;
  }

  .map {
    min-height: 440px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 12px;
  }

  .hero-copy,
  .hero-aside,
  .panel {
    border-radius: 24px;
  }

  .hero-copy,
  .panel {
    padding: 18px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 15vw, 4.7rem);
  }

  .map {
    min-height: 360px;
  }
}
