/* Light mode repair: final cascade layer, deliberately isolated from dark mode and rarity frames. */
html[data-theme="light"]{
  --st-bg:#f5f2e9;
  --st-bg-soft:#ebe7dc;
  --st-surface:#fffdf8;
  --st-surface-2:#f1eee5;
  --st-surface-glass:rgba(255,253,248,.9);
  --st-text:#171a18;
  --st-text-soft:#424843;
  --st-muted:#6b746d;
  --st-border:rgba(31,43,35,.14);
  --st-border-strong:rgba(31,43,35,.24);
  --st-cyan:#237565;
  --st-purple:#68567b;
  --st-gold:#8a6824;
  --st-sage:#617765;
  --st-danger:#a83f55;
  --st-shadow:0 16px 40px rgba(48,43,32,.1);
}
html[data-theme="light"] body{background:var(--st-page)!important;color:var(--st-text)}
html[data-theme="light"] .hero h2,
html[data-theme="light"] #home .home-app-title{color:var(--st-text);text-shadow:none;filter:none}
html[data-theme="light"] .eyebrow{color:var(--st-cyan)}
html[data-theme="light"] .muted,
html[data-theme="light"] .sub{color:var(--st-muted)}
html[data-theme="light"] .stat,
html[data-theme="light"] .panel,
html[data-theme="light"] .family,
html[data-theme="light"] .listitem,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .party-card,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .comparison-card,
html[data-theme="light"] .trade-draft{
  border-color:var(--st-border)!important;
  background:var(--st-surface)!important;
  box-shadow:none!important;
}
html[data-theme="light"] .stat{padding:16px 17px}
html[data-theme="light"] .stat::before{display:none}
html[data-theme="light"] .stat b{color:var(--st-text)!important;font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.55rem,2.5vw,2rem);font-variant-numeric:tabular-nums;letter-spacing:-.035em}
html[data-theme="light"] .stat span{margin-top:2px;color:var(--st-muted)!important;font-weight:750}
html[data-theme="light"] .count,
html[data-theme="light"] .profile-mastery-head>strong{color:var(--st-gold)!important}
html[data-theme="light"] .btn,
html[data-theme="light"] .pill,
html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] .chip,
html[data-theme="light"] .seg button,
html[data-theme="light"] .levels button,
html[data-theme="light"] .quick-action{
  border-color:var(--st-border-strong)!important;
  background:var(--st-surface)!important;
  color:var(--st-text-soft)!important;
  box-shadow:none!important;
}
html[data-theme="light"] .input::placeholder{color:#7b827d;opacity:1}
html[data-theme="light"] .btn.primary{
  border-color:#296e61!important;
  background:#296e61!important;
  color:#fff!important;
  box-shadow:none!important;
}
html[data-theme="light"] .chip.active,
html[data-theme="light"] .nav button.active,
html[data-theme="light"] .mobile button.active{
  border-color:#25332a!important;
  background:#25332a!important;
  color:#fff!important;
  box-shadow:none!important;
}
html[data-theme="light"] .top{border-bottom-color:var(--st-border)!important;background:rgba(245,242,233,.88)!important;box-shadow:none!important}
html[data-theme="light"] .side,
html[data-theme="light"] .mobile{border-color:var(--st-border)!important;background:color-mix(in srgb,var(--st-bg) 94%,transparent)!important;box-shadow:none!important}
html[data-theme="light"] .family,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .btn,
html[data-theme="light"] .chip{
  transition:transform .2s cubic-bezier(.2,.8,.2,1),border-color .2s ease,background-color .2s ease,color .2s ease;
}
html[data-theme="light"] .family:hover,
html[data-theme="light"] .dashboard-card:hover,
html[data-theme="light"] .panel:hover{border-color:var(--st-border-strong)!important;box-shadow:none!important}
html[data-theme="light"] .family:hover{transform:translateY(-2px)}
html[data-theme="light"] .btn:hover,
html[data-theme="light"] .chip:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--st-cyan) 48%,var(--st-border))!important}
html[data-theme="light"] .family.complete{border-color:color-mix(in srgb,var(--st-gold) 55%,var(--st-border))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--st-gold) 12%,transparent)!important}
html[data-theme="light"] .familybanner{background:#ede4cb!important;color:#5f491d!important;text-shadow:none}
html[data-theme="light"] .dialog,
html[data-theme="light"] .sprite-info-dialog,
html[data-theme="light"] .activity-drawer{border-color:var(--st-border-strong)!important;background:var(--st-surface)!important;color:var(--st-text);box-shadow:0 24px 70px rgba(48,43,32,.18)!important}
html[data-theme="light"] .trustbox{border-color:var(--st-border)!important;background:var(--st-surface-2)!important}
html[data-theme="light"] .trustbox p,
html[data-theme="light"] .oauthnote{color:var(--st-muted)}
html[data-theme="light"] :focus-visible{outline-color:#296e61!important}
@media(prefers-reduced-motion:reduce){html[data-theme="light"] .family,html[data-theme="light"] .dashboard-card,html[data-theme="light"] .panel,html[data-theme="light"] .btn,html[data-theme="light"] .chip{transition:none!important}}
