:root {
  --map-water: #bae6fd;
  --map-water-deep: #0284c7;
  --map-land: #fef9c3;
  --map-gotaland: #86efac;
  --map-svealand: #fde047;
  --map-norrland: #93c5fd;
  --map-stroke: #475569;
  --map-hover: #f59e0b;
  --map-active: #ef4444;
  --expedition-gold: #d97706;
  --expedition-dark: #1e293b;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --border-radius: 18px;
}

body.expedition-game-page {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
  min-height: 100vh;
  color: #1e293b;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow-x: hidden;
}

/* Navbar */
.expedition-navbar {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
  color: #ffffff;
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.expedition-brand {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.expedition-brand:hover {
  color: #fef08a;
  text-decoration: none;
}

.expedition-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hud-pill {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 6px 14px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Level Selection Bar */
.level-nav-bar {
  background: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.level-chip-btn {
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 25px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.level-chip-btn:hover {
  border-color: #0284c7;
  color: #0369a1;
}

.level-chip-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.35);
}

/* Interactive Map Canvas Card */
.map-card-wrapper {
  background: #ffffff;
  border-radius: var(--border-radius);
  border: 3px solid #cbd5e1;
  box-shadow: var(--card-shadow);
  padding: 16px;
  position: relative;
  text-align: center;
}

.map-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.svg-map-container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 100%);
  border-radius: 16px;
  border: 2px solid #93c5fd;
  padding: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.sverige-svg {
  width: 100%;
  height: auto;
  max-height: 720px;
  display: block;
  overflow: visible;
}

/* SVG Interactive Elements */
[data-answer] {
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s, filter 0.2s;
}

/* Landsdelar Paths */
.region-path {
  stroke: #334155;
  stroke-width: 2;
  stroke-linejoin: round;
}

.region-norrland {
  fill: #bfdbfe;
}

.region-svealand {
  fill: #fef08a;
}

.region-gotaland {
  fill: #bbf7d0;
}

/* Hover on landsdelar */
.region-path:hover {
  fill: #fde047;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

/* Landskap Paths */
.province-path {
  fill: #fef9c3;
  stroke: #64748b;
  stroke-width: 1.5;
}

.province-path:hover {
  fill: #fed7aa;
  stroke: #ea580c;
  stroke-width: 2.5;
}

/* Lakes */
.lake-path {
  fill: #0284c7;
  stroke: #0369a1;
  stroke-width: 1.5;
}

.lake-path:hover {
  fill: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

/* Rivers */
.river-path {
  fill: none;
  stroke: #0284c7;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.river-path:hover {
  stroke: #0ea5e9;
  stroke-width: 5;
  filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.8));
}

/* Cities & Pins */
.city-group {
  cursor: pointer;
}

.city-pin {
  fill: #ef4444;
  stroke: #ffffff;
  stroke-width: 2;
  transition: r 0.15s, fill 0.15s;
}

.city-ring {
  fill: none;
  stroke: #ef4444;
  stroke-width: 1.5;
  opacity: 0.7;
}

.city-group:hover .city-pin {
  fill: #f59e0b;
  r: 9;
}

.city-label-text {
  font-size: 11px;
  font-weight: 800;
  fill: #0f172a;
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  pointer-events: none;
}

/* Highlighted Correct & Target State */
[data-answer].correct-highlight {
  fill: #22c55e !important;
  stroke: #15803d !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.8));
}

[data-answer].wrong-highlight {
  fill: #ef4444 !important;
  stroke: #991b1b !important;
  stroke-width: 3 !important;
}

/* Mission & Question Side Card */
.mission-card {
  background: #ffffff;
  border-radius: var(--border-radius);
  border: 3px solid #cbd5e1;
  box-shadow: var(--card-shadow);
  padding: 22px;
  position: relative;
}

.mission-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.mission-headline {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 8px;
}

.mission-instruction {
  font-size: 1.05rem;
  color: #475569;
  margin-bottom: 20px;
}

/* Prompt Focus Box */
.prompt-target-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 2px solid #334155;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.prompt-target-name {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
}

/* Multiple Choice Fallback for Identify Mode */
.choices-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 576px) {
  .choices-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.choice-btn {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  text-align: center;
}

.choice-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.choice-btn.correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.choice-btn.wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

/* Feedback Banner */
.feedback-card {
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

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

.feedback-success {
  background: #ecfdf5;
  color: #065f46;
  border: 2px solid #a7f3d0;
}

.feedback-hint {
  background: #fffbeb;
  color: #92400e;
  border: 2px solid #fde68a;
}

/* Next Mission Button */
.btn-next-mission {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 12px;
  padding: 14px 24px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.btn-next-mission:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* Expedition Log Sidebar */
.log-sidebar {
  background: #ffffff;
  border-radius: var(--border-radius);
  border: 2px solid #e2e8f0;
  padding: 18px;
  margin-top: 18px;
  box-shadow: var(--card-shadow);
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.log-item.completed {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* Modal finish */
.modal-expedition {
  border-radius: 20px;
  border: 3px solid #0284c7;
  overflow: hidden;
}

.modal-expedition .modal-header {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: #ffffff;
  border-bottom: none;
}
