/* Approved welcome variants: ge stacked (mock 1), mei side-by-side (mock 2). */
#home{align-items:flex-start;padding:28px 38px 20px;overflow:auto}
#home .m0-welcome-layout{max-width:1320px;display:grid;grid-template-columns:minmax(310px,.9fr) minmax(500px,1.9fr);gap:52px;margin:0 auto}
#home .m0-welcome-intro{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
#home .m0-welcome-character{--frame:214px;--offset:28px;--portrait-y:0px;width:270px;height:286px;margin:0 0 8px;background-image:url('assets/assistant/welcome-ge-palm.png');background-size:calc(var(--frame) * 4) auto;background-repeat:no-repeat;background-position:var(--offset) var(--portrait-y);animation:m0-greeting 5s steps(1,end) infinite}
#home[data-welcome-persona=mei] .m0-welcome-character{--frame:267px;--offset:0px;--portrait-y:-29px;background-image:url('assets/assistant/welcome-mei.png?v=palm2')}
@keyframes m0-greeting{0%{background-position-x:var(--offset)}10%{background-position-x:calc(var(--offset) - var(--frame))}18%{background-position-x:calc(var(--offset) - var(--frame) * 2)}24%{background-position-x:calc(var(--offset) - var(--frame) * 3)}34%,100%{background-position-x:var(--offset)}}
#home .m0-welcome-intro{position:relative}
#home .m0-welcome-layout{position:relative}
#home .m0-welcome-arrow,#home[data-welcome-persona=mei] .m0-welcome-arrow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;background:none;mask:none;z-index:2}
#home .m0-welcome-arrow svg{display:block;width:100%;height:100%;overflow:visible}
#home[hidden] .m0-welcome-character{animation-play-state:paused}
#home .m0-persona-switch{display:inline-flex;border:1px solid #ccd9e3;border-radius:5px;overflow:hidden;margin-bottom:12px}
#home .m0-persona-switch button{border:0;background:white;color:#0b3c5d;padding:6px 16px;min-height:32px;font:inherit;cursor:pointer}
#home .m0-persona-switch button+button{border-left:1px solid #ccd9e3}
#home .m0-persona-switch button[aria-pressed=true]{background:#0b3c5d;color:white}
#home .m0-welcome-copy h1{font-size:26px;line-height:1.5;color:#0b3c5d;margin:0 0 14px;font-weight:700;letter-spacing:-.5px}
#home .m0-welcome-copy p{font-size:15px;color:#54677b;line-height:1.7;margin:0 0 16px}
#home #btnDiag{background:#f57921;color:#fff;border:0;min-width:220px;min-height:46px;font-size:16px;font-weight:600;border-radius:6px}
#home .m0-direct-entry{border-top:1px solid #ccd9e3;margin-top:16px;padding-top:8px;align-self:stretch}
#home .m0-direct-entry button{display:block;border:0;background:none;padding:4px 0;color:#0b3c5d;font:600 15px 'Microsoft YaHei','PingFang SC',sans-serif;cursor:pointer}
#home .m0-direct-entry small{color:#54677b;font-size:12px;line-height:1.8}
#home .m0-welcome-config{border:1px solid #aabfce;border-radius:10px;overflow:hidden;align-self:start;margin-top:24px;min-height:470px;background:#fff}
#home .m0-config-title{background:#0b3c5d;color:#fff;padding:18px 24px;font-size:23px;font-weight:700}
#home .cards{display:flex;flex-direction:column;gap:18px;padding:24px}
#home .card{min-height:94px;border-radius:7px;padding:14px 18px;display:grid;grid-template-columns:1fr auto;column-gap:18px;row-gap:6px;background:#fff;border-color:#ccd9e3}
#home .card .no{display:none}#home .card .nm{font-size:18px;color:#0b3c5d;margin:0;grid-column:1}
#home .card .ds{font-size:12px;line-height:1.6;grid-column:1;grid-row:2}
#home .card .ds br{display:none}#home .card .ft{grid-column:2;grid-row:1/3;align-self:center;margin:0;font-size:12px;max-width:125px;text-align:right}
#home .card:hover{border-color:#f57921;background:#fff9f3}
#home .stat{padding:0 24px 18px;margin:0;font-size:11px}
#home .m0-welcome-explain{display:none}
#homePersonaError{font-size:12px;color:#994408;margin:0 0 10px}
#towerExit{width:34px;height:32px;min-width:34px;display:inline-flex;align-items:center;justify-content:center;font-size:25px;line-height:1;color:#0b3c5d;flex-shrink:0}
#home[data-welcome-persona=mei] .m0-welcome-layout{grid-template-columns:minmax(520px,1.1fr) minmax(450px,1.5fr);gap:38px}
#home[data-welcome-persona=mei] .m0-welcome-intro{display:grid;grid-template-columns:280px minmax(0,1fr);column-gap:22px;align-content:start}
#home[data-welcome-persona=mei] .m0-character-group{grid-column:1;grid-row:1}
#home[data-welcome-persona=mei] .m0-welcome-copy{grid-column:2;grid-row:1;padding-top:48px}
#home[data-welcome-persona=mei] .m0-welcome-copy h1{font-size:21px;line-height:1.6}
#home[data-welcome-persona=mei] .m0-welcome-copy p{font-size:14px;margin-top:14px}
#home[data-welcome-persona=mei] .m0-welcome-explain{grid-column:1/-1;display:grid;gap:17px;list-style:none;margin:8px 0 28px;padding:0;font-size:17px;color:#0b3c5d}
#home[data-welcome-persona=mei] #btnDiag,#home[data-welcome-persona=mei] .m0-direct-entry,#home[data-welcome-persona=mei] #homePersonaError{grid-column:1/-1;justify-self:start}
#home[data-welcome-persona=mei] .m0-direct-entry{justify-self:stretch}
#home[data-welcome-persona=mei] .m0-config-title{color:#0b3c5d;background:white;padding:24px 24px 12px}
#home[data-welcome-persona=mei] .cards{gap:0}
#home[data-welcome-persona=mei] .card{border-width:0 0 1px;border-radius:0;padding:20px 8px}
#home[data-welcome-persona=mei] .card:last-child{border-bottom:0}
#home button:focus-visible{outline:2px solid #0b3c5d;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#home .m0-welcome-character{animation:none}}
@media(max-width:1050px){#home{padding:24px}#home .m0-welcome-layout{grid-template-columns:minmax(270px,.8fr) minmax(390px,1.2fr);gap:26px}#home[data-welcome-persona=mei] .m0-welcome-layout{grid-template-columns:1fr 1.2fr;gap:26px}#home[data-welcome-persona=mei] .m0-welcome-intro{display:flex}#home[data-welcome-persona=mei] .m0-welcome-copy{padding-top:0}}
@media(max-width:760px){#home{padding:20px}#home .m0-welcome-layout,#home[data-welcome-persona=mei] .m0-welcome-layout{display:flex;flex-direction:column;gap:24px}#home .m0-welcome-config{width:100%;margin-top:0;min-height:0}#home .card{display:flex;gap:6px}#home .card .ft{text-align:left;align-self:flex-start}#home .m0-welcome-intro{width:100%}}
#home .m0-welcome-explain li{display:flex;align-items:center;gap:16px}
#home .m0-welcome-explain img{width:27px;height:27px;flex:none}
#home .m0-direct-entry button{display:flex;align-items:center;gap:10px}
#home .m0-direct-entry img{width:20px;height:20px}
#home[data-welcome-persona=mei] .m0-welcome-copy .m0-guide-name{color:#f57921}
@media(max-width:760px){
 body:has(#home:not([hidden])) #top{height:auto;min-height:46px;flex-wrap:wrap;padding:6px 48px 6px 12px;position:relative;gap:5px}
 body:has(#home:not([hidden])) #steps{order:3;flex-basis:100%;margin-left:0;overflow-x:auto}
 body:has(#home:not([hidden])) #towerExit{position:absolute;right:8px;top:5px}
 body:has(#home:not([hidden])) #pubState{white-space:normal}
 body:has(#home:not([hidden])) #top .sp{display:none}
}

/* Configuration actions belong to configuration pages, not the welcome home. */
body:has(#home:not([hidden])) #top :is(#steps,#guideToggle,#globalStash,#pubState,#btnPublish,#btnExport){display:none!important}

@media(max-width:760px){#home .m0-welcome-arrow{display:none}}

#home[data-welcome-persona=ge] .m0-welcome-character{clip-path:inset(0 28px)}
#home[data-welcome-persona=mei] .m0-welcome-character{clip-path:inset(0 3px 0 0)}

@media(max-width:760px){#home[data-welcome-persona=mei] .m0-welcome-arrow{display:none}}

/* Welcome surfaces follow the shared account theme; portraits and orange arrows retain brand colors. */
body:has(#home:not([hidden])){background:var(--bg,#f4f6f9);color:var(--ink,#1c2733)}
body:has(#home:not([hidden])) #top{background:var(--card,#fff);border-color:var(--line,#e3e8ef)}
body:has(#home:not([hidden])) #towerExit{background:var(--card,#fff);color:var(--ink,#1c2733);border-color:var(--line,#e3e8ef)}
#home{background:var(--bg,#f4f6f9);color:var(--ink,#1c2733)}
#home .m0-welcome-config,#home .card,#home .card.one{background:var(--card,#fff);border-color:var(--line,#e3e8ef)}
#home .card:hover{background:color-mix(in srgb,var(--card,#fff) 92%,#f57921);border-color:#f57921}
#home .m0-welcome-copy h1,#home .card .nm,#home .m0-direct-entry button,#home .m0-welcome-explain{color:var(--ink,#1c2733)}
#home .m0-welcome-copy p,#home .card .ds,#home .m0-direct-entry small,#home .stat{color:var(--gray,#627184)}
#home .m0-persona-switch,#home .m0-persona-switch button+button,#home .m0-direct-entry{border-color:var(--line,#e3e8ef)}
#home .m0-persona-switch button{background:var(--card,#fff);color:var(--ink,#1c2733)}
#home .m0-persona-switch button[aria-pressed=true]{background:#0b3c5d;color:#fff}
#home[data-welcome-persona=mei] .m0-config-title{background:var(--card,#fff);color:var(--ink,#1c2733)}
#home .card .ft{color:var(--orange,#e8832b)}
[data-theme=dark] #home .m0-welcome-explain img,[data-theme=dark] #home .m0-direct-entry img{filter:brightness(0) invert(.9)}
#home button:focus-visible{outline-color:var(--orange,#e8832b)}

#home[data-welcome-persona=mei] .m0-welcome-explain{color:var(--ink,#1c2733)}
body:has(#home:not([hidden])) #vsummary{background:var(--card,#fff);color:var(--gray,#627184)}
#settingsPanel{color:#1c2733}
#settingsPanel :is(.cope-window-title,.cope-window-controls){--ink:#1c2733;color:#1c2733}
/* Keep the separate legacy configuration editor's own palette until it is adapted. */
#app:has(#home[hidden]){--ink:#1A2230;--navy:#16335B;--warn:#B26A00;color:var(--ink)}

/* Standalone M0 navigation must use readable foregrounds in both theme surfaces. */
html[data-theme=dark] body:has(#home) #workspaceNavigation{background:#1a2333;color:#e6ebf2}
html[data-theme=dark] body:has(#home) #workspaceNavigation button{color:#e6ebf2}
html[data-theme=dark] body:has(#home) #steps button{color:#d4deeb}
html[data-theme=dark] body:has(#home) #steps button.on{color:#fff;background:#994408}

html[data-theme=dark] body:has(#home) #top{background:#1a2333;color:#e6ebf2}
