:root{--platform-bg:#f8f6ef;--platform-paper:#fff;--platform-ink:#1f2937;--platform-muted:#667085;--platform-line:#dedbd1;--platform-accent:#2f6bff;--platform-accent-soft:#e8efff;--platform-good:#16865c;--platform-warn:#e87919;--platform-bad:#d64545;--platform-shadow:0 12px 30px rgba(31,41,55,.09);--platform-radius:18px}
html{color-scheme:light;scroll-behavior:smooth}
body.platform-ui{background:var(--platform-bg);color:var(--platform-ink);font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}
body.platform-ui.theme-yilin{--platform-accent:#2f6bff;--platform-accent-soft:#e8efff}
body.platform-ui.theme-nce{--platform-accent:#238b57;--platform-accent-soft:#e3f5ea}
body.platform-ui.theme-phonics{--platform-accent:#e97b19;--platform-accent-soft:#fff0dd}
body.platform-ui :where(button,a,input,select,textarea){font:inherit}
body.platform-ui :where(button,.btn,[role="button"],input,select){min-height:44px}
body.platform-ui :where(button,.btn){border-radius:13px;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
body.platform-ui :where(button,.btn):not(:disabled):active{transform:translateY(1px) scale(.985)}
body.platform-ui :where(input,select,textarea){border:1px solid var(--platform-line);border-radius:13px;background:#fff;color:var(--platform-ink);padding:10px 12px}
body.platform-ui :where(input,select,textarea):focus{outline:3px solid color-mix(in srgb,var(--platform-accent) 23%,transparent);border-color:var(--platform-accent)}
body.platform-ui :where(.card,.panel,.section-card,.book-tile,.unit-item,.fc-card,.qz-panel,.learning-panel){border-radius:var(--platform-radius);border-color:var(--platform-line);box-shadow:var(--platform-shadow);background:var(--platform-paper)}
body.platform-ui :where(h1,h2,h3){letter-spacing:-.025em;color:var(--platform-ink)}
body.platform-ui :where(.muted,.sub,.hint,small){color:var(--platform-muted)}
body.platform-ui .platform-focus-link{position:fixed;left:10px;top:-60px;z-index:10000;background:#111827;color:#fff;padding:10px 14px;border-radius:10px;text-decoration:none}
body.platform-ui .platform-focus-link:focus{left:10px;top:54px}
.platform-bottom{display:none}.platform-toast{position:fixed;right:18px;bottom:18px;z-index:9999;max-width:320px;padding:12px 16px;border-radius:14px;background:#17202d;color:#fff;box-shadow:var(--platform-shadow)}
.platform-skeleton{position:relative;overflow:hidden;background:#ece9df;border-radius:12px;min-height:44px}.platform-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);animation:platform-shimmer 1.2s infinite}
@keyframes platform-shimmer{to{transform:translateX(100%)}}@keyframes platform-pop{0%{transform:scale(.88);opacity:0}70%{transform:scale(1.04)}100%{transform:scale(1);opacity:1}}.platform-celebrate{animation:platform-pop .42s ease-out}
@media(max-width:700px){body.platform-ui{padding-bottom:72px!important}.platform-bottom{position:fixed;z-index:9000;left:8px;right:8px;bottom:8px;height:58px;padding:5px;display:grid;grid-template-columns:repeat(5,1fr);gap:3px;background:rgba(255,255,255,.94);border:1px solid var(--platform-line);border-radius:18px;box-shadow:0 10px 35px rgba(31,41,55,.18);backdrop-filter:blur(14px)}.platform-bottom button,.platform-bottom a{min-width:0;min-height:46px;border:0;background:transparent;color:var(--platform-muted);border-radius:12px;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font-size:18px;padding:0}.platform-bottom span{font-size:11px;line-height:1.1;white-space:nowrap}.platform-bottom .active{background:var(--platform-accent-soft);color:var(--platform-accent);font-weight:800}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@media print{.platform-bottom,.platform-focus-link,.platform-toast{display:none!important}}

/* 窄屏「更多」抽屉（platform.js openMore） */
.platform-more{position:fixed;inset:0;z-index:9995;background:rgba(17,24,39,.32);display:flex;align-items:flex-end;animation:platform-fade .16s ease-out}
.platform-more-panel{width:100%;max-height:78vh;overflow:auto;background:#fff;border-radius:22px 22px 0 0;padding:14px 14px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(31,41,55,.18)}
.platform-more-panel header{display:flex;align-items:center;justify-content:space-between;margin:0 4px 10px;font-size:16px}
.platform-more-panel header button{border:0;background:#f2f4f7;border-radius:50%;width:36px;height:36px;min-height:36px;font-size:20px;line-height:1;color:var(--platform-muted)}
.platform-more-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.platform-more-grid a{display:flex;align-items:center;justify-content:center;text-align:center;min-height:56px;padding:8px 6px;border-radius:14px;background:var(--platform-bg);border:1px solid var(--platform-line);color:var(--platform-ink);text-decoration:none;font-size:14px;font-weight:600;line-height:1.3}
.platform-more-grid a.active{background:var(--platform-accent-soft);border-color:var(--platform-accent);color:var(--platform-accent)}
@keyframes platform-fade{from{opacity:0}}

/* Yilin: preserve every route while giving the large SPA one child-friendly shell. */
body.platform-ui.theme-yilin .topbar{background:rgba(255,255,255,.96);border-bottom:1px solid var(--platform-line);box-shadow:0 8px 25px rgba(47,107,255,.08)}
body.platform-ui.theme-yilin .brand{color:var(--platform-accent)}
body.platform-ui.theme-yilin .topnav{gap:5px;padding:6px 12px;overflow-x:auto}
/* 顶栏改成白底后，原来给蓝色渐变底用的白字导航会整排「隐身」，这里必须显式给深色字 */
body.platform-ui.theme-yilin .topnav a{border-radius:12px;white-space:nowrap;color:var(--platform-muted);font-weight:600}
body.platform-ui.theme-yilin .topnav a:hover{background:#f2f4f7;color:var(--platform-ink)}
body.platform-ui.theme-yilin .topnav a.active{background:var(--platform-accent-soft);color:var(--platform-accent)}
body.platform-ui.theme-yilin .topbar .icon-btn{color:var(--platform-ink)}
body.platform-ui.theme-yilin .view-container{max-width:1120px}
body.platform-ui.theme-yilin :where(.book-tile,.unit-item,.action-card,.word-card,.test-card){border:1px solid var(--platform-line);box-shadow:var(--platform-shadow)}
body.platform-ui.theme-yilin :where(.book-tile,.unit-item):hover{transform:translateY(-2px);border-color:var(--platform-accent)}

/* NCE: replace the editorial shell with the same working-surface rhythm. */
body.platform-ui.theme-nce{--bg:#f8f6ef!important;--paper:#fff!important;--ink:#1f2937!important;--muted:#667085!important}
body.platform-ui.theme-nce #sidebar{background:#fff;border-right:1px solid var(--platform-line);box-shadow:8px 0 30px rgba(35,139,87,.06)}
body.platform-ui.theme-nce .nav-icon{border-radius:13px;margin:2px 6px}
body.platform-ui.theme-nce .nav-icon.on{background:var(--platform-accent-soft);color:var(--platform-accent)}
body.platform-ui.theme-nce :where(.lesson-card,.stat-card,.quick-card,.content-card,.fc-card,.quiz-card){border-radius:var(--platform-radius);border-color:var(--platform-line);box-shadow:var(--platform-shadow)}
body.platform-ui.theme-nce .ctab{min-height:44px;border-radius:12px 12px 0 0}
body.platform-ui.theme-nce .ctab.on{color:var(--platform-accent);border-color:var(--platform-accent)}
body.platform-ui.theme-nce #mob-bottom-nav{display:none!important}

/* Phonics: orange identity, consistent surfaces and calmer reading widths. */
body.platform-ui.theme-phonics{--primary:var(--platform-accent);--bg-body:var(--platform-bg);--bg-card:#fff}
body.platform-ui.theme-phonics .header{background:rgba(255,255,255,.96);border-bottom:1px solid var(--platform-line);box-shadow:0 8px 25px rgba(233,123,25,.08)}
body.platform-ui.theme-phonics .nav{gap:5px}
body.platform-ui.theme-phonics .nav-link{border-radius:12px;white-space:nowrap}
body.platform-ui.theme-phonics .nav-link.active{background:var(--platform-accent-soft);color:var(--platform-accent)}
body.platform-ui.theme-phonics :where(.category-card,.pattern-card,.practice-card,.qz-unit-card,.ex-section,.download-card,.roadmap-card){border-radius:var(--platform-radius);border-color:var(--platform-line);box-shadow:var(--platform-shadow)}
body.platform-ui.theme-phonics :where(.learning-hero,.dl-header,.ex-head){border-radius:22px;background:linear-gradient(135deg,#fff7eb,#fff);border:1px solid #f3d1aa}

@media(max-width:700px){body.platform-ui.theme-yilin .topnav{display:none}body.platform-ui.theme-nce #mob-bottom-nav{display:none!important}body.platform-ui.theme-phonics .header .nav{display:none!important}body.platform-ui.theme-yilin .view-container{padding-left:12px;padding-right:12px}}
