
/* Kidsverse Learning Journey stabilization layer
   Loaded after styles.css. Scoped only to learning-journey.html. */

.learning-journey-page {
  overflow-x: hidden;
}

.learning-journey-page *,
.learning-journey-page *::before,
.learning-journey-page *::after {
  box-sizing: border-box;
}

.learning-journey-page main {
  overflow: hidden;
}

.learning-journey-page .learning-hero,
.learning-journey-page .section,
.learning-journey-page .learning-command-preview,
.learning-journey-page .learning-login-section,
.learning-journey-page .learning-dashboard {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.learning-journey-page .learning-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: stretch;
  padding: clamp(28px, 5vw, 54px) 0 18px;
}

.learning-journey-page .learning-hero-copy,
.learning-journey-page .learning-phone-preview,
.learning-journey-page .learning-login-card,
.learning-journey-page .learning-dashboard-head,
.learning-journey-page .learning-panel {
  min-width: 0;
  overflow: hidden;
}

.learning-journey-page .learning-hero-copy {
  min-height: 0;
  padding: clamp(22px, 4vw, 42px);
}

.learning-journey-page .learning-phone-preview {
  position: relative;
  display: grid;
  align-content: stretch;
  gap: 14px;
  min-height: 0;
  padding: clamp(18px, 3vw, 28px);
}

.learning-journey-page .learning-phone-preview::before {
  inset: 72px 18px 18px;
  border-radius: 28px;
  pointer-events: none;
}

.learning-journey-page .learning-phone-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 22px;
}

.learning-journey-page .learning-phone-top strong,
.learning-journey-page .learning-phone-top small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-journey-page .learning-ring {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(168px, 48vw);
  height: min(168px, 48vw);
  margin: 6px auto;
  border-radius: 999px;
  text-align: center;
}

.learning-journey-page .learning-ring strong {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.92;
}

.learning-journey-page .learning-ring span {
  max-width: 120px;
  font-size: 0.95rem;
  line-height: 1.12;
}

.learning-journey-page .learning-mini-missions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.learning-journey-page .learning-mini-missions article {
  display: grid;
  grid-template-columns: minmax(78px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 18px;
}

.learning-journey-page .learning-mini-missions strong,
.learning-journey-page .learning-mini-missions span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.12;
}

.learning-journey-page .learning-phone-dock {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.learning-journey-page .learning-phone-dock a {
  min-width: 0;
  text-align: center;
  white-space: normal;
}

.learning-journey-page .learning-hero-pills,
.learning-journey-page .learning-hero-metrics,
.learning-journey-page .learning-command-preview,
.learning-journey-page .learning-live-grid,
.learning-journey-page .mission-grid,
.learning-journey-page .learning-two-column,
.learning-journey-page .coach-score-grid,
.learning-journey-page .weekly-report-grid,
.learning-journey-page .badge-row,
.learning-journey-page .blueprint-grid,
.learning-journey-page .journey-health-list,
.learning-journey-page .learning-dashboard-toolbar,
.learning-journey-page .learning-login-grid {
  min-width: 0;
}

.learning-journey-page .learning-login-card,
.learning-journey-page .parent-login-flow,
.learning-journey-page .parent-login-step,
.learning-journey-page .learning-details-form,
.learning-journey-page .learning-panel,
.learning-journey-page .learning-dashboard-head {
  display: grid;
  gap: 14px;
}

.learning-journey-page .learning-login-grid,
.learning-journey-page .learning-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.learning-journey-page .learning-login-grid label,
.learning-journey-page .learning-details-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #16453e;
  font-weight: 900;
}

.learning-journey-page input,
.learning-journey-page select,
.learning-journey-page textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 49, 66, 0.14);
  border-radius: 16px;
  background: #fff;
  color: #1f3142;
  font: inherit;
  font-weight: 800;
}

.learning-journey-page .kiya-panel {
  width: min(360px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  border-radius: 24px;
  background: #fffaf1;
  box-shadow: 0 24px 70px rgba(31, 49, 66, 0.2);
}

.learning-journey-page .kiya-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(31, 49, 66, 0.08);
}

.learning-journey-page .kiya-body {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 14px;
}

.learning-journey-page .kiya-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.learning-journey-page .kiya-links a,
.learning-journey-page .kiya-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 13px;
  background: #eefbf5;
  color: #16453e;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.15;
}

.learning-journey-page .kiya-whatsapp {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ff725f, #ff9d57);
  color: #fff;
}

/* Compact premium hero pass: keeps the dashboard above the fold on laptops. */
.learning-journey-page .learning-hero {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.6fr);
  align-items: start;
  gap: clamp(16px, 2.4vw, 26px);
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: 8px;
}

.learning-journey-page .learning-hero-copy {
  min-height: 0;
  align-content: start;
  padding: clamp(22px, 3.2vw, 34px);
}

.learning-journey-page .learning-hero h1 {
  max-width: 800px;
  font-size: clamp(2.45rem, 4.6vw, 4.45rem);
  line-height: 0.98;
}

.learning-journey-page .learning-hero-copy > p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.42;
}

.learning-journey-page .learning-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.learning-journey-page .learning-hero-pills span {
  padding: 9px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

.learning-journey-page .learning-hero-metrics {
  gap: 10px;
  margin-top: 18px;
}

.learning-journey-page .learning-hero-metrics article {
  min-height: 92px;
  padding: 13px 15px;
}

.learning-journey-page .learning-phone-preview {
  min-height: 0;
  gap: 10px;
  padding: clamp(16px, 2.4vw, 22px);
  border-radius: 34px;
}

.learning-journey-page .learning-phone-preview::before {
  inset: 64px 16px 18px;
  border-radius: 26px;
}

.learning-journey-page .learning-phone-top {
  padding: 10px 12px;
  border-radius: 19px;
}

.learning-journey-page .learning-ring {
  width: min(142px, 36vw);
  height: min(142px, 36vw);
  margin: 2px auto 4px;
}

.learning-journey-page .learning-ring strong {
  font-size: clamp(2.15rem, 5.4vw, 3.55rem);
}

.learning-journey-page .learning-ring span {
  font-size: 0.86rem;
}

.learning-journey-page .learning-mini-missions {
  gap: 8px;
}

.learning-journey-page .learning-mini-missions article {
  min-height: 62px;
  padding: 10px 12px;
  border-radius: 16px;
}

.learning-journey-page .learning-phone-dock {
  gap: 8px;
  margin-top: 2px;
}

.learning-journey-page .learning-phone-dock a {
  min-height: 38px;
  border-radius: 15px;
}

@media (max-width: 960px) {
  .learning-journey-page .learning-hero {
    grid-template-columns: 1fr;
  }

  .learning-journey-page .learning-phone-preview {
    width: min(100%, 560px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .learning-journey-page .learning-hero {
    width: min(100% - 20px, 1180px);
    gap: 14px;
    padding-top: 16px;
  }

  .learning-journey-page .learning-hero-copy {
    padding: 18px;
    border-radius: 22px;
  }

  .learning-journey-page .learning-hero h1 {
    font-size: clamp(2.05rem, 9.5vw, 2.75rem);
    line-height: 1;
  }

  .learning-journey-page .learning-hero-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .learning-journey-page .learning-hero-pills span {
    min-width: 0;
    padding: 9px 8px;
    text-align: center;
    white-space: normal;
  }

  .learning-journey-page .learning-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .learning-journey-page .learning-hero-metrics article {
    min-height: 78px;
    padding: 10px 8px;
    border-radius: 16px;
  }

  .learning-journey-page .learning-hero-metrics strong {
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .learning-journey-page .learning-hero-metrics span {
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .learning-journey-page .learning-phone-preview {
    padding: 14px;
    border-radius: 24px;
  }

  .learning-journey-page .learning-phone-preview::before {
    inset: 58px 12px 14px;
    border-radius: 20px;
  }

  .learning-journey-page .learning-ring {
    width: 118px;
    height: 118px;
  }

  .learning-journey-page .learning-mini-missions article {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 56px;
    padding: 9px 10px;
  }

  .learning-journey-page .learning-mini-missions strong,
  .learning-journey-page .learning-mini-missions span,
  .learning-journey-page .learning-phone-dock a {
    font-size: 0.82rem;
  }
}


/* Desktop polish: keep the learning hero premium, compact and non-overlapping. */
@media (min-width: 761px) {
  .learning-journey-page .learning-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.62fr) !important;
    align-items: center !important;
    gap: clamp(20px, 3vw, 34px) !important;
    padding-top: clamp(24px, 4vw, 46px) !important;
    padding-bottom: 22px !important;
  }

  .learning-journey-page .learning-hero-copy {
    align-content: center !important;
    min-height: 0 !important;
    padding: clamp(24px, 3vw, 38px) !important;
    border-radius: 30px !important;
  }

  .learning-journey-page .learning-hero h1 {
    max-width: 780px !important;
    font-size: clamp(2.75rem, 4.45vw, 4.15rem) !important;
    line-height: 1.01 !important;
    letter-spacing: 0 !important;
    overflow-wrap: normal !important;
  }

  .learning-journey-page .learning-hero-copy > p:not(.eyebrow) {
    max-width: 760px !important;
    margin-top: 10px !important;
    font-size: clamp(1rem, 1.2vw, 1.15rem) !important;
    line-height: 1.55 !important;
  }

  .learning-journey-page .learning-hero-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }

  .learning-journey-page .learning-hero-metrics {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .learning-journey-page .learning-hero-metrics article {
    min-height: 88px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
  }

  .learning-journey-page .learning-phone-preview {
    width: 100% !important;
    max-width: 460px !important;
    min-height: 560px !important;
    max-height: 640px !important;
    justify-self: end !important;
    align-content: start !important;
    padding: 24px !important;
    border-radius: 30px !important;
  }

  .learning-journey-page .learning-phone-preview::before {
    inset: 78px 24px 24px !important;
    border-radius: 30px !important;
  }

  .learning-journey-page .learning-phone-top {
    min-height: 68px !important;
    padding: 16px 18px !important;
    border-radius: 24px !important;
  }

  .learning-journey-page .learning-ring {
    width: 150px !important;
    height: 150px !important;
    margin: 14px auto 16px !important;
  }

  .learning-journey-page .learning-ring strong {
    font-size: clamp(2.8rem, 4vw, 3.85rem) !important;
  }

  .learning-journey-page .learning-ring span {
    max-width: 118px !important;
    font-size: 0.98rem !important;
  }

  .learning-journey-page .learning-mini-missions {
    gap: 12px !important;
  }

  .learning-journey-page .learning-mini-missions article {
    min-height: 58px !important;
    padding: 11px 13px !important;
    border-radius: 20px !important;
  }

  .learning-journey-page .learning-phone-dock {
    margin-top: 12px !important;
  }

  .learning-journey-page .learning-phone-dock a {
    min-height: 42px !important;
    border-radius: 18px !important;
  }

  .learning-journey-page .kiya-widget {
    right: 24px !important;
    bottom: 24px !important;
    z-index: 80 !important;
  }

  .learning-journey-page .kiya-toggle,
  .learning-journey-page .kiya-avatar {
    width: 62px !important;
    height: 62px !important;
  }

  .learning-journey-page .kiya-panel {
    right: 0 !important;
    bottom: 76px !important;
  }
}

@media (max-width: 760px) {
  .learning-journey-page {
    padding-bottom: 92px;
  }

  .learning-journey-page .top-strip {
    display: none !important;
  }

  .learning-journey-page .site-header {
    width: 100% !important;
    min-height: 74px !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .learning-journey-page .brand {
    min-width: 0 !important;
    max-width: calc(100vw - 118px) !important;
    padding: 6px 9px !important;
    border-radius: 20px !important;
  }

  .learning-journey-page .brand img {
    width: 46px !important;
    height: 46px !important;
    object-fit: contain !important;
    border-radius: 14px !important;
  }

  .learning-journey-page .brand strong {
    font-size: 1.05rem !important;
    line-height: 1 !important;
  }

  .learning-journey-page .brand small {
    font-size: 0.72rem !important;
  }

  .learning-journey-page .header-cta {
    display: none !important;
  }

  .learning-journey-page .menu-button {
    display: inline-flex !important;
    width: auto !important;
    min-width: 64px !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-size: 0.86rem !important;
  }

  .learning-journey-page .nav-links {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-height: calc(100vh - 96px) !important;
    overflow-y: auto !important;
  }

  .learning-journey-page .learning-hero,
  .learning-journey-page .section,
  .learning-journey-page .learning-command-preview,
  .learning-journey-page .learning-login-section,
  .learning-journey-page .learning-dashboard {
    width: min(100% - 22px, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .learning-journey-page .learning-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 18px 0 8px !important;
  }

  .learning-journey-page .learning-hero-copy {
    display: grid !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .learning-journey-page .learning-hero h1,
  .learning-journey-page h1 {
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(2rem, 9vw, 2.85rem) !important;
    line-height: 1.03 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
  }

  .learning-journey-page h2,
  .learning-journey-page .section-heading h2 {
    max-width: 100% !important;
    font-size: clamp(1.72rem, 8vw, 2.35rem) !important;
    line-height: 1.06 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
  }

  .learning-journey-page p {
    max-width: 100% !important;
    font-size: 0.96rem !important;
    line-height: 1.5 !important;
  }

  .learning-journey-page .hero-actions,
  .learning-journey-page .quest-action-stack {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    width: 100% !important;
  }

  .learning-journey-page .primary-button,
  .learning-journey-page .secondary-button {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    border-radius: 16px !important;
    font-size: 1rem !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  .learning-journey-page .learning-hero-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
  }

  .learning-journey-page .learning-hero-pills span {
    width: auto !important;
    min-height: 0 !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
  }

  .learning-journey-page .learning-hero-metrics,
  .learning-journey-page .learning-command-preview,
  .learning-journey-page .learning-live-grid,
  .learning-journey-page .mission-grid,
  .learning-journey-page .learning-two-column,
  .learning-journey-page .coach-score-grid,
  .learning-journey-page .weekly-report-grid,
  .learning-journey-page .badge-row,
  .learning-journey-page .blueprint-grid,
  .learning-journey-page .journey-health-list,
  .learning-journey-page .learning-dashboard-toolbar,
  .learning-journey-page .learning-login-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .learning-journey-page .learning-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .learning-journey-page .learning-hero-metrics article {
    min-height: 76px !important;
    padding: 9px 6px !important;
    text-align: center !important;
  }

  .learning-journey-page .learning-hero-metrics strong {
    font-size: 1.35rem !important;
    line-height: 1 !important;
  }

  .learning-journey-page .learning-hero-metrics span {
    font-size: 0.66rem !important;
    line-height: 1.1 !important;
  }

  .learning-journey-page .learning-phone-preview {
    display: grid !important;
    gap: 11px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 14px !important;
    border-radius: 26px !important;
  }

  .learning-journey-page .learning-phone-preview::before {
    inset: 64px 12px 12px !important;
    border-radius: 22px !important;
  }

  .learning-journey-page .learning-phone-top {
    padding: 10px 12px !important;
    border-radius: 18px !important;
  }

  .learning-journey-page .learning-phone-top strong {
    font-size: 1rem !important;
  }

  .learning-journey-page .learning-phone-top small {
    font-size: 0.82rem !important;
  }

  .learning-journey-page .learning-ring {
    width: 100% !important;
    height: auto !important;
    min-height: 94px !important;
    margin: 2px 0 !important;
    padding: 16px !important;
    border-radius: 20px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 12px !important;
    place-items: center start !important;
    background: linear-gradient(135deg, rgba(255,216,111,0.94), rgba(217,247,232,0.22)) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16), 0 18px 40px rgba(0,0,0,0.18) !important;
  }

  .learning-journey-page .learning-ring strong {
    font-size: clamp(2.2rem, 12vw, 3.6rem) !important;
    line-height: 0.9 !important;
    color: #ffffff !important;
  }

  .learning-journey-page .learning-ring span {
    max-width: none !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    line-height: 1.18 !important;
    text-align: left !important;
  }

  .learning-journey-page .learning-mini-missions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .learning-journey-page .learning-mini-missions article {
    display: grid !important;
    grid-template-columns: minmax(72px, 0.42fr) minmax(0, 1fr) !important;
    min-height: 0 !important;
    padding: 10px 11px !important;
    border-radius: 16px !important;
  }

  .learning-journey-page .learning-mini-missions strong,
  .learning-journey-page .learning-mini-missions span {
    font-size: 0.86rem !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }

  .learning-journey-page .learning-phone-dock {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .learning-journey-page .learning-phone-dock a {
    min-height: 38px !important;
    padding: 8px 6px !important;
    border-radius: 13px !important;
    font-size: 0.78rem !important;
  }

  .learning-journey-page .learning-login-card,
  .learning-journey-page .parent-login-step,
  .learning-journey-page .learning-dashboard-head,
  .learning-journey-page .learning-panel,
  .learning-journey-page .learning-score-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .learning-journey-page .learning-dashboard-toolbar {
    position: static !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  .learning-journey-page .learning-dashboard-toolbar a,
  .learning-journey-page .mission-grid article,
  .learning-journey-page .learning-command-preview article,
  .learning-journey-page .learning-live-grid article,
  .learning-journey-page .weekly-report-grid article,
  .learning-journey-page .coach-score-grid article,
  .learning-journey-page .badge-row article,
  .learning-journey-page .blueprint-grid span,
  .learning-journey-page .journey-health-list span,
  .learning-journey-page .roadmap-list a {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .learning-journey-page .fluency-roadmap article {
    display: grid !important;
    grid-template-columns: minmax(76px, 0.32fr) minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .learning-journey-page .kiya-widget {
    right: 12px !important;
    bottom: 16px !important;
    z-index: 90 !important;
  }

  .learning-journey-page .kiya-toggle,
  .learning-journey-page .kiya-avatar {
    width: 50px !important;
    height: 50px !important;
  }

  .learning-journey-page .kiya-panel {
    right: 0 !important;
    bottom: 62px !important;
    width: min(340px, calc(100vw - 24px)) !important;
  }

  .learning-journey-page .kiya-links {
    grid-template-columns: 1fr !important;
  }

  .learning-journey-page .whatsapp-float {
    left: 12px !important;
    bottom: 16px !important;
    z-index: 88 !important;
    max-width: calc(100vw - 92px) !important;
    min-height: 44px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    font-size: 0.86rem !important;
  }

  .learning-journey-page .site-footer {
    width: min(100% - 22px, 1180px) !important;
    margin: 0 auto !important;
    padding: 18px 0 92px !important;
    display: grid !important;
    gap: 6px !important;
    text-align: left !important;
  }
}

@media (max-width: 420px) {
  .learning-journey-page .learning-hero,
  .learning-journey-page .section,
  .learning-journey-page .learning-command-preview,
  .learning-journey-page .learning-login-section,
  .learning-journey-page .learning-dashboard {
    width: min(100% - 18px, 1180px) !important;
  }

  .learning-journey-page .learning-hero-metrics {
    grid-template-columns: 1fr !important;
  }

  .learning-journey-page .learning-ring {
    grid-template-columns: 1fr !important;
    place-items: center !important;
    text-align: center !important;
  }

  .learning-journey-page .learning-ring span {
    text-align: center !important;
  }

  .learning-journey-page .learning-mini-missions article {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .learning-journey-page .fluency-roadmap article {
    grid-template-columns: 1fr !important;
  }
}

/* Final Learning Journey hero fit pass: latest rules win over older rescue blocks. */
@media (min-width: 761px) {
  .learning-journey-page .learning-hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.56fr) !important;
    align-items: start !important;
    gap: clamp(16px, 2vw, 24px) !important;
    padding-top: clamp(16px, 2.4vw, 28px) !important;
    padding-bottom: 10px !important;
  }

  .learning-journey-page .learning-hero-copy {
    align-content: start !important;
    min-height: 0 !important;
    padding: clamp(22px, 2.6vw, 32px) !important;
    border-radius: 28px !important;
  }

  .learning-journey-page .learning-hero h1 {
    max-width: 760px !important;
    font-size: clamp(2.35rem, 4.15vw, 3.95rem) !important;
    line-height: 1 !important;
  }

  .learning-journey-page .learning-hero-copy > p:not(.eyebrow) {
    margin-top: 8px !important;
    font-size: clamp(0.98rem, 1.1vw, 1.1rem) !important;
    line-height: 1.42 !important;
  }

  .learning-journey-page .learning-hero .hero-actions {
    margin-top: 14px !important;
  }

  .learning-journey-page .learning-hero-pills {
    margin-top: 13px !important;
    gap: 8px !important;
  }

  .learning-journey-page .learning-hero-pills span {
    padding: 8px 11px !important;
    font-size: 0.88rem !important;
  }

  .learning-journey-page .learning-hero-metrics {
    margin-top: 14px !important;
    gap: 10px !important;
  }

  .learning-journey-page .learning-hero-metrics article {
    min-height: 78px !important;
    padding: 10px 12px !important;
    border-radius: 17px !important;
  }

  .learning-journey-page .learning-hero-metrics strong {
    font-size: clamp(1.85rem, 3vw, 2.55rem) !important;
  }

  .learning-journey-page .learning-phone-preview {
    max-width: 420px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 18px !important;
    border-radius: 28px !important;
  }

  .learning-journey-page .learning-phone-preview::before {
    inset: 64px 18px 18px !important;
    border-radius: 24px !important;
  }

  .learning-journey-page .learning-phone-top {
    min-height: 54px !important;
    padding: 11px 13px !important;
    border-radius: 20px !important;
  }

  .learning-journey-page .learning-ring {
    width: 126px !important;
    height: 126px !important;
    margin: 8px auto 10px !important;
  }

  .learning-journey-page .learning-ring strong {
    font-size: clamp(2.25rem, 3.2vw, 3.2rem) !important;
  }

  .learning-journey-page .learning-ring span {
    max-width: 104px !important;
    font-size: 0.82rem !important;
  }

  .learning-journey-page .learning-mini-missions {
    gap: 8px !important;
  }

  .learning-journey-page .learning-mini-missions article {
    grid-template-columns: minmax(70px, 0.38fr) minmax(0, 1fr) !important;
    min-height: 52px !important;
    padding: 9px 11px !important;
    border-radius: 16px !important;
  }

  .learning-journey-page .learning-mini-missions strong,
  .learning-journey-page .learning-mini-missions span,
  .learning-journey-page .learning-phone-dock a {
    font-size: 0.82rem !important;
  }

  .learning-journey-page .learning-phone-dock {
    margin-top: 8px !important;
    gap: 7px !important;
  }

  .learning-journey-page .learning-phone-dock a {
    min-height: 36px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 760px) {
  .learning-journey-page .learning-phone-preview {
    max-width: 100% !important;
    min-height: 0 !important;
  }
}

/* Phone preview overlap fix: reserve space for the traffic dots and lower the glass panel. */
.learning-journey-page .learning-phone-preview {
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  align-content: start !important;
  overflow: hidden !important;
}

.learning-journey-page .learning-phone-preview::before {
  top: 82px !important;
}

.learning-journey-page .learning-phone-top {
  position: relative !important;
  z-index: 3 !important;
  grid-template-columns: 56px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.learning-journey-page .learning-phone-top span {
  display: block !important;
  width: 54px !important;
  height: 11px !important;
  border-radius: 999px !important;
  background: #ffd86f !important;
  box-shadow: 19px 0 0 #ff9c7a, 38px 0 0 #d9f7e8 !important;
}

.learning-journey-page .learning-phone-top strong {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(0.92rem, 1.7vw, 1.08rem) !important;
  line-height: 1 !important;
}

.learning-journey-page .learning-phone-top small {
  min-width: max-content !important;
  max-width: 120px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(0.72rem, 1.3vw, 0.9rem) !important;
  line-height: 1 !important;
}

.learning-journey-page .learning-ring,
.learning-journey-page .learning-mini-missions,
.learning-journey-page .learning-phone-dock {
  z-index: 2 !important;
}

@media (max-width: 520px) {
  .learning-journey-page .learning-phone-top {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  .learning-journey-page .learning-phone-top span {
    width: 46px !important;
    height: 10px !important;
    box-shadow: 16px 0 0 #ff9c7a, 32px 0 0 #d9f7e8 !important;
  }

  .learning-journey-page .learning-phone-top small {
    max-width: 92px !important;
  }
}

/* Simplified phone top: remove Kidsverse OS label and status dots to prevent crowding. */
.learning-journey-page .learning-phone-top {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 48px !important;
  padding: 10px 14px !important;
  text-align: center !important;
}

.learning-journey-page .learning-phone-top span,
.learning-journey-page .learning-phone-top strong {
  display: none !important;
}

.learning-journey-page .learning-phone-top small {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  font-size: clamp(0.86rem, 1.5vw, 1rem) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.learning-journey-page .learning-phone-preview::before {
  top: 72px !important;
}
