:root{font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#2d303b;background:#f7f8fa;color-scheme:light;font-synthesis:none;font-size:14px;--purple:#7160d8;--muted:#8c909e;--line:#e9eaf0;--green:#349579}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{border:0}a{color:inherit;text-decoration:none}button:disabled{cursor:default;opacity:.42}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #b6a8f4;outline-offset:4px}.icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle}.sidebar{width:228px;background:#fff;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:35px 21px 24px;z-index:5}.brand{display:flex;gap:12px;align-items:center;padding-left:11px;font-size:25px;font-weight:750;letter-spacing:3px}.brand-icon{display:block;flex-shrink:0;width:44px;height:44px;border-radius:13px;box-shadow:0 5px 10px #7160d823}.brand small{display:block;font-size:8px;letter-spacing:1.65px;margin-top:5px;color:#9893a8;font-weight:500}.nav-caption{font-size:10px;letter-spacing:1.4px;color:#a0a3af;margin:54px 15px 18px}.nav-item{width:100%;display:flex;align-items:center;gap:12px;background:none;text-align:left;padding:15px 14px;border-radius:9px;color:#777d8c;font-size:13px;margin-bottom:8px;white-space:nowrap}.nav-item.selected{background:#f0edfc;color:#7160d8;font-weight:600}.nav-item small{font-size:9px;color:#9b9eaa;margin-left:auto;border:1px solid #e8e9ef;padding:2px 4px;border-radius:4px}.nav-item:disabled{opacity:.72}.nav-dot{width:5px;height:5px;border-radius:100%;background:var(--purple);margin-left:auto}.sidebar-bottom{margin-top:auto;padding-top:40px}.small-note{padding:20px 17px;background:linear-gradient(145deg,#f6f4fd,#f9fafc);border:1px solid #eeedf6;border-radius:12px}.note-spark{color:#a89bcf}.small-note p{font-size:12px;line-height:1.95;color:#75738a;letter-spacing:.5px;margin:10px 0}.small-note small{font-size:9px;color:#aaa5b8}.backup-link{background:none;display:flex;gap:10px;align-items:center;color:#747a88;font-size:12px;margin:25px 13px 21px}.backup-link:hover{color:var(--purple)}.local-caption{display:flex;align-items:center;gap:7px;font-size:10px;color:#a0a5af;padding-left:16px}.green-dot{width:6px;height:6px;background:#60ad92;border-radius:100%;display:inline-block;flex-shrink:0}.workspace{margin-left:228px}.topbar{height:75px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 43px;font-size:12px;background:#ffffffd9;position:sticky;top:0;z-index:3;color:#9297a3}.topbar::before{content:'';position:absolute;inset:0;backdrop-filter:blur(10px);pointer-events:none;z-index:-1}.topbar strong{font-weight:500;color:#525765}.slash{margin:0 14px;color:#c4c7d0}.save-status{display:flex;align-items:center;gap:6px;font-size:11px;color:#9297a0}.save-status .icon{width:14px;height:14px;color:#65a18c}main{max-width:1450px;margin:0 auto;padding:36px 43px 0}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:650;color:#9590a8}h1{font-size:26px;font-weight:650;letter-spacing:.5px;margin:12px 0 10px}.page-heading p{font-size:12px;color:#9094a1;margin:0}.edition{border:1px solid #e3e4eb;background:#fff;padding:7px 11px;border-radius:6px;font-size:10px;color:#8d8f9d}.course-banner{position:relative;overflow:hidden;border:1px solid #e5e0f5;background:linear-gradient(110deg,#ede9fb 0%,#f4f0fd 60%,#eae6f9 100%);border-radius:14px;padding:28px 30px;min-height:202px;display:flex;align-items:center;justify-content:space-between}.course-tag{font-size:9px;letter-spacing:.8px;color:#7c6bab;border:1px solid #d9d0ed;border-radius:5px;padding:5px 8px;background:#ffffff40}.course-copy h2{font-size:23px;letter-spacing:.5px;font-weight:650;margin:20px 0 10px;color:#43395f}.course-copy h2 span{font-size:14px;color:#8a77b7;font-weight:450;margin-left:9px;letter-spacing:1px}.course-copy p{font-size:12px;color:#978aab;margin:0}.course-meta{display:flex;align-items:center;gap:15px;font-size:10px;color:#8b7b9f;margin-top:22px}.course-meta span{display:flex;align-items:center;gap:7px}.course-meta .icon{width:14px;height:14px}.course-meta i{width:2px;height:2px;background:#b8acca;border-radius:50%}.book-art{width:250px;height:166px;position:relative;flex-shrink:0}.art-book{position:absolute;left:82px;top:0;width:108px;height:148px;background:#8270c9;border-radius:3px 8px 8px 3px;transform:rotate(12deg);box-shadow:inset 6px 0 0 #6858ad,4px 3px 0 #fff,8px 6px 0 #d1c8e9,18px 20px 25px #9582b62e;border:1px solid #7162b7;padding:18px 15px;color:#faf7ff;z-index:2}.art-book span{font-size:17px;font-family:Georgia,serif;line-height:1.4;letter-spacing:1px}.art-book small{font-size:6px;display:block;letter-spacing:1.4px;margin-top:19px;opacity:.75}.art-star{position:absolute;left:38px;top:19px;font-size:30px;color:#ac96d6}.art-pill{position:absolute;bottom:0;left:28px;z-index:3;background:#fffefb;padding:10px 13px;font-size:9px;border-radius:6px;color:#9b88b1;transform:rotate(-7deg);box-shadow:0 5px 15px #9b8ab518}.art-pill .icon{width:12px;height:12px;margin-left:5px}.art-orbit{position:absolute;inset:15px -15px 0 0;border:1px solid #d4c9e9;border-radius:50%;transform:rotate(-20deg)}.stats{display:grid;grid-template-columns:1fr 1fr 1.35fr;background:white;border:1px solid var(--line);border-radius:12px;margin:20px 0 32px;padding:22px 0}.stat{display:flex;gap:15px;align-items:center;padding:0 26px;border-right:1px solid #eeeef3}.stat-icon{width:41px;height:43px;display:grid;place-items:center;border-radius:11px}.purple{color:#8c7ac4;background:#f3f0fb}.mint{color:#69a78b;background:#edf7f1}.stat-label{font-size:10px;color:#9498a6}.stat-value{margin-top:6px;display:flex;align-items:baseline;gap:8px}.stat-value strong{font-size:26px;line-height:1;font-weight:600;letter-spacing:-1px}.stat-value small{color:#adb1bc;font-size:10px}.progress-stat{border:0;display:block}.progress-label{display:flex;justify-content:space-between;color:#9599a6;font-size:10px;margin-bottom:10px}.progress-label strong{color:#8a77c8;font-size:11px}progress{appearance:none;display:block;border:0;width:100%;height:5px;border-radius:6px;overflow:hidden;background:#f0eef7}progress::-webkit-progress-bar{background:#f0eef7}progress::-webkit-progress-value{background:#a18cd9;border-radius:6px}progress::-moz-progress-bar{background:#a18cd9}.progress-stat>small{display:block;font-size:9px;color:#b1b4bd;margin-top:10px}.chapter-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.chapter-title{display:flex;align-items:center;gap:13px}.chapter-title h2{font-size:18px;letter-spacing:.5px;margin:0;font-weight:650}.chapter-title>span{color:#a6aab5;font-size:10px;padding-left:13px;border-left:1px solid #dddfe7}.chapter-actions{display:flex;gap:10px}.primary,.secondary{min-height:36px;padding:9px 13px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:11px;font-weight:500;transition:background .15s}.primary{background:var(--purple);color:white;box-shadow:0 3px 5px #7160d819}.primary:hover{background:#6252c5}.secondary{background:white;border:1px solid #e2e4ec;color:#787e8e}.secondary:hover:not(:disabled){border-color:#bcb0e5;background:#f7f5fd}.primary .icon,.secondary .icon{width:14px;height:14px}.instructions{display:flex;align-items:center;gap:7px;color:#9b9fac;font-size:10px;margin-bottom:16px}.instructions>.icon{width:14px;height:14px;color:#a6a1b5}kbd{font-family:inherit;font-size:9px;border:1px solid #e2e3e9;border-radius:3px;padding:1px 3px;background:#fff}.legend{margin-left:auto;display:flex;align-items:center;gap:6px}.word-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;outline:none}.word-card{min-width:0;border:1px solid #e7e9f0;background:#fff;border-radius:10px;overflow:hidden;transition:border-color .18s,box-shadow .18s,transform .18s}.word-card:hover{border-color:#c6b9e8;box-shadow:0 5px 16px #34314507;transform:translateY(-2px)}.word-card.active{border-color:#a58bdc;box-shadow:0 0 0 2px #ddd2f542;transform:none}.card-face{background:transparent;color:inherit;display:flex;flex-direction:column;text-align:left;width:100%;height:100%;padding:18px 20px 0;min-height:200px}.card-face:focus-visible{outline-offset:-4px;border-radius:10px}.card-top{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:18px;gap:6px}.word-number{font-size:12px;font-family:ui-monospace,monospace;color:#b3b7c4;letter-spacing:.5px}.chapter-number{margin-left:5px;letter-spacing:0;color:#cfd2dc}.word-status{font-size:11px;color:#b6bac5;display:flex;align-items:center;gap:4px}.word-status.done{color:#69a58d}.word-status .icon{width:13px;height:13px}.word-name{font-size:29px;letter-spacing:-.5px;font-weight:600;line-height:1.28;overflow-wrap:anywhere;display:block}.phonetic{display:block;min-height:21px;font-family:"Segoe UI",sans-serif;font-size:15px;letter-spacing:.3px;color:#a5a8b4;margin-top:9px}.translation{display:block;color:#7d8493;font-size:15px;line-height:1.8;margin:12px 0 16px;overflow-wrap:anywhere}.card-bottom{margin-top:auto;border-top:1px solid #f1f2f5;display:flex;align-items:center;justify-content:space-between;width:100%;padding:13px 0;color:#b7bbc5;font-size:12px;gap:6px}.card-bottom>span{font-size:17px;color:#beb9cf}.card-bottom.correct-message{color:#429675;justify-content:flex-start;font-size:12px}.card-bottom .icon{width:15px;height:15px}.active-card{padding:18px 20px 14px;min-height:200px;display:flex;flex-direction:column;height:100%}.active-card .card-top{margin-bottom:11px}.writing-label{font-size:12px;color:#9980c4}.blurred{filter:blur(6px);user-select:none;opacity:.65;cursor:pointer}.active-card .translation{font-size:16px;margin:10px 0 13px;cursor:pointer}.spelling-form{margin-top:auto}.input-row{position:relative;display:flex}.input-row input{width:100%;min-width:0;font-size:16px;color:#58516e;border:1px solid #c5b5e2;border-radius:7px;background:#fdfbff;height:44px;padding:9px 42px 9px 11px;outline-offset:1px}.input-row input::placeholder{font-size:14px;color:#b2a8c3}.check-button{position:absolute;right:4px;top:4px;bottom:4px;background:#f0eafa;color:#8d70bc;border-radius:6px;width:36px;display:grid;place-items:center}.check-button .icon{width:18px;height:18px}.spell-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:11px;margin-top:11px;color:#a3a0af}.spell-tip{color:#b6b3c1}.input-row input.invalid{border-color:#d38f8f;background:#fff9f9}.incorrect{color:#be6464}.pagination{display:flex;align-items:center;justify-content:space-between;margin-top:22px;padding-bottom:28px;border-bottom:1px solid var(--line);color:#a2a7b2;font-size:10px}.pagination>div{display:flex;align-items:center;gap:17px}.pagination .secondary{font-size:10px;min-height:33px}.reverse{transform:rotate(180deg)}.pagination>div>span{font-size:11px;color:#9894a6}.chapter-finish{background:#eef7f1;border:1px solid #d4eadd;border-radius:8px;color:#448e6d;padding:15px;margin-top:20px;font-size:12px}.chapter-finish .icon{margin-right:7px;width:16px;height:16px}footer{display:flex;justify-content:space-between;font-size:9px;color:#b0b4bd;padding:22px 0 28px}footer a{color:#9992ae;margin-left:5px}.warning{padding:13px 16px;background:#fff6df;color:#8d743f;font-size:12px;border:1px solid #eddfbb;border-radius:7px;margin-bottom:20px}dialog{width:min(760px,calc(100% - 32px));max-height:85vh;padding:28px;border:1px solid #e2deec;border-radius:16px;color:#393345;box-shadow:0 25px 100px #2f264433}dialog::backdrop{background:#27203355;backdrop-filter:blur(4px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-heading h2{font-size:22px;font-weight:600;margin:10px 0}.icon-button{padding:8px;border-radius:7px;background:#f5f3f9;color:#8f869f;display:flex}.dialog-subtitle{font-size:12px;color:#96909f;line-height:1.9;margin-bottom:22px}.chapter-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;max-height:55vh;overflow-y:auto;padding:4px}.chapter-choice{display:flex;flex-direction:column;gap:9px;border:1px solid #e7e3ef;background:#fff;color:#8b8297;border-radius:8px;padding:14px 8px}.chapter-choice strong{font-size:11px;font-weight:550}.chapter-choice span{font-size:10px;color:#b1aab9}.chapter-choice.current{border-color:var(--purple);background:#f2eefc;color:var(--purple)}.chapter-choice.finished{background:#eff8f2;border-color:#d4eadd}.backup-options{display:grid;grid-template-columns:1fr 1fr;gap:15px}.backup-options>div{padding:20px;background:#faf9fc;border:1px solid #ece8f2;border-radius:10px}.backup-options h3{font-size:14px;font-weight:600;margin:0 0 12px}.backup-options p{font-size:11px;color:#9a91a4;line-height:1.8;min-height:38px}#backup-message{font-size:12px;color:#8b72ad;line-height:1.8}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-100px;left:245px;z-index:100;padding:15px;background:white;color:var(--purple)}.skip-link:focus{top:8px}.loading,.error-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;color:#8a80a5}.error-page p{font-size:13px}.error-page h1{font-size:24px} [hidden]{display:none!important}
@media(min-width:1500px){main{padding-top:44px}.word-grid{gap:18px}.card-face,.active-card{min-height:210px;padding-left:23px;padding-right:23px}.course-banner{min-height:218px}.course-copy h2{font-size:26px}.book-art{margin-right:40px}}
@media(max-width:1200px){.sidebar{width:200px;padding-left:15px;padding-right:15px}.workspace{margin-left:200px}.topbar{padding:0 28px}main{padding-left:28px;padding-right:28px}.word-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.nav-item{gap:8px}.nav-item small{font-size:8px}.stat{padding:0 18px;gap:10px}.stat-icon{width:34px;height:38px}.course-banner{padding:25px}.book-art{width:190px}.art-book{left:55px}.art-pill{left:0}.art-star{left:20px}.course-copy h2{font-size:22px}.edition{display:none}}
@media(max-width:900px){.sidebar{width:175px;padding-left:10px;padding-right:10px}.workspace{margin-left:175px}.brand{font-size:22px;gap:9px;letter-spacing:2px}.brand small{font-size:6px}.brand-icon{width:38px;height:38px}.nav-item{font-size:11px;padding:14px 11px;gap:9px}.nav-item small{display:none}.small-note{padding:15px 11px}.small-note p{font-size:11px}.small-note small{font-size:8px}main{padding:26px 22px 0}.topbar{padding:0 22px}.save-status{font-size:9px}h1{font-size:23px}.course-copy h2{font-size:20px}.course-copy h2 span{font-size:11px;margin-left:3px}.book-art{width:145px;transform:scale(.8);transform-origin:right center;margin-left:-20px}.stats{grid-template-columns:1fr 1fr 1.15fr}.stat{padding:0 14px;gap:8px}.stat-icon{display:none}.stat-value strong{font-size:23px}.stat-value small{font-size:9px}.chapter-title{gap:9px}.chapter-title>span{padding-left:9px;font-size:9px}.chapter-actions{gap:6px}.chapter-actions button{font-size:10px;padding:8px 10px}.word-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.desktop-tip{display:none}}
@media(max-width:620px){.sidebar{position:static;width:100%;padding:18px 20px 0;border-right:0;border-bottom:1px solid var(--line);display:block}.brand{font-size:23px;padding:0}.brand small{font-size:7px}.brand-icon{height:36px;width:36px;border-radius:10px}.nav-caption,.sidebar-bottom,.nav-dot{display:none}.sidebar nav{display:flex;margin-top:17px;gap:8px}.nav-item{justify-content:center;font-size:12px;padding:12px 10px;border-radius:7px 7px 0 0;margin:0;gap:7px}.nav-item .icon{width:16px;height:16px}.nav-item:disabled{font-size:11px}.workspace{margin:0}.topbar{height:48px;padding:0 20px;font-size:10px}.save-status{font-size:9px}.slash{margin:0 8px}.topbar .icon{width:12px;height:12px}main{padding:26px 18px 0}.page-heading{margin-bottom:23px}h1{font-size:23px;line-height:1.4;margin-top:10px}.eyebrow{font-size:8px}.page-heading p{font-size:11px}.course-banner{min-height:190px;padding:22px 19px}.course-tag{font-size:8px}.course-copy h2{font-size:19px;line-height:1.4;margin-top:15px;max-width:240px}.course-copy h2 span{display:block;font-size:10px;margin:3px 0}.course-copy p{font-size:10px;max-width:165px;line-height:1.7}.course-meta{gap:8px;font-size:8px;margin-top:15px}.course-meta .icon{display:none}.book-art{position:absolute;right:7px;top:33px;width:120px;transform:scale(.6);transform-origin:right center}.art-book{left:0}.art-orbit{left:-30px}.art-pill{left:-55px;bottom:0}.art-star{left:-27px;top:8px}.stats{padding:18px 0;margin:15px 0 25px;grid-template-columns:1fr 1fr}.stat{padding:0 19px}.stat:nth-child(2){border:0}.progress-stat{grid-column:1/-1;padding-top:17px;margin:17px 19px 0;padding-left:0;padding-right:0;border-top:1px solid #f0eef5}.progress-stat>small{display:none}.progress-label{margin-bottom:8px}.chapter-toolbar{flex-wrap:wrap;gap:16px;margin-bottom:14px}.chapter-title h2{font-size:18px}.chapter-title>span{font-size:10px}.chapter-actions{width:100%;justify-content:space-between}.chapter-actions button{font-size:11px;padding:9px 13px}.chapter-actions .primary{min-width:154px}.instructions{font-size:9px;gap:5px;margin-bottom:13px}.legend{font-size:8px}.word-grid{grid-template-columns:1fr;gap:12px}.card-face,.active-card{padding:16px 16px 0;min-height:190px}.active-card{padding-bottom:14px}.card-top{margin-bottom:14px}.word-name{font-size:27px}.phonetic{font-size:14px;margin-top:9px}.translation{font-size:14px;line-height:1.8;margin:12px 0 15px}.card-bottom{font-size:12px;padding:13px 0}.card-bottom.correct-message{font-size:12px;gap:3px}.word-status{font-size:11px}.word-number{font-size:12px}.spell-bottom{font-size:11px;flex-wrap:wrap}.spell-tip{width:100%;text-align:left}.active-card .translation{font-size:15px}.pagination{align-items:flex-start;gap:15px;flex-direction:column;margin-top:20px;padding-bottom:22px}.pagination>div{width:100%;justify-content:space-between}.pagination .secondary{font-size:11px;padding:10px 15px}footer{font-size:8px;gap:10px;padding-top:20px}.chapter-picker{grid-template-columns:repeat(3,1fr);gap:8px}dialog{padding:20px;max-height:88vh}.dialog-heading h2{font-size:20px}.dialog-subtitle{font-size:11px}.backup-options{grid-template-columns:1fr}.backup-options p{min-height:0}.backup-options>div{padding:17px}.skip-link{left:20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.save-status{background:transparent;padding:5px 0}.save-status:hover{color:var(--purple)}
.sentence-section{margin-top:36px}.sentence-page-size{font-size:11px;color:#9590a8}.sentence-list{display:grid;gap:16px}.sentence-card{display:flex;align-items:flex-start;gap:22px;padding:28px;background:#fff;border:1px solid var(--line);border-radius:12px}.sentence-number{font-family:ui-monospace,monospace;font-size:12px;color:#a69cbe;padding-top:10px}.sentence-copy{min-width:0;flex:1}.sentence-english{margin:0;font-size:22px;line-height:1.8;color:#43395f;overflow-wrap:anywhere}.sentence-chinese{margin:15px 0 0;font-size:15px;line-height:1.9;color:#858092;overflow-wrap:anywhere}.sentence-pronounce{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:40px;height:40px;margin-left:5px;border-radius:10px;color:#8a76b7;background:#f5f2fc}.sentence-pronounce:hover,.sentence-pronounce.playing{background:#e9e2fb;color:var(--purple)}.sentence-pronounce.playing{box-shadow:inset 0 0 0 1px #b8a5e4}#sentence-load-message{font-size:13px;line-height:1.8;color:#858092}#sentence-retry{margin-bottom:20px}
@media(max-width:620px){.sentence-section{margin-top:28px}.sentence-card{padding:20px 16px;gap:12px}.sentence-number{font-size:11px;padding-top:8px}.sentence-english{font-size:19px}.sentence-chinese{font-size:14px;margin-top:13px}.sentence-pronounce{width:44px;height:44px}.sentence-section .pagination>div{padding-bottom:0}#sentences-view footer{padding-bottom:28px}}
.word-card{display:flex;flex-direction:row}.card-body{flex:1;min-width:0;display:flex;flex-direction:column}.card-header{margin:0;padding:0 12px 0 20px;min-height:62px}.card-tools{display:flex;align-items:center;gap:10px}.pronounce{position:relative;width:56px;flex-shrink:0;align-self:stretch;background:#fcfbfe;color:#9584bd;transition:background .18s}.pronounce::before{content:"";position:absolute;left:50%;top:50%;width:42px;height:42px;margin:-21px 0 0 -21px;border-radius:12px;background:#f5f2fc;transition:background .18s}.pronounce .icon{position:absolute;left:50%;top:50%;width:22px;height:22px;margin:-11px 0 0 -11px}.pronounce:hover,.pronounce.playing{background:#f7f3fe;color:#7160d8}.pronounce:hover::before,.pronounce.playing::before{background:#e9e2fb}.pronounce.playing::before{box-shadow:inset 0 0 0 1px #b8a5e4}.pronounce:focus-visible{outline:none}.pronounce:focus-visible::before{outline:3px solid #b6a8f4;outline-offset:3px}.card-face,.active-card{padding-top:0;min-height:155px;height:auto;flex:1}.card-header .writing-label{font-size:11px}
@media(min-width:1500px){.card-header{padding-left:24px;padding-right:0}.card-face,.active-card{min-height:165px}.word-name{font-size:31px}.translation{font-size:16px}}
@media(max-width:620px){.card-header{padding:0 14px 0 16px;min-height:68px}.card-tools{gap:8px}.pronounce{width:66px}.pronounce::before{top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:13px}.pronounce .icon{top:50%;width:24px;height:24px;margin:-12px 0 0 -12px}.card-face,.active-card{min-height:170px}}
/* 自动滚动和锚点跳转为固定顶栏留出高度与 8px 间距。 */
html{scroll-padding-top:83px}
@media(max-width:620px){html{scroll-padding-top:56px}}
/* 章节进度入口：桌面端常显在顶栏右侧（与保存状态并排），不遮挡任何滚动内容；
   手机端顶栏放不下，改为右下角悬浮胶囊。 */
.float-progress{display:flex;align-items:center;gap:10px;padding:7px 14px 7px 8px;border:1px solid #e2deec;border-radius:999px;background:#fff;color:#4a4458;transition:box-shadow .18s,border-color .18s}
.float-progress:hover{border-color:#d3cbe8;box-shadow:0 8px 22px #2f26441f}
.float-ring{width:30px;height:30px;flex-shrink:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(140deg,#6d5bd0,#9b86ee);color:#fff}
.float-ring .icon{width:15px;height:15px}
.float-progress.is-done .float-ring{background:linear-gradient(140deg,#2f8f72,#4cb694)}
.float-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1.35;text-align:left}
.float-copy strong{font-size:11px;font-weight:650;color:#393345;white-space:nowrap}
.float-copy small{font-size:9px;color:#96909f;white-space:nowrap;font-variant-numeric:tabular-nums}
.topbar-tools{display:flex;align-items:center;gap:14px}
@media(prefers-reduced-motion:reduce){.float-progress{transition:none}}
@media(max-width:620px){.topbar-tools{display:contents}.float-progress{position:fixed;right:14px;bottom:14px;z-index:4;padding:8px 13px 8px 9px;gap:9px;border-radius:999px;box-shadow:0 10px 30px #2f264424}.float-ring{width:30px;height:30px}.float-ring .icon{width:15px;height:15px}.float-copy strong{font-size:11px}.float-copy small{font-size:9px}.pagination>div{padding-bottom:52px}footer{padding-bottom:70px}}
.celebrate{text-align:center;padding:8px 4px 2px}.celebrate-badge{width:58px;height:58px;margin:0 auto 16px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(140deg,#6d5bd0,#9b86ee);color:#fff;box-shadow:0 12px 28px #6d5bd038}.celebrate-badge .icon{width:28px;height:28px}.celebrate h2{font-size:21px;font-weight:650;margin:12px 0 10px;color:#393345}.celebrate p{font-size:12px;color:#96909f;line-height:1.9;margin:0 0 24px}.celebrate-actions{display:flex;flex-wrap:wrap;gap:9px;justify-content:center}#chapter-done-close{border:0;background:transparent;color:#96909f;min-height:36px;padding:9px 13px;border-radius:7px;font-size:11px}#chapter-done-close:hover{background:#f5f3f9;color:#6f6880}
@media(max-width:620px){.celebrate-badge{width:52px;height:52px;margin-bottom:13px}.celebrate h2{font-size:18px}.celebrate-actions{flex-direction:column}.celebrate-actions button{width:100%}}

.icon-definitions{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.icon{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#word-load-message{color:var(--muted);font-size:13px;line-height:1.8;margin:24px 0}
#word-error{margin-top:24px}

/* 主题入口保持在全站顶栏；不重绘学习内容，切换时保留输入和进度。 */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex-shrink:0;min-width:36px;min-height:36px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#777084;font-size:11px;white-space:nowrap}
.theme-toggle:hover{background:#f5f2fc;color:var(--purple)}
.theme-toggle .icon{width:17px;height:17px}
.theme-sun{display:none}
[data-theme="dark"] .theme-moon{display:none}
[data-theme="dark"] .theme-sun{display:inline-block}
@media(max-width:900px){.theme-toggle{padding:8px}.theme-toggle span{display:none}.topbar-tools{gap:10px}}
@media(max-width:620px){.theme-toggle{min-width:40px;min-height:40px}.topbar-tools{display:flex;gap:8px}.topbar{gap:8px}.topbar>div:first-child{white-space:nowrap}}

/* 深色调色板：主内容、辅助信息和交互状态分别配色，避免整页反色。 */
:root[data-theme="dark"]{color-scheme:dark;color:#edeaf5;background:#16151d;--purple:#b9a7ff;--muted:#b6b0c5;--line:#3c364a;--green:#84d3b0;--dark-surface:#211f2b;--dark-raised:#2b2737;--dark-accent:#342d49;--dark-text:#edeaf5}
[data-theme="dark"] :is(.sidebar,.stats,.word-card,.sentence-card,.edition,.secondary,.float-progress,.chapter-choice,.theme-toggle,dialog,.skip-link){background:var(--dark-surface);border-color:var(--line);color:var(--dark-text)}
[data-theme="dark"] .topbar{background:#211f2bed;color:var(--muted)}
[data-theme="dark"] :is(.topbar strong,.float-copy strong,.celebrate h2,.sentence-english,.course-copy h2){color:var(--dark-text)}
[data-theme="dark"] :is(.brand small,.nav-caption,.nav-item,.nav-item small,.small-note p,.small-note small,.backup-link,.local-caption,.save-status,.eyebrow,.page-heading p,.edition,.course-copy p,.course-meta,.stat-label,.stat-value small,.progress-label,.progress-stat>small,.chapter-title>span,.instructions,.instructions>.icon,.word-number,.chapter-number,.word-status,.phonetic,.translation,.card-bottom,.card-bottom>span,.spell-bottom,.spell-tip,.pagination,.pagination>div>span,footer,footer a,.dialog-subtitle,.chapter-choice span,.backup-options p,.float-copy small,.celebrate p,.sentence-page-size,.sentence-number,.sentence-chinese,#sentence-load-message,#chapter-done-close){color:var(--muted)}
[data-theme="dark"] :is(.nav-item small,.stat,.chapter-title>span,.card-bottom){border-color:var(--line)}
[data-theme="dark"] :is(.nav-item.selected,.chapter-choice.current,.purple,.check-button,.sentence-pronounce,.icon-button,.theme-toggle[aria-pressed="true"]){background:var(--dark-accent);color:var(--purple)}
[data-theme="dark"] .chapter-choice.current{border-color:var(--purple)}
[data-theme="dark"] :is(.note-spark,.course-copy h2 span,.progress-label strong,.writing-label,#backup-message,.loading,.error-page){color:var(--purple)}
[data-theme="dark"] .small-note{background:linear-gradient(145deg,#2c263f,#211f2b);border-color:var(--line)}
[data-theme="dark"] .course-banner{background:linear-gradient(110deg,#302840,#252133 60%,#302844);border-color:#49405e}
[data-theme="dark"] .course-tag{background:#211c30;color:#c5b4eb;border-color:#534664}
[data-theme="dark"] .course-meta i{background:#7b6b93}
[data-theme="dark"] .art-pill{background:var(--dark-raised);color:#d1c4e9}
[data-theme="dark"] .art-orbit{border-color:#554666}
[data-theme="dark"] :is(.mint,.chapter-finish,.chapter-choice.finished){background:#20372f;color:var(--green);border-color:#39664f}
[data-theme="dark"] .chapter-choice.finished.current{border-color:var(--purple)}
[data-theme="dark"] :is(.word-status.done,.card-bottom.correct-message,.save-status .icon){color:var(--green)}
[data-theme="dark"] .green-dot{background:var(--green)}
[data-theme="dark"] progress{background:var(--dark-raised)}
[data-theme="dark"] progress::-webkit-progress-bar{background:var(--dark-raised)}
[data-theme="dark"] progress::-webkit-progress-value{background:var(--purple)}
[data-theme="dark"] progress::-moz-progress-bar{background:var(--purple)}
[data-theme="dark"] .primary{background:#7560d0;color:#fff}
[data-theme="dark"] .primary:hover{background:#6854bd}
[data-theme="dark"] :is(.secondary:hover:not(:disabled),.theme-toggle:hover,.icon-button:hover,#chapter-done-close:hover){background:var(--dark-accent);color:var(--dark-text);border-color:#817098}
[data-theme="dark"] :is(.backup-link:hover,.save-status:hover,footer a:hover){color:var(--purple)}
[data-theme="dark"] :is(.word-card:hover,.float-progress:hover){border-color:#817098;box-shadow:0 5px 20px #0003}
[data-theme="dark"] .word-card.active{border-color:var(--purple);box-shadow:0 0 0 2px #b9a7ff26}
[data-theme="dark"] :is(kbd,.backup-options>div){background:var(--dark-raised);border-color:var(--line)}
[data-theme="dark"] .input-row input{background:#191620;color:var(--dark-text);border-color:#8f7dac;caret-color:var(--purple)}
[data-theme="dark"] .input-row input::placeholder{color:var(--muted)}
[data-theme="dark"] .input-row input.invalid{background:#372329;border-color:#e29b9f}
[data-theme="dark"] .incorrect{color:#ffb2b6}
[data-theme="dark"] .pronounce{background:#25212f;color:var(--purple)}
[data-theme="dark"] .pronounce::before{background:var(--dark-accent)}
[data-theme="dark"] :is(.pronounce:hover,.pronounce.playing){background:#30293f;color:#d3c6ff}
[data-theme="dark"] :is(.pronounce:hover,.pronounce.playing)::before,[data-theme="dark"] :is(.sentence-pronounce:hover,.sentence-pronounce.playing){background:#45365f;color:#d3c6ff}
[data-theme="dark"] .warning{background:#382e20;color:#f1d299;border-color:#6c5837}
[data-theme="dark"] dialog{box-shadow:0 25px 100px #0008}
[data-theme="dark"] dialog::backdrop{background:#08060eb3}
[data-theme="dark"] .slash{color:#847b95}
[data-theme="dark"] :is(.sidebar-toggle:hover,html[data-sidebar="collapsed"] .sidebar-toggle){background:var(--dark-accent);border-color:#4a4359;color:var(--purple)}
[data-theme="dark"] ::selection{background:#685597;color:#fff}

/* 顶栏折叠按钮：位于“学习空间”左侧，收起左侧导航让学习区占满窗口；
   手机端导航改为顶部横排，不提供折叠，因此按钮只在 621px 以上出现。 */
.topbar-title{display:flex;align-items:center;gap:10px;min-width:0}
.sidebar-toggle{display:none}
@media(min-width:621px){
  .sidebar-toggle{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin-left:-6px;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:#8f94a3}
  .sidebar-toggle:hover{border-color:#e4dff3;background:#f2eefc;color:var(--purple)}
  .sidebar-toggle .icon{width:18px;height:18px;transition:transform .22s ease}
  html[data-sidebar-anim="on"] .sidebar{transition:transform .22s ease}
  html[data-sidebar-anim="on"] .workspace{transition:margin-left .22s ease}
  html[data-sidebar="collapsed"] .sidebar{transform:translateX(-100%)}
  html[data-sidebar="collapsed"] .workspace{margin-left:0}
  html[data-sidebar="collapsed"] .sidebar-toggle{background:#f2eefc;border-color:#e4dff3;color:var(--purple)}
  html[data-sidebar="collapsed"] .sidebar-toggle .icon{transform:scaleX(-1)}
  html[data-sidebar="collapsed"] .skip-link{left:16px}
}
