/* ==========================================================================
   Kiddohub — Shared Components (Phase 14)
   Reusable, accessible component system used by all four personalities.
   Extends and harmonizes with the original style.css components.
   ========================================================================== */

/* ---- Layout container ---- */
.kh-container {
  width: 100%;
  max-width: var(--kh-max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.kh-reading {
  max-width: var(--kh-max-reading);
  margin-inline: auto;
}

/* ---- Eyebrow / section label ---- */
.kh-eyebrow {
  color: var(--scope-accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   CARD SYSTEM
   ========================================================================== */
.kh-card {
  background-color: var(--kh-surface);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-radius-lg);
  box-shadow: var(--kh-shadow-sm);
  padding: var(--kh-space-lg);
}

.kh-card--flat {
  box-shadow: none;
}

.kh-card-interactive {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform var(--kh-speed) var(--kh-ease),
              box-shadow var(--kh-speed) var(--kh-ease),
              border-color var(--kh-speed) var(--kh-ease);
}

.kh-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--kh-shadow-md);
  border-color: var(--scope-accent);
  color: inherit;
}

.kh-card-interactive:focus-visible {
  outline: 3px solid var(--scope-accent);
  outline-offset: 3px;
  border-color: var(--scope-accent);
}

/* Learning card (FlagMap child contexts) */
.kh-card-learning {
  border-radius: var(--kh-radius-xl);
}

/* Parent card — structured, calm */
.kh-card-parent {
  background-color: var(--kh-surface);
  border-color: var(--kh-border-soft);
  border-radius: var(--kh-radius-md);
}

/* Admin card — compact, data-oriented */
.kh-card-admin {
  border-radius: var(--kh-radius-md);
  padding: var(--kh-space-md);
}

/* Premium card — subtle, never salesy in child areas */
.kh-card-premium {
  border: 1.5px solid var(--kh-sunshine);
  background: linear-gradient(180deg, #fffdf5, var(--kh-surface));
}

/* Achievement card — celebratory but tasteful */
.kh-card-achievement {
  border-color: var(--kh-sunshine);
  background-color: #fffdf6;
}

/* ==========================================================================
   BUTTON SYSTEM
   All buttons: ≥44px height, consistent radius, visible focus, pressed and
   disabled states, and a loading state via .is-loading.
   ========================================================================== */
.kh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--kh-touch);
  padding: 0.7rem 1.5rem;
  border-radius: var(--kh-radius-pill);
  border: 2px solid transparent;
  font-family: var(--kh-font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--kh-speed) var(--kh-ease),
              background-color var(--kh-speed) var(--kh-ease),
              box-shadow var(--kh-speed) var(--kh-ease),
              border-color var(--kh-speed) var(--kh-ease);
  white-space: normal;          /* tolerate longer BM translations */
  text-align: center;
}

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

.kh-btn:focus-visible {
  outline: 3px solid var(--scope-accent);
  outline-offset: 2px;
}

.kh-btn[disabled],
.kh-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.kh-btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.kh-btn.is-loading::before {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: kh-spin 0.7s linear infinite;
}

.kh-btn--primary {
  background-color: var(--scope-accent);
  color: #fff;
  box-shadow: var(--kh-shadow-sm);
}
.kh-btn--primary:hover { background-color: var(--scope-accent-dark); color: #fff; transform: translateY(-2px); }

.kh-btn--explorer {
  background-color: var(--kh-explorer);
  color: #fff;
  box-shadow: var(--kh-shadow-sm);
}
.kh-btn--explorer:hover { background-color: var(--kh-explorer-dark); color: #fff; transform: translateY(-2px); }

.kh-btn--child {
  background-color: var(--kh-teal);
  color: #fff;
  box-shadow: var(--kh-shadow-sm);
  font-size: 1.05rem;
}
.kh-btn--child:hover { background-color: var(--kh-teal-dark); color: #fff; transform: translateY(-2px); }

.kh-btn--sunshine {
  background-color: var(--kh-sunshine);
  color: #4a3a08;
  box-shadow: var(--kh-shadow-sm);
}
.kh-btn--sunshine:hover { background-color: var(--kh-sunshine-dark); color: #fff; transform: translateY(-2px); }

.kh-btn--secondary {
  background-color: var(--kh-surface);
  color: var(--scope-accent-dark);
  border-color: var(--kh-border);
}
.kh-btn--secondary:hover { border-color: var(--scope-accent); background-color: var(--scope-accent-light); color: var(--scope-accent-dark); }

.kh-btn--outline {
  background-color: transparent;
  color: var(--scope-accent-dark);
  border-color: var(--scope-accent);
}
.kh-btn--outline:hover { background-color: var(--scope-accent-light); color: var(--scope-accent-dark); }

.kh-btn--ghost {
  background-color: transparent;
  color: var(--kh-text-secondary);
}
.kh-btn--ghost:hover { background-color: var(--scope-accent-light); color: var(--scope-accent-dark); }

.kh-btn--success {
  background-color: var(--kh-leaf);
  color: #fff;
}
.kh-btn--success:hover { background-color: #3f8f68; color: #fff; }

.kh-btn--danger {
  background-color: transparent;
  color: var(--kh-danger);
  border-color: var(--kh-danger);
}
.kh-btn--danger:hover { background-color: #fbecec; color: var(--kh-danger); }

.kh-btn--lg { min-height: 3.25rem; padding: 0.9rem 2rem; font-size: 1.1rem; }
.kh-btn--sm { min-height: 2.4rem; padding: 0.45rem 1rem; font-size: 0.92rem; }
.kh-btn--block { width: 100%; }

/* ==========================================================================
   CHIPS (filters / roles)
   ========================================================================== */
.kh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--kh-touch);
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--kh-border);
  border-radius: var(--kh-radius-pill);
  background-color: var(--kh-surface);
  color: var(--kh-text-primary);
  font-weight: 800;
  text-decoration: none;
  transition: all var(--kh-speed) var(--kh-ease);
}

.kh-chip:hover { border-color: var(--scope-accent); color: var(--scope-accent-dark); background-color: var(--scope-accent-light); }
.kh-chip:focus-visible { outline: 3px solid var(--scope-accent); outline-offset: 2px; }
.kh-chip.is-active { border-color: var(--scope-accent); background-color: var(--scope-accent); color: #fff; }

/* Role chips — cooperative games (not colour-only) */
.kh-role {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--kh-radius-pill);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
}
.kh-role i { font-size: 1rem; }
.kh-role--child { background-color: #fef3c7; color: #92400e; border-color: #f4c95d; }
.kh-role--parent { background-color: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.kh-role--team { background-color: var(--kh-teal-light); color: var(--kh-teal-dark); border-color: var(--kh-teal); }

/* ==========================================================================
   MASTERY STARS
   ========================================================================== */
.kh-stars { color: var(--kh-sunshine-dark); letter-spacing: 0.08em; font-size: 1.3rem; }
.kh-stars--empty { color: #cbd5df; }

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.kh-progress {
  height: 0.7rem;
  border-radius: var(--kh-radius-pill);
  background-color: var(--kh-border-soft);
  overflow: hidden;
}
.kh-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--kh-teal), var(--kh-explorer));
  transition: width 0.3s var(--kh-ease);
}

/* ==========================================================================
   PREMIUM LOCK (child-safe)
   ========================================================================== */
.kh-premium-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--kh-radius-pill);
  background-color: #fff7e6;
  color: var(--kh-sunshine-dark);
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid #f0d99a;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.kh-empty {
  max-width: 40rem;
  margin: var(--kh-space-2xl) auto;
  padding: var(--kh-space-2xl) var(--kh-space-lg);
  border: 1.5px dashed var(--kh-border);
  border-radius: var(--kh-radius-xl);
  background-color: var(--kh-surface);
  text-align: center;
}
.kh-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: var(--kh-space-md);
  border-radius: 50%;
  background-color: var(--scope-accent-light);
  color: var(--scope-accent-dark);
  font-size: 2rem;
}
.kh-empty__title { font-family: var(--kh-font-display); font-weight: 600; margin-bottom: 0.4rem; }
.kh-empty__text { color: var(--kh-text-secondary); font-weight: 600; }

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
.kh-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--scope-accent-light);
  border-top-color: var(--scope-accent);
  border-radius: 50%;
  animation: kh-spin 0.7s linear infinite;
}
.kh-skeleton {
  border-radius: var(--kh-radius-md);
  background: linear-gradient(90deg, var(--kh-border-soft) 25%, #f4f7fa 50%, var(--kh-border-soft) 75%);
  background-size: 200% 100%;
  animation: kh-shimmer 1.4s infinite;
}

@keyframes kh-spin { to { transform: rotate(360deg); } }
@keyframes kh-shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   ERROR / STATUS PAGES
   ========================================================================== */
.kh-error {
  max-width: 34rem;
  margin: var(--kh-space-2xl) auto;
  text-align: center;
}
.kh-error__code {
  font-family: var(--kh-font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 700;
  color: var(--scope-accent);
  line-height: 1;
}
.kh-error__title { font-family: var(--kh-font-display); font-weight: 600; margin: 0.5rem 0; }
.kh-error__text { color: var(--kh-text-secondary); font-weight: 600; }

/* ==========================================================================
   VISIBLE FOCUS (consistent ring; never remove outline without replacement)
   ========================================================================== */
.kh-focusable:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--scope-accent);
  outline-offset: 2px;
  border-radius: var(--kh-radius-sm);
}

/* Screen-reader only utility */
.kh-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Phase 15 — notifications
   ========================================================================== */
.notification-stack {
  position: fixed;
  top: 5.25rem;
  right: 1rem;
  z-index: 1100;
  display: grid;
  gap: 0.65rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}
.notification-flashes { display: grid; gap: 0.65rem; }
.notification {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-radius-md);
  background-color: var(--kh-surface);
  color: var(--kh-text-primary);
  box-shadow: var(--kh-shadow-md);
  font-weight: 700;
  pointer-events: auto;
}
.notification > i { color: var(--scope-accent); margin-top: 0.15rem; }
.notification--success, .notification.alert-success { border-left: 4px solid var(--kh-leaf); }
.notification--achievement { border-left: 4px solid var(--kh-sunshine); background-color: #fffdf6; }
.notification--warning, .notification.alert-warning { border-left: 4px solid var(--kh-sunshine-dark); }
.notification--danger, .notification--error, .notification--critical, .notification.alert-danger { border-left: 4px solid var(--kh-danger); }
.notification__close { margin-left: auto; border: 0; background: transparent; color: var(--kh-text-secondary); min-width: 2rem; min-height: 2rem; }
.notification__close:focus-visible { outline: 3px solid var(--scope-accent); outline-offset: 1px; }
.notification .btn-close { margin-left: auto; }

/* ==========================================================================
   Phase 15 — celebration modal
   ========================================================================== */
.celebration-overlay[hidden] { display: none; }
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(27, 52, 73, 0.54);
}
.celebration-card {
  position: relative;
  width: min(30rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem 1.5rem;
  border: 2px solid var(--kh-teal);
  border-radius: var(--kh-radius-xl);
  background: radial-gradient(circle at 50% 0, var(--kh-teal-light), transparent 45%), var(--kh-surface);
  box-shadow: var(--kh-shadow-lg);
  text-align: center;
}
.celebration-card--hero { border-color: var(--kh-sunshine); background: radial-gradient(circle at 50% 0, #fff7d9, transparent 48%), var(--kh-surface); }
.celebration-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: transparent; color: var(--kh-text-secondary); }
.celebration-close:hover { background: var(--kh-border-soft); color: var(--kh-text-primary); }
.celebration-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 0.75rem; border-radius: 50%; background-color: var(--kh-sunshine); color: #5a4306; font-size: 2rem; }
.celebration-kicker { color: var(--kh-teal-dark); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.celebration-title { font-family: var(--kh-font-display); font-size: 1.75rem; font-weight: 600; color: var(--kh-primary); }
.celebration-message, .celebration-country { color: var(--kh-text-secondary); font-weight: 700; }
.celebration-country { font-size: 1.25rem; color: var(--kh-teal-dark); }
.celebration-country-flag { display: block; width: min(12rem, 80%); max-height: 6rem; margin: 0.75rem auto; object-fit: contain; border-radius: var(--kh-radius-sm); box-shadow: var(--kh-shadow-sm); }
.celebration-fact { display: inline-block; padding: 0.55rem 0.85rem; border-radius: var(--kh-radius-pill); background-color: var(--kh-primary-light); color: var(--kh-primary-dark); font-weight: 800; }
.celebration-points { min-height: 1.5rem; color: var(--kh-sunshine-dark); font-family: var(--kh-font-display); font-size: 1.35rem; font-weight: 600; }
body.celebration-open { overflow: hidden; }

/* ==========================================================================
   Phase 15 — parent invitation, family presence, achievement summary
   ========================================================================== */
.parent-invite-card { max-width: 38rem; margin: 3rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 2px solid var(--kh-teal); border-radius: var(--kh-radius-xl); background: radial-gradient(circle at 50% 0, var(--kh-teal-light), transparent 50%), var(--kh-surface); box-shadow: var(--kh-shadow-md); text-align: center; }
.parent-invite-card__icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; background-color: var(--kh-coral-light); color: var(--kh-coral-dark); font-size: 2rem; }
.parent-invite-card h1 { font-family: var(--kh-font-display); font-weight: 600; color: var(--kh-primary); }
.parent-invite-card__message { color: var(--kh-text-secondary); font-size: 1.1rem; font-weight: 700; }
.family-pair { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; color: var(--kh-primary-dark); font-weight: 800; }
.family-pair span { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.65rem 0.85rem; border-radius: var(--kh-radius-pill); background-color: var(--kh-primary-light); }
.family-mode-chip { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.55rem; padding: 0.45rem 0.8rem; border: 1px solid var(--kh-teal); border-radius: var(--kh-radius-pill); background-color: var(--kh-teal-light); color: var(--kh-teal-dark); font-size: 0.85rem; font-weight: 800; }
.family-mode-chip strong { padding-left: 0.45rem; border-left: 1px solid rgba(44, 132, 134, 0.3); }
.combined-achievement-summary { display: grid; gap: 0.35rem; margin: 1.25rem auto; padding: 1rem; border: 1px solid var(--kh-sunshine); border-radius: var(--kh-radius-lg); background-color: #fffdf6; color: var(--kh-primary); font-weight: 800; }
.combined-achievement-summary span { color: var(--kh-text-secondary); }

@media (max-width: 575.98px) {
  .notification-stack { top: 4.75rem; right: 0.75rem; width: calc(100vw - 1.5rem); }
  .celebration-overlay { align-items: end; padding: 0.5rem; }
  .celebration-card { border-radius: var(--kh-radius-xl) var(--kh-radius-xl) var(--kh-radius-md) var(--kh-radius-md); padding: 1.5rem 1rem; max-height: calc(100vh - 1rem); }
}

/* Skip link */
.kh-skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 2000;
  padding: 0.7rem 1.1rem;
  border-radius: var(--kh-radius-md);
  background-color: var(--kh-primary);
  color: #fff;
  font-weight: 800;
  transition: top var(--kh-speed) var(--kh-ease);
}
.kh-skip-link:focus { top: 0.75rem; color: #fff; }

/* ==========================================================================
   Phase 17 — access level and role-aware orientation
   ========================================================================== */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-radius-pill);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.plan-badge--free { background-color: var(--kh-explorer-light); border-color: #b8d6f5; color: var(--kh-explorer-dark); }
.plan-badge--premium { background-color: #fff8df; border-color: #ecd58a; color: #806214; }
.plan-badge--compact { min-height: 2rem; padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.plan-badge:hover { filter: brightness(0.97); color: inherit; }
.app-brand { position: relative; }
.app-brand__child { display: block; margin-top: -0.1rem; color: var(--kh-text-secondary); font-family: var(--kh-font-body); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em; }
.app-plan-status { margin-left: 0.35rem; }
.free-explorer-banner { display: flex; align-items: center; gap: 0.85rem; max-width: var(--kh-max-width); margin: 0 auto var(--kh-space-lg); padding: 0.85rem 1rem; border: 1px solid #b8d6f5; border-radius: var(--kh-radius-lg); background-color: var(--kh-explorer-light); color: var(--kh-primary); }
.free-explorer-banner__icon { display: grid; place-items: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background-color: var(--kh-explorer); color: #fff; }
.free-explorer-banner__copy { flex: 1; }
.free-explorer-banner__copy p:not(.kh-eyebrow) { color: var(--kh-text-secondary); font-size: 0.9rem; font-weight: 700; }
.free-explorer-banner__close { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--kh-text-secondary); }
.free-explorer-banner__close:hover { background-color: rgba(58, 123, 213, 0.1); }
.child-plan-card { max-width: 38rem; margin: 3rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--kh-border); border-radius: var(--kh-radius-xl); background-color: var(--kh-surface); box-shadow: var(--kh-shadow-md); text-align: center; }
.child-plan-card__icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; background-color: var(--kh-explorer-light); color: var(--kh-explorer-dark); font-size: 2rem; }
.child-plan-card h1 { font-family: var(--kh-font-display); font-weight: 600; color: var(--kh-primary); }
.child-plan-card p:not(.kh-eyebrow) { color: var(--kh-text-secondary); font-size: 1.05rem; font-weight: 700; }
.parent-header-actions { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.parent-current-plan { display: grid; gap: 0.25rem; }
.parent-current-plan > span { color: var(--kh-text-secondary); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 991.98px) {
  .app-plan-status { margin: 0.5rem 0 0; }
}
@media (max-width: 575.98px) {
  .free-explorer-banner { align-items: flex-start; flex-wrap: wrap; }
  .free-explorer-banner__copy { min-width: calc(100% - 3.5rem); }
  .free-explorer-banner .kh-btn { margin-left: 3.35rem; }
  .parent-header-actions { align-items: stretch; flex-direction: column; width: 100%; }
}

/* ==========================================================================
   NAV CTA (logged-out primary action in navbar)
   ========================================================================== */
.app-navbar .nav-cta {
  background-color: var(--scope-accent);
  color: #fff !important;
}
.app-navbar .nav-cta:hover {
  background-color: var(--scope-accent-dark) !important;
  color: #fff !important;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (FlagMap family/child UI)
   Fixed bottom bar; hidden on desktop. Body gets bottom padding so content
   is never obscured. Only rendered when a child is selected.
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  background-color: var(--kh-surface);
  border-top: 1px solid var(--kh-border);
  box-shadow: 0 -4px 18px rgba(36, 49, 66, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.5rem;
  padding: 0.4rem 0.2rem;
  color: var(--kh-text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}
.mobile-bottom-nav__item i { font-size: 1.3rem; }
.mobile-bottom-nav__item:hover { color: var(--scope-accent-dark); }
.mobile-bottom-nav__item.is-active { color: var(--scope-accent-dark); }
.mobile-bottom-nav__item.is-active i { color: var(--scope-accent); }
.mobile-bottom-nav__item:focus-visible { outline: 3px solid var(--scope-accent); outline-offset: -3px; }

@media (max-width: 991.98px) {
  .mobile-bottom-nav { display: grid; }
  body:has(.mobile-bottom-nav) { padding-bottom: 4rem; }
  /* Hide bottom nav when a form/game is likely focused (avoid interference). */
  body.kh-scope-flagmap .mobile-bottom-nav { display: grid; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
