:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Inter, sans-serif;
  color: #0f172a;
  --sky-bg: #e0f2fe;
  --navy: #0f172a;
  --slate-dark: #1e293b;
  --slate-subtle: #64748b;
  --slate-border: rgba(15, 23, 42, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.9);
  --blue: #0284c7;
  --blue-light: #e0f2fe;
  --accent-orange: #ea580c;
  --accent-red: #e11d48;
  --green: #059669;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, #bae6fd 0%, #e0f2fe 35%, #f1f5f9 70%, #f8fafc 100%);
  color: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 28px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 700;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--slate-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.back-link:hover {
  background: #ffffff;
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

.title-box {
  text-align: left;
}

.title-box .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  background: var(--blue-light);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.title-box h1 {
  margin: 2px 0 0;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.header-center {
  display: flex;
  justify-content: center;
  flex: 1;
}

/* Sleek Segmented Mode Control */
.mode-pills {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.06);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  gap: 2px;
}

.mode-pill {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.mode-pill:hover {
  color: var(--navy);
}

.mode-pill.active {
  background: #ffffff;
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.mode-pill.super-pill.active {
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-orange) 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.3);
}

.mode-pill.learn-pill.active {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--slate-border);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
  color: #334155;
}

.tool-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.tool-btn:active {
  transform: translateY(1px);
}

.tool-btn.active {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Tour & Stage Status Bar (Aerospace Flight Strip) */
.tour-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 8px 18px;
  margin-bottom: 8px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

.stage-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-tag {
  background: #0f172a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 6px;
}

.stage-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.stage-progress-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 300px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-progress-box.super-theme .progress-fill {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
}

.progress-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-subtle);
  white-space: nowrap;
}

.flight-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--slate-border);
  padding: 4px 10px;
  border-radius: 8px;
}

.metric-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--slate-subtle);
  letter-spacing: 0.1em;
}

.metric-chip strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

#speed-chip.super-active strong {
  color: var(--accent-red);
}

#multiplier-chip strong {
  color: var(--blue);
}

/* Main Mission HUD (Glass Cockpit) */
.mission-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 12px 20px;
  margin-bottom: 12px;
  box-shadow: 0 6px 24px -3px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.speak-btn {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.speak-btn:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.speak-btn:active {
  transform: translateY(1px);
}

.mission-text {
  display: flex;
  flex-direction: column;
}

.mission-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  margin-bottom: 2px;
}

.target-country {
  font-size: clamp(19px, 3.2vw, 26px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.target-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-subtle);
  margin-top: 2px;
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--slate-border);
  border-radius: 12px;
  padding: 6px 14px;
  min-width: 68px;
}

.stat-pill span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--slate-subtle);
}

.stat-pill strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Stage & Canvas Viewport */
.stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #38bdf8;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

#sky-canvas {
  display: block;
  width: 100%;
  height: min(65vh, 560px);
  min-height: 420px;
  touch-action: none;
  cursor: pointer;
}

/* Overlays / Modals (2026 Elegance) */
.overlay-panel {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(440px, calc(100% - 36px));
  height: max-content;
  max-height: 90%;
  overflow-y: auto;
  padding: 32px 28px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.22);
  z-index: 20;
}

.overlay-panel.hidden {
  display: none;
}

.overlay-icon {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 12px;
}

.overlay-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.overlay-panel p {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate-subtle);
}

.fun-fact-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0 24px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  color: #0369a1;
  text-align: left;
}

.fun-fact-box b {
  color: #0c4a6e;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.big-btn {
  width: 100%;
  max-width: 320px;
  padding: 14px 26px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.big-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  background: #0369a1;
}

.big-btn:active {
  transform: translateY(1px);
}

.super-fire-btn {
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-orange) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35) !important;
}

.super-fire-btn:hover {
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.5) !important;
  transform: translateY(-2px);
}

.academy-btn {
  background: #f8fafc !important;
  color: var(--navy) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

.academy-btn:hover {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
}

.game-hint-tag {
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: #ffedd5;
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 14px;
  display: inline-block;
}

/* Passport Stamp Box */
.passport-stamp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 0 24px;
}

.stamp {
  border: 2px dashed var(--blue);
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  padding: 8px 24px;
  border-radius: 12px;
  transform: rotate(-3deg);
  letter-spacing: 0.12em;
  background: rgba(2, 132, 199, 0.05);
}

.stamp-stars {
  font-size: 22px;
  letter-spacing: 4px;
}

/* Trophy Box */
.trophy-badge-box {
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 16px 0 24px;
}

.trophy-stars {
  font-size: 24px;
  margin-bottom: 6px;
}

.trophy-badge-box p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}

/* Academy Modal (Flag Atlas) */
.overlay-panel.academy-modal {
  max-width: 940px;
  width: 94%;
  max-height: 86vh;
  overflow-y: auto;
  text-align: left;
  padding: 28px 32px;
  border-radius: 24px;
}

.academy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.academy-header h2 {
  font-size: 24px;
  margin: 0 0 4px;
}

.academy-header p {
  margin: 0;
  font-size: 13px;
  color: var(--slate-subtle);
}

.close-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: grid;
  place-items: center;
}

.close-btn:hover {
  background: #e2e8f0;
  color: var(--navy);
}

.academy-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.continent-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.quiz-toggle-btn {
  background: var(--blue-light);
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quiz-toggle-btn:hover {
  background: #bae6fd;
  color: #0369a1;
}

/* Practice Quiz Box */
.quiz-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.quiz-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quiz-badge {
  background: #16a34a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 6px;
}

.quiz-question-row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #14532d;
  flex: 1;
}

.quiz-score-pill {
  background: #ffffff;
  border: 1px solid #86efac;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.quiz-choice-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.quiz-choice-card:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.15);
}

.quiz-choice-card canvas {
  width: 90px;
  height: 58px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.quiz-choice-card span {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.quiz-feedback {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  min-height: 20px;
}

/* Academy Cards Grid */
.academy-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.academy-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.academy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

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

.card-continent-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--slate-subtle);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

.card-flag-preview {
  display: flex;
  justify-content: center;
  margin: 4px 0 12px;
}

.card-flag-preview canvas {
  width: 120px;
  height: 78px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.card-country-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.card-capital {
  font-size: 12px;
  color: var(--slate-subtle);
  margin-bottom: 8px;
}

.card-capital b {
  color: var(--navy);
  font-weight: 600;
}

.card-hint {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  margin-bottom: 14px;
  flex: 1;
}

.card-btn-row {
  display: flex;
  gap: 8px;
}

.card-listen-btn {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.card-listen-btn:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.card-fly-btn {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-fly-btn:hover {
  background: #0369a1;
}

/* Bottom Controls & Passport Badge Shelf */
.bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.kid-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.steer-btn {
  width: 64px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--slate-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  color: var(--navy);
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.steer-btn:active {
  transform: scale(0.96);
  background: #ffffff;
}

.boost-btn {
  height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #f59e0b 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.boost-btn:active {
  transform: scale(0.96);
}

/* Passport Badge Shelf */
.sticker-shelf {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}

.shelf-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--slate-subtle);
  margin-bottom: 8px;
}

.shelf-title span:last-child {
  color: var(--blue);
  background: var(--blue-light);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
}

.stickers-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--slate-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s;
  cursor: pointer;
  color: var(--navy);
}

.flag-badge:hover {
  transform: translateY(-1px);
}

.flag-badge.locked {
  opacity: 0.38;
  filter: grayscale(0.8);
}

.flag-badge canvas {
  width: 20px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
}

/* Toast Message */
.toast-msg {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 15;
}

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

@media (max-width: 768px) {
  .wrap {
    width: calc(100% - 20px);
    padding: 10px 0 20px;
  }
  header {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .tour-status-bar {
    padding: 8px 12px;
    gap: 10px;
  }
  .stage-progress-box {
    max-width: 140px;
  }
  .mission-hud {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
  }
  .hud-left {
    justify-content: space-between;
  }
  .hud-stats {
    justify-content: flex-end;
  }
  #sky-canvas {
    height: 55vh;
    min-height: 380px;
  }
  .steer-btn {
    width: 58px;
    height: 46px;
    font-size: 18px;
  }
  .boost-btn {
    height: 46px;
    font-size: 13px;
    padding: 0 18px;
  }
}
