:root{font-family:"Plus Jakarta Sans","Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#0b1c30;background:#f8f9ff;--blue:#0755ce;--soft:#eff4ff;--line:#dce9ff;--muted:#667085;--green:#079b75;--orange:#e88a00}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:#f8f9ff}button,input,select{font:inherit}button{cursor:pointer}.app-shell{width:min(100%,430px);min-height:100vh;margin:auto;background:#f8f9ff}.topbar{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:1fr 38px auto;align-items:center;gap:10px;min-height:66px;padding:10px 16px;border-bottom:1px solid var(--line);background:rgba(248,249,255,.94);backdrop-filter:blur(16px)}.brand{display:flex;align-items:center;gap:10px}.brand img{width:38px;height:38px;border-radius:10px}.brand div{display:grid}.brand b{font-size:17px}.brand small{color:#667085;font-size:10px}.brand small::before{color:var(--blue);content:"● ";font-size:8px}.head-action{border:0;color:#374151;background:none;font-size:25px}.sync-state,.neutral-pill{padding:5px 10px;border-radius:999px;color:#667085;background:#e5eeff;font-size:10px}.view{display:none}.view.is-active{display:block}main{padding:12px 14px calc(82px + env(safe-area-inset-bottom))}.summary-card{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:10px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 4px 16px rgba(0,74,198,.05)}.summary-icon{display:grid;width:46px;height:46px;place-items:center;border-radius:14px;color:var(--blue);background:#e7edff;font-size:24px}.summary-card h1{margin:0;font-size:14px}.summary-card h1 em{margin-left:4px;padding:3px 7px;border-radius:6px;color:var(--blue);background:#e6efff;font-size:10px;font-style:normal}.summary-card p{margin:3px 0 0;color:#667085;font-size:11px}.summary-card button{height:40px;padding:0 12px;border:0;border-radius:9px;color:#fff;background:var(--blue);font-size:11px;font-weight:700}.search{position:relative;display:none;margin:10px 0}.search.is-visible{display:block}.search span{position:absolute;top:10px;left:13px;color:#667085;font-size:20px}.search input{width:100%;height:44px;padding:0 14px 0 40px;border:1px solid var(--line);border-radius:12px;color:#172033;background:#fff}.filter-rail,.scene-rail{display:flex;gap:8px;margin:12px 0;overflow:auto;scrollbar-width:none}.filter-rail button,.scene-rail button{flex:0 0 auto;min-height:34px;padding:0 13px;border:1px solid var(--line);border-radius:999px;color:#475467;background:#fff;font-size:11px}.filter-rail button.is-active,.scene-rail button.is-active{border-color:var(--blue);color:#fff;background:var(--blue);font-weight:700}.filter-rail button[data-starred="true"]{border-color:#f7c96f;color:#b66c00;background:#fff7e7}.scene-rail{align-items:center;margin-top:-5px}.scene-rail span{flex:0 0 auto;color:#667085;font-size:11px}.scene-rail button{min-height:28px;border:0;border-radius:8px;background:var(--soft)}.state-card{padding:42px 20px;border:1px dashed #b9c8de;border-radius:16px;color:#667085;background:#fff;text-align:center;font-size:12px;line-height:1.7}.state-card[hidden]{display:none}.word-list{display:grid;gap:12px}.word-card{padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(15,23,42,.04)}.word-card.is-mastered{border-color:#a7e6d4;background:#fbfffd}.word-head{display:flex;justify-content:space-between;gap:8px}.word-title{min-width:0}.word-title h2{display:flex;align-items:center;gap:7px;margin:0;font-size:18px;overflow-wrap:anywhere}.speak{width:30px;height:30px;border:0;border-radius:50%;color:var(--blue);background:#e7efff}.word-title p{margin:3px 0;color:#475467;font-size:12px;line-height:1.45}.word-actions{display:flex;gap:6px}.word-actions button{min-width:60px;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:999px;color:#475467;background:var(--soft);font-size:10px}.word-actions .star.is-active{border-color:#f7c96f;color:#b66c00;background:#fff7e7}.word-actions .status.is-mastered{border-color:#9be3cf;color:#087c61;background:#e9faf5}.context-preview{margin-top:12px;padding:12px;border-radius:12px;background:#f1f5ff}.context-preview p{margin:0;font-size:13px;line-height:1.5}.context-preview p+p{margin-top:4px;color:#667085;font-size:11px}.context-preview mark{padding:1px 3px;border-radius:4px;color:var(--blue);background:#dfe8ff;font-weight:700}.source-line{display:flex;align-items:center;gap:7px;margin-top:12px;color:#667085;font-size:11px}.source-line>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-line a{flex:0 0 auto;padding:6px 9px;border-radius:7px;color:var(--blue);background:#e5eeff;font-weight:700;text-decoration:none}.scene-select{min-width:86px;margin-left:auto;padding:5px;border:0;border-radius:7px;color:#475467;background:#f0f3f9;font-size:10px}.more-menu summary{min-height:38px;color:#667085;font-size:10px;line-height:38px}.context-row{padding:8px;border-left:3px solid #abc3f4;color:#475467;background:#f8f9ff;font-size:10px;white-space:pre-line}.danger-button{width:100%;height:38px;margin-top:8px;border:1px solid #ffd1cc;border-radius:9px;color:#ba1a1a;background:#fff8f7}.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:14px;color:#667085;font-size:10px}.pager button{height:36px;border:1px solid var(--line);border-radius:9px;color:var(--blue);background:#fff}.study-head{display:flex;align-items:center;justify-content:space-between;padding:8px 2px}.study-head small{color:var(--blue);font-weight:700}.study-head h1{margin:2px 0 0;font-size:22px}.study-head select{max-width:150px;height:42px;padding:0 10px;border:1px solid var(--line);border-radius:999px;color:#172033;background:#e5eeff;font-weight:700}.progress-line{display:flex;align-items:center;gap:12px;margin:10px 0 18px;color:var(--blue);font-size:12px;font-weight:700}.progress-line i{flex:1;height:8px;overflow:hidden;border-radius:999px;background:#dce7fb}.progress-line i b{display:block;width:0;height:100%;border-radius:inherit;background:var(--blue);transition:width .2s}.study-card{overflow:hidden;border:1px solid #d7e0ef;border-radius:18px;background:#fff;box-shadow:0 6px 20px rgba(15,23,42,.07)}.study-source{display:flex;justify-content:space-between;padding:13px;color:#172033;background:#eef4ff;font-size:11px}.study-source button{border:0;color:var(--blue);background:none}.study-term{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 18px 8px}.study-term h2{margin:0;font-size:28px}.study-term p{margin:4px 0;color:#667085}.study-term button{height:38px;border:0;border-radius:999px;color:var(--blue);background:#e7efff}.study-card blockquote{margin:10px 18px;padding:14px;border-radius:14px;background:#eff4ff}.study-card blockquote p{margin:0;font-size:15px;font-weight:600;line-height:1.55}.study-card blockquote small{display:block;margin-top:8px;color:#667085;line-height:1.5}.study-answer{margin:0 18px 18px;padding-top:14px;border-top:1px dashed #cbd5e1}.study-answer h3{margin:0 0 10px;color:#475467;font-size:12px}.study-answer strong{display:block;padding:12px;border-radius:12px;background:#e5eeff;font-size:16px}.study-answer p{color:#475467;font-size:12px}.study-answer span{display:inline-block;margin:4px;padding:5px 8px;border-radius:7px;background:#e5eeff;font-size:11px}.study-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.study-actions button,.done-card button{height:54px;border:1px solid #c9d8ef;border-radius:14px;color:#475467;background:#e5eeff;font-weight:700}.study-actions button+button,.done-card button:first-of-type{border-color:var(--blue);color:#fff;background:var(--blue)}.done-card{padding:28px;border:1px solid var(--line);border-radius:18px;background:#fff;text-align:center}.done-card p{color:#667085}.done-card button{width:100%;margin-top:10px}.page-title{display:flex;align-items:center;justify-content:space-between}.page-title h1{font-size:20px}
/* 个人中心：卡片是白底 + 浅蓝描边 + 极轻投影（Stitch 的 rounded-2xl / surface-container-lowest），
   卡片内的小块再浅一层（surface-container-low），三层底色把「卡片 / 小块 / 页面」分开。 */
.card{margin-top:14px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 2px 10px rgba(0,74,198,.05)}
.card>*+*{margin-top:14px}
.status-pill{display:flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;color:#667085;background:#fff;font-size:10px}
.status-pill::before{width:6px;height:6px;border-radius:50%;background:#9aa8bd;content:""}
.status-pill[data-signed-in="true"]{border-color:#a7e6d4;color:#087c61;background:#f3fdfa}
.status-pill[data-signed-in="true"]::before{background:var(--green)}
.identity-head{display:grid;grid-template-columns:48px 1fr;gap:12px;align-items:center}
.identity-head.has-divider{padding-bottom:14px;border-bottom:1px solid var(--soft)}
.identity-text{min-width:0}
.identity-text h2{margin:0;font-size:15px}
.identity-text p{margin:3px 0 0;color:#667085;font-size:11px;line-height:1.5}
.identity-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.identity-line b{font-size:14px;overflow-wrap:anywhere}
.avatar{display:grid;width:48px;height:48px;place-items:center;border:1px solid var(--soft);border-radius:50%;color:var(--blue);background:#eef4ff;font-size:24px}
.plan-pill{padding:3px 7px;border:1px solid rgba(7,85,206,.15);border-radius:999px;color:var(--blue);background:rgba(7,85,206,.08);font-size:10px;font-weight:600}
.primary-wide{display:flex;width:100%;height:44px;align-items:center;justify-content:center;gap:7px;border:0;border-radius:12px;color:#fff;background:var(--blue);font-size:13px;font-weight:700}
.primary-wide.soft{border:1px solid var(--line);color:#667085;background:#eef4ff}
.row-tile{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.row-icon{display:grid;width:26px;height:26px;flex:none;place-items:center;border-radius:8px;color:var(--blue);background:#fff}
.row-tile small{flex:1;min-width:0;color:#667085;font-size:11px}
.pill-button{display:flex;flex:none;align-items:center;gap:4px;padding:5px 10px;border:1px solid rgba(7,85,206,.2);border-radius:999px;color:var(--blue);background:rgba(7,85,206,.08);font-size:11px;font-weight:600}
.pill-button:disabled{opacity:.5}
.pill-button[hidden]{display:none}
.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.action-grid button{display:flex;height:44px;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:12px;color:var(--blue);background:var(--soft);font-size:11px;font-weight:700}
.action-grid button[hidden]{display:none}
.action-grid .danger-button{grid-column:1/-1;height:42px;margin:0;border-radius:12px;font-size:11px;font-weight:700}
.sync-detail{margin:0;color:#667085;font-size:10px;line-height:1.6}
.card-head{display:flex;align-items:center;gap:10px}
.head-icon{display:grid;width:32px;height:32px;flex:none;place-items:center;border-radius:10px;color:var(--blue);background:var(--soft)}
.head-text{flex:1;min-width:0}
.head-text h2{margin:0;font-size:14px}
.head-text p{margin:2px 0 0;color:#667085;font-size:11px}
.sync-state{display:flex;align-items:center;gap:5px;padding:5px 9px;border:1px solid var(--line);border-radius:999px;color:#667085;background:#fff;font-size:10px}
.sync-state::before{width:6px;height:6px;border-radius:50%;background:#9aa8bd;content:""}
.sync-state[hidden]{display:none}
.sync-state[data-status="synced"]{border-color:#a7e6d4;color:#087c61;background:#f3fdfa}.sync-state[data-status="synced"]::before{background:var(--green)}
.sync-state[data-status="syncing"],.sync-state[data-status="pending"]{border-color:#f7d9a4;color:#a35b00;background:#fffaf1}
.sync-state[data-status="syncing"]::before,.sync-state[data-status="pending"]::before{background:var(--orange)}
.sync-state[data-status="failed"]{border-color:#ffd1cc;color:#ba1a1a;background:#fff8f7}.sync-state[data-status="failed"]::before{background:#ba1a1a}
.sync-state[data-status="offline"]{border-color:#d7dced;color:#475467;background:#f4f6fb}.sync-state[data-status="offline"]::before{background:#98a2b3}
.tiles-head,.card-title-row{display:flex;align-items:center;justify-content:space-between}
.tiles-head span:first-child,.card-title-row h3{margin:0;color:#667085;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.tiles-head span:last-child{color:#667085;font-size:10px}
.card-note{display:flex;align-items:center;gap:4px;color:#667085;font-size:10px}
.card-note svg{width:13px;height:13px;color:var(--blue)}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tile-stack{display:grid;gap:10px}
.tile{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.tile-row{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#667085;font-size:11px}
.tile-row svg{width:15px;height:15px;flex:none;color:#94a3b8}
.tile-label{display:flex;align-items:center;gap:5px;min-width:0}
.tile-value{display:flex;align-items:baseline;gap:6px;margin:6px 0 0}
.tile-value b{color:var(--blue);font-size:20px;font-weight:700}
.tile-value span{color:#667085;font-size:11px}
.tile-badge{padding:2px 6px;border-radius:4px;color:var(--blue);background:rgba(7,85,206,.1);font-size:11px;font-style:normal;font-weight:600}
.tile-note{flex:none;color:#667085;font-size:10px}
.tile-foot{margin:8px 0 0;color:#667085;font-size:10px}
.bar-track{display:flex;overflow:hidden;height:8px;margin-top:10px;border-radius:999px;background:#e5eeff}
.bar-track>i{width:0;height:100%;border-radius:inherit;background:var(--blue);transition:width .2s}
#masteryBar{background:var(--green)}
.pos-bars>i{border-radius:0;transition:none}
.pos-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.pos-legend-item{display:flex;align-items:center;gap:4px;color:#667085;font-size:10px}
.pos-legend-item i{width:7px;height:7px;flex:none;border-radius:50%}
.pos-legend-item b{color:#172033;font-weight:600}
#posTile.is-empty .bar-track,#posTile.is-empty .pos-legend{display:none}
.locked>.export-types{margin-top:10px}
.export-types{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.export-types button{display:flex;height:74px;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid var(--line);border-radius:12px;color:#667085;background:#f6f9ff}
.export-types button svg{width:18px;height:18px;color:var(--blue)}
.export-types b{color:#0b1c30;font-size:12px}
.export-types small{font-size:10px;font-weight:400}
.locked>.card-foot{margin-top:10px}
.card-foot{margin:0;color:#667085;font-size:10px;text-align:center}
.auth-view{position:relative}.back-button{position:absolute;top:0;left:0;width:42px;height:42px;border:0;border-radius:12px;background:#fff;font-size:20px}.auth-hero{text-align:center}.auth-hero img{width:76px;height:76px;margin-top:36px;border-radius:22px}.auth-hero h1{margin:15px 0 5px;font-size:23px}.auth-hero p{margin:0;color:#667085}.trial{margin-top:20px;padding:14px;border-radius:13px;color:var(--blue);background:#e5eeff;font-size:12px;font-weight:700}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;margin-top:16px;padding:5px;border-radius:13px;background:#e7edfb}.auth-tabs button{height:42px;border:0;border-radius:10px;color:#475467;background:transparent}.auth-tabs button.is-active{color:var(--blue);background:#fff;font-weight:700;box-shadow:0 3px 9px rgba(15,23,42,.08)}form{display:grid;gap:14px;margin-top:16px;padding:17px;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.06)}form label{color:#172033;font-size:12px}form input{width:100%;height:50px;margin-top:7px;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#f8faff}form label span{display:grid;grid-template-columns:1fr 112px;gap:8px}form label span button{height:50px;margin-top:7px;border:1px solid #bad2f7;border-radius:12px;color:var(--blue);background:#e5eeff}form>p{margin:0;color:#667085;font-size:10px}.auth-submit{height:52px;border:0;border-radius:12px;color:#fff;background:var(--blue);font-weight:700}form output{min-height:20px;color:#ba1a1a;font-size:11px}.bottom-nav{position:fixed;right:0;bottom:0;left:0;z-index:6;display:grid;grid-template-columns:repeat(3,1fr);width:min(100%,430px);min-height:calc(66px + env(safe-area-inset-bottom));margin:auto;padding-bottom:env(safe-area-inset-bottom);border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(16px)}.bottom-nav button{display:grid;place-content:center;gap:2px;border:0;color:#475467;background:none;font-size:11px}.bottom-nav span{font-size:21px}.bottom-nav button.is-active{color:var(--blue);font-weight:700}.bottom-nav button.is-active::after{width:22px;height:3px;margin:auto;border-radius:999px;background:var(--blue);content:""}.toast{position:fixed;right:16px;bottom:78px;left:16px;z-index:10;display:none;width:min(calc(100% - 32px),398px);margin:auto;padding:12px;border-radius:11px;color:#fff;background:#213145;text-align:center;font-size:11px}.toast.is-visible{display:block}.toast button{margin-left:6px;border:0;border-radius:6px;color:var(--blue);background:#fff}@media(max-width:340px){main{padding-left:10px;padding-right:10px}.summary-card{grid-template-columns:42px 1fr}.summary-card>button{grid-column:1/-1}.word-head{display:block}.word-actions{margin-top:8px}.stat-grid{grid-template-columns:1fr}.source-line{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* P3-C：账号、同步徽标与扫码弹层 */
.sync-state[data-status="synced"]{color:#087c61;background:#e6f8f2}
.sync-state[data-status="pending"],.sync-state[data-status="syncing"]{color:#b66c00;background:#fff3dd}
.sync-state[data-status="failed"]{color:#ba1a1a;background:#ffe9e6}
.sync-state[data-status="offline"],.sync-state[data-status="local"]{color:#667085;background:#eceff4}
.card[hidden],.action-grid button[hidden],.export-types button[hidden]{display:none}
.modal-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:20px;background:rgba(11,28,48,.45)}
.modal-backdrop[hidden]{display:none}
.modal-card{width:min(100%,340px);padding:18px;border-radius:18px;background:#fff;box-shadow:0 18px 40px rgba(11,28,48,.22);text-align:center}
.modal-head{display:flex;align-items:center;justify-content:space-between;font-size:14px}
.modal-head button{border:0;color:var(--blue);background:none;font-size:11px}
.qr-image{margin:14px auto;padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff}
.qr-image svg{display:block;width:100%;height:auto}
.qr-hint{margin:0 0 8px;color:#667085;font-size:11px;line-height:1.6}
.qr-link{display:block;padding:8px;border-radius:8px;color:var(--blue);background:#f1f5ff;font-size:11px;word-break:break-all}
.modal-card .primary-wide{width:100%;height:46px;margin-top:12px;border:0;border-radius:12px;color:#fff;background:var(--blue);font-weight:700}

/* 条款弹窗。壳子复用上面那套（`.modal-card`），两处不同：
   一是宽度——340px 那个尺寸是给二维码的，条款一行要放下一整句；
   二是文字左对齐、正文自己滚（标题栏固定），读长文档时标题与「关闭」不会跟着滚走。 */
.modal-card.legal-card{display:flex;width:min(100%,560px);max-height:86vh;flex-direction:column;text-align:left}
.legal-body{flex:1;min-height:0;margin-top:12px;overflow-y:auto;color:#42526b;font-size:12px;line-height:1.75;overflow-wrap:anywhere}
.legal-body h1{margin:0;color:#0b1c30;font-size:16px}
/* 「最后更新」那一行与正文是两段，之间那条分隔线归它（独立页上也有同一条）。 */
.legal-body .updated{margin:4px 0 0;padding-bottom:10px;border-bottom:1px solid var(--line);color:#667085;font-size:10px}
.legal-body h2{margin:16px 0 6px;color:#0b1c30;font-size:13px}
.legal-body h3,.legal-body h4{margin:12px 0 4px;color:#0b1c30;font-size:12px}
.legal-body p{margin:0 0 8px}
.legal-body ul,.legal-body ol{margin:6px 0;padding-left:18px}
.legal-body li{margin:3px 0}
.legal-body a{color:var(--blue)}
.legal-body blockquote{margin:8px 0;padding:2px 10px;border-left:3px solid var(--line);color:#667085}
.legal-body code{padding:1px 4px;border-radius:5px;background:#f1f5ff;font-size:11px}
.legal-body pre{margin:8px 0;padding:9px;overflow-x:auto;border-radius:9px;background:#f1f5ff;font-size:11px}
.legal-body table{width:100%;border-collapse:collapse;font-size:11px}
.legal-body th,.legal-body td{padding:4px 6px;border:1px solid var(--line);text-align:left}
.legal-fallback{margin:10px 0 0;color:#667085;font-size:10px;text-align:center}
.legal-fallback a{color:var(--blue)}
