:root {
  --bg: #06101c;
  --panel: rgba(8, 18, 31, 0.86);
  --text: #f6f0df;
  --muted: rgba(246, 240, 223, 0.68);
  --soft: rgba(246, 240, 223, 0.46);
  --gold: #d8b35a;
  --green: #6ee7a8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #152d49 0%, var(--bg) 60%);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 28px clamp(20px, 4vw, 56px) 14px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 88px);
  line-height: .9;
  letter-spacing: -.06em;
  font-weight: 500;
  text-transform: lowercase;
}

.site-header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 21px);
}

.map-stage {
  position: relative;
  flex: 1;
  margin: 8px clamp(12px, 2vw, 28px) 0;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 30px;
  overflow: hidden;
  min-height: 68vh;
  background: #07121f;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}

.map-copy {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 3;
  width: min(430px, calc(100% - 48px));
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(6,16,28,.58);
  backdrop-filter: blur(10px);
}

.map-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 15px;
}

.map-copy .eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

#tripMap {
  width: 100%;
  height: 100%;
  min-height: 68vh;
  display: block;
}

.land {
  fill: rgba(237,222,185,.16);
  stroke: rgba(237,222,185,.25);
  stroke-width: 1.2;
}

.route-line {
  fill: none;
  stroke: rgba(216,179,90,.72);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 9;
}

.stop-hit {
  cursor: pointer;
  fill: transparent;
}

.stop-dot {
  cursor: pointer;
  stroke-width: 3;
}

.stop-dot.planned {
  fill: rgba(154,164,178,.34);
  stroke: rgba(246,240,223,.74);
}

.stop-dot.has-photos {
  fill: var(--green);
  stroke: rgba(246,240,223,.95);
  filter: url(#softGlow);
}

.stop-dot.current {
  fill: var(--gold);
  stroke: rgba(255,255,255,.98);
  filter: url(#softGlow);
}

.stop-label {
  pointer-events: none;
  fill: rgba(246,240,223,.78);
  font-size: 13px;
  paint-order: stroke;
  stroke: rgba(6,16,28,.85);
  stroke-width: 4px;
}

.stop-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-100% - 22px));
  z-index: 5;
  width: min(420px, calc(100% - 32px));
  max-height: min(420px, calc(100% - 32px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0,0,0,.48);
  backdrop-filter: blur(18px);
}

.hidden { display: none; }

.close-card {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 22px;
  cursor: pointer;
}

.status-pill {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid rgba(216,179,90,.38);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.stop-card h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.dates {
  margin: 8px 0 0;
  color: var(--muted);
}

.counts {
  margin: 12px 0 18px;
  color: var(--soft);
  font-size: 14px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 9px;
}

.action-btn {
  text-decoration: none;
  text-align: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 11px 10px;
  color: var(--text);
  background: rgba(255,255,255,.07);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.entry {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  line-height: 1.42;
  font-size: 14px;
}

.rec-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rec-form input,
.rec-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 14px;
}

.rec-form textarea {
  min-height: 96px;
  resize: vertical;
}

.rec-form ::placeholder {
  color: rgba(246,240,223,.42);
}

.rec-form button {
  border: 0;
  border-radius: 14px;
  padding: 12px;
  color: #06101c;
  background: var(--gold);
  font: inherit;
  cursor: pointer;
}

.form-note {
  margin: 0;
  color: rgba(246,240,223,.42);
  font-size: 12px;
}

footer {
  padding: 14px 28px 22px;
  color: rgba(246,240,223,.42);
  font-size: 13px;
  text-align: right;
}

.route-panel {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 4;
  width: min(420px, calc(100% - 48px));
  max-height: 36vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: rgba(6,16,28,.62);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
}

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

.route-panel-header span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.route-panel-header strong {
  color: rgba(246,240,223,.7);
  font-size: 13px;
  font-weight: 500;
}

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

.route-item {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px 11px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.route-item:hover {
  background: rgba(216,179,90,.12);
  border-color: rgba(216,179,90,.38);
}

.route-number {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(216,179,90,.18);
  color: var(--gold);
  font-size: 12px;
}

.route-main {
  display: grid;
  gap: 2px;
}

.route-main strong {
  font-size: 14px;
  font-weight: 600;
}

.route-main span {
  color: rgba(246,240,223,.52);
  font-size: 12px;
}

.route-date {
  color: rgba(246,240,223,.46);
  font-size: 12px;
  white-space: nowrap;
}

.action-btn.disabled,
.action-btn[aria-disabled="true"] {
  opacity: .46;
  cursor: not-allowed;
}

.stop-group:hover .stop-dot {
  filter: url(#softGlow);
}

@media (max-width: 760px) {
  .route-panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    max-height: 28vh;
  }

  .route-panel-header {
    display: block;
  }

  .route-date {
    display: none;
  }

  .route-item {
    grid-template-columns: 24px 1fr;
  }

  .stop-card {
    z-index: 6;
  }
}

/* Route tray refinement */
.route-panel {
  left: 24px;
  right: 24px;
  bottom: 22px;
  width: auto;
  max-height: none;
  height: 138px;
  padding: 14px 16px;
  border-radius: 22px;
}

.route-panel-header {
  margin-bottom: 8px;
}

.route-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.route-item {
  min-width: 210px;
  max-width: 250px;
  grid-template-columns: 26px 1fr;
  grid-template-rows: auto auto;
  padding: 10px 11px;
}

.route-number {
  grid-row: 1 / span 2;
}

.route-date {
  grid-column: 2;
  font-size: 12px;
  margin-top: 2px;
}

.route-main strong {
  font-size: 14px;
}

.route-main span {
  display: none;
}

@media (max-width: 760px) {
  .route-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: 118px;
    padding: 12px;
  }

  .route-panel-header strong {
    display: none;
  }

  .route-item {
    min-width: 175px;
  }
}


/* Force-remove route panel from prototype */
.route-panel,
.route-panel-header,
.route-list {
  display: none !important;
}

/* Visual polish pass */

.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 55% 48%, black 0%, black 55%, transparent 90%);
}

.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 28%, rgba(216,179,90,.10), transparent 22%),
    radial-gradient(circle at 60% 70%, rgba(110,231,168,.06), transparent 28%),
    linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.25));
}

#tripMap {
  position: relative;
  z-index: 0;
}

.map-copy {
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
}

.land {
  fill: rgba(227, 218, 190, .18);
  stroke: rgba(246, 240, 223, .22);
  stroke-width: 1.4;
}

.route-line {
  stroke: rgba(216,179,90,.82);
  stroke-width: 3;
  stroke-dasharray: 2 10;
  filter: drop-shadow(0 0 5px rgba(216,179,90,.30));
}

.stop-dot {
  transition: r .15s ease, filter .15s ease, opacity .15s ease;
}

.stop-group:hover .stop-dot {
  r: 11;
}

.stop-dot.current {
  animation: pulseCurrent 1.9s ease-in-out infinite;
}

@keyframes pulseCurrent {
  0%, 100% {
    opacity: 1;
    stroke-width: 3;
  }
  50% {
    opacity: .82;
    stroke-width: 6;
  }
}

.stop-label {
  font-size: 14px;
  font-weight: 700;
  fill: rgba(246,240,223,.84);
  stroke-width: 5px;
}

.map-legend {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(6,16,28,.62);
  backdrop-filter: blur(12px);
  color: rgba(246,240,223,.66);
  font-size: 12px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.legend-dot.current {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(216,179,90,.65);
}

.legend-dot.has-photos {
  background: var(--green);
  box-shadow: 0 0 12px rgba(110,231,168,.55);
}

.legend-dot.planned {
  background: rgba(154,164,178,.35);
  border: 1px solid rgba(246,240,223,.72);
}

.stop-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--panel);
  border-right: 1px solid rgba(255,255,255,.16);
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.action-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .map-legend {
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    border-radius: 18px;
  }

  .map-copy {
    font-size: 14px;
  }

  .stop-label {
    font-size: 12px;
  }
}

/* Real SVG map base */
.real-land {
  fill: rgba(227, 218, 190, .16);
  stroke: rgba(246, 240, 223, .11);
  stroke-width: .7;
}

.real-border {
  fill: none;
  stroke: rgba(246, 240, 223, .18);
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}

.city-label {
  fill: rgba(246,240,223,.28);
  font-size: 10px;
  letter-spacing: .04em;
  paint-order: stroke;
  stroke: rgba(6,16,28,.75);
  stroke-width: 3px;
  pointer-events: none;
}

.real-map-base {
  opacity: 1;
}

.reset-local-btn {
  margin-top: 12px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 9px 10px;
  color: rgba(246,240,223,.46);
  background: rgba(255,255,255,.035);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.reset-local-btn:hover {
  color: rgba(246,240,223,.76);
  border-color: rgba(216,179,90,.32);
  background: rgba(216,179,90,.08);
}

/* Expanded popup and local entry controls */
.stop-card {
  transform: none !important;
}

.stop-card.expanded {
  max-height: min(72vh, calc(100% - 32px));
}

.entry {
  position: relative;
}

.entry-text {
  margin-bottom: 8px;
}

.entry-meta {
  color: rgba(246,240,223,.42);
  font-size: 12px;
}

.entry-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.entry-actions button {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(246,240,223,.64);
  background: rgba(255,255,255,.045);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.entry-actions button:hover {
  color: rgba(246,240,223,.9);
  border-color: rgba(216,179,90,.36);
  background: rgba(216,179,90,.10);
}

/* Friend Rec comments */
.comment-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.comment {
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(0,0,0,.16);
  color: rgba(246,240,223,.68);
  font-size: 13px;
  line-height: 1.35;
}

.comment-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.20);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.comment-form textarea {
  min-height: 70px;
  resize: vertical;
}

.comment-form ::placeholder {
  color: rgba(246,240,223,.42);
}

.comment-form button {
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  color: #06101c;
  background: var(--gold);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.comment-actions button {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(246,240,223,.58);
  background: rgba(255,255,255,.04);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.comment-actions button:hover {
  color: rgba(246,240,223,.9);
  border-color: rgba(216,179,90,.34);
  background: rgba(216,179,90,.10);
}

.comment-line {
  color: rgba(246,240,223,.72);
}

/* Tighter edit/remove controls */
.stop-card {
  width: min(520px, calc(100% - 32px));
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: start;
}

.entry-text {
  grid-column: 1;
  margin-bottom: 4px;
}

.entry-meta {
  grid-column: 1;
}

.entry-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 6px;
  margin-top: 0;
  justify-content: flex-end;
  align-items: start;
}

.entry-actions button,
.comment-actions button {
  min-width: 30px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  line-height: 1;
}

.comment {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: start;
}

.comment-line {
  grid-column: 1;
}

.comment .entry-meta {
  grid-column: 1;
}

.comment-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 6px;
  margin-top: 0;
  justify-content: flex-end;
  align-items: start;
}

.comment-form {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .stop-card {
    width: min(520px, calc(100% - 28px));
  }

  .entry,
  .comment {
    grid-template-columns: 1fr auto;
  }
}

.rec-form-primary {
  margin-top: 0;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(216,179,90,.18);
  border-radius: 16px;
  background: rgba(216,179,90,.055);
}

/* Cleaner flat comment list */
.comment-list {
  gap: 4px;
}

.comment {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246,240,223,.72);
}

.comment + .comment {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 8px;
}

.comment-line {
  grid-column: 1;
  font-size: 13px;
  line-height: 1.35;
}

.comment-actions {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  align-items: center;
}

.comment-actions button {
  min-width: 26px;
  height: 24px;
  padding: 0 5px;
  font-size: 12px;
}

/* Make rec comments visibly subordinate */
.comment-list {
  margin-left: 2.25rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(246,240,223,.16);
}

.comment-form {
  margin-left: 2.25rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(246,240,223,.10);
}

/* Indent comments so they sit under the recommendation */
.comment-list,
.comment-form {
  margin-left: 2.5rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(246,240,223,.14);
}

/* Tighten comment indentation under recs */
.comment-list,
.comment-form {
  margin-left: 2ch !important;
  padding-left: 2ch !important;
  border-left: 1px solid rgba(246,240,223,.12);
}

/* Pull rec comments much closer to the left */
.comment-list,
.comment-form {
  margin-left: 0.75ch !important;
  padding-left: 1.25ch !important;
  border-left: 1px solid rgba(246,240,223,.12);
}

/* Pull rec comments much closer to the left */
.comment-list,
.comment-form {
  margin-left: 0.75ch !important;
  padding-left: 1.25ch !important;
  border-left: 1px solid rgba(246,240,223,.12);
}

/* Final rec comment spacing: slight indent only */
.comment-list,
.comment-form {
  margin-left: 0 !important;
  padding-left: 1.15rem !important;
  border-left: 1px solid rgba(246,240,223,.12) !important;
}

.comment {
  padding-left: 0 !important;
}

.comment-line {
  margin-left: 0 !important;
}

/* FINAL FIX: comments belong under the rec, not in the right grid column */
.entry > .comment-list,
.entry > .comment-form {
  grid-column: 1 / -1 !important;
  width: auto !important;
  margin-left: 2ch !important;
  padding-left: 1.25ch !important;
  border-left: 1px solid rgba(246,240,223,.14) !important;
}

.entry > .comment-list {
  margin-top: 10px !important;
}

.comment {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  padding: 5px 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.comment-line {
  grid-column: 1 !important;
  margin-left: 0 !important;
}

.comment-actions {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Clean map view: hide stop labels until hover/focus */
.stop-label,
.map-label,
.city-label,
.route-label,
.stop text,
.map-stop text {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .15s ease;
}

.stop:hover .stop-label,
.stop:hover .map-label,
.stop:hover .city-label,
.map-stop:hover .stop-label,
.map-stop:hover .map-label,
.map-stop:hover .city-label,
.stop.is-active .stop-label,
.stop.active .stop-label,
.map-stop.is-active .stop-label,
.map-stop.active .stop-label {
  opacity: 1 !important;
}

/* Map cleanup: hide city labels until hover */
.stop-label {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .15s ease;
}

g:hover > .stop-label,
.stop:hover .stop-label,
.map-stop:hover .stop-label,
.stop-group:hover .stop-label {
  opacity: 1 !important;
}

/* Map zoom controls */
.map-zoom-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 999px;
  background: rgba(7, 20, 39, .72);
  border: 1px solid rgba(246,240,223,.16);
  backdrop-filter: blur(8px);
}

.map-zoom-controls button {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(246,240,223,.18);
  border-radius: 999px;
  background: rgba(246,240,223,.08);
  color: #f6f0df;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.map-zoom-controls button:hover {
  background: rgba(210,180,107,.22);
  border-color: rgba(210,180,107,.5);
}

.map-zoom-controls .map-zoom-reset {
  min-width: auto;
  font-size: 13px;
  padding: 0 12px;
}

/* Hover label date line */
.stop-label-date {
  font-size: 11px;
  opacity: .78;
  font-weight: 400;
}

/* Temporary cleanup: hide full-route spaghetti lines */
.route-line {
  display: none !important;
}

/* Clean map reset - keep the public map dot-only unless a stop is hovered. */
#routeLines,
.route-line {
  display: none !important;
}

.stop-label {
  opacity: 0 !important;
  pointer-events: none;
}

.stop-group:hover .stop-label,
.stop-group:focus .stop-label,
.stop-group:focus-within .stop-label {
  opacity: 1 !important;
}

.stop-label-date {
  font-size: 11px;
  opacity: .78;
  font-weight: 400;
}


/* Map interaction polish */
#tripMap {
  cursor: grab;
  touch-action: none;
}

#tripMap.is-panning {
  cursor: grabbing;
}

.stop-hit {
  pointer-events: auto;
}

.stop-label {
  pointer-events: none;
}


/* Fine tuning: smaller dots and clean route legs */
#routeLines {
  display: block !important;
  pointer-events: none;
}

.route-line {
  display: block !important;
  fill: none;
  stroke: rgba(214, 184, 102, 0.42);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  pointer-events: none;
}

.stop-dot {
  stroke-width: 2.5;
}

.stop-hit {
  pointer-events: auto;
}


/* Europe zoom polish: tighter route dashes and readable hover labels */
.route-line {
  stroke-width: 1 !important;
  stroke-dasharray: 2.5 3.5 !important;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.stop-dot {
  vector-effect: non-scaling-stroke;
  stroke-width: 2 !important;
}

.stop-label {
  paint-order: stroke;
  stroke: rgba(4, 13, 22, 0.82);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.stop-label-date {
  paint-order: stroke;
  stroke: rgba(4, 13, 22, 0.82);
  stroke-width: 4px;
  stroke-linejoin: round;
}


/* General recs, floating controls, and content-aware legend */
.general-recs-btn {
  margin-top: 14px;
  border: 1px solid rgba(214, 184, 102, 0.48);
  background: rgba(214, 184, 102, 0.14);
  color: #f6e9c8;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.general-recs-btn:hover {
  background: rgba(214, 184, 102, 0.24);
  border-color: rgba(214, 184, 102, 0.78);
}

.map-zoom-controls {
  position: fixed !important;
  top: 128px !important;
  right: 22px !important;
  z-index: 1200 !important;
}

.map-legend {
  position: fixed !important;
  top: 178px !important;
  right: 22px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 1190 !important;
  display: grid !important;
  gap: 7px !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  background: rgba(4, 13, 22, .72) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .32) !important;
  backdrop-filter: blur(10px);
}

.map-legend span {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: rgba(250, 245, 229, .84);
  font-size: 12px;
  text-transform: none;
  letter-spacing: .02em;
}

.stop-dot.current,
.legend-dot.current {
  fill: #f2ad2e !important;
  background: #f2ad2e !important;
  stroke: rgba(255, 244, 206, .96) !important;
}

.stop-dot.has-photos,
.legend-dot.has-photos {
  fill: #35e884 !important;
  background: #35e884 !important;
  stroke: rgba(220, 255, 235, .96) !important;
}

.stop-dot.has-recs,
.legend-dot.has-recs {
  fill: #36a3ff !important;
  background: #36a3ff !important;
  stroke: rgba(222, 241, 255, .98) !important;
}

.stop-dot.planned,
.legend-dot.planned {
  fill: rgba(236, 231, 209, .44) !important;
  background: rgba(236, 231, 209, .7) !important;
  stroke: rgba(250, 245, 229, .82) !important;
}

.legend-dot.has-notes {
  background: #b46cff !important;
}

.stop-label-status {
  font-weight: 800;
  letter-spacing: .01em;
  paint-order: stroke;
  stroke: rgba(4, 13, 22, .86);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.stop-label-status.status-photos {
  fill: #35e884;
}

.stop-label-status.status-notes {
  fill: #b46cff;
}

.stop-label-status.status-recs {
  fill: #ff5d5d;
}

@media (max-width: 760px) {
  .map-zoom-controls {
    top: 110px !important;
    right: 12px !important;
  }

  .map-legend {
    top: 158px !important;
    right: 12px !important;
    padding: 10px 12px !important;
  }
}


/* General Friend Recs button - placed directly under intro copy */
.general-recs-btn {
  display: block !important;
  width: fit-content;
  margin-top: 16px !important;
  border: 1px solid rgba(214, 184, 102, 0.72);
  background: rgba(214, 184, 102, 0.20);
  color: #f9efd3;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}

.general-recs-btn:hover {
  background: rgba(214, 184, 102, 0.32);
  border-color: rgba(247, 221, 147, .95);
}

/* Legend should show only map-dot states. Notes appear only inside hover/popup details. */
.map-legend .legend-dot.has-notes,
.map-legend .legend-dot.has-notes + span {
  display: none !important;
}


/* General Friend Recs popup cleanup */
.stop-card.general-recs-mode .card-status,
.stop-card.general-recs-mode .card-counts,
.stop-card.general-recs-mode .card-actions,
.stop-card.general-recs-mode #notesPanel,
.stop-card.general-recs-mode #resetLocalBtn {
  display: none !important;
}

.stop-card.general-recs-mode #cardTitle {
  display: inline !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
  margin-right: 8px;
}

.stop-card.general-recs-mode #cardDates {
  display: inline !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  color: rgba(250, 245, 229, .92) !important;
  white-space: nowrap !important;
}

.stop-card.general-recs-mode #cardDates::before {
  content: " - ";
  color: rgba(250, 245, 229, .62);
}

.stop-card.general-recs-mode #recsPanel {
  display: block !important;
  margin-top: 16px;
}

.stop-card.general-recs-mode #recsPanel h3 {
  display: none !important;
}

.stop-card.general-recs-mode #recsList {
  margin-top: 0 !important;
}

@media (max-width: 620px) {
  .stop-card.general-recs-mode #cardTitle,
  .stop-card.general-recs-mode #cardDates {
    font-size: 18px !important;
  }
}


/* Hard cleanup for General Friend Recs popup */
.stop-card.general-recs-mode #photosBtn,
.stop-card.general-recs-mode #notesBtn,
.stop-card.general-recs-mode #recsBtn,
#stopCard.general-recs-mode #photosBtn,
#stopCard.general-recs-mode #notesBtn,
#stopCard.general-recs-mode #recsBtn {
  display: none !important;
}

.stop-card.general-recs-mode .card-status,
#stopCard.general-recs-mode .card-status {
  display: none !important;
}

.stop-card.general-recs-mode .card-counts,
#stopCard.general-recs-mode .card-counts {
  display: block !important;
}


/* Public popup cleanup and local time hover line */
#resetLocalBtn {
  display: none !important;
}

.stop-label-local {
  fill: rgba(250, 245, 229, .88);
  font-weight: 750;
  letter-spacing: .01em;
  paint-order: stroke;
  stroke: rgba(4, 13, 22, .86);
  stroke-width: 4px;
  stroke-linejoin: round;
}
