/* ============================================================================
   MÁGICAS NAVIDADES · APPLE PRO SPATIAL GLASS DESIGN SYSTEM (v2)
   Pure OLED #000 + iOS 18 Frosted Glass + PlayStation × Apple Pro Intro
   ============================================================================ */
:root {
  --bg: #000000;
  --surface: #111113;
  --card: rgba(28, 28, 30, 0.84);
  --card-2: #242426;
  --border: rgba(255, 255, 255, 0.095);
  --border-strong: rgba(245, 208, 97, 0.36);
  --text: #f5f5f7;
  --text-dim: #a1a1a6;
  --muted: #8e8e93;
  --gold: #f5d061;
  --gold-bright: #fef08a;
  --gold-dim: rgba(245, 208, 97, 0.14);
  --emerald: #30d158;
  --emerald-dim: rgba(48, 209, 88, 0.15);
  --amber: #ff9f0a;
  --danger: #ff453a;
  --danger-dim: rgba(255, 69, 58, 0.16);
  --blue: #0a84ff;
  --ice: #64d2ff;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: calc(68px + var(--safe-b));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000000;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overscroll-behavior: none;
  overflow: hidden;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ==================== PLAYSTATION × APPLE PRO ANIMATED INTRO ==================== */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: radial-gradient(circle at 50% 38%, #0e192d 0%, #04070e 58%, #010205 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px calc(28px + var(--safe-b));
  overflow: hidden;
  transition: opacity 0.54s cubic-bezier(0.22, 1, 0.36, 1), transform 0.54s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-screen.hidden {
  display: none;
}

.intro-screen.exiting {
  opacity: 0;
  pointer-events: none;
}

.intro-ambient-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 197, 66, 0.22) 0%, rgba(100, 210, 255, 0.12) 46%, transparent 72%);
  filter: blur(24px);
  animation: introBreathe 4.6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes introBreathe {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1;    transform: translate(-50%, -50%) scale(1.12); }
}

.intro-motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 0%, rgba(245, 197, 66, 0) 75%);
  opacity: 0;
  animation: introMoteFloat 5.4s ease-in-out infinite;
}

.intro-mote.ice {
  background: radial-gradient(circle, #bae6fd 0%, rgba(100, 210, 255, 0) 75%);
}

@keyframes introMoteFloat {
  0%   { opacity: 0; transform: translateY(16px) scale(0.6); }
  35%  { opacity: 0.78; }
  75%  { opacity: 0.35; }
  100% { opacity: 0; transform: translateY(-50px) scale(1.25); }
}

.intro-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-emblem-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), filter 0.52s ease;
}

.intro-screen.exiting .intro-emblem-wrap {
  transform: scale(1.26);
  filter: drop-shadow(0 0 38px rgba(245, 197, 66, 0.78));
}

.intro-exit-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid rgba(254, 240, 138, 0.78);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.intro-screen.exiting .intro-exit-ring {
  animation: introExitWave 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introExitWave {
  0%   { opacity: 0.9; transform: scale(0.88); }
  100% { opacity: 0;   transform: scale(2.25); }
}

.intro-emblem-svg {
  width: 168px;
  height: 168px;
  filter: drop-shadow(0 12px 30px rgba(245, 197, 66, 0.26));
}

.intro-ring-draw {
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  transform-origin: 90px 90px;
  transform: rotate(-90deg);
  animation: introDrawRing 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

@keyframes introDrawRing { to { stroke-dashoffset: 0; } }

.intro-ring-spin {
  transform-origin: 90px 90px;
  animation: introSpinSlow 24s linear infinite;
}

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

.intro-star-group {
  transform-origin: 90px 90px;
  opacity: 0;
  animation:
    introStarIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards,
    introStarFloat 3.6s ease-in-out 1.15s infinite alternate;
}

@keyframes introStarIn {
  0%   { opacity: 0; transform: scale(0.76) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes introStarFloat {
  from { transform: translateY(0px); }
  to   { transform: translateY(-4px); }
}

.intro-glint-bar {
  animation: introGlint 3.2s cubic-bezier(0.4, 0, 0.2, 1) 0.65s infinite;
}

@keyframes introGlint {
  0%   { transform: translateX(-40px) rotate(22deg); opacity: 0; }
  12%  { opacity: 1; }
  38%  { transform: translateX(250px) rotate(22deg); opacity: 0; }
  100% { transform: translateX(250px) rotate(22deg); opacity: 0; }
}

.intro-brand {
  opacity: 0;
  animation: introFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.intro-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 54%, #f5d061 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro-sub {
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: rgba(245, 208, 97, 0.8);
}

.intro-status-pill {
  margin-top: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  animation: introFadeUp 0.68s cubic-bezier(0.22, 1, 0.36, 1) 0.68s forwards;
}

.intro-enter-btn {
  margin-top: 24px;
  width: 100%;
  max-width: 268px;
  padding: 15px 22px;
  border-radius: 16px;
  border: 0.5px solid rgba(245, 208, 97, 0.55);
  background: linear-gradient(135deg, rgba(245, 208, 97, 0.2), rgba(100, 210, 255, 0.16));
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  opacity: 0;
  animation: introFadeUp 0.68s cubic-bezier(0.22, 1, 0.36, 1) 0.86s forwards;
  transition: transform 0.14s ease, background 0.2s ease;
}

.intro-enter-btn:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, rgba(245, 208, 97, 0.32), rgba(100, 210, 255, 0.26));
}

.intro-enter-arrow {
  color: #fef08a;
  font-size: 17px;
}

.intro-hint {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(142, 142, 147, 0.82);
  opacity: 0;
  animation: introFadeUp 0.6s ease 1.05s forwards;
}

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

/* ==================== MOBILE APP SHELL ==================== */
.mobile-shell {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 30% at 50% -4%, rgba(245, 208, 97, 0.11) 0%, transparent 66%),
    radial-gradient(ellipse 65% 24% at 86% 6%, rgba(100, 210, 255, 0.08) 0%, transparent 62%),
    #000000;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.92);
}

@media (min-width: 520px) {
  .mobile-shell {
    border-left: 0.5px solid rgba(255, 255, 255, 0.1);
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
  }
}

/* ==================== FROSTED APPLE HEADER ==================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  z-index: 30;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-chip {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2c2c30 0%, #141417 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.app-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.15;
}

.app-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.header-hud {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hud-chip {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(44, 44, 46, 0.74);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), background 0.15s ease;
}

.hud-chip:active { transform: scale(0.95); }

.hud-chip.gps-ok {
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.32);
  background: rgba(48, 209, 88, 0.12);
}

.hud-chip.gps-sim {
  color: var(--gold);
  border-color: rgba(245, 208, 97, 0.42);
  background: rgba(245, 208, 97, 0.14);
}

.hud-chip.gps-err {
  color: #ff6961;
  border-color: rgba(255, 69, 58, 0.36);
  background: rgba(255, 69, 58, 0.13);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(44, 44, 46, 0.75);
  border: 0.5px solid rgba(255, 255, 255, 0.11);
  color: #e5e5ea;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), background 0.15s ease;
}

.icon-btn:active { transform: scale(0.93); }
.icon-btn.muted { opacity: 0.48; }

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.sim-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(245, 208, 97, 0.14);
  border-bottom: 0.5px solid rgba(245, 208, 97, 0.34);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.sim-banner.active { display: flex; }

.sim-banner button {
  border: 0.5px solid rgba(245, 208, 97, 0.48);
  background: rgba(0, 0, 0, 0.45);
  color: #fef08a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== MAIN VIEWS ==================== */
.views {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.view {
  display: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 15px 15px calc(24px + var(--nav-h));
  animation: fadeIn 0.18s ease;
}

.view.active { display: block; }
.view.view-map { padding: 0; overflow: hidden; }

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

/* ==================== iOS 18 GLASS CARDS & TYPOGRAPHY ==================== */
.card {
  background: rgba(28, 28, 30, 0.82);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-top: 2px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag-gold, .tag-emerald, .tag-crimson, .tag-ice {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.tag-gold {
  background: rgba(245, 208, 97, 0.14);
  color: #f5d061;
  border: 0.5px solid rgba(245, 208, 97, 0.32);
}

.tag-emerald {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
  border: 0.5px solid rgba(48, 209, 88, 0.32);
}

.tag-crimson {
  background: rgba(255, 69, 58, 0.16);
  color: #ff6961;
  border: 0.5px solid rgba(255, 69, 58, 0.38);
}

.tag-ice {
  background: rgba(100, 210, 255, 0.14);
  color: #64d2ff;
  border: 0.5px solid rgba(100, 210, 255, 0.32);
}

/* ==================== SHOW TICKER STRIP ==================== */
.show-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(245, 208, 97, 0.14), transparent 70%),
    rgba(28, 28, 30, 0.86);
  border: 0.5px solid rgba(245, 208, 97, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}

.show-ticker:active { transform: scale(0.985); }

.show-ticker.is-live {
  background:
    radial-gradient(ellipse 90% 100% at 0% 50%, rgba(255, 69, 58, 0.24), transparent 72%),
    rgba(36, 20, 24, 0.92);
  border-color: rgba(255, 69, 58, 0.55);
  box-shadow: 0 0 24px rgba(255, 69, 58, 0.18);
}

.show-ticker-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.show-ticker-emoji { font-size: 24px; flex-shrink: 0; }
.show-ticker-title { font-size: 13.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.015em; }
.show-ticker-sub { font-size: 11.5px; color: var(--gold); margin-top: 1px; font-variant-numeric: tabular-nums; }
.show-ticker-time { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.show-ticker-hour { font-size: 16.5px; font-weight: 700; color: #fff; line-height: 1.1; }
.show-ticker-cd { font-size: 11px; font-weight: 600; color: var(--text-dim); }

/* ==================== TITANIUM GLASS HERO COPILOT CARD ==================== */
.hero-card {
  position: relative;
  border-radius: 26px;
  padding: 20px 18px 18px;
  margin-bottom: 14px;
  background:
    radial-gradient(ellipse 90% 65% at 14% 0%, rgba(245, 208, 97, 0.16) 0%, transparent 62%),
    linear-gradient(165deg, rgba(36, 36, 40, 0.94) 0%, rgba(20, 20, 22, 0.97) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 44px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.hero-card.tone-crimson {
  background:
    radial-gradient(ellipse 95% 70% at 15% 0%, rgba(255, 69, 58, 0.22) 0%, transparent 62%),
    linear-gradient(165deg, rgba(44, 24, 28, 0.95) 0%, rgba(20, 16, 20, 0.97) 100%);
  border-color: rgba(255, 69, 58, 0.42);
}

.hero-card.tone-ice {
  background:
    radial-gradient(ellipse 90% 68% at 15% 0%, rgba(100, 210, 255, 0.16) 0%, transparent 62%),
    linear-gradient(165deg, rgba(28, 36, 46, 0.94) 0%, rgba(18, 20, 24, 0.97) 100%);
  border-color: rgba(100, 210, 255, 0.28);
}

.hero-title {
  margin: 11px 0 7px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-reason {
  margin: 0 0 15px;
  font-size: 13.5px;
  line-height: 1.48;
  color: #d1d1d6;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.meta-chip .arrow {
  color: var(--gold);
  font-size: 14px;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==================== APPLE BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  color: #f5f5f7;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), background 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.97); opacity: 0.9; }

/* Apple Luminous White Primary CTA */
.btn-luminous {
  background: linear-gradient(180deg, #ffffff 0%, #e5e5ea 100%);
  color: #000000;
  border: none;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn-done {
  background: rgba(48, 209, 88, 0.14);
  border-color: rgba(48, 209, 88, 0.35);
  color: #30d158;
  grid-column: span 2;
}

.btn-danger {
  background: rgba(255, 69, 58, 0.13);
  border-color: rgba(255, 69, 58, 0.32);
  color: #ff6961;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 11px;
}

/* ==================== EXPEDITION SVG DIORAMA CARD ==================== */
.expedition-card {
  cursor: pointer;
  padding: 16px;
}

.expedition-svg-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: #060914;
  margin: 8px 0 10px;
}

.expedition-svg {
  display: block;
  width: 100%;
  height: auto;
}

.exp-twinkle {
  animation: expTwinkle 3.2s ease-in-out infinite alternate;
}

@keyframes expTwinkle {
  from { opacity: 0.25; }
  to   { opacity: 0.95; }
}

.exp-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: expPulse 1.9s ease-in-out infinite;
}

@keyframes expPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.65); opacity: 0.1; }
}

.map-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-ok { background: var(--emerald); }
.dot-now { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.dot-show { background: var(--danger); }
.dot-next { background: #52525b; }

/* ==================== QUICK TILES & ALTERNATIVES ==================== */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.quick-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 13px;
  border-radius: 18px;
  background: rgba(28, 28, 30, 0.84);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}

.quick-tile:active { transform: scale(0.975); }
.quick-tile .qt-icon { font-size: 20px; flex-shrink: 0; }
.quick-tile .qt-title { font-size: 12.5px; font-weight: 700; line-height: 1.2; color: #fff; }
.quick-tile .qt-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; font-variant-numeric: tabular-nums; }

.alt-list { display: flex; flex-direction: column; gap: 8px; }

.alt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.alt-item:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.08); }
.alt-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.alt-emoji {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
}
.alt-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.alt-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.alt-dist { text-align: right; flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Progress capsule */
.bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #30d158 0%, #64d2ff 55%, #f5d061 100%);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==================== AUTHENTIC iOS UISegmentedControl ==================== */
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(118, 118, 128, 0.22);
  padding: 3px;
  border-radius: 13px;
  gap: 2px;
  margin-bottom: 12px;
}

.seg-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 8px 6px;
  color: var(--text-dim);
  font-family: inherit;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.seg-btn.active {
  background: #323236;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}

/* ==================== MAP VIEW ==================== */
#map-wrap { position: relative; width: 100%; height: 100%; }
#leaflet-map { width: 100%; height: 100%; background: #070d1c; }

/* Warm festive sapphire-night theme for free OpenStreetMap street tiles */
.osm-christmas-tiles {
  filter: invert(92%) hue-rotate(195deg) brightness(0.92) contrast(1.08) saturate(1.35);
}

.map-top-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.map-mode-seg {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  background: rgba(14, 16, 26, 0.86);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  padding: 3px;
  border-radius: 13px;
  gap: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.mseg-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 7px 4px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.mseg-btn.active {
  background: linear-gradient(180deg, #f5d061 0%, #e5a910 100%);
  color: #14101f;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 208, 97, 0.35);
}

.map-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.map-filters::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(16, 18, 28, 0.84);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.chip:active { transform: scale(0.95); }

.chip.active {
  background: linear-gradient(180deg, #ffffff 0%, #e5e5ea 100%);
  color: #000000;
  border-color: transparent;
  font-weight: 700;
}

.map-fabs {
  position: absolute;
  right: 12px;
  bottom: calc(20px + var(--nav-h));
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fab {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(18, 20, 30, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #ffffff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.fab:active { transform: scale(0.93); }
.fab-car { border-color: rgba(48, 209, 88, 0.55); }

/* Friendly Named Christmas Landmark Badges on Map */
.poi-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: rgba(14, 18, 36, 0.88);
  border: 1.5px solid rgba(245, 208, 97, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.poi-badge-wrap .pb-ico {
  font-size: 13px;
  line-height: 1;
}

.poi-badge-wrap .pb-txt {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.poi-badge-wrap.cat-show {
  background: rgba(88, 16, 34, 0.94);
  border-color: #ff6961;
  padding: 4px 9px 4px 5px;
}

.poi-badge-wrap.cat-show .pb-txt { color: #ffe4e6; }

.poi-badge-wrap.cat-food {
  background: rgba(14, 38, 56, 0.9);
  border-color: #64d2ff;
}

.poi-badge-wrap.cat-parking,
.poi-badge-wrap.cat-gate {
  background: rgba(18, 26, 48, 0.9);
  border-color: #93c5fd;
  padding: 2px 7px 2px 4px;
}

.poi-badge-wrap.cat-service {
  background: rgba(24, 24, 30, 0.88);
  border-color: #a1a1aa;
  padding: 2px 6px 2px 4px;
}

.poi-badge-wrap.cat-paid_excluded {
  background: rgba(24, 24, 27, 0.82);
  border-color: #71717a;
  opacity: 0.82;
}

.poi-badge-wrap.is-visited {
  border-color: var(--emerald);
  background: rgba(12, 42, 26, 0.88);
  opacity: 0.78;
}

.poi-badge-wrap.is-target {
  background: linear-gradient(135deg, #f5d061 0%, #f59e0b 100%);
  border-color: #ffffff;
  padding: 5px 11px 5px 6px;
  box-shadow: 0 0 0 5px rgba(245, 208, 97, 0.36), 0 8px 22px rgba(0, 0, 0, 0.75);
  z-index: 900;
}

.poi-badge-wrap.is-target .pb-txt {
  color: #14101f;
  font-weight: 800;
  text-shadow: none;
}

.street-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(6, 10, 22, 0.78);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.user-gps-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0a84ff;
  border: 3.5px solid #ffffff;
  box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.32), 0 0 18px rgba(10, 132, 255, 0.9);
  animation: gpsPulse 2s ease-in-out infinite;
}

@keyframes gpsPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.35), 0 0 16px rgba(10, 132, 255, 0.9); }
  50%      { box-shadow: 0 0 0 14px rgba(10, 132, 255, 0.1), 0 0 22px rgba(10, 132, 255, 1); }
}

/* Apple Glass Bottom Sheet */
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 10px;
}

.map-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--nav-h));
  z-index: 550;
  background: rgba(24, 24, 28, 0.92);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 10px 16px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(135%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-sheet.open { transform: translateY(0); }
.map-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.map-sheet-title { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.02em; color: #fff; }
.sheet-desc { font-size: 12.8px; color: #d1d1d6; margin: 7px 0 6px; line-height: 1.44; }
.sheet-tip { font-size: 12px; color: var(--gold); margin-bottom: 12px; line-height: 1.4; }
.map-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

/* ==================== ROUTE & CHECKLIST VIEW ==================== */
.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.select-box {
  background: rgba(28, 28, 30, 0.86);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 9px 11px;
}

.select-box label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 4px;
}

.select-box select {
  width: 100%;
  background: transparent;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

.select-box select option { background: #1c1c1e; color: #ffffff; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(100, 210, 255, 0.35), rgba(255, 69, 58, 0.55));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  background: rgba(28, 28, 30, 0.82);
  border: 0.5px solid rgba(255, 255, 255, 0.095);
  border-radius: 18px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  border: 2.5px solid var(--gold);
}

.tl-item.kind-show {
  border-color: rgba(255, 69, 58, 0.38);
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(255, 69, 58, 0.14), transparent 70%),
    rgba(28, 24, 28, 0.9);
}

.tl-item.kind-show::before { border-color: var(--danger); background: var(--danger); }
.tl-item.is-now { border-color: rgba(245, 208, 97, 0.62); box-shadow: 0 0 22px rgba(245, 208, 97, 0.16); }
.tl-item.is-now::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tl-item.is-done { opacity: 0.54; }
.tl-item.is-done::before { border-color: var(--emerald); background: var(--emerald); }

.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.tl-hour { font-size: 13px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.tl-status { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tl-status.now { background: rgba(245, 208, 97, 0.2); color: var(--gold); }
.tl-status.done { background: rgba(48, 209, 88, 0.18); color: #30d158; }
.tl-title { font-size: 14.5px; font-weight: 700; margin: 0 0 4px; color: #fff; letter-spacing: -0.015em; }
.tl-desc { font-size: 12.4px; line-height: 1.44; color: var(--text-dim); margin: 0 0 10px; }
.tl-actions { display: flex; align-items: center; gap: 7px; }

/* Checklist subview */
.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 8px;
}

.check-row.done {
  border-color: rgba(48, 209, 88, 0.32);
  background: rgba(48, 209, 88, 0.07);
}

.check-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.check-row.done .check-circle {
  background: var(--emerald);
  border-color: var(--emerald);
}

/* ==================== INFO / UTILITIES ==================== */
.car-box {
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(100, 210, 255, 0.14), transparent 65%),
    rgba(28, 28, 30, 0.88);
  border-color: rgba(100, 210, 255, 0.3);
}

.input-dark {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
}

.input-dark:focus { border-color: rgba(245, 208, 97, 0.55); }

.info-list { margin: 8px 0 0; padding-left: 18px; font-size: 12.8px; line-height: 1.55; color: var(--text-dim); }
.info-list li { margin-bottom: 6px; }
.info-list strong { color: #f5f5f7; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-inc {
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
  background: rgba(48, 209, 88, 0.12); border: 0.5px solid rgba(48, 209, 88, 0.3); color: #86efac;
}
.tag-paid {
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
  background: rgba(255, 69, 58, 0.12); border: 0.5px solid rgba(255, 69, 58, 0.28); color: #fca5a5;
}

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; border-radius: 999px; background: rgba(120, 120, 128, 0.36); cursor: pointer; transition: background 0.2s ease; }
.slider::before {
  content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  border-radius: 50%; background: #ffffff; box-shadow: 0 2px 6px rgba(0,0,0,0.4); transition: transform 0.2s ease;
}
.switch input:checked + .slider { background: var(--emerald); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ==================== FROSTED APPLE BOTTOM TAB BAR ==================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 500px;
  height: var(--nav-h);
  padding: 6px 10px var(--safe-b);
  background: rgba(16, 16, 18, 0.84);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.11);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 600;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #8e8e93;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.16s ease, transform 0.14s ease;
}

.nav-btn:active { transform: scale(0.92); }
.nav-btn .ni { display: grid; place-items: center; height: 24px; }
.nav-btn.active { color: var(--gold); }

/* ==================== SIMULATOR SHEET MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open { display: flex; }

.modal-card {
  width: 100%;
  max-width: 500px;
  background: rgba(24, 24, 28, 0.96);
  backdrop-filter: blur(28px) saturate(180%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + var(--safe-b));
  box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.7);
}

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.modal-head h3 { margin: 2px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal-sub { margin: 0 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.44; }
.sim-slider-wrap { margin: 12px 0; }
.sim-slider-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.sim-time-val { color: var(--gold); font-size: 15px; }
.sim-slider-wrap input[type="range"] { width: 100%; accent-color: var(--gold); height: 28px; }
.sim-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }

/* ==================== FLOATING APPLE TOAST ==================== */
.toast {
  position: fixed;
  top: calc(64px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 990;
  max-width: 92%;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(28, 28, 32, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(245, 208, 97, 0.45);
  color: #fef08a;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Leaflet dark styling */
.leaflet-container { font-family: inherit; background: #060913; }
.leaflet-control-attribution { background: rgba(12, 12, 14, 0.72) !important; color: #8e8e93 !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: #64d2ff !important; }
