/* KINGAI Global UI 2026
   Shared visual authority for kingai.work and *.kingai.work.
   Product-local layout and business logic remain authoritative. */
:root{
  --kai-canvas:#FFFFFF;
  --kai-canvas-secondary:#F7F7F8;
  --kai-surface:#FFFFFF;
  --kai-text:#111111;
  --kai-text-secondary:#5F6368;
  --kai-text-tertiary:#8A8A8E;
  --kai-line:rgba(17,17,17,.08);
  --kai-line-strong:rgba(17,17,17,.14);
  --kai-action:#111111;
  --kai-accent:#246BFD;
  --kai-accent-soft:#EEF4FF;
  --kai-violet:#6757D9;
  --kai-success:#237B55;
  --kai-focus:rgba(36,107,253,.28);
  --kai-shadow-soft:0 12px 36px rgba(17,17,17,.055);
  --kai-shadow-float:0 28px 80px rgba(17,17,17,.10);
  --kai-font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;

  /* Fleet compatibility aliases. These intentionally override historical warm-life palettes. */
  --bg:#FFFFFF!important;--paper:#FFFFFF!important;--soft:#F7F7F8!important;--cream:#F7F7F8!important;--text:#111111!important;--ink:#111111!important;--muted:#5F6368!important;--line:rgba(17,17,17,.08)!important;--shadow:var(--kai-shadow-soft)!important;--focus:#246BFD!important;
  --ui-bg:#FFFFFF!important;--ui-bg-soft:#F7F7F8!important;--ui-surface:#FFFFFF!important;--ui-surface-2:#F7F7F8!important;--ui-paper:#FFFFFF!important;--ui-ink:#111111!important;--ui-text:#111111!important;--ui-text-2:#5F6368!important;--ui-text-3:#8A8A8E!important;--ui-muted:#5F6368!important;--ui-line:rgba(17,17,17,.08)!important;--ui-line-strong:rgba(17,17,17,.14)!important;--ui-blue:#246BFD!important;--ui-blue-hover:#1E5FE3!important;--ui-blue-soft:#EEF4FF!important;--ui-green:#237B55!important;--ui-green-soft:#EEF7F2!important;--ui-gold:#6757D9!important;--ui-focus:#246BFD!important;--ui-shadow:var(--kai-shadow-soft)!important;
  --p-bg:#FFFFFF!important;--p-paper:#FFFFFF!important;--p-warm:#F7F7F8!important;--p-cream:#F7F7F8!important;--p-ink:#111111!important;--p-muted:#5F6368!important;--p-subtle:#8A8A8E!important;--p-line:rgba(17,17,17,.08)!important;--p-line-strong:rgba(17,17,17,.14)!important;--p-champagne:#246BFD!important;--p-gold:#6757D9!important;--p-coral:#246BFD!important;--p-coral-deep:#1E5FE3!important;--p-sage-deep:#237B55!important;--p-shadow:var(--kai-shadow-float)!important;--p-shadow-soft:var(--kai-shadow-soft)!important;
  --life-bg:#FFFFFF!important;--life-paper:#FFFFFF!important;--life-paper-warm:#F7F7F8!important;--life-cream:#F7F7F8!important;--life-coral:#246BFD!important;--life-gold:#6757D9!important;--life-champagne:#246BFD!important;--life-sage-deep:#237B55!important;--life-text:#111111!important;--life-muted:#5F6368!important;--life-line:rgba(17,17,17,.08)!important;--life-focus:#246BFD!important;--life-shadow:var(--kai-shadow-soft)!important;
  --pet-bg:#FFFFFF!important;--pet-paper:#FFFFFF!important;--pet-surface:#FFFFFF!important;--pet-soft:#F7F7F8!important;--pet-blue-soft:#EEF4FF!important;--pet-green-soft:#EEF7F2!important;--pet-text:#111111!important;--pet-muted:#5F6368!important;--pet-line:rgba(17,17,17,.08)!important;--pet-gold:#6757D9!important;--pet-blue:#246BFD!important;--pet-green:#237B55!important;--pet-focus:#246BFD!important;--pet-shadow:var(--kai-shadow-soft)!important;
}
html[data-kingai-global-ui="2026"]{color-scheme:light!important;background:#fff!important;-webkit-text-size-adjust:100%}
html[data-kingai-global-ui="2026"] body{
  color:var(--kai-text)!important;
  background:#fff!important;
  background-image:none!important;
  font-family:var(--kai-font)!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
html[data-kingai-global-ui="2026"] ::selection{background:#DCE8FF;color:#111}

/* Consistent readable hierarchy without replacing product-local layout. */
html[data-kingai-global-ui="2026"] :is(h1,h2,h3,h4){color:var(--kai-text)!important;text-wrap:balance}
html[data-kingai-global-ui="2026"] :is(h1,.hero h1,.page-hero h1,.pagehero h1){font-weight:690!important;letter-spacing:-.058em!important}
html[data-kingai-global-ui="2026"] :is(h2,.section-head h2){font-weight:680!important;letter-spacing:-.048em!important}
html[data-kingai-global-ui="2026"] h3{font-weight:650!important;letter-spacing:-.025em}
html[data-kingai-global-ui="2026"] :is(p,.lede,.subtitle,.hero-subtitle,.section-head p){color:var(--kai-text-secondary)!important}
html[lang^="zh"][data-kingai-global-ui="2026"] :is(h1,h2,h3,h4){letter-spacing:-.035em!important;line-break:strict}

/* Top navigation uses translucent material only where hierarchy benefits. */
html[data-kingai-global-ui="2026"] :is(header,.topbar,.site-header,.site-nav-wrap,.navbar):not(.hero){border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] :is(.topbar,.site-nav-wrap,.site-header,.navbar.sticky,.nav.sticky){
  background:rgba(255,255,255,.84)!important;
  background-image:none!important;
  border-color:var(--kai-line)!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:blur(22px) saturate(145%)!important;
  backdrop-filter:blur(22px) saturate(145%)!important;
}
html[data-kingai-global-ui="2026"] :is(.brand,.logo,.wordmark){color:#111!important;font-weight:700!important;letter-spacing:-.025em!important}
html[data-kingai-global-ui="2026"] :is(.navlinks a,.links a,.desktop-nav>a){color:#4E5054!important}

/* Universal action hierarchy. */
html[data-kingai-global-ui="2026"] :is(.btn,.button,.cta-button,[data-primary-action]){
  border-radius:12px!important;
  font-weight:620!important;
  transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease,background .18s ease,border-color .18s ease!important;
}
html[data-kingai-global-ui="2026"] :is(.btn.primary,.btn.blue,.button.primary,.primary-cta,.nav-cta,.nav-download,[data-primary-action]){
  background:#111!important;
  background-image:none!important;
  color:#fff!important;
  border-color:#111!important;
  box-shadow:0 9px 24px rgba(17,17,17,.14)!important;
}
html[data-kingai-global-ui="2026"] :is(.btn.primary,.btn.blue,.button.primary,.primary-cta,.nav-cta,.nav-download,[data-primary-action]):hover{
  background:#262626!important;
  border-color:#262626!important;
  transform:translateY(-1px);
  box-shadow:0 13px 30px rgba(17,17,17,.17)!important;
}
html[data-kingai-global-ui="2026"] :is(.btn.secondary,.btn.light,.button.secondary,.button.ghost){background:#fff!important;background-image:none!important;color:#111!important;border-color:var(--kai-line-strong)!important;box-shadow:none!important}

/* Common product surfaces: quiet paper, hairline border, shadow only when elevated. */
html[data-kingai-global-ui="2026"] :is(.card,.panel,.tile,.feature-card,.product-card,.plan-card,.stat,.metric,.repo,.step,.feature-row,.platform,.answer,.download-card,.business-card){border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] :is(.card,.feature-card,.product-card,.plan-card,.repo,.step,.feature-row,.platform,.answer,.download-card,.business-card){background:#fff!important;background-image:none!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] :is(.card,.feature-card,.product-card,.plan-card,.repo,.step,.feature-row):hover{border-color:var(--kai-line-strong)!important;box-shadow:var(--kai-shadow-soft)!important}
html[data-kingai-global-ui="2026"] :is(.product-window,.demo-frame,.device-shell,.console-preview,.preview-shell,.showcase-card){background:#F7F7F8!important;background-image:none!important;border-color:var(--kai-line)!important;box-shadow:var(--kai-shadow-float)!important}

/* Quiet alternate sections and status states. */
html[data-kingai-global-ui="2026"] :is(.section.alt,.section.secondary,.section-muted,.surface-soft,.flag-section.alt,.page-section.alt){background:#F7F7F8!important;background-image:none!important}
html[data-kingai-global-ui="2026"] :is(.status-ok,.healthy,.success,.state-success,.status.live,.ops-state){color:var(--kai-success)!important}
html[data-kingai-global-ui="2026"] :is(.eyebrow,.kicker,.label,.meta,.crumb){color:#6D6F73!important}

/* Main KING AI homepage: neutralize the previous Warm Life authority while retaining layout. */
html[data-kingai-global-ui="2026"] :is(.kh-hero,.kh-section){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] .kh-section.kh-soft{background:#F7F7F8!important;background-image:none!important}
html[data-kingai-global-ui="2026"] .kh-hero::before{background:radial-gradient(circle,rgba(36,107,253,.08),transparent 68%)!important}
html[data-kingai-global-ui="2026"] .kh-hero h1{font-size:clamp(52px,6.8vw,92px)!important;font-weight:690!important;line-height:.99!important;letter-spacing:-.064em!important;max-width:13ch!important}
html[data-kingai-global-ui="2026"] .kh-hero .kh-lede{color:#5F6368!important;font-size:clamp(18px,1.55vw,22px)!important}
html[data-kingai-global-ui="2026"] :is(.kh-demo,.kh-value-card,.kh-audience-card,.kh-compare-card){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important;box-shadow:var(--kai-shadow-soft)!important}
html[data-kingai-global-ui="2026"] .kh-demo{border-radius:30px!important;box-shadow:var(--kai-shadow-float)!important;transform:none!important}
html[data-kingai-global-ui="2026"] .kh-task{background:#F7F7F8!important;background-image:none!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] .kh-task:nth-child(2),html[data-kingai-global-ui="2026"] .kh-task:nth-child(3),html[data-kingai-global-ui="2026"] .kh-task:nth-child(4){background:#F7F7F8!important}
html[data-kingai-global-ui="2026"] .kh-task i,html[data-kingai-global-ui="2026"] .kh-value-card .kh-icon{background:#EEF4FF!important;color:#246BFD!important}
html[data-kingai-global-ui="2026"] .kh-task em{background:#EEF7F2!important;color:#237B55!important}
html[data-kingai-global-ui="2026"] .kh-task.needs-approval em{background:#FFF4E8!important;color:#A85F1D!important}
html[data-kingai-global-ui="2026"] .kh-approval{background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] .kh-audience-card strong,html[data-kingai-global-ui="2026"] .kh-audience-card a{color:#246BFD!important}
html[data-kingai-global-ui="2026"] .kh-flow span{background:#F7F7F8!important;border-color:var(--kai-line)!important;color:#5F6368!important}
html[data-kingai-global-ui="2026"] .kh-flow b{color:#246BFD!important}

/* KINGAI OS: preserve the product layout and truth, replace the historical warm authority. */
html[data-kingai-global-ui="2026"] :is(.route-home .hero,.problem-strip,.flag-section,.page-section,.os-intro,.trust-section,.faq-section,.early-access){background:#fff!important;background-image:none!important;color:#111!important}
html[data-kingai-global-ui="2026"] :is(.flag-section.alt,.page-section.alt,.os-intro,.problem-strip){background:#F7F7F8!important;background-image:none!important}
html[data-kingai-global-ui="2026"] .route-home .hero h1,html[data-kingai-global-ui="2026"] body:not(.route-home) .page-hero h1{color:#111!important;font-size:clamp(52px,6vw,82px)!important;font-weight:690!important;letter-spacing:-.06em!important}
html[data-kingai-global-ui="2026"] :is(.stage-badge,.route-home .stage-badge){background:#F5F5F7!important;color:#5F6368!important;border-color:var(--kai-line)!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] :is(.hero-visual,.device-shell,.device-screen,.v9-product-visual,.os-stage,.product-frame,.product-visual){background:#F7F7F8!important;background-image:none!important;border-color:var(--kai-line)!important;box-shadow:var(--kai-shadow-float)!important}
html[data-kingai-global-ui="2026"] :is(.v9-product-visual img,.os-stage img,.product-frame img,.product-visual img,.device-screen img,.hero-visual img){background:#fff!important;filter:none!important}
html[data-kingai-global-ui="2026"] :is(.problem-card,.os-feature,.flag-card,.dev-tile,.trust-panel,.path-card,.value-card,.privacy-item,.faq-list details,.permission-window,.scenario-wrap,.result-card){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] .permission-actions .allow{background:#111!important;color:#fff!important}

/* KINGAI Tools: keep utility density, remove template-like warm gradients. */
html[data-kingai-global-ui="2026"] :is(.blessing-strip,.ecosystem-section){background:#F7F7F8!important;background-image:none!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] :is(.quick-btn,.ecosystem-card,.category-quick-grid a,.popular-card,.answer-card,.personal-tools,.search,.filters button,.personal-tool-link,.card-fav){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important;color:#111!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] :is(.popular-card,.card)::before{background:#246BFD!important;height:2px!important;opacity:.45!important}
html[data-kingai-global-ui="2026"] .hero-toolbar .btn.primary{background:#111!important;background-image:none!important;border-radius:12px!important}
html[data-kingai-global-ui="2026"] .filters button.active{background:#111!important;color:#fff!important;border-color:#111!important}

/* AI Life: preserve companion content, modernize application chrome and controls. */
html[data-kingai-global-ui="2026"] #app :where(.topbar,.mobile-top,.bottom-nav,.v3-bottom,nav,.sidebar,.rail,.life-head){background:rgba(255,255,255,.90)!important;color:#111!important;border-color:var(--kai-line)!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] #app :where(.card,.panel,.sheet,.tile,.hud,.module,.modal,.dialog,.community-v8,.age-safety-card,.life-grid article,.memory-strip,.v3-task,.v3-limited,.v3-mood,.v3-heartcard,.v3-event,.v3-goals,.v3-composer){background:#fff!important;background-image:none!important;color:#111!important;border-color:var(--kai-line)!important;box-shadow:none!important;border-radius:22px!important}
html[data-kingai-global-ui="2026"] #app :where(button,.button,a.button){border-radius:12px!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] #app :where(.primary,[data-primary="true"],.hero-copy>button,#enter){background:#111!important;background-image:none!important;color:#fff!important;border-color:#111!important;box-shadow:0 9px 24px rgba(17,17,17,.14)!important}
html[data-kingai-global-ui="2026"] #app :where(.active,[aria-selected="true"]){background:#EEF4FF!important;color:#245FC9!important;border-color:#D8E5FF!important}
html[data-kingai-global-ui="2026"] #app .hero-copy em{background:none!important;color:#111!important;-webkit-text-fill-color:currentColor!important}
html[data-kingai-global-ui="2026"] #app .memory-strip{background:#F7F7F8!important;background-image:none!important}

/* KINGAI Pet: keep the companion scene, simplify the surrounding product chrome. */
html[data-kingai-global-ui="2026"] :is(.app-shell,.workspace){background:#F7F7F8!important;background-image:none!important}
html[data-kingai-global-ui="2026"] :is(.game-sidebar,.season-card,.resource-pill,.icon-btn,.pill-btn,.right-rail .hud-card,.quick-card,.account-card,.xp-card,.speech,.pet-meta,.living-pulse,.needs-strip,.action-dock,.modal,.large-modal){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important;color:#111!important;box-shadow:none!important}
html[data-kingai-global-ui="2026"] :is(.gold-btn,.primary-btn){background:#111!important;background-image:none!important;color:#fff!important;border-color:#111!important;border-radius:12px!important}
html[data-kingai-global-ui="2026"] .violet-btn{background:#6757D9!important;background-image:none!important;color:#fff!important;border-radius:12px!important}
html[data-kingai-global-ui="2026"] .side-nav button.active,html[data-kingai-global-ui="2026"] .side-nav button:hover{background:#EEF4FF!important;background-image:none!important;color:#245FC9!important}
html[data-kingai-global-ui="2026"] .stage-card{background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important;box-shadow:var(--kai-shadow-soft)!important}

/* Security and other editorial product sites. */
html[data-kingai-global-ui="2026"] :is(.nav-cta,.site-header){background-image:none!important}
html[data-kingai-global-ui="2026"] :is(.pill,.callout,.cta,.menu-panel){background:#fff!important;background-image:none!important;border-color:var(--kai-line)!important}
html[data-kingai-global-ui="2026"] .cta{background:#F7F7F8!important}
html[data-kingai-global-ui="2026"] .eyebrow::before{background:#246BFD!important;background-image:none!important}

/* Form clarity and accessibility. */
html[data-kingai-global-ui="2026"] :is(input,textarea,select){background:#fff!important;color:#111!important;border-color:var(--kai-line-strong)!important;border-radius:12px!important}
html[data-kingai-global-ui="2026"] :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid var(--kai-focus)!important;outline-offset:3px!important}

/* Shared public footer. */
html[data-kingai-global-ui="2026"] :is(footer,.site-footer,.global-footer,.ecosystem-footer,[data-kai-shell-footer]){
  color-scheme:light!important;
  background:#F7F7F8!important;
  background-image:none!important;
  color:var(--kai-text-secondary)!important;
  border-color:var(--kai-line)!important;
}
html[data-kingai-global-ui="2026"] :is(footer,.site-footer,.global-footer,.ecosystem-footer,[data-kai-shell-footer]) :is(h1,h2,h3,h4,strong,b){color:#111!important}
html[data-kingai-global-ui="2026"] :is(footer,.site-footer,.global-footer,.ecosystem-footer,[data-kai-shell-footer]) :is(a,p,small,span){color:#626469!important}
html[data-kingai-global-ui="2026"] :is(footer,.site-footer,.global-footer,.ecosystem-footer,[data-kai-shell-footer]) a:hover{color:#111!important}

/* Prevent legacy AI-template decoration from taking over shared shell UI. */
html[data-kingai-global-ui="2026"] [data-kai-shell-header] :is(.btn,.button){box-shadow:none!important}

@media(max-width:720px){
  html[data-kingai-global-ui="2026"] :is(.hero h1,.page-hero h1,.pagehero h1,.kh-hero h1){font-size:clamp(40px,11vw,54px)!important;line-height:1.05!important;letter-spacing:-.052em!important}
  html[data-kingai-global-ui="2026"] :is(.hero-actions,.actions):has(>.btn){gap:10px}
}
@media(prefers-reduced-motion:reduce){
  html[data-kingai-global-ui="2026"]{scroll-behavior:auto!important}
  html[data-kingai-global-ui="2026"] *,html[data-kingai-global-ui="2026"] *::before,html[data-kingai-global-ui="2026"] *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}
