:root,
:root[data-theme="light"] {
  --paper: #f5f7fa;
  --paper-dark: #e6ebf2;
  --ink: #152033;
  --muted: #5a6b7c;
  --ocean: #3d7ea8;
  --ocean-lit: #6ba3c7;
  --ocean-deep: #1e4d6b;
  --land: #8faf78;
  --outline: #8492a1;
  --accent: #0f5c6e;
  --accent-alt: #147a8c;
  --correct: #15803d;
  --wrong: #b91c1c;
  --highlight-learn: #15803d;
  --highlight-learn-stroke: #14532d;
  --box: rgba(90, 107, 124, 0.55);
  --page-glow: rgba(255, 255, 255, 0.55);
  --page-top: #eef2f7;
  --page-bottom: #e0e7ef;
  --modal-surface: rgba(255, 255, 255, 0.98);
  --modal-surface-end: rgba(245, 247, 250, 0.98);
  --space-near: #152033;
  --space-mid: #0b1018;
  --space-far: #05070c;
  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.85rem;
  --shadow-soft: 0 0.5rem 1.75rem rgba(21, 32, 51, 0.06), 0 0.2rem 0.6rem rgba(21, 32, 51, 0.04);
  --shadow-lift: 0 1rem 2.5rem rgba(21, 32, 51, 0.08), 0 0.35rem 1rem rgba(21, 32, 51, 0.05);
  --shadow-glow: 0 0.5rem 1.75rem rgba(45, 212, 191, 0.14);
  --ease-smooth: cubic-bezier(0.34, 1.15, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 0.32s var(--ease-smooth);
  --transition-fast: 0.22s var(--ease-out-soft);
  --border-soft: rgba(90, 107, 124, 0.1);
  --font-sans: "Nunito", "Segoe UI", sans-serif;
  --font-display: "Nunito", "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #151d29;
  --paper-dark: #0f1520;
  --ink: #eef3f8;
  --muted: #9aadc0;
  --ocean: #1f4f72;
  --ocean-lit: #3d7ea8;
  --ocean-deep: #0f2d45;
  --land: #6f8f5c;
  --outline: #7f93a8;
  --accent: #2dd4bf;
  --accent-alt: #5eead4;
  --correct: #15803d;
  --wrong: #b91c1c;
  --highlight-learn: #15803d;
  --highlight-learn-stroke: #14532d;
  --box: rgba(140, 160, 180, 0.4);
  --page-glow: rgba(45, 212, 191, 0.08);
  --page-top: #121925;
  --page-bottom: #0b1018;
  --modal-surface: rgba(24, 33, 46, 0.98);
  --modal-surface-end: rgba(16, 22, 32, 0.98);
  --space-near: #101822;
  --space-mid: #080c12;
  --space-far: #030507;
  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.85rem;
  --shadow-soft: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.22), 0 0.2rem 0.6rem rgba(0, 0, 0, 0.14);
  --shadow-lift: 0 1rem 2.5rem rgba(0, 0, 0, 0.28), 0 0.35rem 1rem rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 0.5rem 1.75rem rgba(45, 212, 191, 0.18);
  --ease-smooth: cubic-bezier(0.34, 1.15, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 0.32s var(--ease-smooth);
  --transition-fast: 0.22s var(--ease-out-soft);
  --border-soft: rgba(255, 255, 255, 0.08);
  --font-sans: "Nunito", "Segoe UI", sans-serif;
  --font-display: "Nunito", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  --sidebar-width: 4.5rem;
  margin: 0;
  min-height: 100vh;
  max-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 12% -8%, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(244, 114, 182, 0.06), transparent 50%),
    linear-gradient(180deg, #0b1018 0%, #070b12 100%);
  padding-left: var(--sidebar-width);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

button {
  font: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0.55rem 0.95rem;
  background:
    linear-gradient(180deg, #161c26 0%, #10151d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar-top,
.app-sidebar-bottom,
.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.app-sidebar-top {
  gap: 1.15rem;
}

.app-sidebar-nav {
  gap: 0.35rem;
}

.app-sidebar-bottom {
  gap: 0.75rem;
}

.app-sidebar-brand {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  color: #06252b;
  background: linear-gradient(145deg, #5eead4 0%, #14b8a6 100%);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.app-sidebar-brand:hover,
.app-sidebar-brand:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  outline: none;
}

.app-sidebar-brand svg {
  width: 1.35rem;
  height: 1.35rem;
}

.app-sidebar-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  color: rgba(156, 163, 175, 0.95);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.app-sidebar-item svg {
  width: 1.35rem;
  height: 1.35rem;
}

.app-sidebar-item:hover,
.app-sidebar-item:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.app-sidebar-item.is-active {
  color: #ffffff;
  background: rgba(45, 212, 191, 0.12);
}

.app-sidebar-item.is-active::after {
  content: "";
  position: absolute;
  right: -0.55rem;
  top: 50%;
  width: 0.18rem;
  height: 1.2rem;
  border-radius: 0.2rem 0 0 0.2rem;
  background: #2dd4bf;
  box-shadow: none;
  transform: translateY(-50%);
}

.app-sidebar-avatar {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #e8eef5;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(145deg, #5b7cfa 0%, #3d57c7 100%);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.app-sidebar-avatar:hover,
.app-sidebar-avatar:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.06);
  outline: none;
}

.app-sidebar-avatar-initials {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Give MapLibre real dimensions while the game screen is still off-screen. */
.game-screen.map-warmup {
  display: block !important;
  visibility: hidden;
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.account-bar {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  max-width: calc(100vw - 1.7rem);
}

.account-bar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.account-button {
  min-width: auto;
  padding: 0.55rem 0.95rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--accent);
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.account-button-secondary {
  background: rgba(21, 32, 51, 0.78);
}

.account-button:hover,
.account-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.account-greeting {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.account-offline-note {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
}

.page-shell {
  height: 100vh;
  max-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.landing-screen {
  min-height: 100%;
  height: auto;
  max-height: none;
  overflow-y: visible;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.9fr);
  grid-template-areas:
    "path path"
    "globe quest"
    "panel panel";
  gap: 1.25rem;
  padding: 1.15rem;
  align-items: stretch;
}

.learning-path {
  grid-area: path;
}

.mastery-globe {
  grid-area: globe;
}

.landing-hero.quest-log {
  grid-area: quest;
}

.landing-panel {
  grid-area: panel;
}

.learning-path {
  border-radius: 1.35rem;
  padding: clamp(1.15rem, 2.8vw, 1.75rem);
  color: #f4f7fb;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    linear-gradient(165deg, #121826 0%, #0c111a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lift);
}

.learning-path-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.learning-path-intro {
  flex: 1 1 18rem;
  min-width: 0;
}

.learning-path-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  font-weight: 700;
}

.learning-path-kicker-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}

.learning-path-title {
  margin: 0.45rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.learning-path-title-strong {
  color: #ffffff;
}

.learning-path-title-muted {
  color: rgba(244, 247, 251, 0.42);
  font-weight: 700;
}

.learning-path-subtitle {
  margin: 0;
  max-width: 36rem;
  color: rgba(156, 163, 175, 0.95);
  line-height: 1.55;
  font-size: 0.92rem;
  font-weight: 400;
}

.learning-path-progress {
  flex: 0 1 16rem;
  min-width: 12rem;
  margin-top: 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
}

.learning-path-progress-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(156, 163, 175, 0.9);
}

.learning-path-progress-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.learning-path-progress-bar {
  width: 100%;
  max-width: 14rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.learning-path-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #5eead4;
  transition: width 0.35s ease;
}

.learning-path-section-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.learning-path-section-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #ffffff;
  text-shadow: none;
}

.learning-path[data-learning-section="countries"] .learning-path-section-title {
  color: #5eead4;
  text-shadow: none;
}

.learning-path[data-learning-section="flags"] .learning-path-section-title {
  color: #ffd38a;
  text-shadow: none;
}

.learning-path[data-learning-section="capitals"] .learning-path-section-title {
  color: #9fd8ff;
  text-shadow: none;
}

.learning-path-section-button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.learning-path-section-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(94, 234, 212, 0.35);
}

.learning-path-auth-gate {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(94, 234, 212, 0.28);
  align-content: center;
}

.learning-path-auth-gate p {
  margin: 0;
  max-width: 36rem;
  color: #5eead4;
  font-weight: 500;
  line-height: 1.35;
  font-size: 0.86rem;
}

.learning-path-auth-gate .landing-hero-cta {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.learning-path-play-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.learning-path-guide {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(21, 32, 51, 0.08);
  box-shadow: var(--shadow-soft);
}

.learning-path-guide-image {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  border-radius: 0.9rem;
  flex-shrink: 0;
}

.learning-path-guide-copy {
  min-width: 0;
}

.learning-path-guide-name {
  margin: 0 0 0.15rem;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c96e45;
}

.learning-path-guide-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--accent);
}

:root[data-theme="dark"] .learning-path-guide {
  background: rgba(28, 38, 52, 0.95);
  border-color: rgba(180, 200, 220, 0.14);
}

:root[data-theme="dark"] .learning-path-guide-text {
  color: var(--ink);
}

.learning-path-play-area.hidden,
.learning-path-auth-gate.hidden,
.admin-only-control.hidden {
  display: none !important;
}

.guided-reviews-toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0 0;
  color: rgba(244, 247, 251, 0.92);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.guided-reviews-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.guided-reviews-switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.55rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.18s ease;
}

.guided-reviews-switch::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.guided-reviews-toggle input:checked + .guided-reviews-switch {
  background: #5eead4;
}

.guided-reviews-toggle input:checked + .guided-reviews-switch::after {
  transform: translateX(1.1rem);
}

.guided-reviews-toggle input:focus-visible + .guided-reviews-switch {
  outline: 2px solid rgba(94, 234, 212, 0.75);
  outline-offset: 3px;
}

.guided-reviews-label {
  line-height: 1.3;
}

.learning-path-section-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.learning-path-section-button.hidden {
  display: none;
}

.learning-path-scroller {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.learning-path-scroll-button {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #f7f4ec;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.learning-path-scroll-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
}

.learning-path-scroll-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.learning-path-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  gap: 1.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 0.35rem 0.15rem 0.55rem;
}

.learning-path-list > .learning-level {
  flex: 0 0 18.5rem;
}

.learning-path-list::-webkit-scrollbar {
  display: none;
}

.learning-level {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  min-height: 11.5rem;
  padding: 1rem 1.05rem 0.95rem;
  text-align: left;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(12, 18, 30, 0.92));
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-soft), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.learning-level::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.2rem;
  width: 1.05rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.45), rgba(148, 163, 184, 0.08));
  pointer-events: none;
}

.learning-level:last-child::after {
  display: none;
}

.learning-level:hover:not(.is-locked) {
  transform: translateY(-3px) scale(1.01);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 189, 248, 0.4);
}

.learning-level.is-locked {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.25);
}

.learning-level.is-completed {
  border: 2px solid rgba(52, 211, 153, 0.72);
  background:
    linear-gradient(165deg, rgba(16, 185, 129, 0.14), rgba(12, 18, 30, 0.94));
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.18),
    0 0 1.1rem rgba(16, 185, 129, 0.22),
    0 0.55rem 1.5rem rgba(34, 197, 94, 0.1);
}

.learning-level.is-current {
  border: 3px solid #22d3ee;
  background:
    linear-gradient(165deg, rgba(34, 211, 238, 0.18), rgba(10, 18, 32, 0.96));
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.55),
    0 0 1.1rem rgba(34, 211, 238, 0.55),
    0 0 2.4rem rgba(34, 211, 238, 0.38),
    0 0 3.6rem rgba(6, 182, 212, 0.22),
    inset 0 0 1.2rem rgba(34, 211, 238, 0.08);
  z-index: 2;
}

.learning-level.is-review:not(.is-completed):not(.is-current) {
  border-color: rgba(120, 176, 220, 0.4);
  background: rgba(79, 143, 212, 0.12);
}

.learning-level-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.learning-level-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.learning-level.is-completed .learning-level-tag {
  color: #86efac;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.learning-level.is-current .learning-level-tag {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.55);
  box-shadow: 0 0 0.85rem rgba(34, 211, 238, 0.35);
  letter-spacing: 0.12em;
}

.learning-level-badge {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #f7f4ec;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.learning-level.is-completed .learning-level-badge {
  background: #22c55e;
  color: #052e16;
  border-color: rgba(187, 247, 208, 0.65);
  box-shadow: 0 0 1rem rgba(34, 197, 94, 0.55);
}

.learning-level.is-current .learning-level-badge {
  background: rgba(8, 51, 68, 0.85);
  color: #a5f3fc;
  border: 2px solid #22d3ee;
  box-shadow: 0 0 1rem rgba(34, 211, 238, 0.55);
}

.learning-level.is-review .learning-level-badge {
  background: rgba(79, 143, 212, 0.35);
}

.learning-level-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.learning-level-title {
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.learning-level-mode {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 244, 236, 0.62);
}

.learning-level-copy {
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.learning-level-status {
  margin-top: auto;
  margin-bottom: 0.2rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(148, 163, 184, 0.9);
}

.learning-level.is-completed .learning-level-status {
  color: #86efac;
}

.learning-level.is-current .learning-level-status {
  color: #67e8f9;
}

.learning-level-progress {
  display: block;
  width: 100%;
  height: 0.48rem;
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.7);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(120, 210, 255, 0.1);
}

.learning-level-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2 0%, #22d3ee 45%, #67e8f9 100%);
  box-shadow:
    0 0 0.45rem rgba(34, 211, 238, 0.9),
    0 0 1rem rgba(34, 211, 238, 0.5);
  transition: width 0.35s ease;
}

.learning-level.is-current .learning-level-progress-fill {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.22) 0 0.22rem,
      transparent 0.22rem 0.44rem
    ),
    linear-gradient(90deg, #0ea5e9 0%, #22d3ee 50%, #67e8f9 100%);
  box-shadow:
    0 0 0.55rem rgba(34, 211, 238, 1),
    0 0 1.2rem rgba(34, 211, 238, 0.55);
}

.learning-level.is-locked .learning-level-progress-fill {
  box-shadow: none;
  background: rgba(160, 180, 200, 0.35);
}

.learning-level.is-completed .learning-level-progress-fill {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 55%, #86efac 100%);
  box-shadow:
    0 0 0.45rem rgba(74, 222, 128, 0.9),
    0 0 1rem rgba(34, 197, 94, 0.45);
}

.results-modal-actions .results-next-button {
  background: linear-gradient(180deg, #f0a04b, #e08a2e);
  color: #fff;
  border: none;
}

.results-modal-actions .results-next-button:hover {
  filter: brightness(1.05);
}

.results-modal-actions .results-prev-button {
  background: rgba(255, 255, 255, 0.92);
  color: #3d74b0;
  border: 1px solid rgba(61, 116, 176, 0.35);
}

.results-modal-actions .results-prev-button:hover {
  background: rgba(61, 116, 176, 0.08);
}

.landing-hero,
.landing-panel {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.landing-hero.quest-log {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  container-type: inline-size;
  container-name: landing-hero;
  padding: 1.25rem 1.25rem 1.3rem;
  color: #f4f7fb;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse 55% 50% at 100% 0%, rgba(244, 114, 182, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 45% at 0% 100%, rgba(56, 189, 248, 0.07), transparent 55%),
    linear-gradient(165deg, #121826 0%, #0c111a 100%);
}

.landing-hero.quest-log .quest-log-kicker {
  color: #f9a8d4;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  font-weight: 700;
}

.landing-hero.quest-log .quest-log-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin-top: 0.2rem;
}

.landing-hero.quest-log .landing-brand-row {
  align-items: flex-start;
}

.landing-hero.quest-log .daily-streak-button {
  order: 3;
  width: 100%;
  max-width: none;
  margin-top: 0.15rem;
}

.landing-hero.quest-log .daily-challenges {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  gap: 0.65rem;
}

.landing-hero.quest-log .landing-brand-copy {
  position: relative;
  flex: 1 1 auto;
  padding-right: 3.5rem;
}

.landing-hero.quest-log .daily-challenges-meta {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.55);
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 0 0.85rem rgba(244, 63, 94, 0.22);
}

.player-xp-panel {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(34, 211, 238, 0.06)),
    rgba(8, 14, 24, 0.55);
}

.player-xp-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.player-xp-level {
  color: #fde68a;
  font-size: 0.9rem;
  font-weight: 750;
}

.player-xp-level strong {
  font-weight: 800;
  color: #fef3c7;
}

.player-xp-total {
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.player-xp-track {
  margin-top: 0.45rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.75);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.12);
}

.player-xp-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 55%, #fde68a 100%);
  box-shadow: 0 0 0.55rem rgba(251, 191, 36, 0.55);
  transition: width 0.35s ease;
}

.player-xp-hint {
  margin: 0.4rem 0 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.72rem;
  line-height: 1.35;
}

.landing-hero.quest-log .landing-daily-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
}

.landing-hero.quest-log .daily-practice-goal {
  order: 2;
}

.landing-hero.quest-log .daily-challenges {
  order: 1;
  flex: 1 1 auto;
}

.landing-hero.quest-log .daily-challenges-note {
  display: none;
}

.landing-hero.quest-log .landing-hero-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.15rem;
}

.landing-hero.quest-log .landing-hero-cta {
  width: 100%;
  text-align: center;
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, rgba(36, 48, 72, 0.95) 0%, rgba(22, 30, 48, 0.98) 100%);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0.35rem 1rem rgba(0, 0, 0, 0.25);
  font-weight: 750;
}

.landing-hero.quest-log .landing-hero-cta:not(.landing-hero-cta-secondary) {
  background: linear-gradient(180deg, rgba(36, 48, 72, 0.95) 0%, rgba(22, 30, 48, 0.98) 100%);
}

.landing-hero.quest-log::after {
  content: "";
  position: absolute;
  right: -2.5rem;
  bottom: -3.5rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.landing-hero::before {
  display: none;
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.95rem;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 100%;
}

.landing-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
  position: relative;
}

.landing-brand-copy {
  min-width: 0;
}

.landing-brand-row .daily-streak-button {
  width: auto;
  max-width: 13rem;
  padding: 0.55rem 0.75rem;
  margin: 0;
}

.landing-daily-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
  align-items: start;
}

@container landing-hero (min-width: 36rem) {
  .landing-daily-row {
    grid-template-columns: minmax(12rem, 0.95fr) minmax(0, 1.25fr);
    gap: 0.65rem;
  }
}

.landing-hero-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  width: 100%;
  max-width: none;
}

.landing-hero-globe {
  display: none;
}

.landing-globe-orbit {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(210, 235, 245, 0.28);
  box-shadow: 0 0 0 0.35rem rgba(126, 183, 216, 0.05);
  pointer-events: none;
}

.landing-globe-orbit-inner {
  inset: 14%;
  border-color: rgba(183, 207, 143, 0.22);
  animation: landing-orbit-spin 18s linear infinite;
  border-style: dashed;
}

.landing-globe {
  position: relative;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  filter: drop-shadow(0 0.55rem 1.1rem rgba(8, 24, 36, 0.42));
}

.landing-globe-sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.5), transparent 24%),
    radial-gradient(circle at 72% 78%, rgba(12, 40, 62, 0.5), transparent 44%),
    linear-gradient(160deg, #8fc4df 0%, #4e91b5 46%, #2a5f7d 100%);
  box-shadow:
    inset -0.55rem -0.35rem 1.1rem rgba(12, 36, 56, 0.48),
    inset 0.35rem 0.25rem 0.7rem rgba(255, 255, 255, 0.2),
    0 0 0 0.2rem rgba(210, 235, 245, 0.12);
}

.landing-globe-map {
  position: absolute;
  inset: -8% -55%;
  width: 210%;
  height: 116%;
  background-image:
    radial-gradient(ellipse 18% 22% at 18% 38%, #b7cf8f 0 68%, transparent 70%),
    radial-gradient(ellipse 12% 16% at 28% 52%, #b7cf8f 0 65%, transparent 68%),
    radial-gradient(ellipse 22% 28% at 48% 42%, #b7cf8f 0 66%, transparent 69%),
    radial-gradient(ellipse 10% 14% at 58% 58%, #a8c47d 0 62%, transparent 65%),
    radial-gradient(ellipse 16% 20% at 72% 48%, #b7cf8f 0 64%, transparent 67%),
    radial-gradient(ellipse 14% 12% at 86% 62%, #b7cf8f 0 60%, transparent 63%),
    radial-gradient(ellipse 20% 10% at 40% 78%, #ffffff 0 55%, transparent 58%);
  opacity: 0.94;
  animation: landing-globe-spin 26s linear infinite;
}

.landing-globe-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.34) 0%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 56%, rgba(8, 24, 36, 0.28) 100%);
  pointer-events: none;
  z-index: 1;
}

@keyframes landing-hero-enter {
  from {
    opacity: 0;
    transform: translateY(0.55rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes landing-globe-spin {
  from { transform: translateX(0); }
  to { transform: translateX(-48%); }
}

@keyframes landing-globe-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.28rem); }
}

@keyframes landing-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .landing-globe-map,
  .landing-hero-globe,
  .landing-globe-orbit-inner {
    animation: none;
  }

  .daily-challenges.is-challenge-burst,
  .daily-challenge-card.is-just-completed,
  .daily-challenge-particle {
    animation: none;
  }
}

.landing-kicker {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(148, 163, 184, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  font-weight: 600;
}

.landing-title-row {
  display: contents;
}

.landing-title {
  position: relative;
  z-index: 1;
  margin: 0.12rem 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: none;
}

.daily-practice-goal {
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 0;
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.daily-practice-goal.is-complete {
  border-color: rgba(45, 212, 191, 0.45);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0.04));
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.12);
}

.daily-practice-goal.is-hour-complete {
  border-color: rgba(250, 204, 21, 0.5);
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(45, 212, 191, 0.08));
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.16);
}

.daily-practice-goal.is-milestone-pulse {
  animation: daily-practice-milestone-pulse 1.1s ease;
}

@keyframes daily-practice-milestone-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.03); }
  70% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.daily-practice-goal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.daily-practice-goal-title {
  margin: 0;
  color: #f4f7fb;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.daily-practice-goal.is-complete .daily-practice-goal-title {
  color: #5eead4;
}

.daily-practice-goal-time {
  margin: 0;
  flex: 0 0 auto;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.daily-practice-goal.is-complete .daily-practice-goal-time {
  color: #99f6e4;
}

.daily-practice-goal-track {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.daily-practice-goal-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf 0%, #5eead4 100%);
  transition: width 280ms ease;
}

.daily-practice-goal.is-complete .daily-practice-goal-fill {
  background: linear-gradient(90deg, #14b8a6 0%, #5eead4 55%, #a7f3d0 100%);
}

.daily-practice-goal-note {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 0.78rem;
  line-height: 1.35;
}

.daily-practice-goal.is-complete .daily-practice-goal-note {
  color: rgba(153, 246, 228, 0.95);
  font-weight: 600;
}

.daily-practice-goal.is-hour-complete .daily-practice-goal-title,
.daily-practice-goal.is-hour-complete .daily-practice-goal-time {
  color: #fde68a;
}

.daily-practice-goal.is-hour-complete .daily-practice-goal-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 55%, #5eead4 100%);
}

.daily-practice-milestone-toast {
  margin: 0;
  justify-self: start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: rgba(15, 23, 42, 0.72);
  color: #ccfbf1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.daily-practice-milestone-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.daily-challenges {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: none;
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(100% 70% at 100% 100%, rgba(250, 204, 21, 0.1), transparent 50%),
    rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.daily-challenges.is-all-complete {
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.14), 0 12px 30px rgba(15, 23, 42, 0.18);
}

.daily-challenges.is-challenge-burst {
  animation: daily-challenges-burst-pulse 1.15s ease;
}

@keyframes daily-challenges-burst-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.025); filter: brightness(1.12); }
  100% { transform: scale(1); filter: brightness(1); }
}

.daily-challenges-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.daily-challenges-title {
  margin: 0;
  color: #f4f7fb;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.daily-challenges-meta {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.daily-challenges.is-all-complete .daily-challenges-meta {
  color: #fde68a;
}

.daily-challenges-list {
  display: grid;
  gap: 0.7rem;
}

.daily-challenge-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.72);
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.daily-challenge-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1.5px solid transparent;
}

.daily-challenge-card.kind-time .daily-challenge-icon {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0.65rem rgba(56, 189, 248, 0.2);
}

.daily-challenge-card.kind-accuracy .daily-challenge-icon {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 0.65rem rgba(251, 191, 36, 0.22);
}

.daily-challenge-card.kind-random .daily-challenge-icon {
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0.65rem rgba(168, 85, 247, 0.2);
}

.daily-challenge-card.kind-time,
.daily-challenge-card.kind-accuracy,
.daily-challenge-card.kind-random {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.daily-challenge-card.is-focus:not(.is-complete) {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.07);
  box-shadow: 0 0 1.15rem rgba(251, 191, 36, 0.14);
}

.daily-challenge-card.is-focus:not(.is-complete)::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0;
  bottom: 0.55rem;
  width: 0.3rem;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 0.85rem rgba(251, 191, 36, 0.7);
}

.daily-challenge-card.is-complete {
  border-color: rgba(52, 211, 153, 0.35);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(56, 189, 248, 0.06));
}

.daily-challenge-card.is-just-completed {
  animation: daily-challenge-card-complete 0.9s ease;
}

@keyframes daily-challenge-card-complete {
  0% { transform: scale(1); }
  30% { transform: scale(1.04); }
  60% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.daily-challenge-body {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.daily-challenge-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.daily-challenge-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.daily-challenge-status {
  flex: 0 0 auto;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.daily-challenge-title {
  margin: 0;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.daily-challenge-description {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.78rem;
  line-height: 1.4;
}

.daily-challenge-track,
.daily-challenge-hint {
  display: none;
}

.daily-challenge-card.is-complete .daily-challenge-status {
  color: #6ee7b7;
}

.daily-challenges-note {
  margin: 0;
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.68rem;
  line-height: 1.3;
}

.daily-challenges-burst {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.daily-challenge-particle {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 0.12rem;
  opacity: 0;
  animation: daily-challenge-particle-fly 1.1s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes daily-challenge-particle-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot));
  }
}

.daily-challenges-toast {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  transform: translateX(-50%) translateY(0.4rem);
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(15, 23, 42, 0.92);
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.daily-challenges-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.daily-practice-survey-button {
  justify-self: start;
  margin: 0.1rem 0 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.daily-practice-survey-button:hover,
.daily-practice-survey-button:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(45, 212, 191, 0.14);
  color: #ccfbf1;
  outline: none;
}

.daily-streak-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 22rem);
  margin: 0.15rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: #f4f7fb;
  cursor: pointer;
  backdrop-filter: none;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.daily-streak-button:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
}

.daily-streak-button:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.7);
  outline-offset: 3px;
}

.daily-streak-button.is-active-today {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
}

.daily-streak-fire {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.daily-streak-fire-icon {
  width: 1.25rem;
  height: 1.55rem;
  overflow: visible;
  filter: none;
}

.daily-streak-fire-outer {
  fill: #9ca3af;
}

.daily-streak-fire-mid {
  fill: #d1d5db;
}

.daily-streak-fire-core {
  fill: #f3f4f6;
}

.daily-streak-button.is-lit .daily-streak-fire-outer {
  fill: #ff9600;
}

.daily-streak-button.is-lit .daily-streak-fire-mid {
  fill: #ffc800;
}

.daily-streak-button.is-lit .daily-streak-fire-core {
  fill: #fff4c8;
}

.daily-streak-button.is-lit .daily-streak-fire-icon {
  filter: drop-shadow(0 0.15rem 0.35rem rgba(255, 96, 20, 0.35));
}

.daily-streak-button:not(.is-lit) .daily-streak-fire-icon {
  filter: none;
  opacity: 0.9;
}

.daily-streak-copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.daily-streak-headline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: #ffffff;
}

.daily-streak-count {
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.daily-streak-button:not(.is-lit) .daily-streak-count,
.daily-streak-button.is-active-today .daily-streak-count {
  color: #ffffff;
}

.daily-streak-meta {
  display: contents;
}

.daily-streak-label {
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-streak-hint {
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.95);
}

.daily-streak-popover {
  position: relative;
  z-index: 2;
  max-width: 22rem;
  margin: -0.2rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(10px);
}

.daily-streak-popover-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.9);
}

.daily-streak-popover-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}

.landing-subtitle {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(148, 163, 184, 0.95);
}

.landing-at-a-glance {
  display: none;
}

.landing-at-a-glance > div {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.glance-label,
.glance-value {
  display: block;
}

.glance-label {
  margin-bottom: 0.25rem;
  color: rgba(247, 244, 236, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.glance-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
}

.mastery-globe {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(0.85rem, 2vw, 1.15rem);
  color: #f4f7fb;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(56, 189, 248, 0.1), transparent 55%),
    linear-gradient(165deg, #141a24 0%, #0e131b 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-lift);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.mastery-globe-open {
  overflow: hidden;
}

.mastery-globe-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(8px);
}

.mastery-globe-backdrop.hidden {
  display: none;
}

.mastery-globe.is-expanded {
  position: fixed;
  z-index: 56;
  inset: clamp(0.75rem, 3vw, 2rem);
  max-width: min(72rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  margin: 0 auto;
  width: calc(100% - clamp(1.5rem, 6vw, 4rem));
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.55);
}

.mastery-globe-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.1rem;
  margin-bottom: 0.85rem;
}

.mastery-globe-intro {
  flex: 1 1 10rem;
  min-width: 0;
}

.mastery-globe-kicker {
  margin: 0;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  font-weight: 650;
}

.mastery-globe-title {
  margin: 0.28rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.mastery-globe-subtitle {
  margin: 0;
  max-width: 28rem;
  color: rgba(156, 163, 175, 0.95);
  font-size: 0.8rem;
  line-height: 1.4;
}

.mastery-globe-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.mastery-globe-mode-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.22rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.mastery-globe-mode-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  color: rgba(226, 232, 240, 0.82);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mastery-globe-mode-button:hover,
.mastery-globe-mode-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.mastery-globe-mode-button.is-active {
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #dbeafe 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.mastery-globe-close-button {
  display: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  color: #f4f7fb;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.mastery-globe.is-expanded .mastery-globe-close-button {
  display: inline-flex;
}

.mastery-globe-close-button:hover,
.mastery-globe-close-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.mastery-globe-body {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
}

.mastery-globe-stage {
  position: relative;
  min-height: clamp(14rem, 26vw, 18rem);
  height: 100%;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at 50% 50%, #0b1220 0%, #05080f 100%);
  box-shadow: inset 0 0 2.5rem rgba(56, 189, 248, 0.1);
  cursor: pointer;
}

.mastery-globe.is-expanded .mastery-globe-stage {
  min-height: min(62vh, 34rem);
  cursor: default;
}

.mastery-globe.is-expanded .mastery-globe-hint {
  left: 0.85rem;
  transform: none;
  bottom: 0.85rem;
}

.mastery-globe.is-expanded .mastery-globe-side {
  max-width: min(16rem, 42%);
}

.mastery-globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(14rem, 26vw, 18rem);
  cursor: grab;
  touch-action: none;
}

.mastery-globe.is-expanded .mastery-globe-canvas {
  min-height: min(62vh, 34rem);
}

.mastery-globe-canvas.is-dragging {
  cursor: grabbing;
}

.mastery-globe-canvas-3d {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* When WebGL drives the visuals the 2D canvas only captures pointer input. */
.mastery-globe-canvas.is-interaction-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

.mastery-globe-zoom {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  display: grid;
  gap: 0.35rem;
}

.mastery-globe-zoom-button {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.55rem;
  background: rgba(8, 14, 24, 0.82);
  color: #f8fafc;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.28);
}

.mastery-globe-zoom-button:hover:not(:disabled),
.mastery-globe-zoom-button:focus-visible:not(:disabled) {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.55);
  outline: none;
}

.mastery-globe-zoom-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.mastery-globe-hint {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 24, 0.72);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
}

.mastery-globe-tooltip {
  position: absolute;
  z-index: 3;
  max-width: 12rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 14, 24, 0.92);
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 0.55rem));
}

.mastery-globe-tooltip strong {
  display: block;
  margin-bottom: 0.1rem;
  color: #ffffff;
  font-size: 0.84rem;
}

.mastery-globe-side {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  max-width: min(13.5rem, 48%);
  padding: 0.6rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.78);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.mastery-globe-legend {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.mastery-globe-legend-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.mastery-globe-legend-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #22c55e 100%);
}

.mastery-globe-legend.is-landmarks .mastery-globe-legend-bar {
  background: linear-gradient(90deg, #2a3344 0%, #0e7490 55%, #fbbf24 100%);
}

.mastery-globe-legend.is-biome .mastery-globe-legend-bar {
  background: linear-gradient(90deg, #c7f53b 0%, #8fbf2a 40%, #d4a574 70%, #e8dcc8 100%);
}

.mastery-globe-legend-note,
.mastery-globe-summary {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mastery-globe-summary strong {
  color: #e2e8f0;
  font-weight: 700;
}

.landing-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  min-width: 0;
  padding: clamp(0.85rem, 2vw, 1.15rem);
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
    linear-gradient(165deg, #121826 0%, #0d121b 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.landing-panel .landing-mode-button {
  min-height: 15.5rem;
  padding: 1.15rem 1.15rem 1.2rem;
}

.landing-panel .landing-mode-copy {
  font-size: 0.9rem;
}

.landing-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.02) 48% 52%, transparent 52% 100%);
  opacity: 0.6;
  pointer-events: none;
}

.landing-mode-button {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  min-height: 16rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  outline: none;
  border-radius: 1.2rem;
  color: white;
  text-align: left;
  align-items: stretch;
  justify-content: flex-end;
  background-color: #1c2b3d;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 200ms var(--ease-out-soft), box-shadow 200ms ease, filter 200ms ease, border-color 200ms ease;
  overflow: hidden;
}

.landing-mode-button::after {
  content: "";
  position: absolute;
  inset: auto -1.8rem -1.8rem auto;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.landing-mode-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(9, 14, 21, 0.12) 0%, rgba(9, 14, 21, 0.18) 45%, rgba(9, 14, 21, 0.74) 100%);
  pointer-events: none;
}

#landingCityModeButton {
  background-image: url("assets/mode-art/city.jpg");
}

#landingCountryModeButton {
  background-image: url("assets/mode-art/country.jpg");
}

#landingCapitalModeButton {
  background-image: url("assets/mode-art/capital.png");
}

#landingFlagModeButton {
  background-image: url("assets/mode-art/flag.jpg");
}

.landing-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0;
}

.landing-hero-cta {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  background: #ffffff;
  color: #111111;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.landing-hero-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.landing-hero-cta:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.landing-hero-testing-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.05rem;
  background: transparent;
  color: rgba(244, 247, 251, 0.92);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing-hero-testing-button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}

.landing-mode-button:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 0.85rem 2rem rgba(34, 211, 238, 0.16), var(--shadow-lift);
  border-color: rgba(34, 211, 238, 0.4);
  filter: brightness(1.05);
}

.landing-mode-button:focus,
.landing-mode-button:focus-visible {
  outline: none;
}

.landing-mode-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 10.5rem;
  margin-bottom: 0.45rem;
  flex: none;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 60%);
  overflow: hidden;
}

.landing-mode-art-city .city-sun {
  position: absolute;
  top: 0.65rem;
  right: 0.85rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #f5d86d;
  box-shadow: 0 0 0 0.35rem rgba(245, 216, 109, 0.14);
}

.landing-mode-art-city .city-building {
  position: absolute;
  bottom: 1.2rem;
  border-radius: 0.25rem 0.25rem 0 0;
  background: linear-gradient(180deg, #9eb8cf, #6a8398);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.landing-mode-art-city .city-building-1 {
  left: 0.8rem;
  width: 1.35rem;
  height: 3.5rem;
}

.landing-mode-art-city .city-building-2 {
  left: 2.4rem;
  width: 1.55rem;
  height: 5.2rem;
}

.landing-mode-art-city .city-building-3 {
  left: 4.2rem;
  width: 1.1rem;
  height: 4.1rem;
}

.landing-mode-art-city .city-road {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.55rem;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.landing-mode-art-country {
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #497e9a, #2f5972);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.country-globe {
  position: absolute;
  inset: 0.45rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
}

.country-continent {
  position: absolute;
  background: #b6dc8f;
  border-radius: 999px;
}

.country-continent-1 {
  left: 1.55rem;
  top: 2rem;
  width: 1.55rem;
  height: 0.95rem;
  transform: rotate(-20deg);
}

.country-continent-2 {
  left: 2.55rem;
  top: 3.1rem;
  width: 1.9rem;
  height: 1.15rem;
  transform: rotate(18deg);
}

.country-meridian {
  position: absolute;
  inset: 0.7rem 2.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.country-meridian-2 {
  inset: 1.25rem 0.7rem;
  transform: rotate(90deg);
}

.landing-mode-art-capital {
  display: block;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(145deg, #31596f, #22384a);
}

.capital-pin {
  position: absolute;
  top: 1.05rem;
  left: 2rem;
  width: 1.9rem;
  height: 2.45rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #f0f4f7;
  box-shadow: inset 0 0 0 1px rgba(32, 48, 64, 0.18);
}

.capital-pin::after {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border-radius: 50%;
  background: #d06d49;
}

.capital-pin-hole {
  position: absolute;
  top: 2rem;
  left: 2.75rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #26364a;
  transform: translate(-50%, -50%);
}

.capital-base {
  position: absolute;
  bottom: 0.85rem;
  left: 0.95rem;
  width: 4.2rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.1));
}

.landing-mode-art-flag {
  display: block;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(145deg, #314a65, #1e2f43);
}

.flag-pole {
  position: absolute;
  bottom: 0.45rem;
  width: 0.22rem;
  height: 4.9rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #d5dbe0, #8c9aa9);
}

.flag-pole-1 {
  left: 1.15rem;
}

.flag-pole-2 {
  right: 1.15rem;
}

.flag-fly {
  position: absolute;
  width: 2.55rem;
  height: 1.7rem;
  border-radius: 0.2rem 0.85rem 0.85rem 0.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flag-fly::before,
.flag-fly::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.flag-fly-1 {
  left: 1.35rem;
  top: 1rem;
  background:
    linear-gradient(180deg, #e74b3c 0 33%, #ffffff 33% 66%, #2f7bc9 66% 100%);
}

.flag-fly-1::before {
  clip-path: polygon(100% 0, 100% 100%, 76% 72%, 76% 28%);
  background: rgba(255, 255, 255, 0.16);
}

.flag-fly-2 {
  right: 1.35rem;
  top: 1.85rem;
  background:
    linear-gradient(180deg, #173d78 0 50%, #f3d44a 50% 100%);
}

.flag-fly-2::before {
  clip-path: polygon(100% 0, 100% 100%, 78% 66%, 78% 34%);
  background: rgba(255, 255, 255, 0.16);
}

.landing-mode-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  min-width: 0;
}

.landing-mode-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(12, 16, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.28);
}

.landing-mode-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.landing-mode-title {
  position: relative;
  z-index: 1;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05em;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 0.12rem 0.7rem rgba(0, 0, 0, 0.6);
}

.landing-mode-name,
.landing-mode-label {
  display: block;
  white-space: nowrap;
}

.landing-mode-copy {
  position: relative;
  z-index: 1;
  max-width: 20rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  font-size: 0.98rem;
  text-shadow: 0 0.12rem 0.65rem rgba(0, 0, 0, 0.6);
}

.game-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  padding: 0.6rem;
  gap: 0.6rem;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(15, 92, 110, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 35% at 100% 0%, rgba(61, 126, 168, 0.07), transparent 50%),
    linear-gradient(180deg, #eef2f7 0%, #e4eaf1 100%);
}

.game-screen::before,
.game-screen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.4;
}

.game-screen::before {
  top: 1rem;
  right: 1rem;
  width: 15rem;
  height: 15rem;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 50% 50%, rgba(21, 32, 51, 0.06), rgba(21, 32, 51, 0.02) 48%, rgba(21, 32, 51, 0) 70%);
}

.game-screen::after {
  left: 2rem;
  bottom: 2rem;
  width: 18rem;
  height: 18rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 92, 110, 0.08), rgba(15, 92, 110, 0) 60%);
}

.game-header {
  position: relative;
  z-index: 1;
  padding: 0.55rem 0.9rem 0.15rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 250, 0.96));
  border: 1px solid rgba(90, 107, 124, 0.12);
  box-shadow: var(--shadow-soft);
}

.mode-best-line {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(15, 92, 110, 0.08);
  border: 1px solid rgba(15, 92, 110, 0.16);
}

.game-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.game-meta-row .meta-line {
  margin: 0;
}

.game-meta-row .meta-line:empty {
  display: none;
}

.game-timer {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game-start-button {
  margin: 0;
  padding: 0.55rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #1a7a8c, #0f5c6e);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.game-start-button:hover {
  filter: brightness(1.03);
}

.learning-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
}

.learning-nav-buttons.hidden {
  display: none;
}

.learning-prev-button,
.learning-next-button {
  margin: 0;
  padding: 0.55rem 1.35rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.learning-next-button {
  background: linear-gradient(180deg, #4f8fd4, #3d74b0);
  box-shadow: 0 0.3rem 0.95rem rgba(61, 116, 176, 0.24);
}

.learning-prev-button {
  background: linear-gradient(180deg, #6b7c8d, #556473);
  box-shadow: 0 0.3rem 0.95rem rgba(32, 48, 64, 0.18);
}

.learning-next-button:hover,
.learning-prev-button:hover:not(:disabled) {
  filter: brightness(1.03);
}

.learning-prev-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.learn-about-country-button {
  margin: 0.35rem 0 0;
  padding: 0.55rem 1.35rem;
  border: 1px solid rgba(61, 116, 176, 0.35);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #2f5f8f;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.2rem 0.65rem rgba(61, 116, 176, 0.12);
  cursor: pointer;
}

.learn-about-country-button:hover {
  background: rgba(61, 116, 176, 0.08);
}

.learn-about-country-panel {
  margin-top: 0.55rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(61, 116, 176, 0.22);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.35rem 1rem rgba(32, 48, 64, 0.1);
  max-width: 28rem;
}

.learn-about-country-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.learn-about-country-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f3348;
}

.learn-about-country-close {
  border: none;
  background: transparent;
  color: #5a6b7d;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

.learn-about-country-facts,
.progress-country-facts-list,
.progress-mastery-rank-facts-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
  color: #314556;
  line-height: 1.45;
}

.country-fact-place-link {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  color: #0f766e;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.country-fact-place-link:hover,
.country-fact-place-link:focus-visible {
  color: #0d9488;
  outline: none;
}

.place-image-modal-card {
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.2rem 1.25rem 1.15rem;
}

.place-image-title {
  margin: 0 1.8rem 0.75rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.place-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 14rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(90, 107, 124, 0.14);
  background:
    radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.12), transparent 50%),
    #0f172a;
}

.place-image-photo {
  display: block;
  width: 100%;
  max-height: min(58vh, 28rem);
  object-fit: contain;
  background: #0f172a;
}

.place-image-status {
  margin: 0;
  padding: 1.5rem;
  color: rgba(226, 232, 240, 0.88);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}

.place-image-source {
  display: inline-flex;
  margin-top: 0.85rem;
  color: #0f766e;
  font-weight: 650;
  font-size: 0.9rem;
}

.place-image-source:hover {
  color: #0d9488;
}

.modal-card.landmark-unlock-card {
  width: min(48rem, calc(100vw - 2rem));
  max-height: min(92vh, 48rem);
  overflow-y: auto;
  padding: 1.35rem;
  border: 1px solid rgba(199, 245, 59, 0.28);
  background:
    radial-gradient(circle at 16% 0%, rgba(199, 245, 59, 0.16), transparent 34%),
    radial-gradient(circle at 100% 30%, rgba(56, 189, 248, 0.13), transparent 42%),
    linear-gradient(180deg, var(--modal-surface), var(--modal-surface-end));
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.42);
}

.landmark-unlock-kicker {
  margin: 0 2rem 0.2rem 0;
  color: #5f7d0c;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landmark-unlock-title {
  margin: 0 2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.landmark-unlock-country {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-weight: 700;
}

:root[data-theme="dark"] .landmark-unlock-kicker {
  color: #c7f53b;
}

.landmark-unlock-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.landmark-unlock-visual {
  min-width: 0;
  margin: 0;
}

.landmark-unlock-visual figcaption {
  margin: 0 0 0.38rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landmark-unlock-globe-canvas,
.landmark-unlock-photo-frame {
  display: block;
  width: 100%;
  height: clamp(12rem, 28vw, 17rem);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 35%, rgba(55, 177, 219, 0.24), transparent 55%),
    #08111f;
}

.landmark-unlock-photo-frame {
  position: relative;
  display: grid;
  place-items: center;
}

.landmark-unlock-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landmark-unlock-photo-status {
  margin: 0;
  padding: 1rem;
  color: rgba(226, 232, 240, 0.82);
  text-align: center;
  line-height: 1.4;
}

.landmark-unlock-description {
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.55;
}

.landmark-unlock-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.landmark-unlock-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-right: auto;
}

.landmark-unlock-nav-button {
  appearance: none;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(90, 107, 124, 0.26);
  border-radius: 0.65rem;
  background: rgba(90, 107, 124, 0.08);
  color: inherit;
  font: inherit;
  font-weight: 750;
  font-size: 0.86rem;
  cursor: pointer;
}

.landmark-unlock-nav-button:hover:not(:disabled) {
  background: rgba(90, 107, 124, 0.16);
}

:root[data-theme="dark"] .landmark-unlock-nav-button {
  border-color: rgba(199, 245, 59, 0.4);
  background: rgba(199, 245, 59, 0.12);
}

:root[data-theme="dark"] .landmark-unlock-nav-button:hover:not(:disabled) {
  background: rgba(199, 245, 59, 0.22);
}

.landmark-unlock-nav-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.landmark-unlock-counter {
  flex: 0 0 auto;
  min-width: 4.2rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.landmark-tour-button {
  appearance: none;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(199, 245, 59, 0.45);
  border-radius: 999px;
  background: rgba(199, 245, 59, 0.12);
  color: inherit;
  font: inherit;
  font-weight: 750;
  font-size: 0.82rem;
  cursor: pointer;
}

.landmark-tour-button:hover {
  background: rgba(199, 245, 59, 0.22);
}

.landmark-unlock-learn-more {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
}

.landmark-unlock-actions .modal-cancel {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .landmark-unlock-actions {
    flex-wrap: wrap;
  }

  .landmark-unlock-nav {
    width: 100%;
    justify-content: space-between;
    margin-right: 0;
  }

  .landmark-unlock-gallery {
    grid-template-columns: 1fr;
  }

  .landmark-unlock-globe-canvas,
  .landmark-unlock-photo-frame {
    height: 12rem;
  }
}

:root[data-theme="dark"] .learn-about-country-button {
  color: #9ec4e8;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(158, 196, 232, 0.35);
}

:root[data-theme="dark"] .learn-about-country-button:hover {
  background: rgba(158, 196, 232, 0.1);
}

:root[data-theme="dark"] .learn-about-country-panel {
  background: rgba(28, 38, 52, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .learn-about-country-title {
  color: #f4f7fb;
}

:root[data-theme="dark"] .learn-about-country-close {
  color: rgba(226, 232, 240, 0.8);
}

:root[data-theme="dark"] .country-fact-place-link {
  color: #5eead4;
}

:root[data-theme="dark"] .country-fact-place-link:hover,
:root[data-theme="dark"] .country-fact-place-link:focus-visible {
  color: #99f6e4;
}

:root[data-theme="dark"] .learn-about-country-facts,
:root[data-theme="dark"] .progress-country-facts-list,
:root[data-theme="dark"] .progress-mastery-rank-facts-list {
  color: #d7e2ee;
}

:root[data-theme="dark"] .progress-country-facts {
  background: rgba(28, 38, 52, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .progress-country-facts-title,
:root[data-theme="dark"] .progress-mastery-rank-facts-title {
  color: #f4f7fb;
}

:root[data-theme="dark"] .place-image-source {
  color: #5eead4;
}

.progress-country-facts {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(32, 48, 64, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.progress-country-facts-title,
.progress-mastery-rank-facts-title {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f3348;
}

.learning-back-button {
  margin: 0.35rem 0 0;
  padding: 0.55rem 1.35rem;
  border: 1px solid rgba(61, 116, 176, 0.35);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #3d74b0;
  background: #fff;
  box-shadow: 0 0.2rem 0.65rem rgba(61, 116, 176, 0.12);
  cursor: pointer;
}

.learning-back-button:hover {
  background: rgba(61, 116, 176, 0.06);
}

.continent-recap-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.continent-recap-assist-notice {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: #8a5a12;
}

.continent-recap-option-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.continent-recap-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #304558;
  cursor: pointer;
  user-select: none;
}

.continent-recap-option input {
  width: 1rem;
  height: 1rem;
  accent-color: #3d74b0;
  cursor: pointer;
}

.continent-recap-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 1px solid rgba(61, 116, 176, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  color: #3d74b0;
  background: #fff;
  cursor: pointer;
}

.continent-recap-help-button:hover {
  background: rgba(61, 116, 176, 0.08);
}

.continent-recap-help-popover {
  position: fixed;
  z-index: 100;
  max-width: min(20rem, calc(100vw - 1.5rem));
  max-height: min(16rem, calc(100vh - 1.5rem));
  overflow-y: auto;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(61, 116, 176, 0.22);
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 0.65rem 1.6rem rgba(32, 48, 64, 0.18);
  pointer-events: auto;
}

.continent-recap-help-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #243746;
}

.continent-recap-help-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #425766;
}

.country-shape.continent-region-colored {
  fill: var(--region-fill);
  stroke: var(--region-stroke);
  stroke-width: 0.2;
}

.country-shape.continent-region-colored:hover {
  fill: var(--region-hover-fill);
  stroke: var(--region-stroke);
  stroke-width: 0.35;
}

.island-box.continent-region-colored {
  fill: var(--region-fill);
  stroke: var(--region-stroke);
  stroke-width: 1;
}

.island-box.continent-region-colored:hover {
  fill: var(--region-hover-fill);
  stroke: var(--region-stroke);
  stroke-width: 1.15;
}

.learning-quiz-panel {
  margin-top: 0.75rem;
}

.learning-quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.learning-quiz-option {
  flex: 1 1 9rem;
  min-width: 7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(83, 97, 110, 0.18);
  border-radius: 0.85rem;
  background: #fff;
  color: #203040;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.learning-quiz-option:hover:not(:disabled) {
  background: #eef5fb;
  border-color: rgba(61, 116, 176, 0.35);
}

.learning-quiz-option.is-correct {
  background: rgba(74, 160, 96, 0.16);
  border-color: rgba(74, 160, 96, 0.55);
}

.learning-quiz-option.is-wrong {
  background: rgba(203, 84, 84, 0.12);
  border-color: rgba(203, 84, 84, 0.45);
  opacity: 0.72;
}

.learning-quiz-option:disabled {
  cursor: default;
}

.learning-quiz-options-flags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.65rem;
}

.learning-quiz-flag-option {
  flex: unset;
  min-width: 0;
  padding: 0.45rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.learning-quiz-flag-option img {
  display: block;
  width: 100%;
  max-width: 8.5rem;
  height: 4.6rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid rgba(32, 48, 64, 0.12);
  background: #f4f7fa;
}

.map-shell.is-hidden-for-quiz {
  display: none;
}

.game-screen.quiz-no-map {
  grid-template-rows: 1fr;
}

.game-screen.quiz-no-map .game-header {
  min-height: min(70vh, 36rem);
}

.prompt-block {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.2rem 0 0.8rem;
  border-bottom: 1px solid rgba(83, 97, 110, 0.12);
}

.prompt-text-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.prompt-color-swatch {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.3rem;
  border: 2px solid rgba(32, 48, 64, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.prompt-country-flag {
  flex: 0 0 auto;
  width: 3.6rem;
  height: 2.4rem;
  object-fit: cover;
  border-radius: 0.3rem;
  border: 1px solid rgba(32, 48, 64, 0.18);
  box-shadow: 0 0.2rem 0.55rem rgba(32, 48, 64, 0.14);
  background: rgba(255, 255, 255, 0.85);
}

.prompt-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.flag-prompt {
  flex: 0 0 auto;
  width: min(7.5rem, 28vw);
  min-height: 0;
  padding: 0.28rem;
  border: 2px solid rgba(32, 48, 64, 0.18);
  border-radius: 0.65rem;
  background: white;
  box-shadow: 0 0.35rem 1rem rgba(32, 48, 64, 0.08);
}

.prompt-block:has(#promptText.hidden) .flag-prompt {
  width: min(14rem, 45vw);
  min-height: 5rem;
  padding: 0.4rem;
  border-radius: 0.8rem;
  box-shadow: 0 0.5rem 1.5rem rgba(32, 48, 64, 0.08);
}

.flag-prompt img {
  display: block;
  width: 100%;
  height: auto;
}

.meta-line {
  margin: 0.45rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(32, 48, 64, 0.06);
  border: 1px solid rgba(32, 48, 64, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.detail-line {
  min-height: 1.5rem;
  border-radius: 1rem;
  padding: 0.6rem 0.8rem;
  margin-top: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

.answer-feedback-banner {
  margin: 0.55rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 2px solid rgba(45, 122, 68, 0.45);
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.98), rgba(187, 247, 208, 0.92));
  color: #14532d;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: 0 0.45rem 1.2rem rgba(22, 101, 52, 0.12);
}

.answer-feedback-banner.is-incorrect {
  border-color: rgba(159, 47, 47, 0.4);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.98), rgba(254, 202, 202, 0.9));
  color: #7f1d1d;
  box-shadow: 0 0.45rem 1.2rem rgba(127, 29, 29, 0.12);
}

.answer-feedback-banner .answer-feedback-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
}

.answer-feedback-banner .answer-feedback-country {
  display: block;
}

:root[data-theme="dark"] .answer-feedback-banner {
  border-color: rgba(74, 222, 128, 0.4);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.95), rgba(22, 101, 52, 0.88));
  color: #bbf7d0;
  box-shadow: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .answer-feedback-banner.is-incorrect {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.92), rgba(153, 27, 27, 0.86));
  color: #fecaca;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding-bottom: 0.2rem;
}

.mode-button,
.action-button,
.modal-options button:not(.modal-cancel),
.modal-cancel {
  min-width: 8.5rem;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--accent);
  box-shadow: none;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.action-button-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.action-button:first-of-type:not(.results-prev-button):not(.results-next-button),
.modal-options button.modal-cancel,
.modal-cancel {
  background: var(--accent-alt);
}

.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.map-shell {
  min-height: 0;
  padding: 0.2rem 0.7rem 0.5rem;
  position: relative;
  z-index: 1;
}

.globe-intro {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: stretch;
  pointer-events: none;
  background: transparent;
  opacity: 1;
  transition: opacity 0.01ms linear;
}

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

.globe-intro-canvas {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  will-change: opacity;
  background: transparent;
}

.world-map {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  min-height: min(70vh, 40rem);
  margin: 0 auto;
  border: 1px solid rgba(47, 103, 136, 0.45);
  border-radius: 1.35rem;
  overflow: hidden;
  background: var(--ocean);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 1.6rem 3.5rem rgba(32, 48, 64, 0.18);
  touch-action: none;
}

.world-map .maplibregl-canvas,
.world-map .maplibregl-canvas-container {
  width: 100% !important;
  height: 100% !important;
}

.world-map .maplibregl-ctrl-attrib {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.55);
}

:root[data-theme="dark"] .world-map .maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.45);
  color: #d7e2ee;
}

:root[data-theme="dark"] .world-map .maplibregl-ctrl-attrib a {
  color: #9ec4e8;
}

:root[data-theme="dark"] .game-screen {
  background:
    radial-gradient(circle at top left, rgba(79, 143, 191, 0.16), transparent 22%),
    radial-gradient(circle at top right, rgba(95, 191, 120, 0.08), transparent 24%),
    linear-gradient(180deg, #151c28 0%, #0d121a 100%);
}

:root[data-theme="dark"] .game-screen::before,
:root[data-theme="dark"] .game-screen::after {
  opacity: 0.28;
}

:root[data-theme="dark"] .game-header {
  background: linear-gradient(180deg, rgba(32, 44, 60, 0.98), rgba(22, 31, 44, 0.98));
  border-color: rgba(232, 238, 245, 0.12);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .mode-best-line {
  color: var(--ink);
  background: rgba(95, 191, 120, 0.14);
  border-color: rgba(95, 191, 120, 0.28);
}

:root[data-theme="dark"] .prompt-text,
:root[data-theme="dark"] .meta-line,
:root[data-theme="dark"] .detail-line,
:root[data-theme="dark"] .continent-recap-option,
:root[data-theme="dark"] .continent-recap-help-title,
:root[data-theme="dark"] .continent-recap-help-text {
  color: var(--ink);
}

:root[data-theme="dark"] .meta-line {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 238, 245, 0.1);
  box-shadow: none;
}

:root[data-theme="dark"] .detail-line {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .continent-recap-assist-notice {
  color: #f0c448;
}

:root[data-theme="dark"] .continent-recap-help-button {
  color: #9ec4e8;
  border-color: rgba(158, 196, 232, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .continent-recap-help-popover {
  background: rgba(22, 31, 44, 0.98);
  border-color: rgba(232, 238, 245, 0.12);
  color: var(--ink);
}

:root[data-theme="dark"] .learning-back-button {
  color: #9ec4e8;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(158, 196, 232, 0.35);
}

:root[data-theme="dark"] .learning-back-button:hover {
  background: rgba(158, 196, 232, 0.1);
}

:root[data-theme="dark"] .prompt-block {
  border-bottom-color: rgba(232, 238, 245, 0.1);
}

:root[data-theme="dark"] .flag-prompt {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 238, 245, 0.14);
}

:root[data-theme="dark"] .prompt-country-flag {
  border-color: rgba(232, 238, 245, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .learning-quiz-option {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(232, 238, 245, 0.28);
  color: #f4f7fb;
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .learning-quiz-option:hover:not(:disabled) {
  background: rgba(158, 196, 232, 0.18);
  border-color: rgba(158, 196, 232, 0.5);
  color: #ffffff;
}

:root[data-theme="dark"] .learning-quiz-option.is-correct {
  background: rgba(95, 191, 120, 0.28);
  border-color: rgba(95, 191, 120, 0.7);
  color: #eaffef;
}

:root[data-theme="dark"] .learning-quiz-option.is-wrong {
  background: rgba(224, 107, 107, 0.22);
  border-color: rgba(224, 107, 107, 0.55);
  color: #ffe8e8;
  opacity: 0.9;
}

:root[data-theme="dark"] .learning-quiz-flag-option img {
  border-color: rgba(232, 238, 245, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.map-grid {
  stroke: rgba(190, 220, 235, 0.28);
  stroke-width: 0.5;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}

.land-shape {
  fill: var(--land);
  stroke: var(--ocean);
  stroke-width: 0.4;
  stroke-linecap: butt;
  stroke-linejoin: bevel;
  pointer-events: none;
  shape-rendering: optimizeSpeed;
}

.country-shape {
  fill: var(--land);
  stroke: none;
  cursor: pointer;
  pointer-events: all;
  shape-rendering: optimizeSpeed;
}

.country-shape.antarctica-shape {
  fill: #ffffff;
}

.country-shape.antarctica-shape:hover,
.country-shape.antarctica-shape.highlight-correct,
.country-shape.antarctica-shape.highlight-wrong {
  fill: #ffffff;
}

.country-outline {
  fill: none;
  stroke: rgba(36, 72, 96, 0.42);
  stroke-width: 0.12;
  pointer-events: none;
  shape-rendering: geometricPrecision;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

#countryLayer[style*="opacity: 1"] .country-shape {
  fill: var(--land);
  stroke: none;
}

.country-shape:hover {
  fill: color-mix(in srgb, var(--land) 82%, white);
}

.country-shape.highlight-correct {
  fill: var(--correct);
  stroke: none;
}

.country-shape.highlight-wrong {
  fill: var(--wrong);
  stroke: none;
}

.country-shape.highlight-learn {
  fill: var(--highlight-learn);
  stroke: var(--highlight-learn-stroke);
  stroke-width: 0.35;
}

.island-box.highlight-learn {
  fill: var(--highlight-learn);
  stroke: var(--highlight-learn-stroke);
}

.island-box {
  fill: transparent;
  stroke: #000000;
  stroke-dasharray: 3.2 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  cursor: pointer;
  pointer-events: all;
  vector-effect: non-scaling-stroke;
}

.answer-highlight {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.island-box:hover {
  fill: transparent;
  stroke: #000000;
}

/* Unified border line drawn on top of country fills to avoid gap artifacts */
.country-borders {
  stroke: rgba(74, 66, 56, 0.65);
  stroke-width: 0.12;
  stroke-linejoin: bevel;
  stroke-linecap: butt;
  pointer-events: none;
  fill: none;
  shape-rendering: geometricPrecision;
}

.island-box.highlight-correct {
  fill: var(--correct);
  stroke: var(--highlight-learn-stroke);
}

.island-box.highlight-wrong {
  fill: var(--wrong);
  stroke: #7f1d1d;
}

.guess-line {
  stroke: rgba(201, 110, 69, 0.7);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.guess-marker {
  stroke: white;
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.guess-marker.guess {
  fill: #c96e45;
}

.guess-marker.actual {
  fill: #2679a8;
}

.theme-modal-card {
  width: min(34rem, calc(100vw - 2rem));
}

.theme-modal-subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
}

.modal-card.settings-modal-card {
  width: min(58rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--modal-surface), var(--modal-surface-end));
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 1.5rem;
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.22);
  display: grid;
  grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
  position: relative;
}

.confirm-modal-card {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--modal-surface), var(--modal-surface-end));
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 1.5rem;
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .modal-card.settings-modal-card,
:root[data-theme="dark"] .confirm-modal-card {
  background: #0b0f14;
  border-color: rgba(232, 238, 245, 0.1);
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.55);
}

.settings-close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.35rem 1rem 1.1rem;
  border-right: 1px solid rgba(32, 48, 64, 0.12);
  background: rgba(32, 48, 64, 0.03);
}

:root[data-theme="dark"] .settings-nav {
  border-right-color: rgba(232, 238, 245, 0.08);
  background: #0b0f14;
}

.settings-nav-header h2,
.confirm-modal-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

:root[data-theme="dark"] .settings-nav-header h2 {
  color: #f4f7fb;
}

.settings-modal-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
}

.settings-panel-copy,
.confirm-modal-body {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

:root[data-theme="dark"] .settings-modal-subtitle,
:root[data-theme="dark"] .settings-panel-copy,
:root[data-theme="dark"] .confirm-modal-body,
:root[data-theme="dark"] .settings-field,
:root[data-theme="dark"] .settings-confirm-copy,
:root[data-theme="dark"] .settings-secondary-button {
  color: #8b98a8;
}

.settings-modal-card .modal-close-button {
  color: var(--ink);
  background: rgba(32, 48, 64, 0.1);
}

:root[data-theme="dark"] .settings-modal-card .modal-close-button {
  color: #d7e2ee;
  background: rgba(255, 255, 255, 0.08);
}

.settings-nav-list {
  display: grid;
  gap: 0.2rem;
  flex: 1 1 auto;
}

.settings-nav-item,
.settings-sign-out {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 0;
  border-radius: 0.85rem;
  color: #6f7d8c;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  position: relative;
}

:root[data-theme="dark"] .settings-nav-item,
:root[data-theme="dark"] .settings-sign-out {
  color: #8b98a8;
}

.settings-nav-item.is-active {
  color: var(--ink);
  background: rgba(32, 48, 64, 0.08);
}

:root[data-theme="dark"] .settings-nav-item.is-active {
  color: #f4f7fb;
  background: rgba(255, 255, 255, 0.06);
}

.settings-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  border-radius: 999px;
  background: #3b82f6;
}

.settings-nav-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}

.settings-nav-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.settings-sign-out {
  margin-top: auto;
  color: #6f7d8c;
  background: rgba(32, 48, 64, 0.08);
  border: 1px solid rgba(32, 48, 64, 0.08);
}

:root[data-theme="dark"] .settings-sign-out {
  color: #9aa8b8;
  background: #141a22;
  border-color: rgba(255, 255, 255, 0.04);
}

.settings-sign-out:hover {
  color: var(--ink);
}

:root[data-theme="dark"] .settings-sign-out:hover {
  color: #e8eef5;
}

.settings-sign-out.hidden {
  display: none;
}

.settings-content {
  min-width: 0;
  overflow: auto;
  max-height: calc(100vh - 2rem);
  padding: 1.65rem 1.75rem 1.5rem;
}

.settings-panel-title {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

:root[data-theme="dark"] .settings-panel-title {
  color: #f4f7fb;
}

.settings-panel-copy {
  margin: 0 0 0.85rem;
}

.settings-section {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(32, 48, 64, 0.12);
}

:root[data-theme="dark"] .settings-section {
  border-bottom-color: rgba(232, 238, 245, 0.1);
}

.settings-section-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

:root[data-theme="dark"] .settings-section-title {
  color: #e8eef5;
}

@media (max-width: 720px) {
  .modal-card.settings-modal-card {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .settings-nav {
    border-right: 0;
    border-bottom: 1px solid rgba(32, 48, 64, 0.12);
  }

  :root[data-theme="dark"] .settings-nav {
    border-bottom-color: rgba(232, 238, 245, 0.08);
  }

  .settings-content {
    max-height: none;
  }
}

.settings-field {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.settings-field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.18);
  border-radius: 0.75rem;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

:root[data-theme="dark"] .settings-field input {
  border-color: rgba(232, 238, 245, 0.14);
  color: #f4f7fb;
  background: #151c28;
}

.settings-field input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.settings-avatar-preview {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #e8eef5;
  background: linear-gradient(145deg, #5b7cfa 0%, #3d57c7 100%);
  border: 1px solid rgba(32, 48, 64, 0.16);
  flex: 0 0 auto;
}

.settings-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-animal-picker-block {
  margin: 0.85rem 0 1rem;
}

.settings-animal-picker-label {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--accent);
}

.settings-animal-picker-hint {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: rgba(32, 48, 64, 0.65);
}

.settings-animal-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.settings-animal-option {
  appearance: none;
  border: 1px solid rgba(32, 48, 64, 0.14);
  background: #fffaf4;
  border-radius: 0.75rem;
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.settings-animal-option img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.45rem;
}

.settings-animal-option:hover,
.settings-animal-option:focus-visible {
  border-color: rgba(201, 110, 69, 0.55);
  outline: none;
  transform: translateY(-1px);
}

.settings-animal-option.is-selected {
  border-color: #c96e45;
  box-shadow: 0 0 0 2px rgba(201, 110, 69, 0.25);
}

.settings-primary-button,
.settings-secondary-button,
.settings-danger-button {
  min-width: 0;
  padding: 0.65rem 0.95rem;
  border: 0;
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: none;
}

.settings-primary-button {
  color: #ffffff;
  background: #3d6f96;
}

.settings-secondary-button {
  color: var(--ink);
  background: rgba(32, 48, 64, 0.1);
  border: 1px solid rgba(32, 48, 64, 0.12);
}

:root[data-theme="dark"] .settings-secondary-button {
  color: #d7e2ee;
  background: #151c28;
  border-color: rgba(232, 238, 245, 0.12);
}

.settings-danger-button {
  color: #fff;
  background: #a33b3b;
}

.settings-file-label {
  display: inline-flex;
  align-items: center;
}

.settings-inline-actions,
.settings-danger-actions,
.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.settings-email-confirm {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 0.9rem;
  background: rgba(61, 111, 150, 0.08);
  border: 1px solid rgba(61, 111, 150, 0.28);
}

:root[data-theme="dark"] .settings-email-confirm {
  background: rgba(45, 212, 191, 0.06);
  border-color: rgba(45, 212, 191, 0.28);
}

.settings-confirm-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.settings-message {
  margin: 0;
  font-size: 0.88rem;
}

.settings-message-success {
  color: #1f8a6a;
}

:root[data-theme="dark"] .settings-message-success {
  color: #3dd6b0;
}

.settings-message-error {
  color: #b42318;
}

:root[data-theme="dark"] .settings-message-error {
  color: #f87171;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
  cursor: pointer;
  user-select: none;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.settings-toggle-switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.45rem;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: rgba(32, 48, 64, 0.22);
  transition: background 0.18s ease;
}

.settings-toggle-switch::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.settings-toggle input:checked + .settings-toggle-switch {
  background: #2f7f9a;
}

.settings-toggle input:checked + .settings-toggle-switch::after {
  transform: translateX(1.15rem);
}

.settings-toggle input:focus-visible + .settings-toggle-switch {
  outline: 2px solid rgba(47, 127, 154, 0.65);
  outline-offset: 3px;
}

.settings-toggle-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.settings-toggle-copy strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.settings-toggle-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.daily-goal-survey-card {
  position: relative;
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(92vh, 46rem);
  overflow-y: auto;
  padding: 1.35rem 1.4rem 1.25rem;
}

.daily-goal-survey-lead {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  line-height: 1.45;
}

.daily-goal-survey-question {
  margin: 0 0 1rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(32, 48, 64, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

:root[data-theme="dark"] .daily-goal-survey-question {
  border-color: rgba(232, 238, 245, 0.1);
  background: rgba(21, 28, 40, 0.65);
}

.daily-goal-survey-question legend {
  padding: 0 0.25rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.daily-goal-survey-ratings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.daily-goal-survey-ratings button {
  min-width: 0;
  padding: 0.7rem 0.35rem;
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 0.75rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

:root[data-theme="dark"] .daily-goal-survey-ratings button {
  border-color: rgba(232, 238, 245, 0.12);
  background: #151c28;
  color: #e8eef5;
}

.daily-goal-survey-ratings button.is-selected,
.daily-goal-survey-ratings button:hover {
  border-color: transparent;
  background: #2f7f9a;
  color: #ffffff;
}

.daily-goal-survey-scale-hint {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.daily-goal-survey-bug-toggle {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.55rem;
}

.daily-goal-survey-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(32, 48, 64, 0.12);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 600;
}

:root[data-theme="dark"] .daily-goal-survey-choice {
  border-color: rgba(232, 238, 245, 0.12);
  background: #151c28;
  color: #e8eef5;
}

.daily-goal-survey-bug-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.daily-goal-survey-bug-details {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 0.75rem;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

:root[data-theme="dark"] .daily-goal-survey-bug-details {
  border-color: rgba(232, 238, 245, 0.12);
  background: #151c28;
  color: #e8eef5;
}

.daily-goal-survey-bug-details:disabled {
  opacity: 0.55;
}

.daily-goal-survey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.35rem;
}

.settings-danger-zone {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-account-signed-out {
  display: grid;
  gap: 0.85rem;
  color: var(--ink);
}

.confirm-modal-body {
  margin: 0.55rem 0 1rem;
}

.confirm-modal-actions {
  margin-top: 1rem;
}

.sidebar-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-sidebar-avatar {
  position: relative;
}

.settings-modal-card .theme-option {
  background: rgba(32, 48, 64, 0.05);
  border: 1px solid rgba(32, 48, 64, 0.14);
  color: var(--ink);
}

:root[data-theme="dark"] .settings-modal-card .theme-option {
  background: #151c28;
  border-color: rgba(232, 238, 245, 0.12);
  color: #f4f7fb;
}

.settings-modal-card .theme-option-desc {
  color: var(--muted);
}

:root[data-theme="dark"] .settings-modal-card .theme-option-desc {
  color: #a8b6c6;
}

.settings-modal-card .theme-option.is-active {
  border-color: #3d6f96;
  box-shadow: inset 0 0 0 1px #3d6f96;
}

:root[data-theme="dark"] .settings-modal-card .theme-option.is-active {
  border-color: #4a7eab;
  box-shadow: inset 0 0 0 1px #4a7eab;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.25rem;
}

.theme-option {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 0.9rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  cursor: pointer;
}

:root[data-theme="dark"] .theme-option {
  background: #151c28;
  border-color: rgba(232, 238, 245, 0.12);
  color: #f4f7fb;
}

.theme-option:hover,
.theme-option:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.theme-option.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.theme-option-preview {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 3.4rem;
  border-radius: 0.55rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, var(--preview-ocean-lit) 0%, var(--preview-ocean) 55%, var(--preview-ocean-deep) 100%);
}

.theme-option-preview-land {
  margin: 0.55rem 0.35rem 0.35rem auto;
  width: 58%;
  border-radius: 999px 0.85rem 1.1rem 0.4rem;
  background: var(--preview-land);
  box-shadow: -0.35rem 0.2rem 0 var(--preview-land);
}

.theme-option-copy {
  display: grid;
  gap: 0.15rem;
}

.theme-option-name {
  font-weight: 700;
}

.theme-option-desc {
  color: var(--muted);
  font-size: 0.82rem;
}

:root[data-theme="dark"] .theme-option-desc {
  color: #a8b6c6;
}

@media (max-width: 34rem) {
  .theme-options {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] .account-greeting {
  color: #f4f7fb;
  background: #1a2330;
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .account-offline-note {
  color: #a8b6c6;
  background: #1a2330;
}

:root[data-theme="dark"] .account-button-secondary {
  background: #2a3648;
  color: #f4f7fb;
}

:root[data-theme="dark"] .auth-field input,
:root[data-theme="dark"] .progress-country-search,
:root[data-theme="dark"] .progress-country-row,
:root[data-theme="dark"] .progress-country-stat,
:root[data-theme="dark"] .progress-mastery-rank-row {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(232, 238, 245, 0.1);
}

:root[data-theme="dark"] .auth-tab {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 238, 245, 0.12);
}

:root[data-theme="dark"] .auth-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 36, 0.48);
  backdrop-filter: blur(6px);
}

.modal-card {
  z-index: 10000;
  width: min(30rem, calc(100vw - 2rem));
  padding: 1.4rem 1.45rem;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--modal-surface), var(--modal-surface-end));
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(90, 107, 124, 0.12);
}

.modal-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.modal-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(5rem, 1fr));
  gap: 0.7rem;
}

.modal-options-regions {
  grid-template-columns: repeat(3, minmax(6rem, 1fr));
}

.modal-empty-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem 0.25rem 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
}

.targeted-review-modal-card {
  width: min(44rem, calc(100vw - 2rem));
  padding: 1.45rem 1.45rem 1.1rem;
  color: #f4f7fb;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(80, 125, 164, 0.18), transparent 58%),
    #121826;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.5rem;
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.45);
}

.targeted-review-modal-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.targeted-review-modal-card .targeted-review-subtitle {
  margin: 0.55rem 0 1.25rem;
  max-width: 36rem;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.95rem;
  line-height: 1.5;
}

.targeted-review-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.targeted-review-option {
  position: relative;
  min-height: 8.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.15rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.targeted-review-option:hover:not(:disabled),
.targeted-review-option:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(255, 255, 255, 0.055);
  filter: none;
  outline: none;
}

.targeted-review-option-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.targeted-review-option-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(45, 212, 191, 0.55);
  border-radius: 999px;
  color: #2dd4bf;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.targeted-review-option.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  color: rgba(148, 163, 184, 0.85);
}

.targeted-review-option.is-locked .targeted-review-option-title {
  color: rgba(148, 163, 184, 0.85);
}

.targeted-review-option.is-locked .targeted-review-option-meta {
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(148, 163, 184, 0.8);
}

.targeted-review-lock {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  color: rgba(148, 163, 184, 0.75);
}

.targeted-review-lock svg {
  width: 100%;
  height: 100%;
}

.targeted-review-empty-note {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.9rem;
  line-height: 1.45;
}

.targeted-review-footer {
  margin-top: 1.2rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.targeted-review-cancel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(148, 163, 184, 0.95);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
}

.targeted-review-cancel:hover,
.targeted-review-cancel:focus-visible {
  color: #ffffff;
  transform: none;
  filter: none;
  outline: none;
}

@media (max-width: 720px) {
  .targeted-review-options {
    grid-template-columns: 1fr;
  }

  .targeted-review-option {
    min-height: 5.5rem;
  }
}

.results-modal-card {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.results-mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.35rem;
}

.results-mascot.hidden {
  display: none;
}

.results-mascot-image {
  width: 10rem;
  height: 10rem;
  object-fit: contain;
  transform-origin: center bottom;
  border-radius: 1.1rem;
}

.results-mascot.is-perfect .results-mascot-image,
.results-mascot.is-great .results-mascot-image {
  animation: mascot-cheer-bounce 0.75s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.results-mascot.is-good .results-mascot-image,
.results-mascot.is-ok .results-mascot-image {
  animation: mascot-pop-in 0.55s cubic-bezier(0.2, 1.3, 0.36, 1);
}

.results-mascot.is-encourage .results-mascot-image {
  animation: mascot-pop-in 0.5s ease-out;
}

.results-mascot-bubble {
  margin: 0;
  max-width: 22rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.95rem;
  background: rgba(32, 48, 64, 0.08);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
}

.results-mascot-bubble:empty {
  display: none;
}

@keyframes mascot-cheer-bounce {
  0% { opacity: 0; transform: translateY(16px) scale(0.7) rotate(-6deg); }
  55% { opacity: 1; transform: translateY(-6px) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

@keyframes mascot-pop-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.mascot-peek {
  position: fixed;
  left: calc(var(--sidebar-width) + 0.75rem);
  right: auto;
  top: auto;
  bottom: 1.15rem;
  z-index: 60;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: min(22rem, calc(100vw - var(--sidebar-width) - 1.5rem));
  pointer-events: none;
  cursor: pointer;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.3s ease;
}

.mascot-peek.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.mascot-peek.hidden {
  display: none;
}

.mascot-peek-image,
.mascot-peek-bubble {
  pointer-events: auto;
}

.mascot-peek-image {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 0.55rem 1rem rgba(32, 48, 64, 0.28));
  flex: 0 0 auto;
}

.mascot-peek.is-prominent .mascot-peek-image {
  width: 7.75rem;
  height: 7.75rem;
}

.mascot-peek-bubble {
  margin: 0 0 0.55rem;
  max-width: 14rem;
  padding: 0.75rem 0.9rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  background: #fffaf4;
  border: 1px solid rgba(32, 48, 64, 0.12);
  box-shadow: 0 0.7rem 1.5rem rgba(32, 48, 64, 0.18);
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.35;
}

.mascot-peek.is-prominent .mascot-peek-bubble {
  max-width: 15rem;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
}

@media (max-width: 640px) {
  .mascot-peek {
    left: calc(var(--sidebar-width) + 0.4rem);
    bottom: 0.55rem;
    gap: 0.4rem;
    max-width: calc(100vw - var(--sidebar-width) - 0.8rem);
  }

  .mascot-peek-image {
    width: 4.75rem;
    height: 4.75rem;
  }

  .mascot-peek.is-prominent .mascot-peek-image {
    width: 5.5rem;
    height: 5.5rem;
  }

  .mascot-peek-bubble {
    max-width: 9.5rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.88rem;
  }

  .mascot-peek.is-prominent .mascot-peek-bubble {
    max-width: 10.5rem;
    font-size: 0.92rem;
  }

  .learning-path-guide-image {
    width: 4.5rem;
    height: 4.5rem;
  }

  .learning-path-guide-text {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-mascot-image,
  .mascot-peek {
    animation: none !important;
    transition: none !important;
  }
}

.results-modal-card.is-celebrating {
  animation: results-card-celebrate 0.7s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.results-modal-card.is-celebrating-perfect {
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.45),
    0 1.2rem 2.8rem rgba(250, 204, 21, 0.22),
    0 1.4rem 3.2rem rgba(0, 0, 0, 0.18);
}

.results-modal-card.is-celebrating-great {
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.4),
    0 1.2rem 2.8rem rgba(34, 197, 94, 0.18),
    0 1.4rem 3.2rem rgba(0, 0, 0, 0.18);
}

.results-modal-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.results-confetti-piece {
  position: absolute;
  top: -12%;
  width: 0.55rem;
  height: 0.9rem;
  border-radius: 0.15rem;
  opacity: 0;
  animation-name: results-confetti-fall;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
  animation-fill-mode: forwards;
}

.results-modal-card > *:not(.results-modal-confetti) {
  position: relative;
  z-index: 2;
}

.results-modal-card.is-celebrating #resultsModalTitle {
  animation: results-title-burst 0.65s cubic-bezier(0.2, 1.45, 0.36, 1);
}

.results-modal-card.is-celebrating .results-modal-score {
  animation: results-score-punch 0.7s cubic-bezier(0.2, 1.4, 0.36, 1) 0.08s both;
}

.results-modal-praise {
  margin: 0.45rem 0 0.2rem;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--accent);
}

.results-modal-praise.is-perfect {
  color: #ca8a04;
  text-shadow: 0 0 28px rgba(250, 204, 21, 0.45);
  animation: results-praise-pop 0.7s cubic-bezier(0.18, 1.5, 0.36, 1);
}

.results-modal-praise.is-great {
  color: #16a34a;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  animation: results-praise-pop 0.6s cubic-bezier(0.2, 1.4, 0.36, 1);
}

.results-modal-praise.is-good {
  color: var(--accent);
  animation: results-praise-pop 0.5s ease-out;
}

@keyframes results-praise-pop {
  0% { opacity: 0; transform: scale(0.55) translateY(14px) rotate(-2deg); }
  55% { opacity: 1; transform: scale(1.12) translateY(0) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
}

@keyframes results-card-celebrate {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes results-title-burst {
  0% { opacity: 0; transform: scale(0.4) translateY(18px); filter: blur(2px); }
  60% { opacity: 1; transform: scale(1.14) translateY(0); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes results-score-punch {
  0% { opacity: 0; transform: scale(0.7); }
  55% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes results-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.6);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), 120vh, 0) rotate(var(--rot)) scale(1);
  }
}

.results-modal-subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
}

.results-modal-score {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.results-modal-percent {
  margin: 0.6rem 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.results-modal-time {
  margin: 0 0 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.results-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.auth-modal-card {
  width: min(28rem, calc(100vw - 2rem));
}

.progress-modal-card {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: #f4f7fb;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.5rem;
  box-shadow: 0 1.4rem 3.2rem rgba(0, 0, 0, 0.45);
}

.progress-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0.35rem;
  border-bottom: 0;
}

.progress-modal-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.progress-modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.progress-modal-card .progress-summary {
  margin: 0.45rem 0 0;
  color: rgba(156, 163, 175, 0.95);
  font-size: 0.9rem;
  line-height: 1.4;
}

.progress-modal-card .modal-close-button {
  color: rgba(210, 218, 228, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

.progress-modal-card .modal-close-button:hover,
.progress-modal-card .modal-close-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.modal-close-button {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(32, 48, 64, 0.08);
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
  background: rgba(32, 48, 64, 0.14);
}

.progress-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.85rem 1.25rem 1.35rem;
}

.progress-modal-footer {
  padding: 0.9rem 1.3rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.progress-modal-footer .modal-cancel {
  width: 100%;
}

.progress-tabs,
.progress-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.leaderboard-mode-tabs {
  grid-template-columns: repeat(4, 1fr);
}

.progress-view-tab,
.progress-tab {
  padding: 0.72rem 0.55rem;
  border: 0;
  border-radius: 0.85rem;
  color: rgba(180, 190, 200, 0.92);
  background: #242424;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.progress-view-tab:hover,
.progress-tab:hover,
.progress-view-tab:focus-visible,
.progress-tab:focus-visible {
  color: #ffffff;
  background: #2c2c2c;
  outline: none;
}

.progress-view-tab.is-active,
.progress-tab.is-active {
  color: #ffffff;
  background: #507da4;
}

.progress-section-title {
  margin: 0.85rem 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(210, 218, 228, 0.78);
}

.progress-list {
  display: grid;
  gap: 0.55rem;
}

.leaderboard-modal-card {
  width: min(32rem, calc(100vw - 2rem));
}

.leaderboard-region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.leaderboard-region-tab {
  padding: 0.48rem 0.72rem;
  border: 0;
  border-radius: 999px;
  color: rgba(180, 190, 200, 0.92);
  background: #242424;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.leaderboard-region-tab:hover,
.leaderboard-region-tab:focus-visible {
  color: #ffffff;
  background: #2c2c2c;
  outline: none;
}

.leaderboard-region-tab.is-active {
  color: #ffffff;
  background: #507da4;
}

.leaderboard-you-card,
.leaderboard-row {
  display: grid;
  grid-template-columns: 2.1rem 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.95rem;
  color: #ffffff;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-you-card {
  margin-bottom: 0.7rem;
  background: rgba(80, 125, 164, 0.22);
  border-color: rgba(80, 125, 164, 0.45);
}

.leaderboard-list {
  display: grid;
  gap: 0.5rem;
}

.leaderboard-row.is-you {
  background: rgba(80, 125, 164, 0.18);
  border-color: rgba(80, 125, 164, 0.4);
}

.leaderboard-rank {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(210, 218, 228, 0.88);
  text-align: center;
}

.leaderboard-avatar,
.leaderboard-avatar-fallback {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  object-fit: cover;
}

.leaderboard-avatar-fallback {
  display: grid;
  place-items: center;
  background: #2c2c2c;
  color: rgba(210, 218, 228, 0.95);
  font-size: 0.72rem;
  font-weight: 700;
}

.leaderboard-name {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-name-meta {
  margin-top: 0.12rem;
  color: rgba(156, 163, 175, 0.95);
  font-size: 0.78rem;
  font-weight: 500;
}

.leaderboard-stats {
  text-align: right;
  white-space: nowrap;
}

.leaderboard-stats strong {
  display: block;
  font-size: 1rem;
  font-weight: 750;
}

.leaderboard-stats span {
  color: rgba(156, 163, 175, 0.95);
  font-size: 0.8rem;
}

.leaderboard-empty {
  padding: 1.2rem 0.85rem;
  border-radius: 0.95rem;
  color: rgba(156, 163, 175, 0.95);
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.challenge-modal-card {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.25rem 1.25rem 1.15rem;
}

.challenge-modal-card h2 {
  margin: 0 2rem 0.55rem 0;
}

.challenge-modal-summary,
.challenge-lobby-status,
.challenge-copy-note {
  margin: 0 0 0.85rem;
  color: var(--muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.4;
}

.challenge-link-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.challenge-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.challenge-link-input {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.16);
  border-radius: 0.75rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
}

.challenge-modal-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.challenge-lobby-players {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0.9rem;
}

.challenge-lobby-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background: rgba(32, 48, 64, 0.06);
  border: 1px solid rgba(32, 48, 64, 0.08);
}

.challenge-lobby-player.is-winner {
  background: rgba(80, 125, 164, 0.16);
  border-color: rgba(80, 125, 164, 0.35);
}

.challenge-lobby-rank {
  font-weight: 750;
}

.challenge-lobby-name {
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-lobby-meta {
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
  font-weight: 500;
}

.challenge-lobby-stats {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.results-challenge-compare {
  margin: 0.35rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background: rgba(32, 48, 64, 0.06);
  border: 1px solid rgba(32, 48, 64, 0.08);
  text-align: left;
}

.results-challenge-compare h3 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-challenge-compare p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.action-button-secondary {
  background: rgba(32, 48, 64, 0.08);
  color: inherit;
}

.progress-item {
  padding: 0.95rem 1rem;
  border-radius: 0.95rem;
  color: #ffffff;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-item strong {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.progress-item span {
  color: rgba(156, 163, 175, 0.95);
  font-size: 0.88rem;
  line-height: 1.35;
}

.progress-modal-card .progress-country-search-label,
.progress-modal-card .progress-mastery-intro,
.progress-modal-card .progress-mastery-detail-summary,
.progress-modal-card .progress-country-detail-capital {
  color: rgba(156, 163, 175, 0.95);
}

.progress-modal-card .progress-country-search,
.progress-modal-card .progress-country-row,
.progress-modal-card .progress-country-stat,
.progress-modal-card .progress-mastery-rank-row {
  color: #f4f7fb;
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.06);
}

.progress-modal-card .progress-country-search::placeholder {
  color: rgba(156, 163, 175, 0.7);
}

.progress-modal-card .progress-country-row:hover,
.progress-modal-card .progress-country-row:focus-visible {
  background: #262626;
  border-color: rgba(80, 125, 164, 0.45);
}

.progress-modal-card .progress-country-back,
.progress-modal-card .progress-country-detail-name,
.progress-modal-card .progress-mastery-detail-title,
.progress-modal-card .progress-country-row-name,
.progress-modal-card .progress-mastery-rank-name,
.progress-modal-card .progress-mastery-rank-percent {
  color: #ffffff;
}

.progress-modal-card .progress-country-row-meta,
.progress-modal-card .progress-mastery-rank-meta,
.progress-modal-card .progress-mastery-rank-index,
.progress-modal-card .progress-country-stat span {
  color: rgba(156, 163, 175, 0.95);
}

.progress-modal-card .progress-country-back {
  background: transparent;
}

.progress-country-search-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-country-search {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 0.75rem;
  font: inherit;
  color: var(--ink);
  background: white;
}

.progress-country-list {
  display: grid;
  gap: 0.45rem;
  max-height: min(28rem, 52vh);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.progress-country-row {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.65rem 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.08);
  border-radius: 0.85rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  cursor: pointer;
}

.progress-country-row:hover,
.progress-country-row:focus-visible {
  background: #fff;
  border-color: rgba(32, 48, 64, 0.18);
}

.progress-country-row-flag {
  width: 2.1rem;
  height: 1.4rem;
  object-fit: cover;
  border-radius: 0.2rem;
  background: rgba(32, 48, 64, 0.08);
}

.progress-country-row-flag.is-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.progress-country-row-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.progress-country-row-name {
  font-weight: 700;
}

.progress-country-row-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-country-back {
  margin-bottom: 0.9rem;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.progress-country-detail-hero {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-country-detail-flag {
  width: 5.5rem;
  height: 3.6rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: rgba(32, 48, 64, 0.08);
  box-shadow: 0 0.35rem 0.9rem rgba(32, 48, 64, 0.12);
}

.progress-country-detail-name {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.progress-country-detail-capital {
  margin: 0;
  color: var(--muted);
}

.progress-country-stats {
  display: grid;
  gap: 0.55rem;
}

.progress-country-stat {
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(32, 48, 64, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.progress-country-stat strong {
  display: block;
  margin-bottom: 0.2rem;
}

.progress-country-stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-mastery-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-mastery-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.progress-mastery-card {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.95rem 0.55rem 1.05rem;
  border: 0;
  border-radius: 1.1rem;
  color: #f4f6f8;
  background:
    radial-gradient(circle at 50% 28%, rgba(64, 98, 132, 0.28), transparent 58%),
    linear-gradient(180deg, #2a3038 0%, #171a1f 100%);
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.progress-mastery-card:hover,
.progress-mastery-card:focus-visible {
  background:
    radial-gradient(circle at 50% 28%, rgba(74, 114, 152, 0.34), transparent 58%),
    linear-gradient(180deg, #323944 0%, #1b1f26 100%);
  outline: none;
}

.progress-mastery-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.progress-mastery-ring-wrap {
  position: relative;
  width: 6.4rem;
  height: 6.4rem;
}

.progress-mastery-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-mastery-ring-track {
  fill: none;
  stroke: #3a414b;
  stroke-width: 8;
}

.progress-mastery-ring-fill {
  fill: none;
  stroke: #3d8bfd;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s ease;
}

.progress-mastery-card[data-mode="capitals"] .progress-mastery-ring-fill,
.progress-mastery-card[data-mode="capitals"] .progress-mastery-ring-dot {
  stroke: #4cc2ff;
  fill: #4cc2ff;
}

.progress-mastery-card[data-mode="flags"] .progress-mastery-ring-fill,
.progress-mastery-card[data-mode="flags"] .progress-mastery-ring-dot {
  stroke: #5b9dff;
  fill: #5b9dff;
}

.progress-mastery-ring-dot {
  fill: #3d8bfd;
  stroke: #171a1f;
  stroke-width: 2;
}

.progress-mastery-disc {
  position: absolute;
  inset: 1.05rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #3a6fb5 0%, #1f4f8f 55%, #183f74 100%);
  box-shadow:
    0 0.35rem 0 #122f57,
    0 0.55rem 0.9rem rgba(0, 0, 0, 0.35),
    inset 0 0.12rem 0 rgba(255, 255, 255, 0.22);
}

.progress-mastery-card[data-mode="capitals"] .progress-mastery-disc {
  background: linear-gradient(180deg, #3f8ec8 0%, #256897 55%, #1b557d 100%);
  box-shadow:
    0 0.35rem 0 #143f5f,
    0 0.55rem 0.9rem rgba(0, 0, 0, 0.35),
    inset 0 0.12rem 0 rgba(255, 255, 255, 0.22);
}

.progress-mastery-card[data-mode="flags"] .progress-mastery-disc {
  background: linear-gradient(180deg, #4a7fd0 0%, #2a5aa6 55%, #214a8a 100%);
  box-shadow:
    0 0.35rem 0 #16356a,
    0 0.55rem 0.9rem rgba(0, 0, 0, 0.35),
    inset 0 0.12rem 0 rgba(255, 255, 255, 0.22);
}

.progress-mastery-icon {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}

.progress-mastery-badge {
  position: absolute;
  right: -0.15rem;
  bottom: 0.35rem;
  min-width: 2.55rem;
  padding: 0.18rem 0.42rem;
  border-radius: 0.45rem;
  color: #2a2418;
  background: #e8b84a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.28);
}

.progress-mastery-detail-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.progress-mastery-detail-summary {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-mastery-rank-list {
  display: grid;
  gap: 0.45rem;
  max-height: min(28rem, 52vh);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.progress-mastery-rank-row {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(32, 48, 64, 0.08);
  border-radius: 0.85rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
}

.progress-mastery-rank-main {
  display: grid;
  grid-template-columns: 1.6rem 2.1rem 1fr auto;
  gap: 0.55rem 0.65rem;
  align-items: center;
}

.progress-mastery-rank-facts {
  grid-column: 1 / -1;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(32, 48, 64, 0.08);
}

.progress-mastery-rank-facts-title {
  cursor: pointer;
  list-style: none;
}

.progress-mastery-rank-facts-title::-webkit-details-marker {
  display: none;
}

.progress-mastery-rank-facts-title::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  color: var(--muted);
}

.progress-mastery-rank-facts[open] .progress-mastery-rank-facts-title::before {
  content: "▾";
}

.progress-mastery-rank-facts-list {
  margin-top: 0.4rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.progress-modal-card .progress-country-facts,
.progress-modal-card .learn-about-country-panel {
  color: #f4f7fb;
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.06);
}

.progress-modal-card .progress-country-facts-title,
.progress-modal-card .progress-mastery-rank-facts-title {
  color: #f4f7fb;
}

.progress-mastery-rank-index {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.progress-mastery-rank-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.progress-mastery-rank-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-mastery-rank-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.progress-mastery-rank-percent {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.progress-mastery-rank-percent.is-empty {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 34rem) {
  .progress-mastery-cards {
    grid-template-columns: 1fr;
  }

  .progress-mastery-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    gap: 0.85rem 1rem;
    padding: 0.85rem 1rem;
  }

  .progress-mastery-card-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .progress-mastery-ring-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
}

.auth-modal-subtitle,
.progress-summary {
  margin: 0 0 1rem;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tab {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.12);
  border-radius: 0.75rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

.auth-tab.is-active {
  color: white;
  background: var(--accent);
  border-color: transparent;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
}

.auth-checkbox-field input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.auth-checkbox-field span {
  color: rgba(30, 41, 59, 0.9);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 550;
}

:root[data-theme="dark"] .auth-checkbox-field span {
  color: rgba(226, 232, 240, 0.92);
}

.daily-reminder-toggle {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.daily-reminder-toggle input {
  margin-top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.daily-reminder-toggle-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.daily-reminder-toggle-title {
  color: #f4f7fb;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.daily-reminder-toggle-note {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.72rem;
  line-height: 1.35;
}

.daily-reminder-prompt-card {
  width: min(100%, 26rem);
  display: grid;
  gap: 0.85rem;
}

.daily-reminder-prompt-body {
  margin: 0;
  color: rgba(71, 85, 105, 0.95);
  font-size: 0.92rem;
  line-height: 1.45;
}

:root[data-theme="dark"] .daily-reminder-prompt-body {
  color: rgba(203, 213, 225, 0.92);
}

.daily-reminder-prompt-note {
  margin: 0;
  color: #b45309;
  font-size: 0.8rem;
}

.daily-reminder-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.auth-geography-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.auth-geography-field legend {
  padding: 0;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.auth-geography-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.auth-geography-ratings button {
  min-width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(32, 48, 64, 0.16);
  border-radius: 0.7rem;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

:root[data-theme="dark"] .auth-geography-ratings button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: inherit;
}

.auth-geography-ratings button.is-selected,
.auth-geography-ratings button:hover {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.auth-geography-hint {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  opacity: 0.75;
}

.auth-field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(32, 48, 64, 0.14);
  border-radius: 0.75rem;
  font: inherit;
  color: var(--ink);
  background: white;
}

.auth-error {
  margin: 0;
  color: var(--wrong);
  font-size: 0.92rem;
}

.auth-success {
  margin: 0;
  color: #1f6b3a;
  font-size: 0.92rem;
  line-height: 1.4;
}

:root[data-theme="dark"] .auth-success {
  color: #86efac;
}

.auth-forgot-wrap {
  margin: -0.2rem 0 0;
  text-align: right;
}

.auth-forgot-button {
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.auth-forgot-button:hover {
  filter: brightness(1.05);
}

.auth-google-section {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(32, 48, 64, 0.14);
}

:root[data-theme="dark"] .auth-divider::before,
:root[data-theme="dark"] .auth-divider::after {
  background: rgba(232, 238, 245, 0.14);
}

.auth-google-button {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 2.75rem;
}

.auth-google-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.results-modal-save-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-options button {
  min-height: 3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.modal-options button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-options button:hover,
.modal-options button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

@media (max-width: 1180px) {
  .page-shell {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .landing-screen {
    height: auto;
    max-height: none;
    overflow-y: visible;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    grid-template-areas:
      "path"
      "globe"
      "quest"
      "panel";
    gap: 0.75rem;
    padding: 0.75rem;
    align-items: stretch;
  }

  .landing-hero.quest-log {
    grid-area: quest;
    min-height: auto;
    min-width: 0;
    padding: 1rem 1.1rem 1.05rem;
  }

  .landing-panel {
    grid-area: panel;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    min-height: auto;
    min-width: 0;
    align-self: stretch;
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .learning-path {
    grid-area: path;
    grid-column: auto;
    display: block;
    min-height: min-content;
    min-width: 0;
    overflow: visible;
    padding: 0.85rem 1rem;
  }

  .mastery-globe {
    grid-area: globe;
    min-width: 0;
  }

  .mastery-globe.is-expanded {
    inset: 0.65rem;
    width: calc(100% - 1.3rem);
    max-height: calc(100dvh - 1.3rem);
  }

  .mastery-globe.is-expanded .mastery-globe-stage,
  .mastery-globe.is-expanded .mastery-globe-canvas {
    min-height: min(58vh, 28rem);
  }

  .mastery-globe-body {
    display: block;
  }

  .landing-hero-copy,
  .landing-brand-row,
  .landing-daily-row,
  .landing-hero-footer {
    max-width: none;
  }

  .landing-daily-row {
    grid-template-columns: 1fr;
  }

  .landing-brand-row {
    flex-wrap: wrap;
    align-items: center;
  }

  .learning-path-header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.7rem;
    gap: 0.75rem 1.25rem;
  }

  .learning-path-play-area {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .learning-path-scroller {
    min-height: 12.5rem;
    align-items: stretch;
  }

  .learning-path-list {
    align-items: stretch;
    height: auto;
    min-height: 12.5rem;
  }

  .learning-path-list > .learning-level {
    flex: 0 0 12.5rem;
    align-self: stretch;
    max-height: none;
    min-height: 11.5rem;
  }

  .landing-hero-copy {
    gap: 0.55rem;
  }

  .landing-title {
    font-size: clamp(1.65rem, 3.4vw, 2.25rem);
  }

  .landing-subtitle {
    font-size: 0.86rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .daily-streak-button {
    padding: 0.55rem 0.75rem;
    gap: 0.55rem;
    width: min(100%, 18rem);
  }

  .landing-brand-row .daily-streak-button {
    width: auto;
    max-width: 13rem;
  }

  .daily-streak-fire {
    width: 2.1rem;
    height: 2.1rem;
  }

  .landing-hero-cta,
  .landing-hero-testing-button {
    padding: 0.55rem 0.95rem;
  }

  .landing-mode-button {
    min-height: 8.75rem;
    height: auto;
    padding: 0.75rem 0.85rem 0.9rem;
    border-radius: 1rem;
    gap: 0.45rem;
  }

  .landing-mode-header {
    gap: 0.45rem;
  }

  .landing-mode-icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .landing-mode-icon svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .landing-mode-title {
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .landing-mode-copy {
    max-width: 100%;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .learning-path-title {
    margin: 0.3rem 0 0.35rem;
    font-size: clamp(1.45rem, 3.2vw, 2rem);
  }

  .learning-path-subtitle {
    font-size: 0.86rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .learning-path-section-title {
    font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  }

  .learning-level {
    padding: 0.7rem;
    gap: 0.65rem;
  }

  /* Keep game chrome compact on iPad too */
  .daily-practice-goal {
    width: min(100%, 20rem);
    padding: 0.65rem 0.75rem 0.7rem;
    gap: 0.35rem;
  }

  .daily-challenges {
    width: min(100%, 20rem);
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .daily-reminder-toggle {
    width: min(100%, 20rem);
  }

  .daily-practice-goal-title {
    font-size: 0.86rem;
  }

  .daily-practice-goal-time {
    font-size: 0.74rem;
  }

  .daily-practice-goal-note {
    font-size: 0.72rem;
  }

  .game-screen {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0.45rem;
    gap: 0.45rem;
  }

  .map-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .world-map {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: 100%;
  }

  .game-header {
    padding: 0.45rem 0.7rem 0.35rem;
    border-radius: 1.05rem;
  }

  .prompt-block {
    min-height: 0;
    padding: 0.1rem 0 0.5rem;
  }

  .prompt-text {
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  }

  .detail-line {
    min-height: 0;
    margin-top: 0.35rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    max-height: 3.4rem;
    overflow: hidden;
  }

  .button-row {
    gap: 0.5rem;
    margin-top: 0.45rem;
  }

  .button-row button {
    min-width: 0;
    padding: 0.55rem 0.8rem;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .landing-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .landing-mode-button {
    min-height: 13.5rem;
  }
}

@media (max-width: 720px) {
  body {
    --sidebar-width: 3.75rem;
  }

  /* Sidebar already has account/settings — floating bar overlaps the country prompt. */
  .account-bar {
    display: none;
  }

  .app-sidebar {
    padding: 0.65rem 0.35rem 0.75rem;
  }

  .app-sidebar-brand,
  .app-sidebar-item {
    width: 2.35rem;
    height: 2.35rem;
  }

  .app-sidebar-brand svg,
  .app-sidebar-item svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .app-sidebar-avatar {
    width: 2rem;
    height: 2rem;
  }

  .app-sidebar-item.is-active::after {
    right: -0.35rem;
    height: 1.15rem;
  }

  .landing-screen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    grid-template-areas:
      "path"
      "globe"
      "quest"
      "panel";
    gap: 0.5rem;
    padding: 0.5rem;
    overflow-x: hidden;
    overflow-y: visible;
    align-content: start;
  }

  .landing-hero,
  .landing-panel,
  .learning-path {
    min-width: 0;
    max-width: 100%;
  }

  .landing-hero.quest-log {
    padding: 1rem;
  }

  .landing-brand-row {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-brand-row .daily-streak-button {
    width: 100%;
    max-width: none;
  }

  .landing-hero-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }

  .landing-hero-actions .landing-hero-cta,
  .landing-hero-actions .landing-hero-testing-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .daily-reminder-toggle {
    width: 100%;
  }

  .landing-hero-globe {
    display: none;
  }

  .landing-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, minmax(6.5rem, auto));
    min-height: 0;
  }

  .landing-mode-button {
    min-height: 6.5rem;
  }

  .landing-subtitle,
  .learning-path-subtitle {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .learning-path {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0.85rem 0.75rem 1rem;
  }

  .learning-path-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .learning-path-title {
    margin: 0.2rem 0 0.35rem;
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .learning-path-subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .learning-path-progress {
    align-items: flex-start;
    text-align: left;
    min-width: 0;
    flex: 1 1 auto;
  }

  .learning-path-progress-text {
    font-size: 0.82rem;
  }

  .learning-path-progress-bar {
    max-width: none;
  }

  .learning-path-section-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
  }

  .learning-path-section-title {
    flex: 1 1 100%;
    font-size: 1.25rem;
    order: -1;
  }

  .learning-path-section-button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.45rem 0.7rem;
    font-size: 0.74rem;
    text-align: center;
  }

  /* Swipe the cards — side arrows steal too much width on phone. */
  .learning-path-scroll-button {
    display: none;
  }

  .learning-path-play-area {
    min-width: 0;
    max-width: 100%;
  }

  .learning-path-scroller {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .learning-path-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 0.65rem;
    padding: 0.1rem 0.05rem 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
  }

  .learning-path-list > .learning-level {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
    padding: 0.85rem 0.8rem;
    gap: 0.7rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .learning-level-badge {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.92rem;
  }

  .learning-level-title {
    font-size: 1rem;
  }

  .learning-level-copy {
    font-size: 0.8rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .learning-level-status {
    font-size: 0.78rem;
  }

  .learning-path-auth-gate {
    padding: 0.9rem 0.95rem;
    margin-top: 0.35rem;
  }

  .learning-path-auth-gate p {
    font-size: 0.88rem;
  }

  .modal {
    align-items: start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0;
  }

  .modal-card {
    width: min(30rem, calc(100vw - 1.25rem));
    max-height: none;
    margin: auto;
  }

  .modal-options {
    grid-template-columns: repeat(2, minmax(5rem, 1fr));
  }

  .modal-options-regions {
    grid-template-columns: repeat(2, minmax(5rem, 1fr));
  }

  .game-header,
  .map-shell {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .world-map {
    height: 100%;
    min-height: 0;
    border-radius: 1rem;
  }

  .button-row {
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding-bottom: 0;
  }

  .button-row button {
    flex: 1 1 6.5rem;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
  }

  .game-screen {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 0.3rem;
    gap: 0.3rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    grid-template-rows: auto minmax(14rem, 1fr);
  }

  .game-header {
    padding: 0.35rem 0.55rem 0.3rem;
    border-radius: 0.9rem;
    overflow: visible;
  }

  .prompt-block {
    min-height: 0;
    gap: 0.35rem;
    padding: 0.05rem 0 0.3rem;
    align-items: flex-start;
  }

  .prompt-text {
    font-size: clamp(1.05rem, 4.8vw, 1.4rem);
    line-height: 1.2;
    word-break: break-word;
  }

  .prompt-country-flag {
    width: 2.35rem;
    height: 1.55rem;
    flex-shrink: 0;
  }

  .flag-prompt {
    width: min(5.5rem, 24vw);
  }

  .prompt-block:has(#promptText.hidden) .flag-prompt {
    width: min(9rem, 42vw);
    min-height: 3.4rem;
  }

  .detail-line {
    min-height: 0;
    margin-top: 0.25rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.3;
    max-height: none;
    overflow: visible;
  }

  .answer-feedback-banner {
    margin-top: 0.4rem;
    padding: 0.75rem 0.8rem;
    font-size: clamp(1.2rem, 5.5vw, 1.55rem);
  }

  .game-meta-row {
    gap: 0.25rem;
    margin-top: 0.2rem;
  }

  .game-meta-row .meta-line,
  .game-timer {
    font-size: 0.72rem;
    padding: 0.28rem 0.45rem;
  }

  .mode-best-line {
    margin-bottom: 0.25rem;
    padding: 0.28rem 0.45rem;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .learning-next-button,
  .learning-prev-button,
  .learning-back-button,
  .learn-about-country-button,
  .game-start-button {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
  }

  .learn-about-country-panel {
    max-width: none;
    padding: 0.7rem 0.8rem;
  }

  .continent-recap-options {
    margin-top: 0.25rem;
    gap: 0.3rem;
  }

  .continent-recap-option {
    font-size: 0.78rem;
  }

  .continent-recap-assist-notice {
    font-size: 0.72rem;
  }

  .map-shell {
    min-height: 14rem;
    padding-top: 0.1rem;
    padding-bottom: 0.35rem;
  }
}

/* ——— App-wide game polish (mastery globe unchanged) ——— */

.landing-mode-title,
.landing-mode-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.results-modal-card h2,
.challenge-modal-card h2,
.theme-modal-card h2,
.settings-modal-card h2,
.targeted-review-modal-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.mascot-peek-bubble,
.results-mascot-bubble {
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
}

.action-button-secondary {
  background: rgba(21, 32, 51, 0.78);
  box-shadow: none;
}

:root[data-theme="dark"] .game-screen {
  background:
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(45, 212, 191, 0.06), transparent 55%),
    linear-gradient(180deg, #121925 0%, #0b1018 100%);
}

:root[data-theme="dark"] .game-header {
  background: linear-gradient(180deg, rgba(28, 38, 52, 0.98), rgba(20, 28, 40, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
}

.map-shell .maplibregl-canvas-container,
.map-shell .maplibregl-map {
  border-radius: var(--radius-lg);
}

/* Softer surfaces */
.learning-path,
.landing-hero,
.landing-panel,
.game-header,
.modal-card:not(.targeted-review-modal-card),
.daily-practice-goal,
.daily-challenges {
  border-color: var(--border-soft);
  backdrop-filter: blur(8px);
}

.learning-level,
.landing-mode-button,
.daily-challenge-card,
.targeted-review-option {
  border-radius: var(--radius-md);
  border-color: rgba(255, 255, 255, 0.08);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    filter var(--transition-fast);
}

/* Smooth interactive feedback */
.landing-mode-button:hover,
.learning-level:hover:not(.is-locked),
.daily-challenge-card:hover:not(:disabled),
.targeted-review-option:hover:not(:disabled),
.landing-hero-cta:hover,
.app-sidebar-brand:hover,
.app-sidebar-item:hover {
  transform: scale(1.02);
}

.landing-mode-button:active,
.learning-level:active:not(.is-locked),
.landing-hero-cta:active,
.mode-button:active,
.action-button:active,
.game-start-button:active,
.modal-options button:not(.modal-cancel):active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.mode-button,
.action-button,
.modal-options button:not(.modal-cancel),
.modal-cancel,
.game-start-button,
.landing-hero-cta,
.learning-next-button,
.learning-prev-button {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast),
    background var(--transition-fast);
}

.mode-button,
.action-button,
.modal-options button:not(.modal-cancel),
.game-start-button,
.learning-next-button {
  background: linear-gradient(180deg, var(--accent-alt) 0%, var(--accent) 100%);
}

.mode-button:hover,
.action-button:hover,
.modal-options button:not(.modal-cancel):hover,
.game-start-button:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
  filter: brightness(1.05);
}

.world-map {
  border-radius: var(--radius-xl);
  border-color: rgba(47, 103, 136, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 1.25rem 3rem rgba(32, 48, 64, 0.12);
}

.modal {
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 36, 0.42);
}

.modal-card {
  border-radius: var(--radius-xl);
  border-color: var(--border-soft);
  box-shadow: var(--shadow-lift);
}

.targeted-review-modal-card {
  border-radius: var(--radius-xl);
}

.learning-path-guide,
.mode-best-line,
.meta-line,
.account-greeting {
  border-radius: var(--radius-md);
  border-color: var(--border-soft);
}

.app-sidebar-item,
.app-sidebar-brand {
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    filter var(--transition-fast);
}

@media (prefers-reduced-motion: reduce) {
  .landing-mode-button:hover,
  .learning-level:hover:not(.is-locked),
  .mode-button:hover,
  .action-button:hover {
    transform: none;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  padding: 0.85rem 1rem 1.1rem;
  margin-left: var(--sidebar-width, 4.5rem);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted, #667264);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink, #1a2118);
  text-decoration: underline;
}

.auth-legal-note {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted, #667264);
}

.auth-legal-note a {
  color: var(--accent, #4f7c1b);
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-note a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .site-footer {
    margin-left: 0;
  }
}

