:root {
  --bg: #f3efe6;
  --panel: rgba(255, 252, 247, 0.86);
  --panel-strong: #fffaf1;
  --text: #172026;
  --muted: #5d6a73;
  --line: rgba(23, 32, 38, 0.12);
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --warm: #c96b2c;
  --warm-soft: #f4bf96;
  --shadow: 0 18px 60px rgba(30, 41, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(201, 107, 44, 0.18), transparent 24%),
    linear-gradient(180deg, #f6f1e7 0%, #f1e9da 100%);
}

.shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero,
.panel,
.stat-card {
  backdrop-filter: blur(14px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.hero-copy {
  margin-bottom: 0;
  max-width: 48rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-value {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.stat-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.panel {
  padding: 22px;
}

.panel-map {
  margin-bottom: 24px;
}

.embed-panel-builder {
  margin-bottom: 24px;
}

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

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.dot-past {
  background: var(--warm);
}

.dot-upcoming {
  background: var(--accent);
}

#map {
  height: 480px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

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

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 32, 38, 0.14);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.embed-code {
  min-height: 110px;
  margin: 12px 0 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92rem;
}

.full-width {
  grid-column: 1 / -1;
}

.primary-button,
.ghost-button,
.trip-card button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.primary-button {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}

.ghost-button,
.trip-card button {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--line);
}

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

.trip-list {
  display: grid;
  gap: 12px;
}

.trip-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.trip-card h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.trip-meta,
.trip-notes {
  color: var(--muted);
  font-size: 0.92rem;
}

.trip-notes {
  margin: 12px 0;
}

.trip-actions {
  margin-top: 12px;
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  border: 1px dashed rgba(23, 32, 38, 0.18);
}

.embed-copy,
.embed-link-line {
  color: var(--muted);
}

.embed-link-line a {
  color: var(--accent-strong);
  word-break: break-all;
}

.embed-body {
  background:
    radial-gradient(circle at top left, rgba(76, 111, 191, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(128, 0, 128, 0.18), transparent 22%),
    linear-gradient(180deg, #f4ede0 0%, #efe4d2 100%);
}

.embed-shell {
  min-height: 100vh;
  padding: 14px;
}

.embed-panel {
  min-height: calc(100vh - 28px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(76, 111, 191, 0.08), transparent 24%),
    radial-gradient(circle at bottom left, rgba(128, 0, 128, 0.08), transparent 30%),
    rgba(255, 250, 241, 0.88);
  box-shadow: var(--shadow);
  padding: 18px;
}

.embed-panel .dot-past {
  background: #4c6fbf;
}

.embed-panel .dot-upcoming {
  background: #800080;
}

.embed-panel .eyebrow {
  color: #4c6fbf;
}

.embed-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.embed-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.embed-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.embed-stat {
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(76, 111, 191, 0.08), rgba(128, 0, 128, 0.08)),
    rgba(255, 255, 255, 0.7);
  padding: 14px 16px;
}

.embed-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  color: #800080;
}

.embed-map {
  height: min(72vh, 700px);
  min-height: 420px;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
}

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

  .hero,
  .panel-heading,
  .embed-topline {
    flex-direction: column;
    align-items: start;
  }

  .embed-stats {
    grid-template-columns: 1fr;
  }
}

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

  .trip-form {
    grid-template-columns: 1fr;
  }

  #map {
    height: 360px;
  }
}
