/* Cruise Europe v5 — tourist atlas / TV mode */
body.cruise-tv-mode #map {
  background:#d8d7bd;
  isolation:isolate;
}
body.cruise-tv-mode #capital-card,
body.cruise-tv-mode #nextdest-card { display:none !important; }

body.cruise-tv-mode #map .maplibregl-map,
body.cruise-tv-mode #map .maplibregl-canvas-container,
body.cruise-tv-mode #map .maplibregl-canvas { width:100%; height:100%; }
body.cruise-tv-mode #map .maplibregl-control-container { display:none !important; }

/* Paper/atlas finish over the live vector map. */
body.cruise-tv-mode #map::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:430;
  pointer-events:none;
  opacity:.20;
  mix-blend-mode:multiply;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(85,109,67,.10) 0 1px, transparent 1.4px),
    radial-gradient(circle at 78% 66%, rgba(126,104,70,.08) 0 1px, transparent 1.5px),
    repeating-linear-gradient(0deg, rgba(92,74,48,.022) 0, rgba(92,74,48,.022) 1px, transparent 1px, transparent 5px);
  background-size:17px 17px,23px 23px,100% 6px;
}

/* Make the existing cruise progress look like part of the tourist map, not a dark dashboard bar. */
body.cruise-tv-mode #cruise-progress {
  z-index:5100 !important;
  top:14px !important;
  left:16px !important;
  right:16px !important;
  border-radius:18px !important;
  border:1px solid rgba(54,87,78,.28) !important;
  background:rgba(250,247,229,.88) !important;
  box-shadow:0 8px 24px rgba(48,61,47,.16) !important;
  backdrop-filter:blur(8px) saturate(.86);
  -webkit-backdrop-filter:blur(8px) saturate(.86);
  padding:10px 14px !important;
  color:#274d56 !important;
}
body.cruise-tv-mode #cruise-progress .cp-title,
body.cruise-tv-mode #cruise-progress .cp-pct,
body.cruise-tv-mode #cruise-progress b,
body.cruise-tv-mode #cruise-progress strong { color:#254f59 !important; }
body.cruise-tv-mode #cruise-progress .cp-meta,
body.cruise-tv-mode #cruise-progress .muted { color:#6e786c !important; }
body.cruise-tv-mode #cruise-progress .cp-bar,
body.cruise-tv-mode #cruise-progress .progress-track,
body.cruise-tv-mode #cruise-progress [class*="track"] {
  background:rgba(70,98,83,.13) !important;
  border-color:rgba(70,98,83,.14) !important;
}
body.cruise-tv-mode #cruise-progress .cp-fill,
body.cruise-tv-mode #cruise-progress [class*="fill"] {
  background:linear-gradient(90deg,#22a8e8,#0e86c4) !important;
  box-shadow:0 0 14px rgba(34,168,232,.42) !important;
}

/* Tourist atlas heading. */
#cruise-tour-title {
  position:absolute;
  left:22px;
  top:86px;
  z-index:5050;
  display:none;
  width:248px;
  box-sizing:border-box;
  padding:13px 16px 12px;
  border-radius:15px;
  border:1px solid rgba(53,83,76,.27);
  background:rgba(249,246,225,.91);
  color:#294f56;
  box-shadow:0 10px 28px rgba(45,57,44,.18);
  backdrop-filter:blur(8px) saturate(.85);
  -webkit-backdrop-filter:blur(8px) saturate(.85);
  pointer-events:none;
}
body.cruise-tv-mode #cruise-tour-title { display:block; }
#cruise-tour-title .ct-title-main {
  font-family:Georgia,"Times New Roman",serif;
  font-size:24px;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1;
  color:#244c59;
}
#cruise-tour-title #ct-corridor {
  margin-top:7px;
  font-size:12px;
  font-weight:800;
  color:#64725f;
  letter-spacing:.035em;
}
#cruise-tour-title .ct-vessel {
  display:inline-flex;
  align-items:center;
  margin-top:8px;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(31,153,209,.10);
  border:1px solid rgba(31,153,209,.24);
  color:#167dab;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}

/* Around your cruise panel: a small editorial strip, not a dashboard card. */
#cruise-coming-up {
  position:absolute;
  top:86px;
  right:22px;
  z-index:5050;
  display:none;
  width:330px;
  box-sizing:border-box;
  padding:11px 12px 10px;
  border-radius:16px;
  border:1px solid rgba(56,87,76,.24);
  background:rgba(250,247,229,.90);
  color:#294d54;
  box-shadow:0 10px 28px rgba(48,60,46,.17);
  backdrop-filter:blur(8px) saturate(.85);
  -webkit-backdrop-filter:blur(8px) saturate(.85);
  pointer-events:none;
}
body.cruise-tv-mode #cruise-coming-up { display:block; }
#cruise-coming-up .cu-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 2px 8px;
  color:#6c755f;
  font-size:9px;
  font-weight:900;
  letter-spacing:.15em;
}
#cruise-coming-up .cu-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#37a86c;
  box-shadow:0 0 0 4px rgba(55,168,108,.12);
}
#cu-items { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
#cu-items .cu-item {
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:5px;
}
#cu-items .cu-item img,
#cu-items .cu-icon {
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid rgba(255,253,242,.98);
  box-shadow:0 0 0 1px rgba(65,91,77,.26),0 5px 12px rgba(47,61,46,.20);
  background:#dde2ce;
}
#cu-items .cu-icon { display:flex; align-items:center; justify-content:center; color:#4d8f58; }
#cu-items .cu-icon svg { width:24px; height:24px; fill:currentColor; }
#cu-items .cu-item strong {
  display:block;
  max-width:92px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#2c5054;
  font-size:10px;
  line-height:1.1;
}
#cu-items .cu-item span {
  display:block;
  margin-top:2px;
  color:#758074;
  font-size:8px;
  line-height:1.15;
}
#cu-items .cu-empty { grid-column:1/-1; padding:10px 4px; color:#758074; font-size:11px; }

/* Photo callouts: circular image + editorial caption + leader to exact map point. */
.cruise-tour-marker,
.cruise-port-marker {
  background:transparent !important;
  border:0 !important;
  overflow:visible !important;
}
.cruise-poi-stack {
  position:relative;
  width:190px;
  height:170px;
  transform-origin:50% 91%;
  pointer-events:auto;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  animation:cruisePoiFloat 6.4s ease-in-out infinite;
}
.cruise-poi-stack::before {
  content:"";
  position:absolute;
  left:56px;
  top:6px;
  width:82px;
  height:82px;
  border-radius:50%;
  background:rgba(255,255,246,.28);
  filter:blur(8px);
}
.cruise-poi-photo {
  position:absolute;
  left:50%;
  top:2px;
  width:88px;
  height:88px;
  margin-left:-44px;
  border-radius:50%;
  overflow:hidden;
  background:#d9dfca;
  border:5px solid #fffaf0;
  box-shadow:0 0 0 1px rgba(61,86,73,.30),0 11px 20px rgba(48,61,45,.24);
  box-sizing:border-box;
  z-index:4;
  transition:transform .20s ease,box-shadow .20s ease;
}
.cruise-poi-stack:hover .cruise-poi-photo {
  transform:translateY(-4px) scale(1.07);
  box-shadow:0 0 0 1px rgba(41,125,165,.34),0 15px 25px rgba(42,58,45,.31);
}
.cruise-poi-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.cruise-poi-photo-fallback { width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#4b8558;background:linear-gradient(145deg,#eef1dc,#cbd8ba); }
.cruise-poi-photo-fallback svg { width:34px;height:34px;fill:currentColor; }
.cruise-poi-caption {
  position:absolute;
  top:94px;
  left:11px;
  right:11px;
  z-index:5;
  min-height:33px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:5px 9px;
  box-sizing:border-box;
  color:#294f54;
  background:rgba(250,247,229,.94);
  border:1px solid rgba(70,94,80,.25);
  border-radius:999px;
  box-shadow:0 5px 12px rgba(45,58,44,.14);
  white-space:nowrap;
}
.cruise-poi-caption strong {
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  font-family:Georgia,"Times New Roman",serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.005em;
}
.cruise-poi-cat {
  flex:0 0 auto;
  width:21px;
  height:21px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  color:white;
  background:#9258b6;
  box-shadow:0 2px 6px rgba(65,52,82,.18);
}
.cruise-poi-cat svg { width:13px;height:13px;fill:currentColor; }
.cruise-poi-stack--scenic .cruise-poi-cat { background:#589f50; }
.cruise-poi-stack--culture .cruise-poi-cat { background:#d98430; }
.cruise-poi-stack--castle .cruise-poi-cat { background:#8055ad; }
.cruise-poi-leader {
  position:absolute;
  z-index:2;
  left:50%;
  top:126px;
  width:1px;
  height:29px;
  background:linear-gradient(180deg,rgba(67,77,65,.68),rgba(67,77,65,.25));
}
.cruise-poi-mapdot {
  position:absolute;
  z-index:3;
  left:50%;
  top:152px;
  width:8px;
  height:8px;
  margin-left:-4px;
  border-radius:50%;
  background:#2398d2;
  border:2px solid #fffaf0;
  box-shadow:0 0 0 1px rgba(39,90,108,.44),0 0 10px rgba(35,152,210,.38);
  box-sizing:border-box;
}
.cruise-tour-marker--compact .cruise-poi-stack { transform:scale(.76); animation:none; }
.cruise-tour-marker--compact .cruise-poi-caption { opacity:.96; }
.cruise-image-failed .cruise-poi-photo { background:linear-gradient(145deg,#e9edda,#c9d6ba); }
@keyframes cruisePoiFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }

/* Cruise ports: unmistakable anchors, with a gentle TV-friendly pulse. */
.cruise-port-pin {
  position:relative;
  width:145px;
  height:42px;
  display:flex;
  align-items:center;
  gap:6px;
  color:#173e52;
  text-shadow:0 1px 0 rgba(255,255,255,.92),0 0 6px rgba(255,255,255,.82);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-weight:900;
  pointer-events:none;
}
.cruise-port-pin strong { font-size:13px; letter-spacing:-.01em; }
.cruise-port-ring {
  position:relative;
  width:33px;
  height:33px;
  flex:0 0 33px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#f8fbf2;
  border:2px solid #168ed0;
  box-shadow:0 3px 10px rgba(31,83,104,.24);
}
.cruise-port-ring::before {
  content:"";
  position:absolute;
  inset:-5px;
  border:2px solid rgba(26,155,220,.48);
  border-radius:50%;
  animation:cruisePortPulse 2.8s ease-out infinite;
}
.cruise-port-icon { width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#168ed0;color:#fff; }
.cruise-port-icon svg { width:16px;height:16px;fill:currentColor; }
@keyframes cruisePortPulse { 0%{transform:scale(.78);opacity:.78} 70%,100%{transform:scale(1.42);opacity:0} }

/* Large POI popup. */
.cruise-photo-popup .leaflet-popup-content-wrapper {
  padding:0 !important;
  overflow:hidden;
  border-radius:20px !important;
  background:#fbf8e8 !important;
  border:1px solid rgba(69,98,82,.35);
  box-shadow:0 18px 46px rgba(43,58,45,.34) !important;
}
.cruise-photo-popup .leaflet-popup-content { margin:0 !important; width:400px !important; max-width:min(400px,72vw) !important; }
.cruise-photo-popup .leaflet-popup-tip { background:#fbf8e8 !important; }
.cruise-photo-popup-card { color:#294b50; font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; }
.cruise-popup-photo { display:block;width:100%;height:205px;object-fit:cover;background:#d5dbc9; }
.cruise-popup-copy { padding:15px 18px 18px; }
.cruise-popup-kicker { margin-bottom:5px;color:#268bb0;font-size:10px;font-weight:900;letter-spacing:.15em; }
.cruise-photo-popup h3 { margin:0 0 7px;color:#24536a;font-family:Georgia,"Times New Roman",serif;font-size:23px;line-height:1.12; }
.cruise-photo-popup p { margin:0;color:#596d64;font-size:13px;line-height:1.48; }
.cruise-photo-credit { margin-top:10px;color:#879187;font-size:9px; }

/* Small source legend. */
#cruise-map-badge {
  position:absolute;
  left:20px;
  bottom:18px;
  z-index:5150;
  display:none;
  align-items:center;
  gap:9px;
  max-width:440px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(250,247,231,.91);
  border:1px solid rgba(67,97,83,.26);
  color:#31525b;
  font-size:10px;
  font-weight:800;
  pointer-events:none;
  box-shadow:0 6px 18px rgba(55,69,51,.17);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
body.cruise-tv-mode #cruise-map-badge { display:flex; }
#cruise-map-badge .river-swatch {
  width:34px;
  height:6px;
  border-radius:999px;
  background:#159ee4;
  box-shadow:0 0 0 2px #f7fdff,0 0 10px rgba(21,158,228,.64);
}

/* TV remote: tiny ribbon when idle, instructional panel only while keys are being used. */
#cruise-tv-hud {
  position:absolute;
  right:20px;
  bottom:18px;
  z-index:5200;
  display:none;
  pointer-events:none;
  color:#294e56;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
body.cruise-tv-mode #cruise-tv-hud { display:block; }
#cruise-tv-hud .ctv-compact {
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(250,247,230,.88);
  border:1px solid rgba(66,96,83,.25);
  box-shadow:0 6px 18px rgba(52,66,50,.17);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  font-size:10px;
  font-weight:700;
  transition:opacity .18s ease,transform .18s ease;
}
#cruise-tv-hud .ctv-compact b { color:#187fac; }
#cruise-tv-hud .ctv-dpad-mini { letter-spacing:-1px;color:#1c88b6;font-weight:900; }
#cruise-tv-hud .ctv-green { color:#2ba56b;font-size:16px;line-height:8px; }
#cruise-tv-hud .ctv-expanded {
  display:none;
  width:300px;
  padding:13px 14px;
  border-radius:18px;
  background:rgba(250,247,230,.95);
  border:1px solid rgba(66,96,83,.29);
  box-shadow:0 13px 32px rgba(47,61,46,.24);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
#cruise-tv-hud.cruise-tv-hud--awake .ctv-compact { display:none; }
#cruise-tv-hud.cruise-tv-hud--awake .ctv-expanded { display:block; animation:cruiseHudIn .18s ease-out; }
#cruise-tv-hud .ctv-title { margin-bottom:9px;color:#65705f;font-size:9px;font-weight:900;letter-spacing:.14em; }
#cruise-tv-hud .ctv-row { display:grid;grid-template-columns:76px 1fr;align-items:center;gap:9px;padding:4px 0;color:#425f61;font-size:11px; }
#cruise-tv-hud .ctv-key { display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:0 7px;border-radius:8px;background:#eef0e1;border:1px solid rgba(64,91,80,.22);color:#295766;font-size:10px;font-weight:900;box-sizing:border-box; }
#cruise-tv-hud .ctv-key-green { background:#e1f0e3;color:#2e7953;border-color:#9fc9aa; }
#cruise-tv-hud .ctv-key-blue { background:#dfedf3;color:#216d8c;border-color:#9fc2d0; }
@keyframes cruiseHudIn { from{opacity:0;transform:translateY(5px) scale(.98)} to{opacity:1;transform:none} }

#cruise-tv-crosshair {
  position:absolute;
  left:50%;
  top:50%;
  width:42px;
  height:42px;
  margin:-21px 0 0 -21px;
  z-index:5150;
  pointer-events:none;
  opacity:0;
  transition:opacity .2s ease;
}
#cruise-tv-crosshair::before,#cruise-tv-crosshair::after {
  content:"";
  position:absolute;
  background:rgba(255,255,247,.98);
  box-shadow:0 0 0 1px rgba(20,104,143,.44),0 0 8px rgba(21,158,233,.55);
}
#cruise-tv-crosshair::before { left:20px;top:0;width:2px;height:42px; }
#cruise-tv-crosshair::after { left:0;top:20px;width:42px;height:2px; }
body.cruise-tv-mode.cruise-manual #cruise-tv-crosshair { opacity:.9; }

@media (min-width:1500px) {
  #cruise-tour-title { left:26px;top:92px;width:278px;padding:15px 18px 14px; }
  #cruise-tour-title .ct-title-main { font-size:28px; }
  #cruise-tour-title #ct-corridor { font-size:13px; }
  #cruise-coming-up { right:26px;top:92px;width:372px;padding:13px 14px 12px; }
  #cu-items .cu-item img,#cu-items .cu-icon { width:60px;height:60px; }
  #cu-items .cu-item strong { max-width:106px;font-size:11px; }
  .cruise-poi-stack { transform:scale(1.05); }
  .cruise-tour-marker--compact .cruise-poi-stack { transform:scale(.80); }
  .cruise-port-pin strong { font-size:14px; }
  #cruise-tv-hud .ctv-compact { font-size:11px;padding:9px 13px; }
  #cruise-tv-hud .ctv-expanded { width:330px;padding:15px 16px; }
  #cruise-tv-hud .ctv-row { font-size:12px; }
  #cruise-map-badge { font-size:11px; }
}

@media (max-width:1050px) {
  #cruise-tour-title { top:80px;left:14px;width:210px; }
  #cruise-tour-title .ct-title-main { font-size:20px; }
  #cruise-coming-up { top:80px;right:14px;width:280px; }
  #cu-items .cu-item img,#cu-items .cu-icon { width:44px;height:44px; }
  #cu-items .cu-item strong { max-width:74px;font-size:9px; }
  #cruise-tv-hud { right:12px;bottom:12px; }
  #cruise-map-badge { left:12px;bottom:12px;max-width:48%;white-space:normal; }
}

@media (max-width:760px) {
  #cruise-coming-up { display:none !important; }
  #cruise-tour-title { width:190px; }
  #cruise-tv-hud .ctv-compact span:nth-child(n+4) { display:none; }
  .cruise-poi-stack { transform:scale(.80); }
  .cruise-tour-marker--compact .cruise-poi-stack { transform:scale(.66); }
}

/* Live vessel emphasis: expanding rings around the real GPS marker. */
.cruise-vessel-aura-marker { background:transparent !important;border:0 !important;pointer-events:none !important; }
.cruise-vessel-aura { position:relative;width:86px;height:86px; }
.cruise-vessel-aura::before,
.cruise-vessel-aura::after,
.cruise-vessel-aura span {
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:28px;height:28px;
  margin:-14px 0 0 -14px;
  border-radius:50%;
  border:2px solid rgba(20,155,220,.70);
  box-sizing:border-box;
  animation:cruiseVesselPulse 3.2s ease-out infinite;
}
.cruise-vessel-aura::after { animation-delay:1.05s; }
.cruise-vessel-aura span { animation-delay:2.10s; }
.cruise-vessel-aura i {
  position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;
  background:rgba(29,166,225,.18);box-shadow:0 0 18px rgba(29,166,225,.55);
}
@keyframes cruiseVesselPulse { 0%{transform:scale(.65);opacity:.84} 75%,100%{transform:scale(2.65);opacity:0} }
body.cruise-tv-mode #map .leaflet-tooltip.my-label {
  border-radius:999px !important;
  padding:7px 12px !important;
  background:linear-gradient(180deg,rgba(32,163,224,.96),rgba(16,130,192,.96)) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.72) !important;
  box-shadow:0 7px 18px rgba(20,83,113,.25) !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.02em !important;
}
