:root {
  --bg-primary: #0a0514;
  --bg-secondary: #110b20;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.06);
  --accent-color: #a855f7;
  --accent-gold: #fbbf24;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* App Bar styling */
.appbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 9990 !important;
  background: rgba(17, 11, 32, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  padding: 0.75rem 0;
}
.appbar-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #c084fc, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.langbar {
  display: flex;
  gap: 0.4rem;
}
.btn-lang {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-weight: bold;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-lang:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.btn-lang.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* Screen layout */
.screen {
  display: none;
  min-height: calc(100vh - 120px);
  padding: 1.5rem 0 6rem;
  animation: fadeIn 0.3s ease-in-out forwards;
}
.screen.active {
  display: block;
}
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.hero p {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
}

/* Stat Grid */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}
.card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 0.3rem;
}
.stat-big {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-color);
}
.stat-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stat-icon {
  font-size: 1.1rem;
}
.stat-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.stat-flags {
  display: inline-flex;
  gap: 3px;
}

/* Flags Pack */
.fl {
  width: 20px;
  height: 13px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}
.flag-it { background: linear-gradient(90deg, #009246 33%, #ffffff 33% 66%, #ce2b37 66%); }
.flag-at { background: linear-gradient(#ed2939 33%, #ffffff 33% 66%, #ed2939 66%); }
.flag-de { background: linear-gradient(#000 33%, #dd0000 33% 66%, #ffce00 66%); }
.flag-fr { background: linear-gradient(90deg, #0055a4 33%, #ffffff 33% 66%, #ef4135 66%); }
.flag-ch {
  background: #d52b1e;
  position: relative;
}
.flag-ch::before {
  content: "";
  position: absolute;
  background: #fff;
  left: 8px;
  top: 2px;
  width: 2px;
  height: 7px;
}
.flag-ch::after {
  content: "";
  position: absolute;
  background: #fff;
  left: 5px;
  top: 4px;
  width: 8px;
  height: 2px;
}

/* Section elements */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

/* Days Grid Layout */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.day-card {
  text-align: right;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid var(--border-card);
}
.day-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
}
.day-card b {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.day-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
}
.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.flagpack {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Detail Screen actions */
.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent-color), #6366f1);
  border: none;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}
.btn.primary:hover {
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}
.btn.sun {
  background: linear-gradient(135deg, var(--accent-gold), #ea580c);
  border: none;
  color: #110b20;
}
.btn.waze {
  background: linear-gradient(135deg, #33ccff, #0d8bd9);
  border: none;
  color: white;
}
.seg {
  display: flex;
  gap: 0.5rem;
}

/* Day Head grid layout */
.day-head {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.map-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 16px;
  display: block;
  margin: 12px auto;
}
.map-card {
  min-height: 250px;
  background: var(--bg-card);
  border-radius: 24px;
}
.info-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
}
.route-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Split grid */
.grid2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

/* Stops accordion styling */
.stop-accordion {
  border: 1px solid var(--border-card);
  background: rgba(255,255,255,0.01);
  border-radius: 16px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: all 0.2s;
}
.stop-accordion[open] {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255,255,255,0.1);
}
.stop-header-summary {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
  font-weight: bold;
}
.stop-header-summary::-webkit-details-marker {
  display: none;
}
.stop-time-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stop-time {
  background: linear-gradient(135deg, var(--accent-color), #6366f1);
  color: white;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2);
}
.stop-title-text {
  font-size: 1.05rem;
  color: var(--text-primary);
}
.stop-expand-icon {
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: transform 0.2s;
}
.stop-accordion[open] .stop-expand-icon {
  transform: rotate(45deg);
}
.stop-content-body {
  padding: 1rem;
  border-top: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stop-photo {
  width: 100%;
  height: clamp(160px, 30vh, 260px);
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: #110b20;
}
.stop-desc-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.stop-links-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Premium stop buttons */
.btn-stop-link {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  transition: all 0.2s;
}
.btn-stop-link:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.02);
}
.btn-stop-link.waze-btn {
  background: rgba(51, 204, 255, 0.15);
  border-color: rgba(51, 204, 255, 0.3);
  color: #33ccff;
}
.btn-stop-link.waze-btn:hover {
  background: #33ccff;
  color: white;
}
.btn-stop-link.gmaps-btn {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}
.btn-stop-link.gmaps-btn:hover {
  background: #6366f1;
  color: white;
}
.btn-stop-link.parking-btn {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--accent-gold);
}
.btn-stop-link.parking-btn:hover {
  background: var(--accent-gold);
  color: #110b20;
}
.btn-stop-link.tickets-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.btn-stop-link.tickets-btn:hover {
  background: #10b981;
  color: white;
}

/* Cost panel styling */
.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.cost-row:last-child {
  border-bottom: none;
}

/* Daily Songs elements */
.daily-song-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-card);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  gap: 0.5rem;
}
.play-song-btn {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}
.play-song-btn:hover {
  background: var(--accent-color);
  color: white;
}

/* Bottom Nav bar fixed */
.bottomnav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
  width: min(580px, 94vw) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(17, 11, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 26px !important;
  padding: 0.4rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.4rem !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch !important;
}
.bottomnav button {
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.6rem 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s;
}
.bottomnav button.active {
  background: linear-gradient(135deg, var(--accent-color), #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Global Floating Music Player widget */
.global-music-player {
  position: fixed;
  z-index: 85;
  right: 1.5rem;
  bottom: 6.5rem;
  background: rgba(20, 15, 36, 0.95);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 0.8rem 1rem;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.global-player-inner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.vinyl-wrapper {
  perspective: 100px;
}
.vinyl {
  font-size: 2.2rem;
  animation: spin 3s linear infinite paused;
  display: inline-block;
  user-select: none;
}
.vinyl.spinning {
  animation-play-state: running;
}
.track-details {
  flex-grow: 1;
  overflow: hidden;
}
.track-title {
  font-weight: bold;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-controls {
  display: flex;
  gap: 0.3rem;
}
.player-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.1s;
}
.player-btn:active {
  transform: scale(0.85);
}

/* Weird facts popup modal styling */
.fact-modal, .diploma-modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.fact-modal.active, .diploma-modal.active {
  display: flex;
}
.fact-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  width: min(480px, 92vw);
  padding: 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: popupScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fact-close-x {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}
#fact-illustration-box {
  margin: 0.5rem auto 1.5rem;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fact-svg {
  width: 100%;
  height: 100%;
}
.fact-popup-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
}
.fact-popup-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-align: justify;
}
.fact-confirm-btn {
  background: linear-gradient(135deg, var(--accent-gold), #ea580c);
  border: none;
  border-radius: 12px;
  color: #110b20;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 5px 15px rgba(251, 191, 36, 0.25);
  transition: transform 0.2s;
}
.fact-confirm-btn:hover {
  transform: scale(1.02);
}

/* Checklist grouping country blocks */
.country-checklist-card {
  margin-bottom: 1.5rem;
}
.country-checklist-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-card);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.check-item input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-color);
}
.check-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.check-item input:checked + span {
  color: white;
  text-decoration: none;
}
.check-item:has(input:checked) {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.25);
}

/* Traveler Tab Switcher row */
.diploma-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.diploma-name-grid .btn-traveler-select {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-card);
  padding: 1rem 0.5rem;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.diploma-name-grid .btn-traveler-select.active {
  background: linear-gradient(135deg, var(--accent-color), #6366f1);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 4px 15px rgba(168,85,247,0.3);
}

/* Premium printable diploma */
.diploma-modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 20px;
  width: min(840px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.cert-print-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cert-print-row button {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.85rem;
}
.print-btn {
  background: #a855f7;
  color: white;
}
.close-btn {
  background: #e5e7eb;
  color: #1f2937;
}
.certificate-container {
  background: white;
  border: 15px double #8a6d3b;
  padding: 2.5rem;
  color: #2c3e50;
  text-align: center;
  font-family: Georgia, serif;
}
.cert-border-inner {
  border: 2px solid #8a6d3b;
  padding: 2rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.cert-badge {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}
.cert-title {
  font-size: 2.4rem;
  font-weight: bold;
  color: #8a6d3b;
  margin-bottom: 0.25rem;
}
.cert-subtitle {
  font-size: 1.15rem;
  font-style: italic;
  color: #555;
}
.cert-divider {
  font-size: 1.25rem;
  color: #8a6d3b;
  margin: 1.5rem 0;
}
.cert-awarded-to {
  font-size: 1.1rem;
  color: #666;
}
.cert-recipient-name {
  font-size: 2.2rem;
  font-weight: bold;
  color: #110b20;
  margin: 0.5rem 0;
  border-bottom: 2px solid #8a6d3b;
  padding-bottom: 0.25rem;
  width: fit-content;
}
.cert-body {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin: 1.5rem 0;
  max-width: 600px;
}
.cert-signatures {
  width: 100%;
  display: flex;
  justify-content: space-around;
  margin-top: 2rem;
  gap: 2rem;
}
.signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sig-line {
  font-family: "Brush Script MT", cursive, sans-serif;
  font-size: 1.7rem;
  border-bottom: 1px solid #777;
  width: 160px;
  padding-bottom: 5px;
  color: #333;
}
.sig-title {
  font-size: 0.75rem;
  color: #666;
  margin-top: 5px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes popupScale {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Graphical timelines */
.graphical-route-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 1rem 0.5rem;
}
.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}
.node-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-color);
  transition: transform 0.2s;
}
.timeline-node:hover .node-dot {
  transform: scale(1.3);
  background: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold);
}
.node-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.timeline-line {
  flex-grow: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-gold));
  min-width: 40px;
  z-index: 1;
  opacity: 0.5;
}
[dir="rtl"] .timeline-line {
  background: linear-gradient(270deg, var(--accent-color), var(--accent-gold));
}

/* Print CSS */
@media print {
  body * {
    visibility: hidden;
  }
  #diploma-cert-modal, #diploma-cert-modal *, #printable-certificate, #printable-certificate * {
    visibility: visible;
  }
  #diploma-cert-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
  }
  .diploma-modal-content {
    width: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
  .cert-print-row {
    display: none;
  }
  .certificate-container {
    border: 15px double #8a6d3b;
    width: 100%;
    margin: 0;
    page-break-inside: avoid;
  }
}

/* iPhones / Mobile & Tablet responsiveness */
@media (max-width: 820px) {
  .day-head {
    grid-template-columns: 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .appbar-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
  }
  .bottomnav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
  width: min(580px, 94vw) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(17, 11, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 26px !important;
  padding: 0.4rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.4rem !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch !important;
}
  .bottomnav button {
    font-size: 0.72rem;
    padding: 8px 4px;
    border-radius: 14px;
  }
  .bottomnav button .nav-label {
    display: none; /* Hide text labels on narrow screens to fit icons cleanly */
  }
  .global-music-player {
    right: 3%;
    left: 3%;
    width: 94%;
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
  }
  .slideshow-container {
    max-height: 220px;
    border-radius: 16px;
  }
  .slideshow-slide img {
    height: 220px;
  }
  .rating-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .rating-pills {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }
  .card {
    padding: 14px;
    border-radius: 18px;
  }
  .stop {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .time {
    font-size: 15px;
  }
  .bottomnav button {
    font-size: 0.85rem;
    padding: 6px 2px;
  }
  .diploma-modal-content {
    width: 96vw;
    padding: 12px;
  }
}

/* Rating Checklist Styling */
.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s, transform 0.2s;
  gap: 12px;
}
.rating-row:hover {
  background: rgba(255, 255, 255, 0.08);
}
.rating-label {
  text-align: start;
  flex: 1;
  min-width: 0;
}
.rating-label b {
  font-size: 14px;
  display: block;
  color: #fff;
}
.rating-desc {
  font-size: 11px;
  color: #aaa;
  display: block;
  margin-top: 2px;
}
.rating-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.rating-pills .pill {
  width: 38px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}
.rating-pills .pill:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* Active selected states */
.rating-pills .pill-0.active {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #0a0514 !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.rating-pills .pill-1.active {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  transform: scale(1.12);
}
.rating-pills .pill-2.active {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #110b20 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transform: scale(1.12);
}
.rating-pills .pill-3.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  transform: scale(1.12);
}

/* ==========================================================================
   ELEGANT & ROMANTIC THEME (Montenegro Ortal & Alex Getaway)
   ========================================================================== */
body.theme-montenegro-romantic {
  background: linear-gradient(135deg, #fff0f5 0%, #fdf2f8 35%, #fae8ff 70%, #fef2f2 100%) !important;
  color: #3b0764 !important;
}

body.theme-montenegro-romantic .appbar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(244, 114, 182, 0.3) !important;
  box-shadow: 0 8px 30px rgba(244, 114, 182, 0.15) !important;
}

body.theme-montenegro-romantic .brand {
  color: #be185d !important;
  text-shadow: none;
}

body.theme-montenegro-romantic .hero {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.95) 0%, rgba(168, 85, 247, 0.9) 50%, rgba(251, 146, 60, 0.9) 100%) !important;
  box-shadow: 0 20px 50px rgba(225, 29, 72, 0.25) !important;
  border: 1px solid rgba(254, 205, 211, 0.6) !important;
  border-radius: 32px;
}

body.theme-montenegro-romantic .hero h1 {
  text-shadow: 0 4px 20px rgba(136, 19, 55, 0.6) !important;
  color: #ffffff !important;
}

body.theme-montenegro-romantic .card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(244, 114, 182, 0.25) !important;
  color: #3b0764 !important;
  box-shadow: 0 14px 35px rgba(244, 114, 182, 0.12) !important;
  backdrop-filter: blur(16px);
  border-radius: 26px;
}

body.theme-montenegro-romantic .card:hover {
  border-color: rgba(244, 114, 182, 0.5) !important;
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.2) !important;
}

body.theme-montenegro-romantic .stop-title,
body.theme-montenegro-romantic h1,
body.theme-montenegro-romantic h2,
body.theme-montenegro-romantic h3,
body.theme-montenegro-romantic b {
  color: #831843 !important;
}

body.theme-montenegro-romantic p {
  color: #4a044e !important;
}

body.theme-montenegro-romantic .chip {
  background: #fce7f3 !important;
  color: #831843 !important;
  border: 1px solid #fbcfe8 !important;
}

body.theme-montenegro-romantic .btn {
  background: #ffffff !important;
  color: #831843 !important;
  border: 1px solid #fbcfe8 !important;
}

body.theme-montenegro-romantic .btn.primary,
body.theme-montenegro-romantic .btn.sun {
  background: linear-gradient(135deg, #e11d48 0%, #c084fc 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.3) !important;
}

body.theme-montenegro-romantic .bottomnav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
  width: min(580px, 94vw) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(17, 11, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 26px !important;
  padding: 0.4rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.4rem !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch !important;
}

body.theme-montenegro-romantic .bottomnav button {
  background: #fdf2f8 !important;
  color: #831843 !important;
}

body.theme-montenegro-romantic .bottomnav button.active {
  background: linear-gradient(135deg, #e11d48, #a855f7) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.4) !important;
}

/* Dark Mode Styles */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
  color: #f8fafc !important;
}

body.dark-mode .appbar {
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom: 1px solid #334155 !important;
}

body.dark-mode .card {
  background: rgba(30, 41, 59, 0.88) !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .stop-title,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode b {
  color: #38bdf8 !important;
}

body.dark-mode p {
  color: #cbd5e1 !important;
}

body.dark-mode .bottomnav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
  width: min(580px, 94vw) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(17, 11, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 26px !important;
  padding: 0.4rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.4rem !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch !important;
}

body.dark-mode .bottomnav button {
  background: rgba(51, 65, 85, 0.6) !important;
  color: #cbd5e1 !important;
}

body.dark-mode .bottomnav button.active {
  background: linear-gradient(135deg, #0284c7, #6366f1) !important;
  color: #ffffff !important;
}

/* Montenegro Dark Mode Overrides */
body.theme-montenegro-romantic.dark-mode {
  background: linear-gradient(135deg, #16081b 0%, #2b0f2c 35%, #1c0a21 70%, #120616 100%) !important;
  color: #fdf2f8 !important;
}

body.theme-montenegro-romantic.dark-mode .appbar {
  background: rgba(26, 10, 32, 0.88) !important;
  border-bottom: 1px solid rgba(244, 114, 182, 0.25) !important;
}

body.theme-montenegro-romantic.dark-mode .brand {
  color: #f472b6 !important;
}

body.theme-montenegro-romantic.dark-mode .card {
  background: rgba(32, 14, 40, 0.76) !important;
  border: 1px solid rgba(244, 114, 182, 0.25) !important;
  color: #fdf2f8 !important;
}

body.theme-montenegro-romantic.dark-mode .stop-title,
body.theme-montenegro-romantic.dark-mode h1,
body.theme-montenegro-romantic.dark-mode h2,
body.theme-montenegro-romantic.dark-mode h3,
body.theme-montenegro-romantic.dark-mode b {
  color: #fce7f3 !important;
}

body.theme-montenegro-romantic.dark-mode p {
  color: #f472b6 !important;
}

body.theme-montenegro-romantic.dark-mode .bottomnav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 1.5rem !important;
  transform: translateX(-50%) !important;
  width: min(580px, 94vw) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(17, 11, 32, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 26px !important;
  padding: 0.4rem !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.4rem !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
  touch-action: pan-x !important;
  -webkit-overflow-scrolling: touch !important;
}

body.theme-montenegro-romantic.dark-mode .bottomnav button {
  background: rgba(244, 114, 182, 0.12) !important;
  color: #fbcfe8 !important;
}

/* Legend Card Styling */
.legend-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.legend-title {
  font-size: 15px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.legend-badge {
  width: 32px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  flex-shrink: 0;
}
.legend-badge-0 { background: rgba(156, 163, 175, 0.2); border: 1px solid #9ca3af; color: #d1d5db; }
.legend-badge-1 { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fca5a5; }
.legend-badge-2 { background: rgba(245, 158, 11, 0.2); border: 1px solid #f59e0b; color: #fde047; }
.legend-badge-3 { background: rgba(16, 185, 129, 0.2); border: 1px solid #10b981; color: #a7f3d0; }

/* Hybrid Audio-Video Cinema Player Styles */
.media-mode-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 8px;
  gap: 4px;
}
.media-mode-tab {
  flex: 1;
  padding: 6px 10px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.media-mode-tab.active {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.video-container {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  position: relative;
}
.video-container video {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.btn-video-tour {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35) !important;
  font-weight: 900 !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-video-tour:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.5) !important;
}

/* Picture-in-Picture Mini Video Drawer & Floating Window */
.pip-mini-video {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 120;
  width: 220px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  border: 2px solid #ffffff;
  background: #000;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pip-mini-video video {
  width: 100%;
  height: 125px;
  object-fit: cover;
}

.cinema-hero-player.pip-floating-mode {
  position: fixed !important;
  bottom: 85px !important;
  right: 20px !important;
  z-index: 99999 !important;
  width: 340px !important;
  max-width: 90vw !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 2px rgba(239, 68, 68, 0.6) !important;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cinema-hero-player.pip-floating-mode video {
  max-height: 200px !important;
  object-fit: contain;
}

/* Embedded HRSA Roadtrip Cinema Player & Video Cards */
.cinema-hero-player {
  background: #0f172a;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.25);
  margin: 16px 0 24px;
  border: 1px solid #334155;
  color: #f8fafc;
}
.cinema-hero-player video {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  background: #000;
  display: block;
}
.cinema-player-body {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}
.video-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(2, 132, 199, 0.2);
  border-color: #38bdf8;
}
.video-card-thumb {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #000;
}
.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}
.video-card-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.video-card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.video-card-title {
  font-weight: 900;
  font-size: 14px;
  color: #0f172a;
}
.video-card-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #0284c7;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}



