/**
 * Geography Map — fullscreen India atlas with Leaflet.
 */

/* Hide app chrome for immersive map */
body.geo-map-active .sidebar,
body.geo-map-active .navbar {
  display: none;
}

body.geo-map-active #mainContent {
  padding: 0;
  max-width: none;
}

body.geo-map-fullscreen .gmap {
  position: fixed;
  inset: 0;
  z-index: 10060;
}

/* ── Layout ─────────────────────────────────────────────────── */

.gmap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--color-bg, #0f1419);
  overflow: hidden;
  animation: gmap-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes gmap-enter {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.gmap__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 1000;
}

[data-theme="light"] .gmap__header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.gmap__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary, #94a3b8);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

[data-theme="light"] .gmap__back {
  border-color: rgba(0, 0, 0, 0.12);
}

.gmap__back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary, #f1f5f9);
}

.gmap__header-center {
  text-align: center;
}

.gmap__kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
  margin: 0;
}

.gmap__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary, #f8fafc);
}

.gmap__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gmap-mode-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--color-text-secondary, #94a3b8);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.gmap-mode-btn.is-active {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.gmap-mode-btn[data-mode="test"].is-active {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.gmap__fs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--color-text-secondary, #94a3b8);
  cursor: pointer;
  transition: background 0.2s;
}

.gmap__fs-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.gmap__body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.gmap__sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 1rem;
  background: rgba(15, 20, 25, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gmap__layers-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.gmap__layers-scroll::-webkit-scrollbar {
  width: 5px;
}

.gmap__layers-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.gmap-layer-group {
  margin-bottom: 0.85rem;
}

.gmap-layer-group__title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
  margin: 0 0 0.4rem;
  padding-left: 0.15rem;
}

.gmap-layer-group__items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gmap-layer__label {
  flex: 1;
  line-height: 1.25;
}

[data-theme="light"] .gmap__sidebar {
  background: rgba(248, 250, 252, 0.95);
  border-right-color: rgba(0, 0, 0, 0.06);
}

.gmap__sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #64748b);
  margin: 0 0 0.75rem;
}

.gmap__layers {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.gmap-layer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-primary, #e2e8f0);
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  transition: all 0.2s;
}

[data-theme="light"] .gmap-layer {
  background: rgba(0, 0, 0, 0.03);
}

.gmap-layer:hover {
  background: rgba(255, 255, 255, 0.08);
}

.gmap-layer.is-active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.gmap-layer__icon {
  font-size: 1.1rem;
}

.gmap__stats {
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 1rem;
}

.gmap__stats-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 0.6rem;
}

.gmap__stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: var(--color-text-secondary, #94a3b8);
}

.gmap__stat-row strong {
  color: var(--color-text-primary, #f1f5f9);
}

.gmap__sidebar-hint {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.gmap__map-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
  cursor: crosshair;
}

/* Cursor-following hover info card */
.gmap-hover-card {
  position: absolute;
  z-index: 700;
  width: min(300px, calc(100% - 2rem));
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  left: 0;
  top: 0;
  transform: scale(0.96);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-theme="light"] .gmap-hover-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.gmap-hover-card--visible {
  opacity: 1;
  transform: scale(1);
}

.gmap-hover-card--hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
}

.gmap-hover-card__tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.gmap-hover-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--color-text-primary, #f8fafc);
  line-height: 1.3;
}

.gmap-hover-card__sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 0.35rem;
}

.gmap-hover-card__body {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
}

.gmap__map {
  width: 100%;
  height: 100%;
  background: #1e293b;
  z-index: 1;
}

.gmap__map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 25, 0.85);
  z-index: 500;
  transition: opacity 0.4s, visibility 0.4s;
}

.gmap__map-loading--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gmap__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: gmap-spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes gmap-spin {
  to { transform: rotate(360deg); }
}

.gmap__legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 400;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  color: #e2e8f0;
}

.gmap-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gmap-legend__item i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ── Leaflet overrides ──────────────────────────────────────── */

.gmap-river-label span {
  font-size: 10px;
  font-weight: 700;
  color: #1e40af;
  text-shadow: 0 0 3px #fff, 0 0 6px #fff, 1px 1px 0 #fff;
  white-space: nowrap;
  pointer-events: none;
}

.gmap-dam-marker__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.6);
  animation: gmap-dam-pulse 2s ease-in-out infinite;
}

@keyframes gmap-dam-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.gmap-physical-marker span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.gmap-tooltip {
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gmap-river-line {
  transition: stroke-width 0.2s, opacity 0.2s;
}

.gmap-river-line:hover {
  cursor: pointer;
}

.gmap-thematic-marker__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gmap-thematic-marker:hover .gmap-thematic-marker__dot,
.gmap-dam-marker:hover .gmap-dam-marker__dot,
.gmap-physical-marker:hover span {
  transform: scale(1.35);
  box-shadow: 0 0 14px currentColor;
}

.gmap-physical-marker span {
  transition: transform 0.2s ease;
}

/* Pulse marker for test mode */
.gmap-pulse-marker__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: #fbbf24;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

.gmap-pulse-marker__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid rgba(251, 191, 36, 0.6);
  border-radius: 50%;
  animation: gmap-pulse-ring 1.5s ease-out infinite;
}

@keyframes gmap-pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.gmap__legend--hidden {
  display: none;
}

/* ── Test mode layout ───────────────────────────────────────── */

.gmap--test-mode .gmap__sidebar {
  display: none;
}

.gmap--test-mode .gmap__map-wrap {
  cursor: crosshair;
}

.gmap-test-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: 0.5rem;
  padding-right: 0.65rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.gmap-test-header--hidden {
  display: none;
}

.gmap-test-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.gmap-test-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s;
}

.gmap-test-dot--active {
  width: 9px;
  height: 9px;
  background: #0ea5e9;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

.gmap-test-dot--done {
  background: #22c55e;
}

.gmap-test-dot--wrong {
  background: #ef4444;
}

.gmap-test-header__score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-primary, #f1f5f9);
  white-space: nowrap;
}

.gmap-test-header__streak {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  animation: gmap-streak-pop 0.35s ease;
}

@keyframes gmap-streak-pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Floating test HUD on map */
.gmap-test-hud {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 650;
  width: min(520px, calc(100% - 2rem));
  border-radius: 16px;
  background: rgba(15, 20, 25, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: gmap-hud-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .gmap-test-hud {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0, 0, 0, 0.1);
}

.gmap-test-hud--hidden {
  display: none;
}

@keyframes gmap-hud-enter {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.gmap-test-hud__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.gmap-test-hud__progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.4s ease;
}

.gmap-test-hud__main {
  padding: 0.85rem 1rem 0.75rem;
}

.gmap-test-hud__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.gmap-test-hud__badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.gmap-test-hud__num {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gmap-test-hud__prompt {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  color: var(--color-text-secondary, #94a3b8);
  line-height: 1.35;
}

.gmap-test-hud__target {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
  color: var(--color-text-primary, #f8fafc);
  line-height: 1.2;
}

.gmap--hide-river-labels .gmap-river-label {
  display: none !important;
}

.gmap-test-hud__clue {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.gmap-test-hud--answered .gmap-test-hud__clue {
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.9rem;
}

.gmap-test-hud__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.gmap-test-hud__tap {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  width: 100%;
  text-align: center;
  padding: 0.35rem 0;
}

.gmap-test-hud__feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  margin-bottom: 0.55rem;
  animation: gmap-fade-in 0.25s ease;
}

.gmap-test-hud__feedback--hidden {
  display: none;
}

.gmap-test-hud__feedback--correct {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.gmap-test-hud__feedback--wrong {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.gmap-test-hud__result-icon {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.gmap-test-hud__feedback--correct .gmap-test-hud__result-icon { color: #22c55e; }
.gmap-test-hud__feedback--wrong .gmap-test-hud__result-icon { color: #ef4444; }

.gmap-test-hud__result-body strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
  color: var(--color-text-primary, #f1f5f9);
}

.gmap-test-hud__result-body p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
}

.gmap-test-hud__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.gmap-test-hud__skip,
.gmap-test-hud__next {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.gmap-test-hud__skip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.gmap-test-hud__skip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.gmap-test-hud__next {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.gmap-test-hud__next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.gmap-test-hud__next-timer {
  font-size: 0.72rem;
  opacity: 0.85;
}

.gmap-test-opt {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary, #e2e8f0);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gmap-test-opt:hover:not(:disabled) {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.12);
}

.gmap-test-opt.is-correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.gmap-test-opt.is-wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

/* ── Test panel (legacy removed) ────────────────────────────── */

.gmap__test-panel {
  flex-shrink: 0;
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: gmap-slide-up 0.35s ease-out;
}

[data-theme="light"] .gmap__test-panel {
  background: rgba(255, 255, 255, 0.98);
  border-top-color: rgba(0, 0, 0, 0.08);
}

.gmap__test-panel--hidden {
  display: none;
}

@keyframes gmap-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gmap__test-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.gmap__test-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0ea5e9, #6366f1);
  transition: width 0.4s ease;
}

.gmap__test-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
}

.gmap__test-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0ea5e9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gmap__test-prompt {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.25rem 0;
  color: var(--color-text-primary, #f1f5f9);
}

.gmap__test-blur {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fbbf24;
  margin: 0.25rem 0;
  filter: blur(0);
  animation: gmap-blur-reveal 0.5s ease;
}

@keyframes gmap-blur-reveal {
  from { letter-spacing: 0.3em; opacity: 0.5; }
  to { letter-spacing: 0.15em; opacity: 1; }
}

.gmap__test-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.gmap__test-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.gmap-test-opt {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary, #e2e8f0);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gmap-test-opt:hover:not(:disabled) {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.12);
}

.gmap-test-opt.is-correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.gmap-test-opt.is-wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.gmap__test-tap-hint {
  font-size: 0.85rem;
  color: #fbbf24;
  margin: 0;
  animation: gmap-tap-bounce 1.2s ease-in-out infinite;
}

@keyframes gmap-tap-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.gmap__test-actions {
  display: flex;
  gap: 0.5rem;
}

.gmap__test-feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: gmap-fade-in 0.3s ease;
}

.gmap__test-feedback--hidden {
  display: none;
}

.gmap__test-feedback--correct {
  background: rgba(34, 197, 94, 0.08);
}

.gmap__test-feedback--wrong {
  background: rgba(239, 68, 68, 0.08);
}

@keyframes gmap-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.gmap__test-result-icon {
  font-size: 1.25rem;
  font-weight: 700;
}

.gmap__test-feedback strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.gmap__test-feedback p {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* ── Popup & results ────────────────────────────────────────── */

.gmap__popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: min(320px, calc(100% - 2rem));
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .gmap__popup {
  background: rgba(255, 255, 255, 0.98);
}

.gmap__popup--visible {
  transform: translateX(0);
}

.gmap__popup--hidden {
  pointer-events: none;
}

.gmap__popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.gmap__popup h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  padding-right: 1.5rem;
  color: var(--color-text-primary, #f1f5f9);
}

.gmap__popup p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  color: #94a3b8;
  white-space: pre-line;
}

.gmap__results {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 800;
  animation: gmap-fade-in 0.4s ease;
}

.gmap__results--hidden {
  display: none;
}

.gmap__results-card {
  text-align: center;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  background: var(--color-bg-elevated, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: gmap-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gmap-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gmap__results-card h2 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 0.5rem;
}

.gmap__results-score {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0;
}

.gmap__results-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

/* ── Workspace card accent ──────────────────────────────────── */

.workspace-card--geography-map {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(99, 102, 241, 0.06));
  border-color: rgba(14, 165, 233, 0.2);
}

.workspace-card--geography-map:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.12);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .gmap__sidebar {
    display: none;
  }

  .gmap__header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .gmap-mode-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  .gmap__test-inner {
    grid-template-columns: 1fr;
  }

  .gmap__test-options {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .gmap__header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .gmap__back {
    justify-self: start;
  }

  .gmap__header-actions {
    justify-content: center;
  }
}
