/* "The Big Lap: Aussie Outback Camper" - Mobile First Cozy Styling */
:root {
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --secondary: #10b981;
  --accent-red: #e11d48;
  --outback-ochre: #c2410c;
  --outback-sand: #fef3c7;
  --bush-green: #3f6212;
  --dark-bg: #0f172a;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0c1524;
  color: var(--text-main);
}

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

/* Canvas Fullscreen */
#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ===== Top HUD: one compact row that fits a phone ===== */
#top-hud {
  position: absolute;
  top: calc(var(--safe-top) + 6px);
  left: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  z-index: 20;
  pointer-events: none;
  box-sizing: border-box;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.hud-group-left {
  flex-shrink: 1;
  min-width: 0;
}

.hud-group-right {
  flex-shrink: 0;
  margin-left: auto;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  pointer-events: auto;
  flex-shrink: 0;
}

button.hud-chip { cursor: pointer; }
button.hud-chip:active { transform: scale(0.94); }

.hud-money { color: #b45309; }
.hud-level {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: 1px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hud-level:active { transform: scale(0.94); }
.hud-sp-badge {
  background: #22c55e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 2px;
  animation: pulse-sp 2s infinite ease-in-out;
}
@keyframes pulse-sp {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.hud-fuel { color: #047857; }
.hud-time { color: var(--text-main); }
.hud-season {
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud-season span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

#build-tag {
  position: absolute;
  right: 2px;
  top: 36px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 480px) {
  #top-hud {
    left: 4px;
    right: 4px;
    gap: 3px;
  }
  .hud-group {
    gap: 3px;
  }
  .hud-chip {
    height: 30px;
    padding: 0 6px;
    font-size: 11px;
    gap: 2px;
  }
  .hud-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .hud-season {
    max-width: 72px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hud-chip {
    padding: 0 4px;
    font-size: 10.5px;
  }
  .hud-season {
    max-width: 34px; /* Icon only */
  }
}

@media (min-width: 640px) {
  .hud-chip {
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    gap: 5px;
  }
  .hud-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .hud-season {
    max-width: none;
  }
}

/* ===== Region Dropdown (Map layers in one compact dropdown) ===== */
#region-dropdown-wrap {
  position: absolute;
  top: calc(var(--safe-top) + 48px);
  left: 10px;
  z-index: 40;
}

body.title-active #region-dropdown-wrap,
body.mode-driving #region-dropdown-wrap,
body.in-minigame #region-dropdown-wrap,
body.has-sheet #region-dropdown-wrap,
body.has-modal #region-dropdown-wrap,
body.has-dialog #region-dropdown-wrap {
  display: none !important;
}

.region-dropdown-trigger {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  transition: all 0.15s ease;
  user-select: none;
}

.region-dropdown-trigger:active,
.region-dropdown-trigger.active {
  background: rgba(30, 41, 59, 0.98);
  border-color: #facc15;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.35);
}

.region-dropdown-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.region-dropdown-trigger.active .region-dropdown-chevron {
  transform: rotate(180deg);
  color: #facc15;
}

.region-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: 280px;
  max-height: 320px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.region-dropdown-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  display: none !important;
}

.region-dropdown-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.region-dropdown-item:hover,
.region-dropdown-item:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.region-dropdown-item.active {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.6);
  color: #fde047;
  font-weight: 700;
}

.rdi-tag {
  font-size: 10px;
  color: #f59e0b;
  font-weight: 700;
}

/* ===== Recenter map pin button: positioned below the quest drawer icon ===== */
#btn-recenter,
.recenter-pin-btn {
  position: absolute;
  left: 10px;
  top: calc(var(--safe-top) + 146px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #ef4444;
  color: #ef4444;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 26;
  pointer-events: auto;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

#btn-recenter:active {
  transform: scale(0.92);
  background: #fef2f2;
}

/* ===== Drive controls (Xbox-style right shoulder bumper bar above action cluster) ===== */
#drive-controls {
  position: absolute;
  right: 12px;
  left: auto;
  bottom: calc(var(--safe-bottom) + 122px);
  display: none;
  justify-content: flex-end;
  gap: 5px;
  z-index: 25;
  pointer-events: auto;
}

.drive-btn {
  min-width: 58px;
  height: 29px;
  padding: 0 9px;
  border-radius: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  backdrop-filter: blur(4px);
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
}

.drive-btn.on { background: #facc15; color: #0f172a; border-color: #fef08a; }
.drive-btn:active { transform: scale(0.93); }

.drive-btn-pause {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(148, 163, 184, 0.7);
  color: #f8fafc;
}
.drive-btn-pause:hover, .drive-btn-pause:active {
  background: rgba(51, 65, 85, 0.95);
  border-color: #38bdf8;
}

.drive-btn-refuel {
  background: rgba(16, 185, 129, 0.88);
  border-color: rgba(110, 231, 183, 0.85);
  color: #fff;
  min-width: 68px;
}
.drive-btn-refuel.low-fuel {
  background: rgba(239, 68, 68, 0.92);
  border-color: #fca5a5;
  animation: driveFuelPulse 0.8s infinite alternate;
}
@media (max-width: 375px) {
  #drive-controls {
    right: 8px;
    bottom: calc(var(--safe-bottom) + 110px);
    gap: 4px;
  }
  .drive-btn {
    min-width: 52px;
    height: 27px;
    padding: 0 7px;
    font-size: 10px;
  }
  .drive-btn-refuel {
    min-width: 62px;
  }
}
@keyframes driveFuelPulse {
  from { transform: scale(1); box-shadow: 0 0 6px #ef4444; }
  to { transform: scale(1.06); box-shadow: 0 0 16px #ef4444; }
}

#btn-drive-horn {
  touch-action: manipulation;
}
#btn-drive-horn.honking {
  background: rgba(250, 204, 21, 0.95) !important;
  color: #0f172a !important;
  transform: scale(0.92);
}

/* ===== Bottom Navigation Drawer ===== */
#bottom-drawer-wrap {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 8px);
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 30;
}

body.title-active #bottom-drawer-wrap,
body.mode-driving #bottom-drawer-wrap,
body.in-minigame #bottom-drawer-wrap,
body.has-sheet #bottom-drawer-wrap,
body.has-modal #bottom-drawer-wrap,
body.has-dialog #bottom-drawer-wrap {
  display: none !important;
}

.bottom-drawer-handle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

/* Floating Drawer Toggle Handle */
#btn-bottom-drawer-toggle,
.bottom-drawer-toggle {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
  padding: 7px 18px;
  border-radius: 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  user-select: none;
}

.bottom-drawer-toggle:active,
.bottom-drawer-toggle.drawer-open {
  background: rgba(30, 41, 59, 0.98);
  border-color: #facc15;
  color: #fde047;
}

.bottom-camp-exit-btn {
  display: none;
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.94), rgba(2, 132, 199, 0.96));
  border: 1.5px solid rgba(186, 230, 253, 0.85);
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.42);
  backdrop-filter: blur(8px);
  transition: transform 0.14s ease, filter 0.14s ease;
  user-select: none;
}
body.mode-camp .bottom-camp-exit-btn {
  display: inline-flex;
}
.bottom-camp-exit-btn:hover {
  filter: brightness(1.08);
}
.bottom-camp-exit-btn:active {
  transform: scale(0.95);
}

.bdt-icon { font-size: 14px; }
.bdt-label { font-size: 12.5px; }

/* The Bottom Nav Bar (Sliding Drawer) */
#bottom-nav,
.bottom-nav-drawer {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 64px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-around;
  align-items: center;
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  margin-bottom: 6px;
}

#bottom-nav.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  display: none !important;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  padding: 2px 1px;
  height: 54px;
  border-radius: var(--radius-md);
}

.nav-item:active { transform: scale(0.9); }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-item.highlight { color: var(--outback-ochre); }
.nav-item.active { background: #fef3c7; color: #92400e; }

@media (max-height: 500px) {
  #bottom-nav { height: 52px; }
  .nav-item { height: 46px; font-size: 10px; }
  .nav-icon { font-size: 18px; }
  #drive-controls { bottom: calc(var(--safe-bottom) + 70px); right: 12px; left: auto; }
}

/* Modals & Drawers */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: min(86dvh, calc(100% - 10px));
  background: #ffffff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(var(--safe-bottom) + 12px);
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 18px;
  color: #0f172a;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 14px 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Location Drawer Styling */
.location-tagline {
  color: var(--outback-ochre);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.location-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 12px;
}

.location-landmark {
  font-size: 12px;
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: #92400e;
  font-weight: 600;
  margin-bottom: 12px;
}

.camp-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.camp-card h4 {
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.camp-card p {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.amenities-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  background: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  color: #334155;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
}

/* Route Planner Cards */
.route-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.route-item-card:active {
  transform: scale(0.98);
}

.route-item-card.locked {
  opacity: 0.65;
  background: #f1f5f9;
  cursor: not-allowed;
}

.route-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.route-item-header h4 {
  font-size: 13px;
  color: #0f172a;
}

.route-distance {
  font-size: 12px;
  font-weight: 700;
  color: var(--outback-ochre);
}

.route-surface {
  font-size: 11px;
  color: #64748b;
}

.route-lock-reason {
  font-size: 11px;
  color: var(--accent-red);
  font-weight: 600;
  margin-top: 4px;
}

/* Recipes in Camping Menu */
.recipe-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.recipe-header h4 {
  font-size: 14px;
  color: #0f172a;
}

.recipe-reward {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}

.recipe-card p {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

/* Shop Items & Category Tabs */
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  overflow: visible;
  padding: 4px 2px 6px;
}

.shop-tab-btn {
  position: relative;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  padding: 6px 10px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11.5px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shop-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.shop-tab-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.shop-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.shop-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.shop-item-header h4 {
  font-size: 13px;
  color: #0f172a;
}

.shop-price {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}

.shop-item-card p {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.veh-specs {
  font-size: 11px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 600;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fee2e2;
  color: #b91c1c;
}

/* Journal Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.badge-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge-item.unlocked {
  background: #fefce8;
  border-color: #facc15;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.25);
}

.badge-item.locked {
  opacity: 0.5;
  filter: grayscale(1);
}

.badge-emoji {
  font-size: 28px;
  margin-bottom: 4px;
}

.badge-name {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.badge-loc {
  font-size: 9px;
  color: #64748b;
}

/* Wildlife Polaroid Photos Grid */
.polaroids-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.album-polaroid {
  background: #ffffff;
  padding: 12px 12px 14px 12px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(226, 232, 240, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-polaroid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
}

.polaroid-frame {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.polaroid-photo {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
  min-height: 130px;
  overflow: hidden;
}

.polaroid-photo .animal-avatar {
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 150px;
  border-radius: 8px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.16));
}

.polaroid-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.polaroid-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.polaroid-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.polaroid-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.polaroid-sci {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.polaroid-reward {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 6px;
}

.polaroid-loc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

.polaroid-states {
  color: #0284c7;
}

.photo-timestamp {
  font-size: 10px;
  color: #94a3b8;
  margin-left: auto;
}

.polaroid-intro {
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #38bdf8;
}

.polaroid-fact {
  font-size: 11.5px;
  line-height: 1.5;
  color: #854d0e;
  background: #fefce8;
  border: 1px solid #fef08a;
  padding: 7px 10px;
  border-radius: 6px;
}

.fact-tag {
  display: inline-block;
  font-weight: 800;
  color: #b45309;
  margin-right: 4px;
}

.empty-album {
  text-align: center;
  padding: 36px 16px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
}

/* Road Event Modal */
.event-box {
  text-align: center;
  padding: 10px 0;
}

.event-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.event-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.event-desc {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.4;
}

.event-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toast Notifications */
#toast-banner {
  position: absolute;
  top: calc(var(--safe-top) + 110px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 100;
  text-align: center;
  white-space: nowrap;
}

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

/* Responsive adjustments for iPad / Desktop */
@media (min-width: 600px) {
  .modal-content {
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    max-height: 70vh;
  }
}

/* ===== v3 additions ===== */
.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-secondary {
  background: #e0f2fe;
  color: #075985;
}

.btn:disabled {
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.route-info {
  font-size: 13px;
  line-height: 1.45;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #155e75;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
}

.route-info.locked {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.routes-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 12px 0 6px;
}

.journal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.journal-stats div {
  background: #fef3c7;
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: #92400e;
}

.journal-stats strong {
  display: block;
  font-size: 17px;
  color: #0f172a;
}

/* ================= v4: photos, NPCs, garage shop, friends ================= */
.loc-photos { margin: -4px -4px 10px; }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 6px; -webkit-overflow-scrolling: touch; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-card { flex: 0 0 86%; scroll-snap-align: center; margin: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18); border: 3px solid #fff; }
.photo-card img { display: block; width: 100%; height: 180px; object-fit: cover; background: #e2e8f0; }
.photo-card figcaption { font-size: 11px; color: #475569; padding: 6px 8px; display: flex; justify-content: space-between; gap: 8px; }
.photo-card figcaption a { color: #0284c7; text-decoration: none; white-space: nowrap; font-weight: 600; }
.photo-hint { text-align: center; font-size: 10px; color: #94a3b8; margin-top: 2px; }
.photo-skeleton { height: 120px; border-radius: 16px; background: linear-gradient(110deg, #e2e8f0 30%, #f1f5f9 50%, #e2e8f0 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 13px; }
.photo-skeleton.offline { animation: none; height: 60px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.npc-chip, .friend-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #fff7ed; border: 2px solid var(--npc, #fdba74); margin: 8px 0; cursor: pointer; }
.npc-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--npc, #fdba74); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; overflow: hidden; }
.npc-avatar svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.npc-chip-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.npc-chip-text strong { font-size: 14px; color: #0f172a; }
.npc-chip-text span { font-size: 11px; color: #64748b; line-height: 1.35; }
.npc-chip-go { font-size: 20px; }
.friend-card { cursor: default; background: #f8fafc; }
.friend-card.unknown { border-style: dashed; border-color: #cbd5e1; opacity: 0.8; }
.friend-card.friend { background: #f0fdf4; }
.journal-h { font-size: 14px; color: #0f172a; margin: 14px 0 6px; }

.npc-hero { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--npc) 22%, #fff), #fff); border: 2px solid var(--npc); }
.npc-hero-avatar { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 3px solid var(--npc); display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 3px 8px rgba(0,0,0,0.12); overflow: hidden; }
.npc-hero-avatar svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.npc-role { font-weight: 700; color: #0f172a; font-size: 15px; }
.npc-meta { font-size: 12px; color: #64748b; }
.npc-bubble { position: relative; margin: 14px 0 10px; padding: 12px 14px; background: #fff; border-radius: 16px; border: 2px solid #e2e8f0; font-size: 14px; line-height: 1.5; color: #1e293b; font-style: italic; }
.npc-bubble::before { content: ""; position: absolute; top: -10px; left: 28px; border: 8px solid transparent; border-bottom-color: #e2e8f0; }
.npc-more { font-size: 12px; color: #475569; margin-bottom: 8px; }
.npc-more summary { cursor: pointer; font-weight: 600; color: #0f172a; padding: 4px 0; }
.npc-more p { margin: 6px 0; line-height: 1.5; }
.npc-perk { font-size: 12px; background: #fef9c3; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; color: #713f12; }
.npc-favour { font-size: 13px; background: #f1f5f9; border-radius: 12px; padding: 10px; margin-bottom: 8px; line-height: 1.5; }
.npc-favour.ok { background: #dcfce7; }
.npc-favour span { font-size: 12px; color: #475569; }
.npc-secret { font-size: 12px; color: #6d28d9; background: #f5f3ff; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.45; }
#npc-body .btn { width: 100%; margin-top: 6px; }

.shop-garage { display: flex; flex-direction: column; gap: 8px; background: #f8fafc; border-radius: 16px; padding: 8px; margin-bottom: 10px; border: 2px solid #e2e8f0; }
#garage-canvas { width: 100%; height: 120px; border-radius: 12px; display: block; }
.garage-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.garage-name { font-weight: 700; color: #0f172a; }
.garage-hp { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.hp-bar { flex: 1; height: 10px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.hp-bar i { display: block; height: 100%; border-radius: 6px; }
.garage-gear { font-size: 18px; letter-spacing: 2px; }
.garage-ok { font-size: 12px; color: #15803d; font-weight: 600; }
.shop-group-title { font-size: 13px; color: #0f172a; margin: 14px 0 6px; padding: 6px 10px; background: #e0f2fe; border-radius: 10px; }
.shop-icon { font-size: 18px; }
.shop-use { font-size: 12px; font-weight: 600; color: #0369a1; margin: 2px 0 4px; }

/* v5: keep toasts below the driving HUD and semi-transparent so they never block the road */
body.mode-driving #toast-banner {
  top: calc(var(--safe-top) + 148px);
  background: rgba(15, 23, 42, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== Roadside Rest Stop Modal ===== */
.drive-rest-modal-content {
  max-width: 480px;
  border-radius: 20px;
  overflow: hidden;
}

.drive-rest-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-bottom: 2px solid #334155;
  padding: 14px 18px;
}
.drive-rest-header h3 {
  color: #38bdf8;
  font-size: 18px;
}

.drive-rest-body {
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(76dvh, calc(100dvh - 96px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drive-rest-body > * {
  flex-shrink: 0;
}

.drive-rest-status-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 14px;
  padding: 8px 12px;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dr-status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
  flex-wrap: wrap;
}

.dr-badge-route {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
}

.dr-badge-weather {
  font-size: 11px;
  font-weight: 600;
  color: #fde047;
  background: rgba(254, 224, 71, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(254, 224, 71, 0.3);
}

.dr-trip-progress {
  margin-bottom: 6px;
}

.dr-leg-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  color: #cbd5e1;
}

.dr-km-val {
  color: #86efac;
  font-weight: 700;
}

.dr-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.dr-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.dr-gauges-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dr-gauge {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dr-gauge-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.dr-gauge-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.dr-fill-hp {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.3s;
}

.dr-fill-fuel {
  height: 100%;
  background: #38bdf8;
  border-radius: 3px;
  transition: width 0.3s;
}

.dr-gauge-val {
  font-size: 9px;
  font-weight: 700;
  color: #e2e8f0;
  text-align: right;
}

.dr-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.dr-companions-box {
  flex-shrink: 0;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 11px;
  min-height: 92px;
  max-height: 175px;
  overflow-y: auto;
}

.dr-companions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dr-companion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 7px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.dr-comp-avatar {
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  flex-shrink: 0;
  overflow: hidden;
}

.dr-comp-avatar svg {
  width: 30px;
  height: 30px;
}

.dr-comp-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.38;
}

.dr-comp-name {
  font-weight: 700;
  color: #0f172a;
  margin-right: 4px;
  display: inline-block;
}

.dr-comp-quote {
  color: #475569;
  font-style: italic;
}

.dr-actions-section {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.dr-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 420px) {
  .dr-actions-grid {
    grid-template-columns: 1fr;
  }
}

.dr-act-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.dr-act-btn:hover {
  background: #f0fdf4;
  border-color: #86efac;
  transform: translateY(-1px);
}

.dr-act-btn:active {
  transform: scale(0.97);
}

.dr-act-btn.done {
  opacity: 0.65;
  background: #f1f5f9;
  border-color: #e2e8f0;
  cursor: default;
}

.dr-act-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.dr-act-info strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 1px;
}

.dr-act-info small {
  display: block;
  font-size: 10px;
  color: #64748b;
  line-height: 1.25;
}

.dr-feedback {
  background: #fef3c7;
  border: 1px solid #fde047;
  color: #92400e;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  animation: fadeIn 0.2s ease;
}

.dr-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.dr-resume-btn {
  flex: 2;
  font-size: 13px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.dr-resume-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.dr-turnback-btn {
  flex: 1;
  font-size: 12px;
  padding: 10px 8px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  border-radius: 10px;
}

.dr-turnback-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Educational Systems: Season HUD, Tabs & Badges */
.hud-season {
  background: linear-gradient(135deg, #15803d, #166534);
  color: #ffffff !important;
  font-weight: 700;
  border: 1px solid #22c55e;
  transition: all 0.2s ease;
}

.hud-season:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
}

.btn-pill {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-pill.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  font-weight: 700;
}

.iucn-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  vertical-align: middle;
}




/* --- Explorer Level Profile Card, XP & Skill Trees --- */
.level-profile-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lpc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.lpc-badge-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lpc-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
}
.lpc-titles h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}
.lpc-cap {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.lpc-sp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 4px 12px;
}
.lpc-sp-label {
  font-size: 10px;
  color: #fcd34d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lpc-sp-val {
  font-size: 17px;
  font-weight: 800;
  color: #38bdf8;
}
.lpc-xp-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lpc-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
}
.lpc-xp-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.lpc-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #3b82f6);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.lpc-xp-fill.maxed {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Category Filter Tabs */
.skills-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.skills-tab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 16px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.skills-tab-btn:hover {
  background: #e2e8f0;
}
.skills-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.skill-tree-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
}
.skill-tree-header {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.perk-card {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.perk-card.locked {
  opacity: 0.65;
  background: #f8fafc;
}
.perk-card.unlocked {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}
.perk-card.available {
  border-color: #38bdf8;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.2);
}
.perk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.perk-title {
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
}
.perk-req-badge {
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 6px;
}
.perk-card.unlocked .perk-req-badge {
  background: #dcfce7;
  color: #15803d;
}
.perk-desc {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}
.perk-btn {
  align-self: flex-end;
  background: #0284c7;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
}
.perk-btn:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}
.perk-btn.btn-unlocked {
  background: #10b981;
  color: white;
  cursor: default;
}

/* --- Pre-Drive Vehicle Inspection Modal --- */
.pd-dest-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  text-align: center;
}
.pd-advisory-card {
  display: flex;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.pd-advisory-card.ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.pd-advisory-card.ok strong {
  color: #065f46;
}
.pd-advisory-card.ok p {
  color: #047857;
}
.pd-adv-icon {
  font-size: 24px;
  line-height: 1;
}
.pd-adv-text strong {
  display: block;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 2px;
}
.pd-adv-text p {
  margin: 0;
  font-size: 11.5px;
  color: #78350f;
  line-height: 1.4;
}
.pd-status-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-status-card.warning {
  border-color: #f59e0b;
  background: #fffdf5;
}
.pd-stat-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}
.pd-stat-header strong.warn {
  color: #d97706;
}
.pd-stat-header strong.ok {
  color: #10b981;
}
.pd-bar-track {
  height: 9px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.pd-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}
.pd-fuel-fill {
  background: linear-gradient(90deg, #10b981, #059669);
}
.pd-fuel-fill.low {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
}
.pd-health-fill {
  background: linear-gradient(90deg, #3b82f6, #0284c7);
}
.pd-health-fill.low {
  background: linear-gradient(90deg, #ef4444, #f97316);
}
.pd-action-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s ease;
}
.pd-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.pd-bottom-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.pd-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}
.pd-btn-secondary {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Outback Calendar & 4 Seasons Modal --- */
.cal-banner {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.cal-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cal-date-main {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
}
.cal-time-badge {
  background: rgba(255,255,255,0.12);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}
.cal-season-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #38bdf8;
  margin-bottom: 6px;
}
.cal-season-title strong {
  color: #f8fafc;
  font-weight: 700;
}
.cal-season-sub {
  font-size: 11px;
  color: #94a3b8;
}
.cal-season-lore {
  margin: 0;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
}
.cal-bonus-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.cal-bonus-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}
.cal-bonus-card p {
  margin: 0;
  font-size: 11.5px;
  color: #166534;
  line-height: 1.35;
}
.cal-weather-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}
.cal-wx-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cal-wx-loc {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.cal-wx-top h4 {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.cal-wx-temp-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 10px;
}
.cal-wx-temp {
  font-size: 18px;
  font-weight: 800;
  color: #0284c7;
}
.cal-wx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.cal-wx-cell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}
.cw-label {
  font-size: 9.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}
.cal-wx-cell strong {
  font-size: 12px;
  color: #0f172a;
}
.cal-uv-tip {
  font-size: 11px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 6px 8px;
  line-height: 1.35;
}

.photo-cap-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 2px;
}

.photo-cap-tasl {
  font-size: 10px;
  color: #475569;
  line-height: 1.35;
}

.photo-cap-tasl a {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}

.photo-cap-tasl a:hover {
  text-decoration: underline;
}

