/* Final homepage reference overrides loaded after the legacy stylesheet. */
body[data-active-panel="landing"] .landing-home-grid {
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 16px 16px !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.74fr) minmax(280px, 0.68fr) !important;
  grid-template-areas:
    "welcome welcome welcome"
    "recommendation recommendation route"
    "growth growth briefing"
    "hardware questions calendar"
    "special special coach" !important;
  gap: 10px !important;
  align-items: start !important;
}

/* Homepage frame v7: keep the homepage locked to the second reference format. */
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .topbar,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #aiDynamicStatus,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #runtimeStatusStrip,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionDock,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionMini,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionMiniBubble,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionAmbientStage {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .main {
  min-height: 100vh !important;
  height: 100vh !important;
  padding: 0 !important;
  background: #f5f8fc !important;
  overflow: hidden auto !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-workspace {
  padding: 0 !important;
  background: #f5f8fc !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 8px 24px 18px !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.74fr) minmax(330px, 0.86fr) !important;
  grid-template-areas:
    "welcome welcome welcome"
    "recommendation recommendation route"
    "growth growth briefing"
    "hardware questions calendar"
    "special special coach" !important;
  grid-template-rows: 96px 260px 206px 190px 180px !important;
  gap: 12px !important;
  align-items: start !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel {
  grid-area: welcome !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 148px 164px !important;
  gap: 16px !important;
  align-items: center !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 12px 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid > .section-card.landing-welcome-panel,
html:not([data-theme="dark"]) :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid > .section-card.landing-welcome-panel,
html[data-theme="light"] :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid > .section-card.landing-welcome-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel::before {
  content: "" !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(255, 115, 86, 0.72), rgba(91, 140, 255, 0.28), rgba(124, 77, 255, 0.62)) !important;
  opacity: 0.78 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid > .section-card.landing-welcome-panel::after {
  display: none !important;
  content: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-greeting-line {
  margin: 0 0 3px !important;
  color: #0f172a !important;
  font-size: 30px !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-streak-line {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-level-gap {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-suggestion,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-customize-home {
  justify-self: end !important;
  width: auto !important;
  min-width: 132px !important;
  height: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 9px !important;
  color: #172033 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-customize-home {
  min-width: 148px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-suggestion p {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-suggestion::before {
  content: "✦" !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #7c4dff, #5b8cff) !important;
  font-size: 12px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-card {
  grid-area: route !important;
  height: 260px !important;
  min-height: 260px !important;
  max-height: 260px !important;
  padding: 16px 18px 12px !important;
  display: grid !important;
  grid-template-rows: auto 4px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 60px !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title {
  display: grid !important;
  gap: 5px !important;
  min-width: 0 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title span {
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title strong {
  color: #7c879c !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title strong::before,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-head strong::before {
  display: none !important;
  content: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress {
  position: relative !important;
  width: 58px !important;
  height: 58px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: conic-gradient(#7c4dff var(--landing-progress, 65%), #e9eef8 0) !important;
  box-shadow: 0 10px 24px rgba(124, 77, 255, 0.14) !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress::before {
  content: "" !important;
  position: absolute !important;
  inset: 7px !important;
  border-radius: 999px !important;
  background: #fff !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress i {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress span,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress strong {
  position: relative !important;
  z-index: 1 !important;
  line-height: 1 !important;
  text-align: center !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress span {
  margin-bottom: 4px !important;
  color: #64748b !important;
  font-size: 8px !important;
  font-weight: 850 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress strong {
  color: #4f46e5 !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress-track {
  height: 4px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: #edf1f8 !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress-track i {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #7c4dff, #5b8cff) !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-timeline {
  display: grid !important;
  align-content: start !important;
  gap: 6px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step {
  position: relative !important;
  width: 100% !important;
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step::after {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-index {
  width: 20px !important;
  height: 20px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-title strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-state {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 54px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-feedback {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-status-bar {
  min-height: 30px !important;
  margin: 0 !important;
  padding-top: 9px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #landingGrowthPathText {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-training-heatmap {
  grid-area: calendar !important;
  position: relative !important;
  height: 190px !important;
  min-height: 190px !important;
  max-height: 190px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-training-heatmap .companion-mini,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-training-heatmap .companion-dock,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-training-heatmap .landing-xiaowen-briefing-avatar {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-bottom {
  grid-area: coach !important;
  position: relative !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  display: grid !important;
  align-items: start !important;
  padding: 16px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-copy {
  position: relative !important;
  z-index: 1 !important;
  width: calc(100% - 132px) !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-copy p {
  margin: 12px 0 14px !important;
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-bottom img {
  position: absolute !important;
  right: 2px !important;
  bottom: -4px !important;
  width: 142px !important;
  height: 142px !important;
  object-fit: contain !important;
  z-index: 0 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .sidebar {
  min-height: 100vh !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .menu-item {
  padding-left: 24px !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .menu-item--bottom {
  margin-top: auto !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .sidebar-account-card {
  margin-top: 14px !important;
  padding: 18px 14px 24px !important;
}

@media (max-width: 1440px) {
  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.76fr) minmax(330px, 0.9fr) !important;
    grid-template-rows: 96px 260px 206px 190px 180px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel {
    grid-template-columns: minmax(0, 1fr) 132px 144px !important;
    gap: 16px !important;
  }

  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-greeting-line {
    font-size: 28px !important;
  }
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .menu-item {
  padding-left: 50px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .menu-item::before {
  left: 18px !important;
}

body[data-active-panel="landing"] .landing-welcome-panel {
  min-height: 48px !important;
  padding: 0 8px !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 12px !important;
}

body[data-active-panel="landing"] .landing-welcome-panel::after {
  display: none !important;
  content: none !important;
}

body[data-active-panel="landing"] .landing-greeting-line {
  margin-bottom: 2px !important;
  font-size: 22px !important;
  line-height: 1.1 !important;
}

body[data-active-panel="landing"] .landing-streak-line {
  font-size: 13px !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion,
body[data-active-panel="landing"] .landing-customize-home {
  height: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(90, 108, 148, 0.14) !important;
  border-radius: 8px !important;
  color: #172033 !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation,
body[data-active-panel="landing"] .landing-route-card {
  height: 232px !important;
  min-height: 232px !important;
  max-height: 232px !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .eyebrow {
  left: 26px !important;
  top: 24px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation h1 {
  left: 26px !important;
  top: 62px !important;
  font-size: 24px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-training-tag {
  left: 244px !important;
  top: 64px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-welcome-copy > p:not(.eyebrow) {
  left: 26px !important;
  top: 98px !important;
  width: min(390px, calc(100% - 310px)) !important;
  line-height: 1.55 !important;
  font-size: 13px !important;
}

body[data-active-panel="landing"] .landing-recommendation-meta {
  left: 26px !important;
  bottom: 60px !important;
  gap: 8px !important;
}

body[data-active-panel="landing"] .landing-recommendation-meta span {
  min-width: 90px !important;
  height: 34px !important;
  font-size: 12px !important;
}

body[data-active-panel="landing"] .landing-primary-action.primary-btn {
  left: 26px !important;
  bottom: 16px !important;
  height: 38px !important;
  min-height: 38px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-recommendation-preview {
  top: 20px !important;
  right: 8px !important;
  width: 230px !important;
  height: 178px !important;
  min-height: 178px !important;
}

body[data-active-panel="landing"] .landing-hero-stack {
  width: 174px !important;
  height: 128px !important;
}

body[data-active-panel="landing"] .landing-route-card {
  padding: 10px 14px !important;
}

body[data-active-panel="landing"] .landing-route-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 56px !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 5px !important;
}

body[data-active-panel="landing"] .landing-route-title {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

body[data-active-panel="landing"] .landing-route-title span {
  color: #0f172a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body[data-active-panel="landing"] .landing-route-title strong {
  color: #8a97ad !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

body[data-active-panel="landing"] .landing-route-title strong::before,
body[data-active-panel="landing"] .landing-route-head strong::before {
  display: none !important;
  content: none !important;
}

body[data-active-panel="landing"] .landing-route-progress {
  position: relative !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: conic-gradient(#7c4dff var(--landing-progress, 65%), #e9eef8 0) !important;
}

body[data-active-panel="landing"] .landing-route-progress::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: #fff;
}

body[data-active-panel="landing"] .landing-route-progress i {
  display: none !important;
}

body[data-active-panel="landing"] .landing-route-progress span,
body[data-active-panel="landing"] .landing-route-progress strong {
  position: relative !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

body[data-active-panel="landing"] .landing-route-progress span {
  margin-bottom: 4px !important;
  color: #64748b !important;
  font-size: 7px !important;
  font-weight: 850 !important;
}

body[data-active-panel="landing"] .landing-route-progress strong {
  color: #4f46e5 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

body[data-active-panel="landing"] .landing-route-progress-track {
  height: 4px !important;
  margin: 0 0 5px !important;
  border-radius: 999px !important;
  background: #edf1f8 !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-route-progress-track i {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #7c4dff, #5b8cff) !important;
}

body[data-active-panel="landing"] .landing-ai-timeline {
  gap: 4px !important;
}

body[data-active-panel="landing"] .landing-ai-step {
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 4px 5px !important;
}

body[data-active-panel="landing"] .landing-ai-status-bar {
  margin-top: 5px !important;
  padding-top: 5px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

body[data-active-panel="landing"] #landingGrowthPathText {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-panel="landing"] .landing-weekly-growth,
body[data-active-panel="landing"] .landing-xiaowen-briefing {
  height: 172px !important;
  min-height: 172px !important;
  max-height: 172px !important;
}

body[data-active-panel="landing"] .landing-weekly-growth-item {
  min-height: 60px !important;
  padding: 8px 10px 18px !important;
}

body[data-active-panel="landing"] .landing-weekly-growth-item strong {
  top: 32px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-advice {
  margin-top: 5px !important;
  max-width: 154px !important;
  font-size: 12px !important;
  line-height: 1.28 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats {
  right: 102px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats div {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 2px !important;
  overflow: hidden !important;
  text-align: center !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats span,
body[data-active-panel="landing"] .landing-xiaowen-briefing-stats strong {
  display: block !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar {
  width: 92px !important;
  height: 92px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar img {
  width: 88px !important;
  height: 88px !important;
}

body[data-active-panel="landing"] .landing-hardware-focus,
body[data-active-panel="landing"] .landing-hardware-questions,
body[data-active-panel="landing"] .landing-training-heatmap {
  height: 190px !important;
  min-height: 190px !important;
  max-height: 190px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-hardware-card {
  min-height: 126px !important;
}

body[data-active-panel="landing"] .landing-special-training,
body[data-active-panel="landing"] .landing-coach-card-bottom {
  height: 136px !important;
  min-height: 136px !important;
  max-height: 136px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-special-training-item {
  min-height: 78px !important;
}

body[data-active-panel="landing"] .landing-special-training-item.is-current,
body[data-active-panel="landing"] .landing-special-training-item[aria-current="true"] {
  border-color: rgba(124, 77, 255, 0.34) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f6f3ff 100%) !important;
}

body[data-active-panel="landing"] .landing-coach-card-bottom img {
  width: 88px !important;
  height: 88px !important;
}

@media (max-width: 1180px) {
  body[data-active-panel="landing"] .landing-home-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "welcome"
      "recommendation"
      "route"
      "growth"
      "briefing"
      "hardware"
      "questions"
      "calendar"
      "special"
      "coach" !important;
  }
}

/* Homepage reference polish v2: fix the red-marked areas. */
body[data-active-panel="landing"] .landing-home-grid {
  padding: 14px 24px 18px !important;
  gap: 12px !important;
}

body[data-active-panel="landing"] .landing-welcome-panel {
  min-height: 64px !important;
  padding: 0 10px !important;
  grid-template-columns: minmax(0, 1fr) 148px 164px !important;
}

body[data-active-panel="landing"] .landing-greeting-line {
  font-size: 24px !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion,
body[data-active-panel="landing"] .landing-customize-home {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion {
  justify-self: center !important;
}

body[data-active-panel="landing"] .landing-customize-home {
  justify-self: end !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion::before {
  content: "✦";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #7c4dff, #5b8cff);
  font-size: 11px;
}

body[data-active-panel="landing"] .landing-primary-recommendation,
body[data-active-panel="landing"] .landing-route-card {
  height: 260px !important;
  min-height: 260px !important;
  max-height: 260px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .eyebrow {
  top: 30px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation h1 {
  top: 72px !important;
  font-size: 26px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-training-tag {
  top: 75px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-welcome-copy > p:not(.eyebrow) {
  top: 114px !important;
  width: min(420px, calc(100% - 380px)) !important;
}

body[data-active-panel="landing"] .landing-recommendation-meta {
  bottom: 72px !important;
}

body[data-active-panel="landing"] .landing-primary-action.primary-btn {
  bottom: 20px !important;
  width: 178px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation .landing-recommendation-preview {
  top: 12px !important;
  right: 12px !important;
  width: clamp(300px, 38%, 440px) !important;
  height: 236px !important;
  min-height: 236px !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 255, 255, 0.9), transparent 12%),
    radial-gradient(circle at 48% 42%, rgba(91, 140, 255, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(237, 242, 255, 0.8)) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-active-panel="landing"] .landing-recommendation-preview::before {
  inset: 24px 34px 18px !important;
  border-radius: 28px !important;
  background:
    linear-gradient(120deg, rgba(124, 77, 255, 0.16), rgba(91, 140, 255, 0.12)),
    linear-gradient(rgba(124, 77, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.1) 1px, transparent 1px) !important;
  background-size: auto, 26px 26px, 26px 26px !important;
  transform: perspective(820px) rotateX(60deg) rotateZ(-42deg) translateY(42px) !important;
}

body[data-active-panel="landing"] .landing-recommendation-preview::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  width: 250px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(91, 140, 255, 0.2), transparent 68%);
  transform: translate(-50%, 42%) rotate(-8deg);
  filter: blur(4px);
  z-index: 0;
}

body[data-active-panel="landing"] .landing-hero-stack {
  width: 236px !important;
  height: 174px !important;
  transform: perspective(820px) rotateX(58deg) rotateZ(-42deg) translateY(10px) !important;
  filter: drop-shadow(0 34px 24px rgba(79, 70, 229, 0.24)) !important;
}

body[data-active-panel="landing"] .landing-hero-stack span,
body[data-active-panel="landing"] .landing-hero-stack b {
  border-radius: 28px !important;
  box-shadow:
    0 26px 52px rgba(79, 70, 229, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(1) {
  width: 190px !important;
  height: 150px !important;
  background: linear-gradient(135deg, rgba(166, 210, 255, 0.78), rgba(85, 88, 255, 0.9)) !important;
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(2) {
  width: 156px !important;
  height: 122px !important;
  background: linear-gradient(135deg, rgba(122, 198, 255, 0.86), rgba(101, 72, 255, 0.96)) !important;
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(3) {
  width: 102px !important;
  height: 78px !important;
  background: linear-gradient(135deg, rgba(207, 234, 255, 0.92), rgba(88, 128, 255, 0.9)) !important;
}

body[data-active-panel="landing"] .landing-hero-stack b {
  width: 42px !important;
  height: 42px !important;
}

body[data-active-panel="landing"] .landing-hero-panel {
  right: 42px !important;
  top: 18px !important;
  bottom: auto !important;
  min-width: 76px !important;
  min-height: 52px !important;
  padding: 9px !important;
  border-radius: 12px !important;
  opacity: 0.72 !important;
  transform: rotate(-8deg) !important;
}

body[data-active-panel="landing"] .landing-hero-panel strong,
body[data-active-panel="landing"] .landing-hero-panel p {
  display: none !important;
}

body[data-active-panel="landing"] .landing-hero-orbit {
  inset: 16px !important;
  border-radius: 0 !important;
  transform: none !important;
}

body[data-active-panel="landing"] .landing-hero-orbit i {
  width: 34px !important;
  height: 34px !important;
  inset: auto !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 12px 28px rgba(91, 140, 255, 0.16) !important;
}

body[data-active-panel="landing"] .landing-hero-orbit i:nth-child(1) {
  left: 30px !important;
  top: 86px !important;
}

body[data-active-panel="landing"] .landing-hero-orbit i:nth-child(2) {
  right: 50px !important;
  top: 42px !important;
}

body[data-active-panel="landing"] .landing-hero-orbit i:nth-child(3) {
  right: 26px !important;
  bottom: 50px !important;
}

body[data-active-panel="landing"] .landing-weekly-growth,
body[data-active-panel="landing"] .landing-xiaowen-briefing {
  height: 206px !important;
  min-height: 206px !important;
  max-height: 206px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing {
  grid-template-columns: minmax(0, 1fr) 148px !important;
  padding: 16px 18px 0 !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-copy p {
  max-width: 330px !important;
  font-size: 14px !important;
  line-height: 1.58 !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-advice {
  max-width: 330px !important;
  white-space: normal !important;
  line-height: 1.5 !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats {
  left: 18px !important;
  right: 158px !important;
  bottom: 18px !important;
  grid-template-columns: repeat(3, minmax(74px, 1fr)) !important;
  gap: 10px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats div {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  padding: 10px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats span {
  font-size: 11px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-stats strong {
  font-size: 19px !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar {
  width: 146px !important;
  height: 146px !important;
  align-self: end !important;
  justify-self: end !important;
  border-radius: 999px 999px 18px 18px !important;
  background: radial-gradient(circle at 50% 44%, rgba(124, 77, 255, 0.2), transparent 68%) !important;
}

body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar img {
  width: 142px !important;
  height: 142px !important;
  object-fit: contain !important;
}

body[data-active-panel="landing"] .landing-special-training,
body[data-active-panel="landing"] .landing-coach-card-bottom {
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
}

body[data-active-panel="landing"] .landing-special-training {
  grid-area: special !important;
}

body[data-active-panel="landing"] .landing-coach-card-bottom {
  grid-area: coach !important;
}

body[data-active-panel="landing"] .landing-special-training-list {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-active-panel="landing"] .landing-special-training-item {
  min-height: 116px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto 1fr auto !important;
  align-items: end !important;
  gap: 4px 8px !important;
  padding: 10px 12px !important;
}

body[data-active-panel="landing"] .landing-special-training-item strong {
  grid-column: 1 / -1 !important;
  font-size: 13px !important;
}

body[data-active-panel="landing"] .landing-special-training-item span {
  display: block !important;
  grid-column: 1 / -1 !important;
  color: #64748b !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-panel="landing"] .landing-special-training-item p {
  align-self: end !important;
  margin: 0 !important;
}

body[data-active-panel="landing"] .landing-special-training-item em {
  justify-self: end !important;
  align-self: end !important;
  min-width: 72px !important;
  height: 28px !important;
}

body[data-active-panel="landing"] .landing-coach-card-bottom {
  padding: 16px !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-coach-card-copy {
  width: calc(100% - 128px) !important;
}

body[data-active-panel="landing"] .landing-coach-card-copy p {
  font-size: 12px !important;
}

body[data-active-panel="landing"] .landing-coach-card-bottom img {
  right: 6px !important;
  bottom: -2px !important;
  width: 140px !important;
  height: 140px !important;
  object-fit: contain !important;
}

body[data-active-panel="landing"] .sidebar {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

body[data-active-panel="landing"] .menu {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body[data-active-panel="landing"] .menu-item--bottom {
  margin-top: auto !important;
  position: relative !important;
}

body[data-active-panel="landing"] .menu-item--bottom::after {
  content: none;
  display: none;
}

body[data-active-panel="landing"] .sidebar-account-card {
  margin-top: 18px !important;
  padding: 18px 14px 24px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.14) !important;
}

body[data-active-panel="landing"] .sidebar-account-button {
  height: 58px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

body[data-active-panel="landing"] .sidebar-account-button::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 12%, transparent 13%),
    radial-gradient(circle at 50% 66%, #fff 0 20%, transparent 21%),
    linear-gradient(135deg, #7c4dff, #5b8cff);
  box-shadow: 0 10px 22px rgba(124, 77, 255, 0.28);
}

body[data-active-panel="landing"] .sidebar-account-copy {
  min-width: 0 !important;
}

/* Homepage reference polish v2.1: keep cards readable at narrower desktop widths. */
body[data-active-panel="landing"] .landing-hero-stack span,
body[data-active-panel="landing"] .landing-hero-stack b {
  transform: translate(-50%, -50%) translateY(var(--layer-y, 0)) !important;
}

body[data-active-panel="landing"] .landing-hero-stack span::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -18px;
  height: 22px;
  border-radius: 0 0 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-top: 0;
  background: linear-gradient(180deg, rgba(80, 114, 255, 0.68), rgba(85, 66, 228, 0.88));
  filter: saturate(1.08);
}

body[data-active-panel="landing"] .landing-hero-stack b::before,
body[data-active-panel="landing"] .landing-hero-stack b::after {
  content: "";
  position: absolute;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

body[data-active-panel="landing"] .landing-hero-stack b::before {
  inset: 10px;
}

body[data-active-panel="landing"] .landing-hero-stack b::after {
  left: 50%;
  top: -34px;
  width: 6px;
  height: 30px;
  transform: translateX(-50%);
  box-shadow:
    -22px 10px 0 rgba(255, 255, 255, 0.32),
    22px 10px 0 rgba(255, 255, 255, 0.32);
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(1) {
  --layer-y: 34px;
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(2) {
  --layer-y: 4px;
}

body[data-active-panel="landing"] .landing-hero-stack span:nth-child(3) {
  --layer-y: -24px;
}

body[data-active-panel="landing"] .landing-hero-stack b {
  --layer-y: -46px;
}

body[data-active-panel="landing"] .landing-special-training-item p {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

body[data-active-panel="landing"] .landing-special-training-item p b {
  font-size: 18px !important;
  line-height: 1 !important;
}

body[data-active-panel="landing"] .landing-special-training-item em {
  white-space: nowrap !important;
}

@media (max-width: 1440px) {
  body[data-active-panel="landing"] .landing-home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.76fr) minmax(330px, 0.9fr) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  body[data-active-panel="landing"] .landing-primary-recommendation .landing-recommendation-preview {
    width: 300px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing {
    grid-template-columns: minmax(0, 1fr) 118px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar {
    width: 118px !important;
    height: 118px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-avatar img {
    width: 114px !important;
    height: 114px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-stats {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-stats div {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    min-width: 0 !important;
    padding: 6px 4px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-copy {
    gap: 6px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-head span {
    font-size: 16px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-head strong {
    font-size: 10px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-copy p {
    margin-top: 0 !important;
    font-size: 13px !important;
    line-height: 1.36 !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-advice {
    font-size: 12px !important;
    line-height: 1.32 !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-advice br {
    display: none !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-advice strong {
    font-size: 13px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-stats span {
    font-size: 9px !important;
  }

  body[data-active-panel="landing"] .landing-xiaowen-briefing-stats strong {
    font-size: 16px !important;
  }

  body[data-active-panel="landing"] .landing-special-training-item {
    padding: 10px !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr auto !important;
    height: 108px !important;
    min-height: 108px !important;
    max-height: 108px !important;
  }

  body[data-active-panel="landing"] .landing-special-training-item span {
    display: none !important;
  }

  body[data-active-panel="landing"] .landing-special-training-item p,
  body[data-active-panel="landing"] .landing-special-training-item em {
    grid-column: 1 !important;
  }

  body[data-active-panel="landing"] .landing-special-training-item em {
    justify-self: end !important;
  }

  body[data-active-panel="landing"] .landing-coach-card-copy {
    width: calc(100% - 148px) !important;
  }
}

@media (max-height: 820px) {
  body[data-active-panel="landing"] .brand {
    padding-top: 16px !important;
    padding-bottom: 10px !important;
  }

  body[data-active-panel="landing"] .brand-head--main {
    min-height: 60px !important;
  }

  body[data-active-panel="landing"] .sidebar-section {
    display: block !important;
    margin: 4px 14px 0 !important;
    color: rgba(203, 213, 225, 0.58) !important;
    font-size: 9px !important;
    font-weight: 950 !important;
    letter-spacing: 0.12em !important;
    line-height: 1 !important;
  }

  body[data-active-panel="landing"] .menu {
    gap: 2px !important;
    flex: 0 0 auto !important;
  }

  body[data-active-panel="landing"] .menu-item {
    min-height: 34px !important;
    height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body[data-active-panel="landing"] .menu-item--bottom {
    margin-top: 6px !important;
  }

  body[data-active-panel="landing"] .sidebar-account-card {
    margin-top: 8px !important;
    padding: 10px 14px 14px !important;
  }

  body[data-active-panel="landing"] .sidebar-account-button {
    height: 50px !important;
  }
}

/* Homepage frame v3: match the reference format with no generic topbar above the greeting. */
body[data-active-panel="landing"] .topbar,
body[data-active-panel="landing"] #aiDynamicStatus,
body[data-active-panel="landing"] #runtimeStatusStrip {
  display: none !important;
}

body[data-active-panel="landing"] .main {
  min-height: 100vh !important;
  padding: 0 !important;
  background: #f5f8fc !important;
}

body[data-active-panel="landing"] .landing-workspace {
  padding: 0 !important;
  background: #f5f8fc !important;
}

body[data-active-panel="landing"] .landing-home-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 10px 26px 18px !important;
  grid-template-rows: 102px 260px 206px 190px 180px !important;
  gap: 12px !important;
}

body[data-active-panel="landing"] .landing-welcome-panel {
  height: 102px !important;
  min-height: 102px !important;
  max-height: 102px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 162px 166px !important;
  align-items: center !important;
  gap: 24px !important;
  padding: 16px 18px 18px 20px !important;
  border: 1px solid rgba(90, 108, 148, 0.12) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9)),
    linear-gradient(90deg, rgba(124, 77, 255, 0.14), rgba(15, 184, 198, 0.08)) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden !important;
}

body[data-active-panel="landing"] .landing-welcome-panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 120, 96, 0.68), rgba(91, 140, 255, 0.34), rgba(124, 77, 255, 0.56));
}

body[data-active-panel="landing"] .landing-welcome-copy {
  align-self: center !important;
  display: grid !important;
  gap: 7px !important;
}

body[data-active-panel="landing"] .landing-greeting-line {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 29px !important;
  font-weight: 950 !important;
  line-height: 1.06 !important;
}

body[data-active-panel="landing"] .landing-streak-line {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
}

body[data-active-panel="landing"] .landing-level-gap {
  display: none !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion,
body[data-active-panel="landing"] .landing-customize-home {
  height: 52px !important;
  min-height: 52px !important;
  align-self: center !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07) !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion p {
  display: none !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion span,
body[data-active-panel="landing"] .landing-customize-home {
  color: #172033 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion::before {
  width: 24px !important;
  height: 24px !important;
}

body[data-active-panel="landing"] .landing-primary-recommendation,
body[data-active-panel="landing"] .landing-route-card {
  margin-top: 0 !important;
}

body[data-active-panel="landing"] .sidebar-account-card {
  border-top-color: rgba(226, 232, 240, 0.18) !important;
}

body[data-active-panel="landing"] .sidebar-account-button {
  min-height: 62px !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
}

@media (max-width: 1440px) {
  body[data-active-panel="landing"] .landing-home-grid {
    padding: 10px 18px 18px !important;
    grid-template-rows: 86px 260px 206px 190px 180px !important;
  }

  body[data-active-panel="landing"] .landing-welcome-panel {
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    grid-template-columns: minmax(0, 1fr) 132px 144px !important;
    gap: 16px !important;
    padding: 12px 14px 14px 18px !important;
  }

  body[data-active-panel="landing"] .landing-greeting-line {
    font-size: 25px !important;
  }

  body[data-active-panel="landing"] .landing-streak-line {
    font-size: 13px !important;
  }

  body[data-active-panel="landing"] .landing-coach-suggestion,
  body[data-active-panel="landing"] .landing-customize-home {
    height: 42px !important;
    min-height: 42px !important;
  }

  body[data-active-panel="landing"] .landing-coach-suggestion span,
  body[data-active-panel="landing"] .landing-customize-home {
    font-size: 13px !important;
  }
}

/* Homepage frame v4: red-box areas follow the second reference more strictly. */
body[data-active-panel="landing"] .landing-home-grid {
  padding-top: 8px !important;
  grid-template-rows: 104px 260px 206px 190px 180px !important;
}

body[data-active-panel="landing"] .landing-welcome-panel {
  align-self: stretch !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 14px 2px 16px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-active-panel="landing"] .landing-home-grid > .section-card.landing-welcome-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) body[data-active-panel="landing"] .landing-home-grid > .section-card.landing-welcome-panel,
html[data-theme="light"] body[data-active-panel="landing"] .landing-home-grid > .section-card.landing-welcome-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-panel="landing"] .landing-home-grid > .section-card.landing-welcome-panel::after {
  display: none !important;
  content: none !important;
}

body[data-active-panel="landing"] .landing-welcome-panel::before {
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, rgba(255, 115, 86, 0.72), rgba(91, 140, 255, 0.28), rgba(124, 77, 255, 0.62)) !important;
  opacity: 0.78 !important;
}

body[data-active-panel="landing"] .landing-welcome-copy {
  padding-left: 2px !important;
}

body[data-active-panel="landing"] .landing-greeting-line {
  font-size: 31px !important;
}

body[data-active-panel="landing"] .landing-streak-line {
  font-size: 15px !important;
}

body[data-active-panel="landing"] .landing-coach-suggestion,
body[data-active-panel="landing"] .landing-customize-home {
  justify-self: end !important;
  width: auto !important;
  min-width: 146px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.94) !important;
}

body[data-active-panel="landing"] .landing-customize-home {
  min-width: 158px !important;
}

body[data-active-panel="landing"] .menu-item--bottom {
  margin-top: auto !important;
}

body[data-active-panel="landing"] .sidebar-account-card {
  margin-top: 14px !important;
  padding-top: 20px !important;
}

body[data-active-panel="landing"] .sidebar-account-button {
  height: 62px !important;
  padding: 8px 10px !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

@media (max-width: 1440px) {
  body[data-active-panel="landing"] .landing-home-grid {
    padding-top: 8px !important;
    grid-template-rows: 96px 260px 206px 190px 180px !important;
  }

  body[data-active-panel="landing"] .landing-welcome-panel {
    grid-template-columns: minmax(0, 1fr) 132px 144px !important;
    gap: 16px !important;
    padding: 12px 0 14px 0 !important;
  }

  body[data-active-panel="landing"] .landing-greeting-line {
    font-size: 28px !important;
  }

  body[data-active-panel="landing"] .landing-coach-suggestion,
  body[data-active-panel="landing"] .landing-customize-home {
    min-width: 118px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
  }

  body[data-active-panel="landing"] .landing-customize-home {
    min-width: 132px !important;
  }

  body[data-active-panel="landing"] .sidebar-account-card {
    margin-top: 12px !important;
    padding-top: 18px !important;
  }
}

/* Homepage frame v8: final red-box alignment after legacy overrides. */
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .topbar,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #aiDynamicStatus,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #runtimeStatusStrip,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionDock,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionMini,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionMiniBubble,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) #companionAmbientStage {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .main {
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  background: #f5f8fc !important;
  overflow: hidden auto !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 8px 24px 18px !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.74fr) minmax(330px, 0.86fr) !important;
  grid-template-areas:
    "welcome welcome welcome"
    "recommendation recommendation route"
    "growth growth briefing"
    "hardware questions calendar"
    "special special coach" !important;
  grid-template-rows: 96px 260px 206px 190px 180px !important;
  gap: 12px !important;
  align-items: start !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel {
  grid-area: welcome !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 148px 164px !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 12px 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel::before {
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 2px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-greeting-line {
  margin: 0 0 3px !important;
  font-size: 30px !important;
  line-height: 1.08 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-streak-line {
  margin: 0 !important;
  font-size: 15px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-suggestion,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-customize-home {
  justify-self: end !important;
  min-width: 132px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 9px !important;
  font-size: 14px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-customize-home {
  min-width: 148px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-card {
  grid-area: route !important;
  height: 260px !important;
  min-height: 260px !important;
  max-height: 260px !important;
  display: grid !important;
  grid-template-rows: auto 4px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 16px 18px 12px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 60px !important;
  gap: 12px !important;
  margin: 0 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title span {
  font-size: 18px !important;
  line-height: 1.1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-title strong {
  font-size: 13px !important;
  line-height: 1.1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-route-progress {
  width: 58px !important;
  height: 58px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-timeline {
  display: grid !important;
  align-content: start !important;
  gap: 6px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step {
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 8px !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step::after,
:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-feedback {
  display: none !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-title strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-step-state {
  flex: 0 0 auto !important;
  min-width: 54px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-ai-status-bar {
  min-height: 30px !important;
  margin: 0 !important;
  padding-top: 9px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  overflow: visible !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-training-heatmap {
  grid-area: calendar !important;
  height: 190px !important;
  min-height: 190px !important;
  max-height: 190px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-bottom {
  grid-area: coach !important;
  position: relative !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  display: grid !important;
  padding: 16px !important;
  overflow: hidden !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-copy {
  width: calc(100% - 132px) !important;
  position: relative !important;
  z-index: 1 !important;
}

:is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-coach-card-bottom img {
  position: absolute !important;
  right: 2px !important;
  bottom: -4px !important;
  width: 142px !important;
  height: 142px !important;
  object-fit: contain !important;
  z-index: 0 !important;
}

@media (max-width: 1440px) {
  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-home-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.76fr) minmax(330px, 0.9fr) !important;
    grid-template-rows: 96px 260px 206px 190px 180px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-welcome-panel {
    grid-template-columns: minmax(0, 1fr) 132px 144px !important;
  }

  :is(body[data-active-panel="landing"], body:has(.landing-workspace.active)) .landing-greeting-line {
    font-size: 28px !important;
  }
}
