/* Shared palette for native and standalone SI pages. */
html[data-si-theme][data-si-resolved]{--bg:light-dark(#f7f6f0,#16241d);--paper:light-dark(#fffefb,#213027);--surface:var(--paper);--ink:light-dark(#233f34,#e6eddf);--muted:light-dark(#647268,#b3c2b1);--green:light-dark(#245143,#c6d7b4);--line:light-dark(#dce2d7,#40533f);--border:var(--line);--soft:light-dark(#eaf0e4,#2d412e);--side:light-dark(#f0f2e9,#1b2b21);--on:light-dark(#fffdf4,#223b2b);--gold:light-dark(#926b37,#d5bd7e);--warn:light-dark(#875827,#e9c095);--danger:light-dark(#954b37,#f3b59e);--library-paper:var(--bg);--library-surface:var(--paper);--library-ink:var(--ink);--library-muted:var(--muted);--library-green:var(--green);--library-line:var(--line);--library-soft:var(--soft);background:var(--bg);color:var(--ink)}
html[data-si-resolved=dark]{color-scheme:dark}html[data-si-resolved=light]{color-scheme:light}
html[data-si-theme][data-si-resolved] body{background:var(--bg)!important;color:var(--ink)!important}
html[data-si-theme][data-si-resolved]{--color-gray-50:#eef2e9;--color-gray-100:#e6eddf;--color-gray-200:#d4decc;--color-gray-300:#bfccba;--color-gray-400:#a7b6a5;--color-gray-500:#7c917c;--color-gray-600:#526c55;--color-gray-700:#40533f;--color-gray-800:#2d412e;--color-gray-850:#27392c;--color-gray-900:#213027;--color-gray-950:#16241d}
.appearance-control{display:flex;align-items:center;gap:6px;flex-shrink:0}.appearance-control label{margin:0;display:block}.appearance-control select{width:105px;min-height:44px;font:12px/1.6 system-ui,'Microsoft YaHei',sans-serif;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);cursor:pointer}
.si-appearance-label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#landing-motion{display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--green);background:transparent;cursor:pointer}#landing-motion svg{width:19px;height:19px}#landing-motion[aria-pressed=false]{color:var(--muted)}.appearance-control :focus-visible{outline:3px solid var(--gold);outline-offset:3px}
html[data-si-theme][data-si-resolved] .topbar-end{gap:12px}.topbar .service-label{display:none}.topbar .brand small,.si-native-brand small{font-size:10px;letter-spacing:.065em}
html[data-si-theme][data-si-resolved] :is(.book-card,.library-choice-card,.paper,.plan-card,.reading-ask){background:var(--paper);border-color:var(--line);border-radius:16px}
html[data-si-theme][data-si-resolved] :is(.library-choice-card h2,.catalog-intro h1,.document-reader h1,.si-native-page h1){font-family:Georgia,'Songti SC',SimSun,serif;font-weight:500;letter-spacing:-.025em}
html[data-si-theme][data-si-resolved] :is(.primary,.primary-button,.library-primary-nav a[aria-current=page]){background:var(--green);color:var(--on);border-color:var(--green)}
html[data-si-theme][data-si-resolved] :is(.primary,.primary-button):hover:not(:disabled):not([aria-disabled=true]){background:var(--green);color:var(--on);filter:brightness(.95)}
html[data-si-theme][data-si-resolved] .primary-button[aria-disabled=true]{background:var(--soft);color:var(--muted);border-color:var(--line)}
html[data-si-theme][data-si-resolved] :is(.filter-panel,.library-scope-band,.badge){background:var(--soft);color:var(--ink);border-color:var(--line)}
html[data-si-theme][data-si-resolved] :is(.secondary-button,.search-field,.book-notes,.empty-results){border-color:var(--line)}
html[data-si-theme][data-si-resolved] .empty-results{background:var(--paper)}
html[data-si-theme][data-si-resolved] :is(.language-count,.language-chip,.status-chip,.book-symbol){background:var(--soft);color:var(--muted);border-color:var(--line)}
html[data-si-theme][data-si-resolved] :is(.choice-symbol,.search-field svg,.empty-results>svg){color:var(--green)}
html[data-si-theme][data-si-resolved] :is(.eyebrow,.intro,.muted,dt,.original-unavailable){color:var(--muted)}
html[data-si-theme][data-si-resolved] :is(.language-chip.unknown,.status-indexing,.status-uploaded){color:var(--warn);background:light-dark(#f5efdf,#3e3624)}
html[data-si-theme][data-si-resolved] .status-ready{color:light-dark(#37654a,#bad9ba);background:light-dark(#e5efe1,#2a412c)}
html[data-si-theme][data-si-resolved] :is(.status-error,.error-banner){color:var(--danger);background:light-dark(#f7e9e0,#422d26);border-color:light-dark(#e3c8ad,#825740)}
html[data-si-theme][data-si-resolved] :is(input,textarea,select){accent-color:var(--green)}
html[data-si-theme][data-si-resolved] .static-workspace :is(input,textarea,select,button:not(.primary):not(.primary-button):not(.text-button)){color:var(--ink)}
html[data-si-theme][data-si-resolved] .static-workspace :is(input,textarea,select){background-color:var(--paper);border-color:var(--line)}
html[data-si-theme][data-si-resolved] .static-workspace .search-field input{background:transparent}
html[data-si-theme][data-si-resolved] .document-reader pre{background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-si-theme][data-si-resolved] .static-workspace pre:not(.document-reader pre){background:var(--soft);color:var(--ink)}
html[data-si-theme][data-si-resolved] .promise{border-color:var(--gold)}
html[data-si-theme][data-si-resolved] #message:not(:empty),html[data-si-theme][data-si-resolved] #form-note:not(:empty){color:var(--warn)}
/* Native dialogs, chat and administration retain their original controls. */
html[data-si-theme][data-si-resolved] :is(#chat-container,#chat-pane,.si-native-page,.si-native-page>div,#settings-tabs-container){background:var(--bg)!important;color:var(--ink)}
html[data-si-theme][data-si-resolved] #sidebar{background:var(--side)!important;color:var(--ink)!important}
html[data-si-theme][data-si-resolved] :is(#chat-input-container,#chat-input){color:var(--ink)}
html[data-si-theme][data-si-resolved] .si-native-shell :is(.bg-white,.bg-gray-50,.bg-gray-100){background-color:var(--paper)!important}
html[data-si-theme][data-si-resolved] .si-native-shell :is([role=dialog],[role=menu],.si-native-account-menu,#settings-tabs-container+div){background-color:var(--paper)!important;color:var(--ink)}
html[data-si-theme][data-si-resolved] .si-native-shell :is(input:not([type=checkbox]):not([type=radio]),textarea,select){border-color:var(--line);color:var(--ink)}
html[data-si-theme][data-si-resolved] .library-action{background:var(--paper);border-color:var(--line);border-radius:16px}
html[data-si-theme][data-si-resolved] .library-hero img{mix-blend-mode:normal;mask-image:radial-gradient(ellipse 64% 63% at 54% 51%,#000 33%,#000e 53%,transparent 80%)}
html[data-si-theme][data-si-resolved] .si-native-brand-symbol{color:var(--on)}
html[data-si-theme][data-si-resolved] .si-native-header .library-language-select{background:var(--paper);color:var(--ink)}
html[data-si-theme][data-si-resolved] .si-native-header .library-nav-tools{margin-left:0;gap:10px}
html[data-si-theme][data-si-resolved] .si-native-header-row{gap:12px}
html[data-si-motion=off] :is(.book-card,.library-choice-card,.library-action){transition:none!important}
@media(max-width:1000px){.topbar .brand small,.si-native-brand small{display:none}}
@media(max-width:780px){html[data-si-theme][data-si-resolved] .topbar{flex-wrap:wrap;height:auto;min-height:78px;gap:12px}.si-native-brand{flex:1}.si-native-header .appearance-control select{width:90px}}
@media(max-width:680px){html[data-si-theme][data-si-resolved]{--si-shell-header:122px}.si-native-header{padding:12px 16px}.si-native-header-row{flex-wrap:wrap;align-content:center;gap:8px!important}.si-native-brand{flex-basis:100%;font-size:22px}.si-native-header .appearance-control{margin-right:auto}.si-native-header .library-language-select{width:90px;min-width:90px;max-width:90px}.si-native-brand-symbol,.si-native-brand small{display:none}}
@media(max-width:580px){html[data-si-theme][data-si-resolved] .topbar-end{flex-basis:100%;width:100%;justify-content:flex-end;gap:10px}.topbar-end .appearance-control{margin-right:auto}.topbar .language select{width:94px}.appearance-control select{width:100px}.topbar .brand{font-size:22px}}
@media(max-width:360px){html[data-si-theme][data-si-resolved] .topbar{padding-inline:12px}html[data-si-theme][data-si-resolved] .topbar-end{gap:6px}.appearance-control{gap:4px}.appearance-control select,.si-native-header .appearance-control select{width:83px;padding-inline:5px}.topbar .language select,.si-native-header .library-language-select{width:80px;min-width:80px;max-width:80px;padding-inline:5px}.topbar-end .appearance-control{margin-right:0}.si-native-header{padding-inline:12px}.si-native-header-row{gap:6px!important}}
@media(prefers-reduced-motion:reduce){.book-card,.library-choice-card,.library-action{transition:none!important}}

html[data-si-theme][data-si-resolved] .intro-illustration{mix-blend-mode:normal;mask-image:radial-gradient(ellipse 64% 63% at 54% 51%,#000 33%,#000e 53%,transparent 80%)}
.navigation .nav-icon svg{display:block;width:19px;height:19px;stroke-width:1.5}

/* Keep secondary native text readable without changing status colors or disabled opacity. */
html[data-si-theme][data-si-resolved] .si-native-shell :is(.text-gray-400,.text-gray-500,.text-gray-600){color:var(--muted)!important}
html[data-si-resolved=dark] .si-native-shell :is(.dark\:text-gray-400,.dark\:text-gray-500,.dark\:text-gray-600){color:var(--muted)!important}
html[data-si-theme][data-si-resolved] .si-native-shell :is(input,textarea)::placeholder{color:var(--muted)!important;opacity:1}
html[data-si-theme][data-si-resolved] .library-hero h1{font:500 clamp(32px,3.2vw,46px)/1.2 Georgia,'Songti SC',SimSun,serif;letter-spacing:-.035em}
html[data-si-theme][data-si-resolved] :is(.library-eyebrow,.library-hero-meta,.library-reading-note){color:var(--muted)}

html[data-si-theme][data-si-resolved] .static-workspace button:not(.primary):not(.primary-button):not(.text-button){background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-si-theme][data-si-resolved] .static-workspace button:not(.primary):hover:not(:disabled){background:var(--soft)}
html[data-si-theme][data-si-resolved] .static-workspace .actions a{color:var(--green)}

@media(max-width:680px){html[data-si-theme][data-si-resolved] .si-native-brand{flex:0 0 100%;font-size:22px}html[data-si-theme][data-si-resolved] .si-native-header-row{flex-wrap:wrap;align-content:center}html[data-si-theme][data-si-resolved] .si-native-brand-symbol,html[data-si-theme][data-si-resolved] .si-native-brand small{display:none}}

/* Shared account geometry and navigation rhythm across both application shells. */
html[data-si-theme][data-si-resolved] :is(.top-account>.account-trigger,.si-native-profile-trigger>button,.si-shared-account-trigger){box-sizing:border-box;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:50%!important;background:var(--soft)!important}
html[data-si-theme][data-si-resolved] :is(.account-trigger>#account-avatar,.si-native-profile-trigger>button>div:first-child,.si-shared-account-trigger>span){width:42px!important;height:42px!important;margin:0!important;border-radius:50%}
html[data-si-theme][data-si-resolved] :is(.account-trigger img,.si-native-profile-trigger img,.si-shared-account-trigger img){display:block;width:42px!important;height:42px!important;object-fit:cover;border-radius:50%}
@media(min-width:781px){html[data-si-theme][data-si-resolved] .workspace{grid-template-columns:245px minmax(0,1fr)}}
html[data-si-theme][data-si-resolved] #pinned-menu-items-list>.library-nav-link{margin:3px 18px;padding:12px 14px;min-height:44px;gap:12px;border-radius:9px;font-size:13px}
html[data-si-theme][data-si-resolved] #pinned-menu-items-list>.library-nav-link svg{width:20px;height:20px;flex-shrink:0}
