/* ============================================================
   NEUSEELAND TRIP PLANNER – Styles
   ============================================================ */

/* ── INTRO SPLASH ── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #1a2a3e 0%, #0f172a 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.55s ease;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#intro-overlay.fade-out { opacity: 0; pointer-events: none; }
#intro-overlay.done     { display: none; }

.intro-ducks-big {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 36px;
  z-index: 1;
  pointer-events: none;
}

.intro-duck {
  width: min(40vw, 180px);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.55));
  opacity: 0;
  transform-origin: center bottom;
}
.intro-duck-1 {
  animation: intro-duck-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards,
             intro-duck-bob 2.4s ease-in-out 0.7s infinite;
}
.intro-duck-2 {
  animation: intro-duck-in-mirror 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards,
             intro-duck-bob-mirror 2.4s ease-in-out 0.85s infinite;
}

@keyframes intro-duck-in {
  0%   { opacity: 0; transform: translateY(50px) scale(0.4) rotate(-20deg); }
  100% { opacity: 1; transform: translateY(0)    scale(1)   rotate(-6deg); }
}
@keyframes intro-duck-in-mirror {
  0%   { opacity: 0; transform: translateY(50px) scale(0.4) rotate(20deg)  scaleX(-1); }
  100% { opacity: 1; transform: translateY(0)    scale(1)   rotate(6deg)   scaleX(-1); }
}
@keyframes intro-duck-bob {
  0%, 100% { transform: translateY(0)    rotate(-6deg); }
  50%      { transform: translateY(-14px) rotate(3deg); }
}
@keyframes intro-duck-bob-mirror {
  0%, 100% { transform: translateY(0)    rotate(6deg)  scaleX(-1); }
  50%      { transform: translateY(-14px) rotate(-3deg) scaleX(-1); }
}

.intro-countdown {
  font-size: clamp(6rem, 22vw, 11rem);
  font-weight: 800;
  color: #14b8a6;
  text-shadow: 0 6px 30px rgba(20,184,166,0.45);
  line-height: 1;
  letter-spacing: -0.04em;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
}
.intro-countdown.pop {
  animation: countdown-pop 0.65s ease-out forwards;
}
@keyframes countdown-pop {
  0%   { opacity: 0; transform: scale(0.3); }
  25%  { opacity: 1; transform: scale(1.25); }
  60%  { opacity: 1; transform: scale(1);    }
  100% { opacity: 0; transform: scale(1.5);  }
}

.intro-burst {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.burst-duck {
  position: absolute;
  top: var(--y, 50%);
  left: -90px;
  width: var(--size, 28px);
  height: auto;
  opacity: 0;
  animation: burst-fly var(--dur, 1.8s) linear var(--delay, 0s) forwards;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}
@keyframes burst-fly {
  0%   { opacity: 0; transform: translateX(0) translateY(0) rotate(0); }
  8%   { opacity: 1; }
  50%  { transform: translateX(50vw) translateY(var(--bob, 0)) rotate(var(--rot, 0deg)); }
  92%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(100vw + 120px)) translateY(0) rotate(0); }
}

.intro-hint {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom, 28px));
  font-size: 0.8rem;
  color: #64748b;
  opacity: 0;
  pointer-events: none;
  animation: intro-hint-in 0.5s ease 2.2s forwards;
  letter-spacing: 0.03em;
}
@keyframes intro-hint-in {
  to { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  #intro-overlay { display: none !important; }
}


:root {
  --north:        #16a34a;
  --north-light:  #dcfce7;
  --south:        #0284c7;
  --south-light:  #e0f2fe;
  --ferry:        #7c3aed;
  --ferry-light:  #ede9fe;

  --bg:           #0f172a;
  --bg2:          #1e293b;
  --bg3:          #334155;
  --card:         #1e293b;
  --card-border:  #334155;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;

  --accent:       #14b8a6;
  --accent2:      #06b6d4;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --success:      #22c55e;

  --sidebar-w:    320px;
  --header-h:     58px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ── LAYOUT ── */
#app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  height: 100dvh;
}

/* Mobile nav hidden by default (shown via media query) */
#mobile-nav-bar { display: none; }

/* ── HEADER ── */
#header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-stats {
  display: flex;
  gap: 20px;
  margin-left: auto;
  align-items: center;
}

.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-value { font-size: 0.92rem; font-weight: 700; }
.stat-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value.ok   { color: var(--success); }
.stat-value.warn { color: var(--warning); }
.stat-value.over { color: var(--danger);  }

/* ── RUBBER DUCKS ── */
.header-ducks {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 6px;
  flex-shrink: 0;
}

@keyframes duck-float {
  0%, 100% { transform: translateY(0)   rotate(-4deg) scaleX(1); }
  25%       { transform: translateY(-6px) rotate(1deg)  scaleX(1); }
  50%       { transform: translateY(-8px) rotate(5deg)  scaleX(1); }
  75%       { transform: translateY(-3px) rotate(0deg)  scaleX(1); }
}

@keyframes duck-float-mirror {
  0%, 100% { transform: translateY(0)   rotate(4deg)  scaleX(-1); }
  25%       { transform: translateY(-5px) rotate(-1deg) scaleX(-1); }
  50%       { transform: translateY(-7px) rotate(-5deg) scaleX(-1); }
  75%       { transform: translateY(-2px) rotate(0deg)  scaleX(-1); }
}

@keyframes duck-squeak {
  0%   { transform: scale(1)    rotate(0deg); }
  18%  { transform: scale(0.78) rotate(-18deg); }
  40%  { transform: scale(1.28) rotate(12deg); }
  58%  { transform: scale(0.91) rotate(-6deg); }
  76%  { transform: scale(1.07) rotate(4deg); }
  100% { transform: scale(1)    rotate(0deg); }
}

@keyframes duck-squeak-mirror {
  0%   { transform: scale(1)    rotate(0deg)  scaleX(-1); }
  18%  { transform: scaleX(-0.78) scaleY(0.78) rotate(18deg); }
  40%  { transform: scaleX(-1.28) scaleY(1.28) rotate(-12deg); }
  58%  { transform: scaleX(-0.91) scaleY(0.91) rotate(6deg); }
  76%  { transform: scaleX(-1.07) scaleY(1.07) rotate(-4deg); }
  100% { transform: scaleX(-1)  rotate(0deg); }
}

@keyframes heart-float {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(1); }
  80%  { opacity: 1; transform: translate(-50%, -28px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -36px) scale(0.8); }
}

.duck {
  cursor: pointer;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
  animation: duck-float 2.6s ease-in-out infinite;
  flex-shrink: 0;
  position: relative;
}

.duck-2 {
  animation-name: duck-float-mirror;
  animation-delay: -1.3s;
}

.duck:hover {
  filter: drop-shadow(0 3px 10px rgba(255,215,0,0.6)) drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.duck.squeaking {
  animation: duck-squeak 0.55s cubic-bezier(0.36,0.07,0.19,0.97) forwards !important;
}

.duck-2.squeaking {
  animation: duck-squeak-mirror 0.55s cubic-bezier(0.36,0.07,0.19,0.97) forwards !important;
}

.duck-heart {
  position: absolute;
  font-size: 0.85rem;
  pointer-events: none;
  top: -4px;
  left: 50%;
  animation: heart-float 0.7s ease-out forwards;
  z-index: 200;
}

/* ── Mini Duck ─────────────────────────────────────────────── */
.mini-duck-wrap {
  position: fixed;
  z-index: 9990;
  pointer-events: none;
  transform: scale(0);
}
.mini-duck-wrap.mini-duck-popin {
  animation: mini-duck-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.mini-duck-wrap.mini-duck-fadeout {
  animation: mini-duck-out 0.35s ease-in forwards;
}
.mini-duck-svg {
  animation: mini-duck-bob 0.45s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}
.mini-duck-heart {
  position: fixed;
  font-size: 1rem;
  pointer-events: none;
  z-index: 9991;
  will-change: transform, opacity;
}
@keyframes mini-duck-pop {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}
@keyframes mini-duck-out {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}
@keyframes mini-duck-bob {
  from { transform: translateY(0)   rotate(-6deg); }
  to   { transform: translateY(-5px) rotate(6deg); }
}

.serancon-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-left: 1px solid var(--card-border);
  margin-left: 4px;
  text-decoration: none;
}

.serancon-brand img {
  height: 22px;
  width: auto;
  opacity: 0.85;
  filter: brightness(1.1);
  transition: opacity 0.2s;
}

.serancon-brand:hover img { opacity: 1; }

.serancon-by {
  font-size: 0.62rem;
  color: var(--text-dim);
  white-space: nowrap;
  line-height: 1;
}

.btn-reset {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-reset:hover { background: var(--card-border); color: var(--text); }

/* ── SIDEBAR ── */
#sidebar {
  grid-row: 2;
  background: var(--bg2);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-head {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-head h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.island-legend {
  display: flex;
  gap: 10px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.island-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
}

.island-dot.north { background: var(--north); }
.island-dot.south { background: var(--south); }
.island-dot.ferry { background: var(--ferry); }

#stop-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 20px;
}

.section-island-label {
  padding: 10px 6px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── STOP CARD ── */
.stop-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--card);
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.2s;
  user-select: none;
  margin-bottom: 4px;
}

.stop-card:hover        { background: var(--bg3); }
.stop-card.active-stop  { border-color: var(--accent); background: rgba(20,184,166,0.07); }
.stop-card.disabled     { opacity: 0.38; }
.stop-card.ferry-card   { border-style: dashed; }

.drag-handle {
  color: var(--text-dim);
  cursor: grab;
  font-size: 0.9rem;
  flex-shrink: 0;
  padding: 0 2px;
}
.drag-handle:active { cursor: grabbing; }

.stop-toggle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: background 0.15s;
}
.stop-toggle.on  { background: currentColor; }
.stop-toggle.off { background: transparent; }

.north-color { color: var(--north); }
.south-color { color: var(--south); }
.ferry-color { color: var(--ferry); }

.stop-info { flex: 1; min-width: 0; }

.stop-name {
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-days {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.day-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg3);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.1s;
  font-family: inherit;
}

.day-btn:hover { background: var(--accent); border-color: var(--accent); }

.days-badge {
  background: var(--bg3);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 44px;
  text-align: center;
}

/* sortable */
.sortable-ghost  { opacity: 0.3; background: var(--bg3) !important; }
.sortable-chosen { box-shadow: 0 0 0 2px var(--accent); }

/* ── MAP ── */
#map-container { grid-row: 2; position: relative; }
#map { width: 100%; height: 100%; }

.leaflet-container { background: #0d1117 !important; font-family: 'Inter', sans-serif !important; }

.leaflet-popup-content-wrapper {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
}
.leaflet-popup-tip { background: var(--bg2) !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: 0.82rem; }

.popup-title { font-weight: 700; margin-bottom: 3px; font-size: 0.88rem; }
.popup-sub   { color: var(--text-muted); font-size: 0.73rem; margin-bottom: 8px; }
.popup-days  { background: var(--bg3); padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; display: inline-block; }
.popup-link  { font-size: 0.73rem; color: var(--accent); cursor: pointer; display: block; margin-top: 8px; }
.popup-link:hover { text-decoration: underline; }


/* ── DETAIL PANEL ── */
#detail-panel {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  /* Acts as containing block for #act-overlay */
  isolation: isolate;
}

#detail-panel.visible { display: flex; }

/* Hero image */
.dp-hero {
  position: relative;
  height: 240px;
  flex-shrink: 0;
  overflow: hidden;
}

.dp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s;
}

.dp-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.dp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.96) 0%, rgba(15,23,42,0.2) 55%, transparent 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 24px;
}

.dp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.dp-close:hover { background: var(--danger); }

.dp-hero-emoji { font-size: 2rem; margin-bottom: 4px; line-height: 1; }

.dp-hero-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.dp-hero-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}

.dp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dp-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.dp-badge.north { background: rgba(22,163,74,0.3); border: 1px solid rgba(22,163,74,0.5); color: #86efac; }
.dp-badge.south { background: rgba(2,132,199,0.3); border: 1px solid rgba(2,132,199,0.5); color: #7dd3fc; }
.dp-badge.ferry { background: rgba(124,58,237,0.3); border: 1px solid rgba(124,58,237,0.5); color: #c4b5fd; }
.dp-badge.days  { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
.dp-badge.drive { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }

/* Tabs */
.dp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg2);
  flex-shrink: 0;
}

.dp-tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.dp-tab-btn:hover  { color: var(--text); }
.dp-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Tab content */
.dp-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Overview tab */
.dp-description {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dp-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.dp-highlight-card {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dp-highlight-card:hover { border-color: var(--accent); background: rgba(20,184,166,0.05); }
.dp-highlight-icon { font-size: 1.6rem; }
.dp-highlight-label { font-size: 0.73rem; color: var(--text-muted); line-height: 1.3; font-weight: 500; }

.dp-drive-next {
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Activities tab */
.dp-activity-list { display: flex; flex-direction: column; gap: 8px; }

.dp-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.dp-activity-item:hover { border-color: var(--card-border); background: var(--bg3); }

.dp-act-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border-radius: 8px;
}

.dp-act-info   { flex: 1; min-width: 0; }
.dp-act-name   { font-size: 0.84rem; font-weight: 500; margin-bottom: 3px; }
.dp-act-type   { font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 600; display: inline-block; }

.dp-act-price  { font-size: 0.9rem; font-weight: 700; text-align: right; flex-shrink: 0; }
.dp-act-price.free { color: var(--success); }
.dp-act-price.paid { color: var(--warning); }
.dp-act-price-note { font-size: 0.67rem; color: var(--text-dim); display: block; text-align: right; }

/* Activity type colors */
.atype-free        { background: rgba(34,197,94,0.12);  color: #4ade80; }
.atype-hiking      { background: rgba(22,163,74,0.15);  color: #86efac; }
.atype-adventure   { background: rgba(239,68,68,0.12);  color: #fca5a5; }
.atype-culture     { background: rgba(168,85,247,0.12); color: #d8b4fe; }
.atype-nature      { background: rgba(6,182,212,0.12);  color: #67e8f9; }
.atype-relaxation  { background: rgba(251,191,36,0.12); color: #fcd34d; }
.atype-food        { background: rgba(251,146,60,0.12); color: #fdba74; }
.atype-attraction  { background: rgba(99,102,241,0.12); color: #a5b4fc; }
.atype-transport   { background: rgba(148,163,184,0.12);color: #94a3b8; }
.atype-day_trip    { background: rgba(6,182,212,0.12);  color: #67e8f9; }

/* Practical tab */
.dp-section { margin-bottom: 24px; }
.dp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--card-border);
}

.dp-camp-list { display: flex; flex-direction: column; gap: 8px; }
.dp-camp-item {
  padding: 11px 13px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}
.dp-camp-top   { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dp-camp-name  { font-size: 0.84rem; font-weight: 600; }
.dp-camp-price { font-size: 0.84rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.dp-camp-note  { font-size: 0.73rem; color: var(--text-muted); }

.dp-tips-list { display: flex; flex-direction: column; gap: 8px; }
.dp-tip-item  {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 10px 12px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warning);
}
.dp-tip-icon { flex-shrink: 0; }

.dp-no-content {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  padding: 20px;
}

/* Serancon footer in detail */
.dp-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--card-border);
  font-size: 0.7rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.dp-footer a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-dim); }
.dp-footer a:hover { color: var(--text-muted); }
.dp-footer img { height: 16px; opacity: 0.6; filter: brightness(2); }

/* ── ACTIVITY PHOTO OVERLAY ── */
#act-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#act-overlay.visible { display: flex; }

.act-overlay-img-wrap {
  position: relative;
  flex-shrink: 0;
  height: 52%;
  overflow: hidden;
  background: var(--bg2);
}

.act-overlay-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: opacity 0.45s ease;
  image-rendering: auto;
}

.act-overlay-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 50%);
  pointer-events: none;
}

.act-overlay-back {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.act-overlay-back:hover { background: rgba(15,23,42,0.95); }

.act-overlay-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: spin 1.2s linear infinite;
}

.act-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  z-index: 3;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.act-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 22px;
}

.act-overlay-type-badge {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.act-overlay-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.act-overlay-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.act-overlay-price {
  font-size: 1.3rem;
  font-weight: 800;
}
.act-overlay-price.free { color: var(--success); }
.act-overlay-price.paid { color: var(--warning); }
.act-overlay-price-note {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.act-overlay-extract {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.act-overlay-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.act-overlay-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid rgba(20,184,166,0.3);
  border-radius: 8px;
  transition: background 0.15s;
}
.act-overlay-wiki-link:hover { background: rgba(20,184,166,0.08); }

/* ── ACTIVITY CAROUSEL (multiple images) ── */
.act-overlay-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(15,23,42,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0 0 4px;
  transition: background 0.15s, opacity 0.15s, transform 0.15s;
}
.act-overlay-nav.visible      { display: flex; }
.act-overlay-nav.prev         { left: 12px; }
.act-overlay-nav.next         { right: 12px; }
.act-overlay-nav:hover        { background: rgba(15,23,42,0.9); }
.act-overlay-nav:active       { transform: translateY(-50%) scale(0.92); }
.act-overlay-nav:disabled     { opacity: 0.3; cursor: default; }
.act-overlay-nav:disabled:hover { background: rgba(15,23,42,0.65); }

.act-overlay-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 6px;
  z-index: 5;
  padding: 7px 12px;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}
.act-overlay-dots.visible { display: flex; }
.act-overlay-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s, width 0.2s, border-radius 0.2s;
}
.act-overlay-dot.active {
  background: white;
  width: 22px;
  border-radius: 4px;
}

.act-overlay-counter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: none;
  padding: 5px 11px;
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}
.act-overlay-counter.visible { display: block; }

/* Clickable activity items */
.dp-activity-item.has-photo {
  cursor: pointer;
}
.dp-activity-item.has-photo:hover {
  border-color: var(--accent);
  background: rgba(20,184,166,0.05);
}

.dp-act-photo-hint {
  flex-shrink: 0;
  font-size: 0.85rem;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.dp-activity-item.has-photo:hover .dp-act-photo-hint { opacity: 1; }

/* ============================================================
   STOP EDITOR (Modal)
   ============================================================ */
.stop-editor {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.stop-editor.visible { display: flex; pointer-events: auto; }
.stop-editor.picking { pointer-events: none; }
.stop-editor.picking .se-sheet,
.stop-editor.picking .se-backdrop { opacity: 0; transform: translateY(40px); pointer-events: none; }

.se-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stop-editor.visible .se-backdrop { opacity: 1; }

.se-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg2);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border: 1px solid var(--card-border);
  border-bottom: none;
  box-shadow: 0 -16px 60px rgba(0,0,0,0.55);
  transform: translateY(110%);
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.24s ease;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
}
.stop-editor.visible .se-sheet { transform: translateY(0); }

.se-grabber {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--bg3);
  margin: 8px auto 0;
  flex-shrink: 0;
}

.se-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
  flex-shrink: 0;
}
.se-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.se-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg3);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.se-close:hover { background: var(--danger); color: white; border-color: var(--danger); }

.se-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.se-row { display: flex; gap: 12px; }
.se-row-emoji-name { align-items: flex-end; }
.se-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.se-field-grow { flex: 1; }

.se-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.se-input {
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;  /* prevents iOS zoom */
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.se-input:focus { border-color: var(--accent); background: rgba(20,184,166,0.04); }
.se-emoji-input {
  width: 64px;
  text-align: center;
  font-size: 1.5rem;
  padding: 8px 6px;
}
.se-input.se-error,
.se-coords.se-error {
  animation: se-shake 0.42s ease;
  border-color: var(--danger);
  color: var(--danger);
}
@keyframes se-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.se-island-picker { display: flex; gap: 6px; }
.se-island {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.se-island:hover { border-color: var(--accent); }
.se-island.selected {
  border-color: var(--accent);
  background: rgba(20,184,166,0.08);
  color: var(--text);
  transform: scale(1.02);
}
.se-isle-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
}
.se-isle-dot.north { background: var(--north); }
.se-isle-dot.south { background: var(--south); }
.se-isle-dot.ferry { background: var(--ferry); }

.se-days-picker {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 4px;
  align-self: flex-start;
}
.se-days-btn {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: none;
  background: var(--bg3);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.08s;
}
.se-days-btn:hover:not(:disabled) { background: var(--accent); }
.se-days-btn:active:not(:disabled) { transform: scale(0.92); }
.se-days-btn:disabled { opacity: 0.35; cursor: default; }
#se-days-value {
  min-width: 76px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

/* Address search */
.se-search-wrap {
  position: relative;
  margin-bottom: 8px;
}
.se-search-input {
  padding-left: 38px;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
}
.se-search-spinner {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.se-search-spinner.visible { opacity: 1; }

.se-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 50;
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.se-search-results.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.se-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: background 0.12s;
}
.se-search-result:last-child  { border-bottom: none; }
.se-search-result:hover,
.se-search-result:focus       { background: var(--bg3); outline: none; }

.se-sr-icon { font-size: 1.15rem; flex-shrink: 0; }
.se-sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.se-sr-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-sr-sub  { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-sr-type {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 2px 6px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
}
.se-search-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.se-location-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.se-coords {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-coords.se-coords-set {
  color: var(--text);
  border-color: rgba(20,184,166,0.4);
  background: rgba(20,184,166,0.05);
}
.se-pick-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
  white-space: nowrap;
}
.se-pick-btn:hover  { background: #0d9488; }
.se-pick-btn:active { transform: scale(0.96); }

.se-footer {
  display: flex;
  gap: 8px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--card-border);
  background: var(--bg2);
  flex-shrink: 0;
}
.se-btn {
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.08s, border-color 0.15s;
}
.se-btn:active { transform: scale(0.97); }
.se-btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  flex: 1;
}
.se-btn-primary:hover { background: #0d9488; }
.se-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--card-border);
}
.se-btn-ghost:hover { background: var(--bg3); color: var(--text); }
.se-btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(239,68,68,0.4);
  display: none;
}
.se-btn-danger:hover { background: rgba(239,68,68,0.1); }

/* ── Map Pick Banner ── */
.map-pick-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-top, 0px));
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: white;
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 1500;
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.map-pick-banner.visible { transform: translateY(0); }
.mpb-icon { font-size: 1.3rem; animation: mpb-pulse 1.4s ease-in-out infinite; }
.mpb-text { flex: 1; }
.mpb-cancel {
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.mpb-cancel:hover { background: rgba(255,255,255,0.4); }

@keyframes mpb-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

/* ── "Neuer Stop" Button ── */
.stop-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(20,184,166,0.06);
  border: 1.5px dashed rgba(20,184,166,0.4);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.08s;
}
.stop-add-btn:hover  { background: rgba(20,184,166,0.12); border-color: var(--accent); }
.stop-add-btn:active { transform: scale(0.98); }
.stop-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
}

/* Highlight pulse for newly added / edited stops */
.stop-card.just-added {
  animation: stop-card-pulse 1.4s ease-out;
}
@keyframes stop-card-pulse {
  0%   { background: rgba(20,184,166,0.35); transform: scale(1.02); box-shadow: 0 0 0 0 rgba(20,184,166,0.6); }
  60%  { background: rgba(20,184,166,0.10); transform: scale(1);    box-shadow: 0 0 0 14px rgba(20,184,166,0); }
  100% { background: var(--card); }
}

/* Edit button in detail panel hero */
.dp-edit {
  position: absolute;
  top: 12px;
  right: 58px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.dp-edit:hover  { background: var(--accent); }
.dp-edit:active { transform: scale(0.92); }

@media (max-width: 860px) {
  .dp-edit  { top: max(14px, env(safe-area-inset-top, 14px)); right: 64px; width: 38px; height: 38px; }
  .dp-close { width: 38px; height: 38px; }
  .se-sheet { max-width: 100%; }
  .se-footer { flex-wrap: wrap; }
  .se-btn-danger { flex-basis: 100%; order: 3; }
  .se-btn-ghost  { flex: 1; }
  .se-btn-primary{ flex: 2; }
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg3);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  border: 1px solid var(--card-border);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

/* ── RESPONSIVE ── */
@media (max-width: 1080px) {
  :root { --sidebar-w: 280px; }
}

/* ============================================================
   MOBILE LAYOUT (≤ 860px)
   ============================================================ */
@media (max-width: 860px) {
  :root {
    --header-h: 92px;
    --mobile-nav-h: 60px;
  }

  /* ── App layout: stack vertically, panels swap via tab ── */
  #app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  }

  /* ── HEADER: compact, wraps stats into row ── */
  #header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    min-height: var(--header-h);
    row-gap: 6px;
  }

  .logo {
    font-size: 0.95rem;
    flex: 0 0 auto;
  }

  .header-subtitle { display: none; }
  .header-ducks    {
    display: flex;
    gap: 2px;
    padding: 0 2px;
    flex: 0 0 auto;
  }
  .header-ducks .duck { width: 30px; height: 24px; }
  .serancon-brand  {
    display: flex;
    margin-left: auto;
    padding: 3px 6px;
    border-left: none;
  }
  .serancon-by     { display: none; }
  .serancon-brand img { height: 18px; }

  .header-stats {
    order: 10;
    flex: 1 1 100%;
    margin-left: 0;
    gap: 0;
    justify-content: space-between;
    align-items: stretch;
  }

  .stat {
    flex: 1;
    align-items: center;
    gap: 1px;
  }
  .stat-value { font-size: 0.88rem; }
  .stat-label { font-size: 0.58rem; }

  .btn-reset {
    padding: 7px 10px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  /* ── Main area: only one panel visible at a time ── */
  #sidebar,
  #map-container {
    flex: 1;
    grid-row: unset;
    grid-column: unset;
    min-height: 0;
    width: 100%;
    border-left: none;
    border-right: none;
    display: none;
  }

  #app.mobile-tab-route #sidebar       { display: flex; }
  #app.mobile-tab-map   #map-container { display: block; }

  /* ── Bottom nav bar ── */
  #mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg2);
    border-top: 1px solid var(--card-border);
    z-index: 600;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.35);
  }

  .mobile-nav-btn {
    flex: 1;
    position: relative;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 9px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: inherit;
    cursor: pointer;
    min-height: var(--mobile-nav-h);
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -19px;
    width: 38px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
  }
  .mobile-nav-btn:active { background: rgba(255,255,255,0.04); }
  .mobile-nav-btn .mnav-icon  {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transition: transform 0.15s;
  }
  .mobile-nav-btn .mnav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
  }
  .mobile-nav-btn .mnav-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .mobile-nav-btn.active            { color: var(--accent); background: rgba(20,184,166,0.08); }
  .mobile-nav-btn.active::before    { opacity: 1; }
  .mobile-nav-btn.active .mnav-icon { transform: scale(1.08); }

  /* ── Sidebar/Route panel touch-friendly ── */
  .sidebar-head { padding: 14px 16px 12px; }
  .sidebar-head h2 { font-size: 0.78rem; }
  .island-legend { font-size: 0.72rem; gap: 12px; }

  #stop-list { padding: 10px 10px 24px; }

  .stop-card {
    padding: 12px 12px;
    gap: 10px;
    margin-bottom: 6px;
  }

  .drag-handle {
    font-size: 1.1rem;
    padding: 6px 4px;
    color: var(--text-muted);
    touch-action: none;
  }

  .stop-toggle {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    border-width: 2px;
  }

  .stop-name     { font-size: 0.92rem; }
  .stop-subtitle { font-size: 0.76rem; }

  .stop-days { gap: 6px; }
  .day-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    border-radius: 50%;
  }
  .days-badge {
    padding: 4px 10px;
    font-size: 0.78rem;
    min-width: 56px;
  }

  /* ── Map container fills available space ── */
  #map-container { position: relative; }
  #map { width: 100%; height: 100%; }

  .leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 1.2rem !important;
  }

  /* ── Detail panel: full screen on mobile ── */
  #detail-panel {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
  }

  .dp-hero { height: 220px; }
  .dp-hero-overlay { padding: 18px 18px; }
  .dp-hero-title { font-size: 1.5rem; }
  .dp-hero-subtitle { font-size: 0.85rem; }

  .dp-close {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    top: max(14px, env(safe-area-inset-top, 14px));
    right: 14px;
  }

  .dp-tab-btn {
    padding: 14px 6px;
    font-size: 0.8rem;
    min-height: 48px;
  }

  .dp-content { padding: 18px 16px 28px; }

  .dp-description { font-size: 0.9rem; }
  .dp-highlights-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
  .dp-highlight-card { padding: 11px 8px; gap: 5px; }
  .dp-highlight-icon  { font-size: 1.5rem; }
  .dp-highlight-label { font-size: 0.72rem; }

  .dp-activity-item { padding: 12px 14px; gap: 12px; }
  .dp-act-icon  { width: 38px; height: 38px; font-size: 1.4rem; }
  .dp-act-name  { font-size: 0.88rem; }
  .dp-act-type  { font-size: 0.7rem; }
  .dp-act-price { font-size: 0.92rem; }

  .dp-camp-item { padding: 12px 14px; }
  .dp-camp-name { font-size: 0.88rem; }
  .dp-camp-price { font-size: 0.88rem; }

  .dp-tip-item { font-size: 0.85rem; padding: 12px 14px; }

  /* ── Activity photo overlay: full screen ── */
  .act-overlay-img-wrap { height: 44%; }
  .act-overlay-back {
    padding: 9px 14px;
    font-size: 0.82rem;
    top: max(14px, env(safe-area-inset-top, 14px));
    left: 14px;
  }
  .act-overlay-body { padding: 18px 18px 28px; }
  .act-overlay-title { font-size: 1.2rem; }
  .act-overlay-price { font-size: 1.15rem; }
  .act-overlay-extract { font-size: 0.88rem; }
  .act-overlay-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .act-overlay-nav.prev { left: 8px; }
  .act-overlay-nav.next { right: 8px; }
  .act-overlay-counter { top: max(14px, env(safe-area-inset-top, 14px)); }

  /* Toast lifts above mobile nav bar */
  .toast {
    bottom: calc(var(--mobile-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Small phones (≤ 400px): tighter typography ── */
@media (max-width: 400px) {
  .logo { font-size: 0.88rem; }
  .stat-value { font-size: 0.82rem; }
  .stat-label { font-size: 0.55rem; }
  .btn-reset  { padding: 6px 8px; font-size: 0.66rem; }
  .dp-hero-title { font-size: 1.3rem; }
  .dp-highlights-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* ── FLUG-SEKTION ─────────────────────────────────────────── */
.flight-section {
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 4px;
}
.flight-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.flight-section-head:hover { background: rgba(255,255,255,0.04); }
.flight-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.flight-section-toggle {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.flight-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
}
.flight-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.flight-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.flight-route-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.flight-airport {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.flight-select {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 6px;
  width: 100%;
  cursor: pointer;
  outline: none;
}
.flight-select:focus { border-color: #f59e0b; }
.flight-city {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding-left: 2px;
}
.flight-arrow {
  font-size: 1rem;
  color: #f59e0b;
  flex-shrink: 0;
  margin: 0 2px;
}
.flight-meta-row {
  display: flex;
  gap: 5px;
}
.flight-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.73rem;
  padding: 5px 6px;
  outline: none;
  min-width: 0;
}
.flight-input:focus { border-color: #f59e0b; }
.flight-nr   { flex: 1.2; }
.flight-date { flex: 1.8; }
.flight-time { flex: 1.1; }
.flight-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.flight-link {
  font-size: 0.7rem;
  color: #60a5fa;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.2);
  transition: background 0.15s;
}
.flight-link:hover { background: rgba(96,165,250,0.22); }
.flight-links-hint {
  font-size: 0.67rem;
  color: var(--text-muted);
  font-style: italic;
}
.flight-airport-fixed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 5px 8px;
}
.flight-airport-fixed strong {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 0.04em;
}
.flight-airport-fixed span {
  font-size: 0.67rem;
  color: var(--text-muted);
}
