:root {
  --navy:   #0f1b2d;
  --blue:   #1e5fa8;
  --bl:     #2d7dd2;
  --accent: #f5a623;
  --green:  #27ae60;
  --red:    #e74c3c;
  --text:   #e8edf5;
  --muted:  #8fa3bc;
  --card:   #162338;
  --border: #1f3454;
  --r:      12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--navy); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }

/* ── Site header ── */
.site-header {
  height: 52px;
  background: linear-gradient(135deg, #0a1628 0%, #1a2d47 60%, #1e4080 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 900;
}
.site-title { font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.site-title em { color: var(--accent); font-style: normal; }
.site-meta { font-size: 0.76rem; color: var(--muted); }
.hspacer { flex: 1; }
.btn-ghost {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: background .15s;
  white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255,255,255,0.13); }
.back-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .15s;
}
.back-link:hover { color: var(--text); border-color: var(--border); background: rgba(255,255,255,0.05); }
.nav-cities { display: flex; gap: 6px; }
.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 0.76rem;
  font-family: inherit;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-btn:hover { color: var(--text); border-color: var(--bl); background: rgba(45,125,210,0.1); }

/* ── Map layout (homepage) ── */
.map-wrap { position: relative; }
#map {
  width: 100%;
  height: calc(100vh - 52px - 90px);
  min-height: 380px;
  background: #0a1628;
}

/* Attendee sidebar — floats over the map */
.sidebar-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 215px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: rgba(18, 30, 50, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 15px;
  backdrop-filter: blur(10px);
  z-index: 500;
  transition: opacity .2s, transform .2s;
}
.sidebar-panel.hidden { opacity: 0; pointer-events: none; transform: translateX(10px); }
.sb-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 8px;
}
.att-chip { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.chip-av {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
  flex-shrink: 0;
}
.chip-av.yes { background: linear-gradient(135deg, var(--blue), var(--bl)); }
.chip-av.no  { background: #1e1414; color: #6b3333; }
.chip-name { font-size: 0.8rem; flex: 1; }
.chip-tag { font-size: 0.62rem; }
.chip-tag.going { color: var(--green); }
.chip-tag.no    { color: var(--red); opacity: .7; }
.sdiv { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* ── City strip (below map) ── */
.city-strip {
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  height: 90px;
}
.city-stop-link {
  flex: 1;
  min-width: 120px;
  padding: 11px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background .15s;
  text-decoration: none;
}
.city-stop-link:last-child { border-right: none; }
.city-stop-link:hover { background: #1a2d47; }
.csl-num  { font-size: 0.6rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.csl-name { font-size: 0.92rem; font-weight: 700; }
.csl-dates{ font-size: 0.68rem; color: var(--muted); margin-top: 1px; }
.csl-badge{ display: inline-block; margin-top: 3px; background: rgba(45,125,210,0.18); color: var(--bl); font-size: 0.62rem; padding: 1px 6px; border-radius: 10px; font-weight: 600; }

/* ── City picks section (homepage, below strip) ── */
.picks-section { padding: 16px 18px 48px; max-width: 1100px; margin: 0 auto; }
.picks-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 13px;
  cursor: pointer;
  font-size: 0.76rem;
  font-family: inherit;
  transition: all .15s;
  margin-bottom: 14px;
}
.picks-toggle-btn:hover { color: var(--text); border-color: var(--bl); }
.cpicks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 11px;
}
.cpick {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 15px;
  transition: border-color .15s;
}
.cpick:hover { border-color: var(--bl); }
.cpick.planned   { border-left: 3px solid var(--bl); }
.cpick.suggested { border-left: 3px solid var(--accent); }
.cpick-top  { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 7px; }
.cpick-emo  { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.cpick-nm   { font-weight: 700; font-size: 0.88rem; }
.cpick-co   { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }
.cpick-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; margin-top: 4px; }
.cpick-badge.planned   { background: rgba(45,125,210,0.2); color: var(--bl); }
.cpick-badge.suggested { background: rgba(245,166,35,0.15); color: var(--accent); }
.cpick-blurb { font-size: 0.74rem; color: var(--muted); line-height: 1.5; }

/* ── City page ── */
.city-page { max-width: 960px; margin: 0 auto; padding: 26px 20px 60px; }

.city-hero { margin-bottom: 22px; }
.city-hero-row { display: flex; align-items: flex-start; gap: 14px; }
.city-hero-emoji { font-size: 2.6rem; line-height: 1; flex-shrink: 0; }
.city-hero-name { font-size: 1.8rem; font-weight: 700; }
.city-hero-sub {
  display: flex; align-items: center; gap: 10px;
  margin-top: 5px; flex-wrap: wrap;
}
.city-hero-dates { font-size: 0.82rem; color: var(--muted); }
.city-nights-badge {
  background: rgba(45,125,210,0.2); color: var(--bl);
  padding: 2px 9px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700;
}
.city-notes {
  margin-top: 11px;
  font-size: 0.82rem; color: var(--muted); line-height: 1.5;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 13px;
}

.city-cols {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  align-items: start;
}

/* Activities panel */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.panel-title {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin-bottom: 11px;
}
.act-item {
  display: flex; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(31,52,84,0.5);
  font-size: 0.84rem; line-height: 1.4;
}
.act-item:last-child { border-bottom: none; }
.act-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bl); margin-top: 7px; flex-shrink: 0; }

/* Schedule panel */
.day-tabs { display: flex; gap: 4px; margin-bottom: 13px; flex-wrap: wrap; }
.day-tab-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.76rem;
  font-family: inherit;
  transition: all .15s;
}
.day-tab-btn:hover { color: var(--text); }
.day-tab-btn.active { background: rgba(45,125,210,0.18); color: var(--bl); border-color: var(--bl); }
.sched-day { display: none; }
.sched-day.active { display: block; }
.sched-day-label {
  font-size: 0.68rem; color: var(--muted);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.t-slot {
  display: flex; gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(31,52,84,0.3);
  align-items: flex-start;
  min-height: 30px;
}
.t-slot:last-child { border-bottom: none; }
.t-time {
  font-size: 0.68rem; color: var(--muted);
  width: 54px; flex-shrink: 0;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.t-content { flex: 1; padding: 2px 0; }
.t-event {
  font-size: 0.82rem;
  padding: 4px 9px;
  border-radius: 0 6px 6px 0;
  border-left: 2px solid var(--bl);
  background: rgba(45,125,210,0.1);
  line-height: 1.4;
}
.t-event.food      { border-left-color: var(--accent); background: rgba(245,166,35,0.09); }
.t-event.logistics { border-left-color: var(--muted);  background: rgba(255,255,255,0.03); color: var(--muted); }
.t-event.activity  { border-left-color: #9b59b6;       background: rgba(155,89,182,0.09); }
.t-event.free      { border-left-color: var(--green);  background: rgba(39,174,96,0.08); }

/* ── Leaflet theme ── */
.leaflet-container { background: #0a1628; font-family: inherit; }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.leaflet-popup-content { margin: 12px 14px; font-size: 0.84rem; line-height: 1.5; }
.leaflet-popup-content strong { color: var(--accent); }
.leaflet-popup-close-button { color: var(--muted) !important; }
.leaflet-control-attribution { background: rgba(15,27,45,.85) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--bl) !important; }
.leaflet-control-zoom a { background: var(--card) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-control-zoom a:hover { background: #1a2d47 !important; }
.c-marker { background: transparent !important; border: none !important; }
.c-pin {
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
}
.c-pin span { transform: rotate(45deg); color: #fff; font-weight: 700; }
.popup-cta {
  display: inline-block; margin-top: 8px;
  background: rgba(45,125,210,0.2); color: var(--bl);
  border: 1px solid var(--bl); border-radius: 6px;
  padding: 3px 10px; font-size: 0.74rem;
  transition: background .15s;
}
.popup-cta:hover { background: rgba(45,125,210,0.35); }

/* ── Responsive ── */
@media (max-width: 700px) {
  #map { height: 58vh; }
  .city-cols { grid-template-columns: 1fr; }
  .sidebar-panel { width: calc(100vw - 24px); }
  .city-stop-link { min-width: 110px; padding: 10px 12px; }
  .city-hero-name { font-size: 1.5rem; }
}
