:root {
  color-scheme: light;
  --bg: #f4f1e9;
  --surface: #fffdfa;
  --surface-2: #f7f1e7;
  --ink: #202724;
  --muted: #68736f;
  --line: #ded3c3;
  --coast: #147c88;
  --forest: #2f6b45;
  --sun: #d9912f;
  --rose: #b75144;
  --blue: #405f8d;
  --purple: #7c5a9a;
  --shadow: 0 20px 50px rgba(33, 39, 36, 0.12);
}

/* Critical Leaflet layout fallback. If the CDN stylesheet is late or blocked,
   these rules keep map tiles and panes positioned correctly. */
.leaflet-container {
  position: relative;
  overflow: hidden;
  background: #d9e4df;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container img.leaflet-tile,
.leaflet-container img.leaflet-marker-icon,
.leaflet-container img.leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile {
  width: 256px;
  height: 256px;
  user-select: none;
}

.leaflet-tile-container {
  transform-origin: 0 0;
}

.leaflet-zoom-animated,
.leaflet-pane > svg,
.leaflet-pane > canvas {
  transform-origin: 0 0 !important;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-pane > svg path.leaflet-interactive {
  cursor: pointer;
  pointer-events: stroke;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 10px;
}

.leaflet-right {
  right: 10px;
}

.leaflet-bottom {
  bottom: 10px;
}

.leaflet-left {
  left: 10px;
}

.leaflet-control-zoom a {
  display: block;
  width: 30px;
  height: 30px;
  border-bottom: 1px solid #ccc;
  background: #fff;
  color: #222;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
}

.leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.leaflet-popup {
  position: absolute;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  padding: 1px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
}

.leaflet-popup-content {
  line-height: 1.35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  min-height: 118px;
  padding: 24px clamp(16px, 4vw, 42px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  color: #fffdf8;
  background:
    linear-gradient(105deg, rgba(20, 124, 136, 0.95), rgba(47, 107, 69, 0.82)),
    url("https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Sea_stacks_near_Bandon%2C_Oregon.jpg/1280px-Sea_stacks_near_Bandon%2C_Oregon.jpg");
  background-size: cover;
  background-position: center;
}

.brand-block {
  min-width: 220px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0.9;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.06rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.trip-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trip-facts span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 253, 248, 0.48);
  background: rgba(255, 253, 248, 0.12);
  font-size: 0.84rem;
  font-weight: 700;
}

.view-tabs {
  position: sticky;
  top: 0;
  z-index: 400;
  display: flex;
  gap: 8px;
  padding: 10px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, 0.96);
  backdrop-filter: blur(10px);
}

.tab-button,
.preset-button,
.primary-button,
.text-button,
.chip,
.choice-row button,
.map-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.tab-button {
  min-width: 104px;
  padding: 10px 14px;
  font-weight: 800;
}

.tab-button.active {
  border-color: var(--coast);
  background: #dff3f1;
}

.planner-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.filters-panel {
  display: grid;
  gap: 16px;
  align-self: start;
}

.panel-section,
.main-panel,
.summary-card,
.stat-card,
.calendar-day,
.detail-panel,
.stop-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-section {
  padding: 16px;
}

.stop-library-section {
  max-height: calc(100vh - 235px);
  overflow: auto;
}

.section-heading,
.summary-header,
.timeline-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary-header,
.timeline-toolbar {
  margin-bottom: 16px;
}

.summary-header p,
.timeline-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.field-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#searchInput,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}

.filter-group {
  margin-top: 2px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 7px 9px;
  font-size: 0.82rem;
}

.chip.active {
  border-color: var(--coast);
  background: #dff3f1;
}

.text-button {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-button {
  padding: 10px 12px;
  background: var(--ink);
  color: #fffdfa;
}

.muted-text {
  color: var(--muted);
  font-size: 0.84rem;
}

.preset-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.preset-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 124px;
  padding: 12px;
  border-radius: 6px;
  text-align: left;
}

.preset-button.active {
  border-color: var(--coast);
  background: #edf8f6;
  box-shadow: inset 4px 0 0 var(--coast);
}

.preset-button.recommended {
  border-color: #b8d2bf;
}

.preset-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.preset-title-row strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.preset-button b {
  flex: 0 0 auto;
  padding: 4px 7px;
  background: #dceee0;
  color: #1d4c2d;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preset-button span {
  color: #3e4a46;
  font-size: 0.84rem;
  line-height: 1.35;
}

.preset-fit-line,
.preset-risk-line {
  padding-left: 9px;
  border-left: 3px solid #c8d6cd;
}

.preset-risk-line {
  border-left-color: #d7a39a;
}

.preset-fit-line strong,
.preset-risk-line strong {
  font-size: inherit;
}

.preset-button .friend-drive-line {
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  background: #fbebe8;
  color: #713429;
  font-size: 0.75rem;
  font-weight: 900;
}

.preset-button em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stop-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stop-card {
  padding: 12px;
  box-shadow: none;
}

.stop-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #d9e4df;
}

.stop-card-main {
  display: grid;
  gap: 8px;
}

.stop-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.stop-title-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
  line-height: 1.25;
}

.stop-card-map-link {
  padding: 2px 0;
  color: var(--coast);
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.stop-card.active-card {
  outline: 2px solid var(--coast);
  outline-offset: -2px;
}

.stop-summary {
  margin-bottom: 0;
  color: #3e4a46;
  font-size: 0.88rem;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.status-pill,
.small-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  background: #eef4ef;
  color: #385243;
  font-size: 0.74rem;
  font-weight: 800;
}

.tag-row span.quiet-tag {
  background: #f1eee8;
  color: var(--muted);
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.choice-row button {
  min-height: 34px;
  padding: 7px 4px;
  font-size: 0.8rem;
}

.choice-row button.active[data-choice="must"],
.status-pill.must {
  border-color: var(--forest);
  background: #dceee0;
  color: #1d4c2d;
}

.choice-row button.active[data-choice="maybe"],
.status-pill.maybe {
  border-color: var(--sun);
  background: #fff0d8;
  color: #744713;
}

.choice-row button.active[data-choice="skip"],
.status-pill.skip {
  border-color: var(--rose);
  background: #f8dfdc;
  color: #7a2b22;
}

.main-panel {
  min-height: calc(100vh - 188px);
  overflow: visible;
}

.view-panel {
  display: none;
  min-height: calc(100vh - 188px);
}

.view-panel.active-view {
  display: block;
}

.route-view.active-view {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
  gap: 0;
}

.route-map-panel {
  position: sticky;
  top: 61px;
  align-self: start;
  width: 100%;
  min-height: calc(100vh - 188px);
}

.route-itinerary-panel {
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
}

.map-canvas {
  width: 100%;
  height: calc(100vh - 188px);
  min-height: 600px;
  touch-action: none;
  background: #d9e4df;
}

.detail-panel {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 350;
  width: min(410px, calc(100% - 56px));
  max-height: min(560px, calc(100vh - 238px));
  overflow: auto;
  padding: 16px;
}

.route-view .detail-panel {
  display: none;
}

.detail-photo {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #d9e4df;
}

#mapView,
.route-map-panel {
  position: relative;
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-panel p {
  color: #3e4a46;
  line-height: 1.45;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.detail-meta div {
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.detail-meta strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rental-box {
  margin: 12px 0;
  padding: 11px;
  border: 1px solid var(--line);
  background: #f7f1e7;
}

.rental-box.strong {
  border-color: var(--forest);
  background: #eff7f1;
}

.rental-box.possible {
  border-color: var(--sun);
  background: #fff7e9;
}

.rental-box.weak {
  border-color: var(--rose);
  background: #fbebe8;
}

.rental-box strong,
.rental-box span {
  display: block;
}

.rental-box strong {
  margin-bottom: 4px;
}

.rental-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.rental-box p {
  margin: 8px 0;
  font-size: 0.86rem;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-links a {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.maps-place-link {
  color: inherit;
  font-weight: 900;
  text-decoration-color: rgba(31, 122, 140, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.maps-place-link:hover,
.maps-place-link:focus-visible {
  color: var(--coast);
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
}

.leaflet-popup-content {
  margin: 10px 12px;
  min-width: 190px;
}

.popup-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 900;
}

.summary-view {
  padding: 18px;
  overflow: auto;
}

.timeline-controls {
  display: flex;
  gap: 10px;
}

.timeline-controls.legacy-controls[hidden] {
  display: none;
}

.timeline-controls label {
  min-width: 110px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-controls select {
  margin-top: 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.itinerary-overview {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.itinerary-overview strong {
  font-size: 1rem;
}

.itinerary-overview span {
  color: var(--muted);
  line-height: 1.4;
}

.overview-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.overview-title-row > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  background: #eef4ef;
  color: #31543d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.route-verdict-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  background: #fffdfa;
}

.route-verdict-grid strong,
.route-verdict-grid span {
  display: block;
}

.route-verdict-grid strong {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.plan-highlights span {
  min-height: 26px;
  padding: 5px 8px;
  background: #eef4ef;
  color: #31543d;
  font-size: 0.76rem;
  font-weight: 900;
}

.friend-drive-summary {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 11px;
  border: 1px solid #d7a39a;
  background: #fbebe8;
}

.friend-drive-summary strong {
  color: #713429;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.friend-drive-summary span {
  color: #2c302e;
  font-weight: 900;
}

.friend-drive-summary p {
  margin: 0;
  color: #5b453f;
  font-size: 0.86rem;
  line-height: 1.4;
}

.route-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.snapshot-card {
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.snapshot-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.snapshot-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  line-height: 1.15;
}

.itinerary-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.calendar-day {
  min-height: 220px;
  padding: 12px;
  box-shadow: none;
}

.itinerary-day {
  display: grid;
  align-content: start;
  gap: 12px;
  border-top: 6px solid var(--day-color, var(--coast));
  background: #fff;
}

.calendar-day.meetup-day {
  border-color: var(--blue);
  background: #f2f6fb;
}

.calendar-day.friend-drive-day {
  border-color: var(--rose);
  background: #fff7f5;
}

.calendar-day.arrival-day {
  border-color: var(--forest);
  background: #eff7f1;
}

.day-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.day-heading strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.98rem;
}

.day-heading .muted-text .maps-place-link,
.itinerary-note .maps-place-link,
.itinerary-list .maps-place-link,
.stay-row .maps-place-link {
  color: var(--coast);
}

.day-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--day-color, var(--coast));
}

.day-summary-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 8px;
}

.day-summary-strip span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
}

.day-summary-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.day-stops {
  display: grid;
  gap: 8px;
}

.day-stop {
  padding: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.day-stop strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.25;
}

.day-stop span {
  color: var(--muted);
  font-size: 0.78rem;
}

.itinerary-route {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.stay-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fffdfa;
}

.stay-row > span:last-child {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.stay-pill {
  display: inline-flex;
  width: max-content;
  min-height: 26px;
  align-items: center;
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stay-pill.hotel {
  background: #eef4ef;
  color: #31543d;
}

.stay-pill.camp {
  background: #dceee0;
  color: #1d4c2d;
}

.stay-pill.flex {
  background: #fff0d8;
  color: #744713;
}

.itinerary-route span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.friend-drive-callout {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #d7a39a;
  background: #fbebe8;
}

.friend-drive-callout span {
  color: #713429;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.friend-drive-callout strong {
  line-height: 1.25;
}

.friend-drive-callout em {
  color: #713429;
  font-style: normal;
  font-weight: 900;
}

.friend-drive-callout p {
  margin: 0;
  color: #5b453f;
  font-size: 0.86rem;
  line-height: 1.4;
}

.itinerary-list {
  display: grid;
  gap: 5px;
}

.itinerary-list > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.itinerary-list ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.itinerary-list li {
  line-height: 1.35;
}

.itinerary-note {
  margin: 0;
  padding: 10px;
  border-left: 3px solid var(--coast);
  background: #f7fbf7;
  color: #3e4a46;
  font-size: 0.88rem;
  line-height: 1.4;
}

.empty-day {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

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

.stat-card {
  padding: 14px;
  box-shadow: none;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

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

.summary-card {
  padding: 14px;
  box-shadow: none;
}

.stack-list {
  display: grid;
  gap: 8px;
}

.summary-item,
.check-item {
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.summary-item strong,
.check-item strong {
  display: block;
  margin-bottom: 4px;
}

.summary-item span,
.check-item span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.scenic-drive-item {
  border-color: #c8d6cd;
  background: #f7fbf7;
}

.marker-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--marker-color, var(--muted));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.marker-dot.must {
  background: var(--marker-color, var(--forest));
}

.marker-dot.maybe {
  background: var(--marker-color, var(--sun));
}

.marker-dot.skip {
  background: var(--rose);
}

.marker-dot.meetup {
  box-shadow: 0 0 0 4px rgba(64, 95, 141, 0.25), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.map-day-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  max-width: 68px;
  padding: 4px 6px;
  border: 2px solid var(--day-color, var(--coast));
  background: rgba(255, 253, 250, 0.96);
  box-shadow: 0 4px 12px rgba(33, 39, 36, 0.2);
  pointer-events: none;
}

.map-day-label strong {
  color: var(--day-color, var(--coast));
  font-size: 0.66rem;
  line-height: 1;
  text-transform: uppercase;
  font-weight: 800;
  white-space: nowrap;
}

.map-day-label.meetup-label {
  min-width: 94px;
  max-width: 108px;
  border-color: var(--rose);
  background: #fff4f1;
}

.map-day-label.meetup-label strong {
  color: var(--rose);
}

@media (max-width: 1100px) {
  .planner-shell {
    grid-template-columns: 1fr;
  }

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

  .stop-library-section {
    grid-column: 1 / -1;
    max-height: 430px;
  }

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

  .route-view.active-view {
    grid-template-columns: 1fr;
  }

  .route-map-panel {
    position: relative;
    top: auto;
    min-height: 520px;
  }

  .route-itinerary-panel {
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .day-summary-strip,
  .route-verdict-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-facts {
    justify-content: flex-start;
  }

  .view-tabs {
    overflow-x: auto;
  }

  .tab-button {
    min-width: 96px;
  }

  .planner-shell {
    padding: 10px;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

  .filters-panel > .panel-section:nth-child(2),
  .stop-library-section {
    display: none;
  }

  .stop-library-section {
    max-height: none;
  }

  .main-panel,
  .view-panel,
  .map-canvas {
    min-height: 640px;
  }

  .map-canvas {
    height: 520px;
    min-height: 520px;
  }

  .detail-panel {
    position: static;
    width: 100%;
    max-height: none;
    border-width: 1px 0 0;
    box-shadow: none;
  }

  #mapView {
    display: none;
  }

  #mapView.active-view {
    display: flex;
    flex-direction: column;
  }

  .route-itinerary-panel {
    padding: 12px;
  }

  .route-snapshot,
  .day-summary-strip,
  .route-verdict-grid {
    grid-template-columns: 1fr;
  }

  .timeline-toolbar,
  .summary-header {
    flex-direction: column;
  }

  .timeline-controls {
    width: 100%;
  }

  .timeline-controls label {
    flex: 1;
  }

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

  .detail-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
