@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg:      #F0F4F8;
  --panel:   #FFFFFF;
  --card:    #FFFFFF;
  --border:  rgba(30,64,110,0.10);
  --text:    #1A2B3C;
  --muted:   #6B7F94;

  --c1: #1E6B8A;
  --c2: #2DA67E;
  --c3: #F0873A;
  --c4: #1E6B8A;

  --grad:      linear-gradient(135deg, #1E6B8A 0%, #2DA67E 50%, #F0873A 100%);
  --grad-cool: linear-gradient(135deg, #1E6B8A, #2DA67E);
  --grad-warm: linear-gradient(135deg, #F0873A, #2DA67E);

  --p1: #1E6B8A;
  --p2: #2DA67E;
  --p3: #F0873A;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sh-sm:   0 2px 8px  rgba(30,107,138,.08);
  --sh-md:   0 6px 24px rgba(30,107,138,.12);
  --sh-lg:   0 16px 56px rgba(30,107,138,.16);
  --sh-glow: 0 0 28px rgba(30,107,138,.30);

  --sidebar-w: 400px;
  --ease: all .25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ───────────────────────────────── */

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-panel {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(30,107,138,.25) transparent;
  z-index: 10;
  position: relative;
}
.app-panel::-webkit-scrollbar { width: 4px; }
.app-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c1), var(--c2));
  border-radius: 4px;
}

.map-section { flex: 1; position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; }

/* ─── HOME STATE — map always visible, panel is sidebar ── */

body.is-home .app-panel {
  justify-content: center;
  background: linear-gradient(170deg, #E8EEF4 0%, #FFFFFF 40%);
}

body.is-home .panel-header {
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.5rem .5rem;
}

body.is-home .app-logo    { height: 64px; width: auto; filter: drop-shadow(0 6px 20px rgba(30,107,138,.3)); }
body.is-home .hero-text h1 { font-size: 2rem; margin-bottom: .1rem; }
.berlin-label { font-weight: 400; letter-spacing: .12em; }
body.is-home .tagline     { font-size: .95rem; max-width: 300px; }

body.is-home .search-section {
  padding: 0 1.5rem 1rem;
}
body.is-home .search-card {
  box-shadow: var(--sh-lg);
  border-color: rgba(30,107,138,.18);
}

/* ─── PANEL HEADER ─────────────────────────── */

.panel-header {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  padding: 1.25rem 1.5rem .75rem;
  flex-shrink: 0;
}

.logo-link { display: inline-block; line-height: 0; }
.app-logo  { height: 40px; width: auto; transition: filter .3s; display: block; }
.app-logo:hover { filter: drop-shadow(0 4px 12px rgba(30,107,138,.4)); }

.hero-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1.1;
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: .25rem;
  line-height: 1.5;
  min-height: 1.4em;
}

/* ─── SEARCH SECTION ───────────────────────── */

.search-section { padding: .5rem 1.5rem 1.25rem; }

.search-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  box-shadow: var(--sh-md);
  position: relative;
  overflow: hidden;
}
.search-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 50%, #F0873A 100%);
}

.person-block { display: flex; flex-direction: column; gap: .4rem; }

.person-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.person-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.person-dot.p1 { background: #1E6B8A; box-shadow: 0 0 6px rgba(30,107,138,.6); }
.person-dot.p2 { background: #F0873A; box-shadow: 0 0 6px rgba(45,166,126,.6); }
.person-dot.p3 { background: #2DA67E; box-shadow: 0 0 6px rgba(45,166,126,.6); }

.remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: .8rem;
  padding: .15rem .4rem;
  border-radius: var(--r-sm);
  transition: var(--ease);
  font-family: inherit;
}
.remove-btn:hover { color: #F0873A; }

.location-input-wrapper { position: relative; display: flex; align-items: center; }

.loc-icon {
  position: absolute;
  left: .875rem;
  font-size: .8rem;
  pointer-events: none;
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

input[type="text"] {
  width: 100%;
  padding: .7rem .7rem .7rem 2.5rem;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(30,107,138,.15);
  background: rgba(30,107,138,.03);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: var(--ease);
}
input[type="text"]:focus {
  border-color: #1E6B8A;
  background: white;
  box-shadow: 0 0 0 3px rgba(30,107,138,.12);
}
input[type="text"]::placeholder { color: var(--muted); font-weight: 400; }

/* Autocomplete dropdown (Photon) */
.ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 1000;
  background: white;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(30,107,138,.2);
  box-shadow: var(--sh-md);
  font-family: 'Space Grotesk', sans-serif;
  margin-top: 4px;
  overflow: hidden;
  display: none;
}
.ac-item {
  padding: .55rem .875rem;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
  color: var(--text);
  border-bottom: 1px solid rgba(30,107,138,.06);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: rgba(30,107,138,.06); }

/* Leaflet custom markers */
.lf-marker { background: none !important; border: none !important; }
.lf-pin {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  color: white;
  font-weight: 700;
  line-height: 1;
}

/* Card emoji thumbnail (replaces Google Photos) */
.card-emoji-thumb {
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(30,107,138,.06);
  flex-shrink: 0;
}
.card-thumb {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(30,107,138,.06);
}

.card-review {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
  margin-top: .25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-review .review-author {
  font-style: normal;
  font-weight: 600;
  font-size: .68rem;
  margin-left: .3rem;
}

.card-hours {
  font-size: .72rem;
  margin-top: .25rem;
  color: var(--muted);
}
.card-hours summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .3rem;
  font-weight: 600;
  color: var(--c1);
  list-style: none;
}
.card-hours summary::-webkit-details-marker { display: none; }
.card-hours summary::after {
  content: '▸';
  font-size: .6rem;
  transition: transform .2s;
}
.card-hours[open] summary::after { transform: rotate(90deg); }
.card-hours ul {
  list-style: none;
  padding: .3rem 0 0 0;
  margin: 0;
  font-size: .68rem;
  line-height: 1.6;
}

.transport-group { display: flex; gap: .3rem; }
.transport-option { flex: 1; }
.transport-option input[type="radio"] { display: none; }
.transport-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .4rem;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(30,107,138,.12);
  background: white;
  color: var(--muted);
  font-size: .85rem;
  cursor: pointer;
  transition: var(--ease);
}
.transport-option input:checked + label {
  background: rgba(30,107,138,.1);
  border-color: #1E6B8A;
  color: #1E6B8A;
  box-shadow: 0 0 8px rgba(30,107,138,.2);
}
.transport-option label:hover { border-color: #1E6B8A; color: #1E6B8A; }

.form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30,107,138,.2), transparent);
}

#add-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .55rem;
  border-radius: var(--r-md);
  border: 1.5px dashed rgba(30,107,138,.3);
  background: transparent;
  color: #1E6B8A;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  font-family: inherit;
}
#add-user-btn:hover { background: rgba(30,107,138,.06); border-color: #1E6B8A; }

.search-btn {
  position: relative;
  width: 100%;
  padding: .875rem 1rem;
  border-radius: var(--r-md);
  border: none;
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 50%, #F0873A 100%);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  letter-spacing: -.01em;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30,107,138,.4), 0 2px 8px rgba(45,166,126,.2);
  animation: glowPulse 3s ease infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(30,107,138,.4), 0 2px 8px rgba(45,166,126,.2); }
  50%       { box-shadow: 0 6px 32px rgba(30,107,138,.6), 0 2px 16px rgba(45,166,126,.35); }
}
.search-btn:hover {
  transform: translateY(-2px);
  animation: none;
  box-shadow: 0 8px 32px rgba(30,107,138,.55), 0 4px 16px rgba(45,166,126,.35);
}
.search-btn:active { transform: translateY(0); }
.search-btn.loading { pointer-events: none; opacity: .85; animation: none; }

.btn-dots { display: flex; gap: 5px; align-items: center; }
.btn-dots span {
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
  animation: dotBounce .7s ease infinite;
}
.btn-dots span:nth-child(2) { animation-delay: .14s; }
.btn-dots span:nth-child(3) { animation-delay: .28s; }
@keyframes dotBounce {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%       { transform: translateY(-6px); opacity: 1; }
}

/* ─── LOADING ──────────────────────────────── */

#loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  gap: 1rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  flex: 1;
}

.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #1E6B8A;
  border-right-color: #2DA67E;
  border-bottom-color: #F0873A;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESULTS ──────────────────────────────── */

.results-feed {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  gap: .75rem;
  flex: 1;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.results-header h2 { font-size: 1.05rem; font-weight: 700; }

#result-count {
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#reset-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .875rem;
  border-radius: 999px;
  border: 1.5px solid rgba(30,107,138,.2);
  background: white;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--ease);
}
#reset-btn:hover { border-color: #1E6B8A; color: #1E6B8A; }

/* ── City badges ── */
.city-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  margin-top: .15rem;
}
.city-badge {
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(30,107,138,.08);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s ease;
}
.city-badge:hover {
  background: rgba(30,107,138,.18);
  color: var(--c1);
}
.city-badge.active {
  background: var(--c1);
  color: #fff;
}

/* ── Search page category selector ── */
.search-categories {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(30,107,138,.08);
}
.cat-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding-bottom: .1rem;
}

.filter-pill {
  flex-shrink: 0;
  padding: .28rem .75rem;
  border-radius: 999px;
  border: 1.5px solid rgba(30,107,138,.15);
  background: white;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  font-family: inherit;
  white-space: nowrap;
}
.filter-pill:hover { border-color: #1E6B8A; color: #1E6B8A; }
.filter-pill.active {
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 12px rgba(30,107,138,.35);
}

.results-list { display: flex; flex-direction: column; gap: .5rem; }

/* Card with thumbnail */
.card-body { display: flex; gap: .625rem; align-items: flex-start; }
.card-thumb {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(30,107,138,.06);
}
.card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.card-review {
  font-size: .73rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
  margin-top: .1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ─── PLAYGROUND CARDS ─────────────────────── */

.playground-card {
  background: white;
  border-radius: var(--r-lg);
  border: 1.5px solid rgba(30,107,138,.1);
  padding: .75rem .875rem;
  cursor: pointer;
  transition: var(--ease);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  animation: slideUp .35s ease backwards;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.playground-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 50%, #F0873A 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.playground-card:hover {
  box-shadow: var(--sh-md);
  border-color: rgba(30,107,138,.22);
  transform: translateY(-2px);
}
.playground-card:hover::after { transform: scaleX(1); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.playground-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playground-name i { color: #F0873A; font-size: .78rem; flex-shrink: 0; }

.playground-details {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.action-chips { display: flex; gap: .3rem; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 600;
  font-family: inherit;
  background: rgba(30,107,138,.06);
  color: var(--muted);
  border: 1.5px solid rgba(30,107,138,.1);
  cursor: pointer;
  transition: var(--ease);
}
.chip.primary {
  background: rgba(30,107,138,.08);
  color: #1E6B8A;
  border-color: rgba(30,107,138,.2);
}
.chip.secondary {
  background: rgba(45,166,126,.08);
  color: #F0873A;
  border-color: rgba(45,166,126,.2);
}

/* ─── MOBILE MAP TOGGLE ────────────────────── */

.map-toggle-bar {
  display: none;
  padding: .625rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
#map-toggle-btn {
  width: 100%;
  padding: .65rem;
  border-radius: var(--r-md);
  border: none;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: var(--ease);
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 100%);
  color: white;
  box-shadow: 0 3px 12px rgba(30,107,138,.3);
}
#map-toggle-btn:hover { box-shadow: 0 5px 20px rgba(30,107,138,.45); transform: translateY(-1px); }

/* ─── PWA INSTALL BANNER ──────────────────── */

.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem;
  padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(30,107,138,.15);
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  font-size: .82rem;
  color: var(--text);
}
.install-content {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 1;
  min-width: 0;
}
.install-content i {
  color: var(--c1);
  font-size: 1rem;
  flex-shrink: 0;
}
.install-content span {
  font-weight: 500;
}
.install-btn {
  background: var(--grad);
  color: #fff;
  border: none;
  padding: .4rem .85rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: .78rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ease);
}
.install-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
}
.install-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 .15rem;
  line-height: 1;
  flex-shrink: 0;
}
.install-dismiss:hover {
  color: var(--text);
}

/* iOS install hint */
.ios-share-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
}

/* ─── FOOTER ───────────────────────────────── */

.app-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.footer-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem;
}
.footer-link {
  display: inline-flex !important; align-items: center; gap: .35rem;
  font-size: .78rem !important; color: var(--muted) !important; text-decoration: none !important; font-weight: 500;
  padding: .4rem .75rem; border-radius: var(--r-md);
  background: var(--panel) !important; border: 1px solid var(--border);
  transition: var(--ease); white-space: nowrap;
}
.footer-link:hover {
  color: var(--c1) !important; border-color: var(--c1); background: #f0eeff !important;
}
.footer-link i { font-size: .7rem; opacity: .7; }
.app-footer p { font-size: .7rem; color: var(--muted); margin-top: .25rem; }

/* ─── MODAL ────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26,43,60,.55);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: white;
  width: 100%;
  max-width: 480px;
  border-radius: var(--r-xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  animation: slideUp .3s ease;
  box-shadow: var(--sh-lg);
  border: 1px solid rgba(30,107,138,.12);
}
.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 50%, #F0873A 100%);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

/* Photo gallery scrollbar */
#modal-photo-gallery { scrollbar-width: thin; scrollbar-color: var(--c1) transparent; }
#modal-photo-gallery::-webkit-scrollbar { height: 4px; }
#modal-photo-gallery::-webkit-scrollbar-thumb { background: var(--c1); border-radius: 4px; }

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(30,107,138,.15);
  background: white;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: var(--ease);
  font-family: inherit;
}
.modal-close:hover {
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
  color: white;
  border-color: transparent;
}

/* ─── RIPPLE ───────────────────────────────── */

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(30,107,138,0.2);
  transform: scale(0);
  animation: rippleAnim .55s linear forwards;
  pointer-events: none;
  z-index: 99;
}
@keyframes rippleAnim { to { transform: scale(3); opacity: 0; } }

/* ─── FLOATING ORBS ────────────────────────── */

.home-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  animation: orbFloat 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
/* Kill orbs + their GPU layers once we leave home state */
body:not(.is-home) .home-orb {
  display: none !important;
  animation: none !important;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -15px) scale(1.04); }
  66%       { transform: translate(-15px, 10px) scale(.97); }
}

/* ─── RESPONSIVE ───────────────────────────── */

@media (max-width: 1024px) {
  :root { --sidebar-w: 360px; }
}

@media (max-width: 768px) {
  body { overflow: auto; }

  #app {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    overflow: visible;
  }

  .app-panel {
    width: 100%;
    height: auto !important;
    min-height: 0;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    justify-content: flex-start;
  }

  body.is-home .app-panel {
    background: linear-gradient(170deg, #E8EEF4 0%, #FFFFFF 50%);
    justify-content: flex-start;
  }
  body.is-home .panel-header {
    padding: 1.25rem 1.25rem .35rem;
  }
  body.is-home .search-section { padding: 0 1.25rem 1.25rem; }
  body.is-home .hero-text h1   { font-size: 1.6rem; }
  body.is-home .app-logo       { height: 44px; }
  .berlin-label { letter-spacing: .06em; }

  .map-section   { height: 45vh; flex-shrink: 0; }
  .map-toggle-bar { display: block; }

  .panel-header   { padding: 1rem 1.25rem .5rem; }
  .search-section { padding: .5rem 1.25rem 1rem; }
  .results-feed   { padding: .75rem 1rem 1rem; }
  .app-footer     { padding: .75rem 1rem; }
  .search-card    { padding: 1rem; border-radius: var(--r-lg); }

  /* Compact person blocks */
  .person-block   { gap: .5rem; padding: .75rem 0; }
  .transport-group { gap: .25rem; }

  /* Modal full-width */
  .modal-content {
    width: 95%;
    max-height: 88vh;
    padding: 1.25rem;
  }

  /* Filter pills smaller text */
  .filter-pill { font-size: .75rem; padding: .35rem .65rem; }
}

@media (max-width: 480px) {
  body.is-home .hero-text h1   { font-size: 1.4rem; }
  body.is-home .panel-header   { padding: 1rem 1rem .25rem; }
  body.is-home .app-logo       { height: 40px; }
  body.is-home .search-section { padding: 0 .875rem 1rem; }
  body.is-home .tagline { font-size: .85rem; }
  .berlin-label { letter-spacing: .04em; }
  .modal-content { padding: 1rem; width: 96%; }
  .search-card { padding: .875rem; }
}

/* ─── COOKIE CONSENT BANNER ──────────────── */

#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 1rem;
  animation: cbSlideUp .4s ease;
}
@keyframes cbSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cb-content {
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem 1.5rem;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 -4px 32px rgba(30,107,138,.18), 0 8px 40px rgba(0,0,0,.1);
}

.cb-text { margin-bottom: .875rem; }
.cb-text strong {
  display: block;
  font-size: .95rem;
  margin-bottom: .35rem;
  color: var(--text);
}
.cb-text p {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.cb-text a {
  color: var(--c1);
  text-decoration: none;
  font-weight: 600;
}
.cb-text a:hover { text-decoration: underline; }

.cb-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.cb-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem 1.1rem;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
}
.cb-btn-primary {
  background: linear-gradient(135deg, #1E6B8A 0%, #2DA67E 100%);
  color: white;
  box-shadow: 0 3px 12px rgba(30,107,138,.35);
}
.cb-btn-primary:hover {
  box-shadow: 0 5px 20px rgba(30,107,138,.5);
  transform: translateY(-1px);
}
.cb-btn-secondary {
  background: rgba(30,107,138,.08);
  color: var(--c1);
  border: 1.5px solid rgba(30,107,138,.2);
}
.cb-btn-secondary:hover {
  background: rgba(30,107,138,.14);
  border-color: var(--c1);
}
.cb-btn-tertiary {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.cb-btn-tertiary:hover { color: var(--c1); border-color: var(--c1); }

/* Settings panel */
.cb-settings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.cb-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(30,107,138,.06);
}
.cb-toggle-row:last-of-type { border-bottom: none; }
.cb-toggle-row strong {
  font-size: .82rem;
  color: var(--text);
  display: block;
}
.cb-toggle-row small {
  font-size: .72rem;
  color: var(--muted);
  display: block;
  margin-top: .1rem;
}

/* Toggle switch */
.cb-switch {
  position: relative;
  display: inline-block;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.cb-switch input { opacity: 0; width: 0; height: 0; }
.cb-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(30,107,138,.15);
  border-radius: 24px;
  transition: .25s;
}
.cb-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cb-switch input:checked + .cb-slider {
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
}
.cb-switch input:checked + .cb-slider::before {
  transform: translateX(18px);
}
.cb-switch input:disabled + .cb-slider {
  opacity: .5;
  cursor: not-allowed;
}
.cb-switch input:checked:disabled + .cb-slider {
  background: linear-gradient(135deg, #1E6B8A, #2DA67E);
  opacity: .7;
}

@media (max-width: 480px) {
  #cookie-banner { padding: .5rem; }
  .cb-content { padding: 1rem; border-radius: var(--r-lg); }
  .cb-actions { flex-direction: column; }
  .cb-btn { width: 100%; text-align: center; }
}

.btn-icon-mini {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  padding: .2rem .4rem; border-radius: var(--r-sm);
  font-family: inherit; font-size: .8rem;
  transition: var(--ease); margin-left: auto;
}
.btn-icon-mini:hover { color: #F0873A; }

/* ── Partner Badge (card) ── */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .6rem;
  font-weight: 700;
  color: #B8860B;
  background: linear-gradient(135deg, #FFF8E1, #FFE082);
  padding: .15rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
  margin-left: .4rem;
}
.playground-card.is-partner {
  border-color: rgba(184,134,11,.25);
  background: linear-gradient(135deg, #FFFDF5 0%, white 40%);
}

/* ── Partner Modal Box ── */
.partner-modal-box {
  background: linear-gradient(135deg, #FFF8E1, #FFFDF5);
  border: 1.5px solid rgba(184,134,11,.2);
  border-radius: var(--r-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}
.partner-modal-header {
  font-weight: 800;
  color: #B8860B;
  font-size: .88rem;
  margin-bottom: .5rem;
}
.partner-modal-header .fa-crown { color: #FFD700; }
.partner-discount {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .75rem;
}
.partner-coupon-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.partner-coupon-code {
  background: white;
  border: 1.5px dashed #B8860B;
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  font-family: monospace;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #B8860B;
  flex: 1;
  text-align: center;
}
.partner-copy-btn {
  background: linear-gradient(135deg, #FFD700, #FFA000);
  color: white;
  border: none;
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: var(--ease);
}
.partner-copy-btn:hover { filter: brightness(1.1); }
.partner-valid {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .5rem;
}
