:root{--bg:#e8edf1;--paper:#f7f9fa;--ink:#263744;--muted:#607581;--blue:#386c97;--line:#cbd6de;--reader-size:20px;--serif:"Songti SC","STSong","Noto Serif CJK SC",serif;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation}button{border:0;background:none}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #649bd0;outline-offset:4px}button:hover{color:var(--blue)}h1,h2,h3,p{margin:0}a{color:var(--blue)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.skip{position:fixed;top:-100px;left:16px;padding:12px;background:white;z-index:20}.skip:focus{top:8px}#header{position:sticky;top:0;z-index:5;background:rgba(232,237,241,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}.header-inner{max-width:1120px;margin:auto;min-height:76px;padding:12px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:10px;padding:0;text-align:left;white-space:nowrap}.brand img{border-radius:50%;object-fit:cover}.brand strong{font-family:var(--serif);font-size:19px;letter-spacing:1px}.chapter-label{font-size:12px;color:var(--muted);margin-left:18px}.header-actions{display:flex;gap:12px;align-items:center}nav{display:flex;gap:22px}nav button{min-height:44px;font-size:14px}nav [aria-current]{color:var(--blue)}nav small{border-radius:20px;background:#d5e0e8;padding:2px 6px;font-size:10px}.modes{background:#dce4ea;border-radius:9px;display:flex;padding:3px}.modes button{font-size:13px;padding:9px 13px;border-radius:7px;min-height:44px}.modes [aria-pressed=true]{background:#f9fafb;box-shadow:0 1px 5px #283d5010;color:var(--blue)}.round{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:50%;font-size:16px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}main{min-height:calc(100vh - 160px)}main:focus{outline:none}.home{max-width:1000px;margin:auto;padding:70px 40px 56px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);line-height:1.8}.home>h1{font-family:var(--serif);font-size:44px;font-weight:500;line-height:1.45;letter-spacing:2px;margin:16px 0}.intro{font-size:15px;line-height:1.9;color:var(--muted)}.home-meta{display:flex;gap:25px;font-size:11px;color:var(--muted);margin:22px 0 54px}.home-meta span:before{content:'·';margin-right:8px}.shelf-heading,.section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.shelf-heading h2,.section-title h2{font-family:var(--serif);font-size:22px;font-weight:500}.shelf-heading>span,.section-title>span{font-size:11px;color:var(--muted)}.book-card{display:grid;grid-template-columns:215px 1fr;gap:42px;background:var(--paper);border:1px solid #d6e0e6;padding:30px;border-radius:14px}.book-cover{height:292px;position:relative;overflow:hidden;border-radius:3px;background:linear-gradient(160deg,#b5c4cf,#4a667a 68%,#314c60);color:#f2f5f7;box-shadow:7px 9px 18px #1c354024;padding:23px 22px;isolation:isolate}.cover-title{font-family:var(--serif);font-size:36px;letter-spacing:7px;line-height:1.5;position:relative;z-index:1}.book-cover>span{display:block;font-size:8px;line-height:1.6;letter-spacing:1.6px;margin-top:13px;position:relative;z-index:1}.book-cover>small{position:absolute;bottom:20px;font-size:9px;letter-spacing:2px;z-index:1}.cover-mist{position:absolute;inset:0;background:radial-gradient(ellipse at 90% 55%,#e1e8eb70,transparent 65%)}.cover-pier{position:absolute;bottom:-22px;right:48px;width:35px;height:125px;background:#2b45599c;transform:skew(-24deg) rotate(7deg)}.cover-pier:before,.cover-pier:after{content:'';position:absolute;left:-12px;top:12px;width:4px;height:45px;background:#243f55;box-shadow:57px 17px #243f55}.cover-pier:after{top:69px}.book-info{align-self:center}.book-info h2{font-family:var(--serif);font-size:32px;font-weight:500;letter-spacing:2px;margin:8px 0 15px}.book-info>p{font-family:var(--serif);font-size:16px;line-height:1.9;max-width:425px}.book-stats{font-size:12px;color:var(--muted);margin:18px 0 22px}.primary,.secondary,.file-button{display:inline-flex;align-items:center;justify-content:center;gap:18px;padding:13px 22px;min-height:46px;border-radius:7px;font-size:13px;line-height:1.5}.primary{background:var(--blue);color:#fff}.primary:hover{background:#2b587d;color:#fff}.secondary,.file-button{border:1px solid #b6c9d7;background:#f8fafb;color:var(--blue)}.text-button{color:var(--blue);font-size:12px;padding:10px 0;min-height:40px}.book-info>.text-button{margin-left:18px}.finished-badge{display:block;font-size:11px;color:var(--muted);margin-top:10px}.how{display:grid;grid-template-columns:repeat(3,1fr);gap:30px;margin:42px 0}.how>div{border-top:1px solid var(--line);padding-top:15px}.how span{font-family:Georgia,serif;font-size:12px;color:var(--muted)}.how h3{font-family:var(--serif);font-size:17px;font-weight:500;margin:9px 0}.how p{font-size:12px;color:var(--muted);line-height:1.8}.local-note{font-size:11px;color:var(--muted);line-height:1.9;margin-top:32px}footer{max-width:1080px;margin:auto;display:flex;gap:22px;align-items:center;justify-content:center;padding:28px 24px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}footer button{font-size:11px;min-height:40px}.reader{max-width:740px;margin:auto;padding:53px 35px 54px}.reader-heading{text-align:center;margin-bottom:42px}.reader-heading h1{font-family:var(--serif);font-size:34px;font-weight:500;letter-spacing:4px;margin:16px 0 9px}.english-title{font-family:Georgia,serif;font-size:12px;letter-spacing:1.5px;color:var(--muted)}.reader-meta{display:flex;gap:20px;justify-content:center;font-size:11px;color:var(--muted);margin:23px 0}.mode-note{font-size:11px;line-height:1.9;color:var(--muted);padding:15px 18px;background:#dce5eb88;border-radius:7px;text-align:left}.story{font-family:var(--serif);font-size:var(--reader-size);line-height:2.1;letter-spacing:.5px;overflow-wrap:anywhere}.story>p{margin:0 0 24px;scroll-margin-top:110px}.word{font-family:inherit;font-size:inherit;letter-spacing:inherit;line-height:inherit;color:var(--blue);padding:0 2px;border-bottom:1px dashed #8daabf;display:inline;text-align:left;border-radius:2px}.word:hover{background:#d6e4ee}.word-hint{font-size:.77em;color:#768d9c;border-bottom:none}.review-dot{font-size:7px;margin-left:2px;vertical-align:super;color:#8c729f}.blank{background:#dce6ed;border:1px dashed #a6bccb;border-radius:4px;padding:0 7px;color:#4d6c83;font-size:.92em}.answered{color:#38725c;border-bottom-color:#73a48c}.answer-box{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;letter-spacing:0;background:var(--paper);border:1px solid #b9cddd;border-radius:9px;padding:20px;margin:-8px 0 28px;font-size:14px;line-height:1.7;box-shadow:0 6px 18px #43637909}.answer-box label{display:block;margin-bottom:12px}.answer-box label small{font-size:11px;color:var(--muted);margin-left:12px}form{display:flex;gap:10px;align-items:center}input[type=text],input[type=search]{min-width:0;width:100%;min-height:52px;padding:12px 14px;border:1px solid #b7c9d6;border-radius:6px;background:#fff;color:var(--ink);font-size:18px}form .primary{flex-shrink:0;min-height:52px}.answer-actions{display:flex;gap:24px;margin-top:10px;font-size:12px;color:var(--muted)}.answer-actions button{min-height:40px;padding:0}.feedback{font-size:12px;display:block;margin-top:12px}.bad{color:#94594d}.good{color:#397558}.chapter-preview{border-left:2px solid #abc0cf;padding:8px 20px;margin:45px 0 23px}.chapter-preview p{font-family:var(--serif);font-size:16px;line-height:1.9;margin:8px 0}.chapter-preview small{font-size:11px;color:var(--muted)}.chapter-complete{display:flex;justify-content:space-between;margin:20px 0 42px;font-size:12px;color:var(--muted)}.chapter-complete button{min-height:44px;padding:0}.quiz-section,.review-preview,.chapter-wordlist{border-top:1px solid var(--line);padding-top:32px;margin-top:38px}.muted{color:var(--muted);font-size:12px;line-height:1.9}.quiz-card{background:var(--paper);border:1px solid #d1dde5;border-radius:10px;padding:27px;margin-top:22px}.quiz-progress{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.quiz-progress span{font-size:10px}.quiz-prompt{font-family:var(--serif);font-size:21px;line-height:1.7;margin:24px 0 9px}.quiz-card>p{font-size:13px;line-height:1.8;margin-bottom:12px}.quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0 8px}.quiz-options button{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:6px;text-align:left;padding:13px;font-size:14px;min-height:50px;background:#fff}.quiz-options button:hover{border-color:var(--blue);background:#edf3f7}.quiz-options span{font-size:11px;color:var(--muted)}.score{font-family:Georgia,serif;font-size:48px;color:var(--blue);margin:12px 0}.score small{font-size:20px;color:var(--muted)}.quiz-buttons{display:flex;gap:22px;margin:18px 0 10px}.quiz-card>small{display:block}.missed{color:#94594d}.word-list{list-style:none;margin:0;padding:0}.word-list li{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:20px 0;border-bottom:1px solid #d1dce3}.word-title{font-family:Georgia,serif;font-size:20px;color:var(--blue);padding:3px 0}.word-list p{font-size:11px;color:var(--muted);line-height:1.9}.word-list p span{margin-left:10px}.list-actions{display:flex;align-items:center;gap:16px}.empty{border:1px dashed var(--line);border-radius:8px;text-align:center;padding:45px 20px;font-size:13px;color:var(--muted);line-height:1.9}.empty.small{padding:24px 18px}.chapter-wordlist summary,.records summary{cursor:pointer;font-size:13px;min-height:40px}.chapter-wordlist summary span{color:var(--muted);font-size:11px;margin-left:15px}.delay-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#dbe6ed;border-radius:9px;padding:21px 24px;margin:24px 0}.delay-banner p{font-size:14px;margin:5px 0}.delay-banner small{font-size:11px;color:var(--muted)}.panel-page{max-width:740px;margin:auto;padding:65px 35px}.panel-page>h1{font-family:var(--serif);font-size:32px;font-weight:500;letter-spacing:2px;margin:13px 0 18px}.review-tools{display:flex;gap:15px;align-items:center;margin:32px 0 10px}.search-label{flex:1}.review-tools input{font-size:14px;min-height:46px}.notice{border-left:2px solid #b39d74;background:#eee9df;padding:15px 18px;font-size:12px;line-height:1.9;margin:25px 0}.data-stats{display:flex;gap:45px;margin:38px 0}.data-stats>div{display:flex;flex-direction:column;gap:9px}.data-stats strong{font-size:28px;font-weight:400;color:var(--blue)}.data-stats span{font-size:11px;color:var(--muted)}.data-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}.file-button{cursor:pointer;position:relative}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.file-button:focus-within{outline:3px solid #649bd0;outline-offset:4px}.records{margin-top:28px}.records p{font-size:12px;color:var(--muted);line-height:2.2}dialog{padding:0;border:1px solid #c1d1dc;border-radius:15px;background:var(--paper);color:var(--ink);width:min(550px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-shadow:0 20px 90px #152e4630}dialog::backdrop{background:#20344752;backdrop-filter:blur(3px)}.dialog-content{padding:27px 30px;overflow:auto}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.dialog-heading h2{font-family:var(--serif);font-weight:500;font-size:22px}.word-card .dialog-heading h2{font-family:Georgia,serif;font-size:30px}.card-top{display:flex;gap:15px;align-items:center;color:var(--muted);font-size:13px;margin-top:-14px}.card-top .round{border:0}.card-meaning{font-size:16px;margin:14px 0 20px}.word-card dl{display:grid;grid-template-columns:70px 1fr;gap:15px 16px;margin:0;font-size:13px;line-height:1.8}.word-card dt{color:var(--muted);font-size:11px;padding-top:1px}.word-card dd{margin:0;overflow-wrap:anywhere}.example{font-family:Georgia,serif}.example small{display:block;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;font-size:11px;color:var(--muted);margin-top:5px}.context{font-family:var(--serif);font-size:14px}.mark-button{border:1px solid #b7c9d7;border-radius:7px;color:var(--blue);width:100%;margin-top:26px;min-height:46px;font-size:13px}.mark-button[aria-pressed=true]{background:#dce7ef}.size-options{display:flex;gap:12px;margin:16px 0 25px}.size-options button{border:1px solid var(--line);border-radius:6px;min-height:46px;min-width:60px;padding:10px 18px}.size-options [aria-pressed=true]{border-color:var(--blue);background:#e0eaf1;color:var(--blue)}.chapter-row{display:flex;justify-content:space-between;gap:20px;align-items:center;min-height:68px;border-bottom:1px solid var(--line);width:100%;font-size:14px}.chapter-row small{font-size:11px;color:var(--muted)}.practice-meaning{font-family:var(--serif);font-size:25px;margin:22px 0}#review-feedback{font-size:13px;color:var(--blue);margin-top:15px}#toast{position:fixed;z-index:12;bottom:24px;left:50%;transform:translateX(-50%) translateY(10px);background:#263e51;color:white;border-radius:7px;padding:13px 20px;font-size:12px;line-height:1.7;max-width:calc(100vw - 36px);width:max-content;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(min-width:900px){.reader{max-width:748px;padding-left:40px;padding-right:40px}.word-card{padding:28px 34px}dialog:has(.word-card){margin:auto auto 24px}}
@media(max-width:760px){.chapter-label{display:none}.header-inner{padding:10px 22px;min-height:68px}.header-actions{gap:8px}.home{padding:48px 26px}.home>h1{font-size:37px}.book-card{gap:26px;grid-template-columns:170px 1fr;padding:25px}.book-cover{height:255px;padding:20px}.book-info h2{font-size:27px}.book-info>p{font-size:14px}.book-info>.text-button{margin:6px 0 0;display:block}.book-stats{font-size:11px}.reader{padding:42px 30px}.panel-page{padding:48px 28px}.reader-heading{margin-bottom:34px}}
@media(max-width:520px){.header-inner{padding:10px 16px;flex-wrap:wrap;gap:8px;min-height:68px}.brand strong{font-size:17px;letter-spacing:.5px}.brand img{width:30px;height:30px}.header-actions:has(.modes){width:100%;justify-content:space-between}.modes{flex:1;margin-right:12px}.modes button{flex:1;font-size:12px;padding:7px 12px;min-height:44px}.round{min-width:44px;min-height:44px}.home{padding:38px 22px 40px}.home>h1{font-size:33px;letter-spacing:1px}.intro{font-size:14px}.desktop{display:none}.home-meta{gap:14px;font-size:10px;margin-bottom:38px}.shelf-heading h2{font-size:20px}.book-card{grid-template-columns:110px 1fr;gap:20px;padding:22px 18px;align-items:start}.book-cover{height:174px;padding:14px 12px}.cover-title{font-size:24px;letter-spacing:4px}.book-cover>span{font-size:6px;letter-spacing:.5px;margin-top:8px}.book-cover>small{font-size:6px;bottom:12px}.cover-pier{height:60px;right:23px;width:22px}.book-info{align-self:start}.book-info .eyebrow{font-size:9px;letter-spacing:.5px}.book-info h2{font-size:23px;letter-spacing:1px;margin:5px 0 10px}.book-info>p{font-size:13px;line-height:1.8}.book-stats{line-height:1.8;margin:12px 0}.book-info .primary{font-size:12px;padding:10px 16px;min-height:42px;width:100%;gap:12px}.how{grid-template-columns:1fr;gap:20px;margin:32px 0}.how>div{position:relative;padding-left:40px;min-height:70px}.how span{position:absolute;left:0;top:22px}.how h3{margin:5px 0}.reader{padding:32px 23px 40px}.reader-heading h1{font-size:29px;letter-spacing:3px}.reader-meta{gap:13px;font-size:10px}.mode-note{font-size:11px;padding:12px 14px}.story{line-height:2.05;letter-spacing:.2px}.story>p{margin-bottom:22px;scroll-margin-top:135px}.answer-box{padding:16px}.answer-box label small{display:block;margin:3px 0 0}.answer-box input{font-size:18px;padding:10px 12px}.answer-box .primary{padding:10px 16px}.quiz-card{padding:21px 18px}.quiz-options{grid-template-columns:1fr}.quiz-prompt{font-size:19px}.section-title h2{font-size:21px}.section-title>span{font-size:10px}.word-list li{gap:12px}.list-actions{gap:8px}.list-actions .text-button{font-size:10px}.word-list p span{display:block;margin:0}.delay-banner{padding:18px;flex-direction:column;align-items:flex-start;gap:14px}.panel-page{padding:40px 23px}.panel-page>h1{font-size:28px}.data-stats{gap:23px}.data-stats span{font-size:10px}.data-actions{flex-direction:column}.data-actions>*{width:100%}.review-tools{gap:10px}.review-tools .primary{padding:12px 14px;font-size:12px}.dialog-content{padding:24px 22px}.word-card dl{grid-template-columns:60px 1fr;gap:14px 12px}.size-options{gap:9px}.size-options button{min-width:52px;padding:10px 14px}dialog{max-height:calc(100dvh - 24px);margin:auto auto 12px}footer{flex-wrap:wrap;column-gap:18px;row-gap:0;padding:20px;font-size:10px}footer>span:nth-child(2){display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Inline recall: the underline is a real text input for iPad Scribble. */
.recall-word{display:inline-block;max-width:100%;vertical-align:baseline;line-height:1.65;letter-spacing:0}.recall-form{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:0 5px;max-width:100%;line-height:1.65}.story input.recall-line{width:var(--blank-width);max-width:100%;min-width:90px;min-height:44px;height:1.9em;border:0;border-bottom:1.5px solid #698fa9;border-radius:0;background:transparent;padding:2px 5px;font-family:Georgia,serif;font-size:.94em;line-height:1.5;color:var(--blue);text-align:center;box-shadow:none}.story input.recall-line:focus{outline:none;background:#f7f9fa88;border-bottom:2px solid var(--blue)}.recall-meaning{font-size:.8em;color:var(--muted);white-space:normal;max-width:100%}.recall-tools{display:none;align-items:center;gap:2px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;font-size:11px;line-height:1.5}.recall-word:focus-within .recall-tools{display:inline-flex}.recall-tools button{min-height:44px;padding:3px 8px;color:var(--blue);border-radius:4px}.recall-tools button:hover{background:#dce6ed}.recall-feedback{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;font-size:11px;line-height:1.5;color:var(--muted)}.recall-word.correct .recall-line{border-bottom-color:#4d876a;color:#397558}.recall-word.correct .recall-feedback{color:#397558}.recall-word.incorrect .recall-line{border-bottom-color:#ac6a58}.recall-word.incorrect .recall-feedback{color:#94594d}.recall-feedback:empty{display:none}

/* ===== 2026-10-11 视觉调整：对齐《雾港来信》原型 ===== */
:root{--bg:#e8edf1;--paper:#f6f8fa;--ink:#20252b;--muted:#5c6776;--blue:#1f4fb8;--word-bg:#dce5f8;--line:#d0d7df;--flag:#b9761a;--ok:#1d7a4e;--ok-bg:#ddf0e5;--bad:#b23a3a;--bad-bg:#f6e1e1;
  --en:"Iowan Old Style","Palatino Linotype","Palatino","Georgia",serif}
#header{background:rgba(232,237,241,.97)}
.brand strong{font-family:inherit;font-weight:600;font-size:17px;letter-spacing:.5px}
.chapter-label{font-size:13px}
/* 模式切换：胶囊，选中为深色 */
.modes{background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:3px}
.modes button{border-radius:999px;font-size:14px;font-weight:500;color:var(--muted);padding:0 16px;min-height:40px}
.modes [aria-pressed=true]{background:var(--ink);color:var(--paper);box-shadow:none}
.modes [aria-pressed=true]:hover{color:var(--paper)}
.round{background:var(--paper);border-color:var(--line);color:var(--ink)}
button:hover{color:var(--blue)}
.primary{background:var(--ink);color:var(--paper);font-size:15px;font-weight:600}
.primary:hover{background:#000;color:var(--paper)}
.secondary,.file-button{border-color:var(--line);color:var(--ink);font-size:14px}
.text-button{font-size:14px}

/* 章节标题：左对齐，像小说扉页 */
.reader-heading{text-align:left;margin-bottom:34px}
.reader-heading .eyebrow,.eyebrow{font-size:12px;letter-spacing:.14em}
.reader-heading h1{font-weight:700;font-size:40px;letter-spacing:.06em;line-height:1.2;margin:12px 0 6px}
.english-title{font-family:var(--en);font-style:italic;font-size:18px;letter-spacing:0}
.reader-meta{justify-content:flex-start;flex-wrap:wrap;gap:6px 18px;font-size:13px;margin:18px 0}
.mode-note{font-size:14px;line-height:1.75;background:none;border-radius:0;border-left:2px solid var(--line);padding:2px 0 2px 12px;color:var(--muted)}

/* 正文 */
.story{color:var(--ink);line-height:2;letter-spacing:.03em}
.story>p{margin-bottom:1.1em}
.word{font-family:var(--en);font-size:1.06em;letter-spacing:0;color:var(--blue);border-bottom:0;padding:0 2px;border-radius:4px;
  text-decoration:underline dotted;text-decoration-color:rgba(31,79,184,.55);text-decoration-thickness:1.5px;text-underline-offset:5px}
.word:hover{background:var(--word-bg);color:var(--blue)}
.word-hint{display:inline-block;font-family:var(--serif);font-size:.7em;color:var(--muted);margin-left:1px}
.review-dot{font-size:.45em;color:var(--flag);margin-left:2px}

/* 回忆模式：中文（＿＿＿），横线就是输入框 */
.recall-word,.recall-form{display:inline;line-height:inherit;letter-spacing:inherit}
.recall-meaning{font-size:1em;color:var(--ink);border-bottom:1px dashed rgba(31,79,184,.6)}
.recall-paren{color:var(--ink)}
.story input.recall-line{display:inline-block;vertical-align:baseline;width:var(--blank-width);min-width:4.5em;max-width:60vw;min-height:0;height:1.45em;
  padding:0 2px;border:0;border-bottom:1.5px solid var(--ink);border-radius:0;background:transparent;
  font-family:var(--en);font-size:1.04em;line-height:1.3;color:var(--blue);text-align:center}
.story input.recall-line:focus{background:transparent;border-bottom:2px solid var(--blue)}
.recall-tools{font-size:13px;gap:2px;margin-left:4px;vertical-align:middle}
.recall-tools button{min-height:36px;padding:2px 8px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink)}
.recall-tools button:hover{background:var(--word-bg);color:var(--blue)}
.recall-feedback{display:inline;font-size:13px;margin-left:4px;padding:1px 6px;border-radius:4px}
.recall-word.correct .recall-line{border-bottom-color:var(--ok);color:var(--ok)}
.recall-word.correct .recall-feedback{color:var(--ok);background:var(--ok-bg)}
.recall-word.incorrect .recall-line{border-bottom-color:var(--bad);color:var(--bad)}
.recall-word.incorrect .recall-feedback{color:var(--bad);background:var(--bad-bg)}
.recall-word.revealed .recall-line{color:var(--blue)}
.recall-word.revealed .recall-feedback{color:var(--blue);background:var(--word-bg)}

/* 章末与列表 */
.chapter-preview{background:var(--paper);border:1px solid var(--line);border-left:1px solid var(--line);border-radius:10px;padding:16px 18px}
.chapter-preview small,.chapter-complete,.muted,.quiz-progress,.quiz-progress span{font-size:13px}
.quiz-card{border-color:var(--line);border-radius:12px}
.quiz-options button{background:var(--bg);border-color:var(--line);font-size:16px}
.quiz-options span{font-size:13px}
.score{font-family:var(--serif);font-weight:700;color:var(--ink)}
.word-title{font-family:var(--en);font-size:21px;color:var(--ink)}
.word-list p{font-size:13px}
.chapter-wordlist summary,.records summary{font-size:15px}
.chapter-wordlist summary span,.section-title>span,.shelf-heading>span{font-size:13px}
.empty{font-size:14px}

/* 词卡 */
.word-card .dialog-heading h2{font-family:var(--en);font-weight:500;font-size:32px}
.word-card dt{font-size:13px}
.word-card dl{font-size:14px}
.example{font-family:var(--en);font-size:16px}
.example small{font-size:13px}
.mark-button{border-color:var(--flag);color:var(--flag);font-size:15px;font-weight:600}
.mark-button[aria-pressed=true]{background:rgba(185,118,26,.12)}
.card-meaning{font-family:var(--serif);font-size:17px}

/* 首页小字 */
.home-meta,.book-stats,.how p,.local-note,footer,footer button{font-size:13px}
.how span{font-family:var(--en)}

@media(max-width:520px){
  .modes button{font-size:14px;padding:0 10px;min-height:40px}
  .reader-heading h1{font-size:34px}
  .reader-meta,.mode-note{font-size:13px}
  .home-meta,.book-stats,footer,footer button,.section-title>span,.list-actions .text-button{font-size:12px}
  .book-info .eyebrow{font-size:11px}
}
.recall-form{white-space:nowrap}
.recall-tools{white-space:nowrap}
.recall-tools button{min-height:32px;font-size:12px;padding:1px 9px}
.recall-feedback{white-space:nowrap;font-size:12px}
.story input.recall-line{max-width:9em}
.recall-form,.recall-meaning{overflow-wrap:normal;word-break:keep-all}

/* Keep the answer controls and feedback within narrow readers at large font sizes. */
.recall-form{white-space:normal}

.recall-prompt{display:inline-block;white-space:nowrap;max-width:100%}

.book-card + .book-card { margin-top: 24px; }
.cover-hear {background:linear-gradient(145deg,#544b67,#95798c)!important;}
.cover-hear .cover-pier {opacity:.15;}
.cover-hear .cover-title {font-size:38px;}
.story-english {font-style:italic;color:inherit;}
.book-switch {display:flex;flex-wrap:wrap;gap:10px;margin:20px 0;}

/* Third story uses the existing shelf layout. */
.cover-beizhu{background:linear-gradient(145deg,#5c4d42,#a18462)!important;}
.cover-beizhu .cover-pier{opacity:.2;}

/* Only the newly added danmu cover. Existing covers retain their original rules. */
.book-cover.cover-danmu{background:linear-gradient(150deg,#efe1dd,#d9cbdc 58%,#b5bbc7);color:#4d4051}
.cover-danmu .cover-title{font-size:clamp(1.8rem,3.1vw,2.6rem);line-height:1.4}
.cover-danmu .cover-mist{opacity:.4}
.cover-danmu .cover-pier{opacity:.18}

/* v1.4 视觉：彩色胶囊、默写状态（2026-10-19） */
body{--accent:#3d6f9a;--tint:#e4eef7;--tint-strong:#cfe0ef}
body[data-book=danmu]{--accent:#c2456b;--tint:#fcebf0;--tint-strong:#f7d3de}
body[data-book=hear]{--accent:#9a7614;--tint:#fdf4dc;--tint-strong:#f6e5b4}
body[data-book=beizhu]{--accent:#3f7a52;--tint:#e8f4ec;--tint-strong:#cfe7d7}
body[data-book=fog]{--accent:#3d6f9a;--tint:#e4eef7;--tint-strong:#cfe0ef}
body[data-book=nightlib]{--accent:#6b5aa8;--tint:#efebfb;--tint-strong:#ddd5f6}
.story .word{background:var(--tint);color:var(--accent);border-bottom:0;border-radius:8px;padding:1px 7px;margin:0 2px;font-weight:500}
.story .word:hover{background:var(--tint-strong);color:var(--accent)}
.story .word-hint{color:var(--accent);opacity:.75}
.recall-word,.recall-form{display:inline;line-height:inherit}
.recall-chip{position:relative;display:inline-flex;align-items:center;gap:4px;background:var(--tint);border-radius:10px;padding:1px 4px 1px 8px;margin:0 3px;vertical-align:baseline;white-space:nowrap;transition:background-color .25s ease}
.recall-chip .recall-meaning{border:0;background:none;padding:0;font:inherit;color:var(--accent);min-height:0;cursor:pointer}
.story .recall-chip input.recall-line{width:var(--blank-width);min-width:4.5em;max-width:9em;min-height:36px;height:1.7em;border:0;border-radius:7px;background:rgba(255,255,255,.75);color:var(--ink);font-family:var(--en,Georgia,serif);font-size:.95em;text-align:center;padding:0 6px}
.story .recall-chip input.recall-line:focus{outline:2px solid var(--accent);outline-offset:1px;background:#fff;border:0}
.recall-check{display:none;color:#2f8a5b}
.recall-eye{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:32px;border-radius:16px;color:var(--accent);opacity:.55;padding:0}
.recall-eye:hover,.recall-eye:focus-visible{opacity:1;background:rgba(255,255,255,.7)}
.recall-peek{position:absolute;left:50%;bottom:calc(100% + 6px);transform:translate(-50%,4px);background:var(--ink);color:#fff;font-family:var(--en,Georgia,serif);font-size:.85em;padding:3px 10px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;white-space:nowrap}
.recall-word.peek .recall-peek{opacity:1;transform:translate(-50%,0)}
.recall-word.correct .recall-chip{background:#e3f5ea}
.recall-word.correct .recall-meaning{color:#2f8a5b}
.recall-word.correct input.recall-line{background:transparent!important;color:#24704a!important}
.recall-word.correct .recall-check{display:inline-flex;animation:pop .3s ease}
.recall-word.correct .recall-eye{display:none}
.recall-word.incorrect input.recall-line{color:#a33d3d!important;text-decoration:underline wavy rgba(178,58,58,.45);text-underline-offset:4px}
.recall-word.revealed input.recall-line{color:var(--accent)!important}
@keyframes pop{0%{transform:scale(.3);opacity:0}70%{transform:scale(1.25)}100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.recall-chip,.recall-peek{transition:none}.recall-word.correct .recall-check{animation:none}}
body[data-book]{background:#fbfaf8}
body[data-book] #header{background:rgba(251,250,248,.94)}
.story .word{display:inline;text-decoration:none!important;border:0!important;min-height:0;line-height:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.story .word *{text-decoration:none}
.story .word{line-height:1.5;padding:1px 7px;vertical-align:baseline}
.recall-chip{line-height:1.5}
.recall-eye{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* Only the new nightlib cover; the other four covers retain their original rules. */
.book-cover.cover-nightlib{background:linear-gradient(150deg,#d9d9cd,#9caaa0 60%,#6f807e);color:#263d39}
.cover-nightlib .cover-title{line-height:1.35}

/* v2.0 账号、激活、同步、章末复习（2026-10-20） */
.boot-loading{max-width:640px;margin:120px auto;text-align:center;color:var(--muted)}
.auth{max-width:440px;margin:56px auto 80px;padding:0 20px}
.auth h1{font-family:var(--serif);font-size:30px;font-weight:500;margin-bottom:22px}
.auth-tabs{display:flex;gap:4px;background:#e4eaee;border-radius:12px;padding:4px;margin-bottom:22px}
.auth-tabs button{flex:1;min-height:44px;border-radius:9px;font-size:15px}
.auth-tabs [aria-selected=true]{background:#fff;color:var(--blue);box-shadow:0 1px 4px #283d5014}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted)}
.auth-form input,.account-form input{min-height:46px;border:1px solid var(--line);border-radius:10px;padding:0 14px;font-size:16px;background:#fff;color:var(--ink)}
.auth-form input:focus,.account-form input:focus{outline:2px solid var(--blue);outline-offset:1px}
.auth-form .primary{min-height:48px;margin-top:4px}
.auth-lead{font-size:15px;line-height:1.8;color:var(--muted)}
.auth-note{font-size:13px;line-height:1.7;color:var(--muted)}
.auth-error,.form-msg{min-height:1.4em;font-size:14px;color:#b23a3a}
.sync-status{font-size:12px;color:var(--muted);padding:4px 10px;border-radius:12px;min-height:32px;white-space:nowrap}
.sync-status:empty{display:none}
.sync-status[data-state=pending]{color:#8a6a14;background:#fbf1d6}
.sync-status[data-state=error],.sync-status[data-state=auth]{color:#a33d3d;background:#fbe5e3}
.legacy-banner{display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:#fff7e0;border-radius:14px;padding:18px 22px;margin:0 0 34px}
.legacy-banner p{font-size:14px;color:var(--muted);margin-top:4px}
.legacy-banner>div:last-child{display:flex;gap:10px;align-items:center}
.locked-heading{margin-top:42px}
.locked-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.locked-card{display:flex;flex-direction:column;justify-content:space-between;gap:14px;background:var(--paper);border:1px dashed var(--line);border-radius:16px;padding:20px}
.locked-card h3{font-family:var(--serif);font-size:20px;font-weight:500;margin:6px 0}
.locked-card p{font-size:14px;line-height:1.7;color:var(--muted)}
.locked-card small{font-size:12px;color:var(--muted)}
.account-page h2{font-family:var(--serif);font-size:20px;font-weight:500;margin:34px 0 12px}
.ent-list{list-style:none;margin:0;padding:0}
.ent-list li{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid var(--line)}
.ent-list li p{font-size:14px;color:var(--muted);margin-top:4px}
.ent-list li small{font-size:13px;color:var(--muted)}
.ent-list li.inactive{opacity:.55}
.account-form{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start}
.account-form input{flex:1 1 200px}
.account-form .form-msg{flex-basis:100%}
.text-button.danger{color:#a33d3d;margin-top:30px}
.chapter-review{margin:40px 0;padding:24px;border-radius:16px;background:var(--tint,#e4eef7)}
.chapter-review .primary{margin-top:14px}
.cr-list{display:flex;flex-direction:column;gap:12px;margin:16px 0}
.cr-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:12px;background:var(--tint,#e4eef7);transition:background-color .25s}
.cr-meaning{font-size:17px;color:var(--accent,#3d6f9a);display:flex;flex-direction:column}
.cr-meaning small{font-size:12px;color:#a3332d}
.cr-field{position:relative;display:flex;align-items:center;gap:6px}
.cr-input{width:9.5em;min-height:42px;border:0;border-radius:8px;background:#fff;font-family:var(--en,Georgia,serif);font-size:18px;text-align:center;color:var(--ink)}
.cr-input:focus{outline:2px solid var(--accent,#3d6f9a)}
.cr-check{display:none;color:#2f8a5b}
.cr-eye{width:40px;height:40px;border-radius:20px;color:var(--accent,#3d6f9a);opacity:.6;display:inline-flex;align-items:center;justify-content:center;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.cr-peek{position:absolute;right:0;bottom:calc(100% + 6px);background:var(--ink);color:#fff;font-family:var(--en,Georgia,serif);padding:3px 10px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .15s;white-space:nowrap}
.cr-row.peek .cr-peek{opacity:1}
.cr-row.correct{background:#e3f5ea}
.cr-row.correct .cr-meaning{color:#2f8a5b}
.cr-row.correct .cr-input{background:transparent;color:#24704a}
.cr-row.correct .cr-check{display:inline-flex;animation:pop .3s ease}
.cr-row.correct .cr-eye{display:none}
.cr-row.incorrect .cr-input{color:#a33d3d;text-decoration:underline wavy rgba(178,58,58,.45);text-underline-offset:4px}
.cr-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
@media (max-width:560px){.cr-row{flex-direction:column;align-items:stretch}.cr-input{width:100%;flex:1}.header-inner .sync-status[data-state=pending],.header-inner .sync-status[data-state=synced]{display:none}}
.auth-form label,.auth-form input,.auth-form .primary{width:100%;align-self:stretch;box-sizing:border-box}
.auth-form{align-items:stretch;text-align:left}

/* ---- v2.1 首页开头与品牌 ---- */
.brand{gap:11px}
.brand-avatar{position:relative;display:inline-flex;width:40px;height:40px;border-radius:50%;padding:2px;background:linear-gradient(140deg,#f3c6d3,#cfc5f2 55%,#bcd6f3)}
.brand-avatar img{width:36px;height:36px;border-radius:50%;border:2px solid #fff}
.brand-avatar:after{content:'';position:absolute;right:-2px;bottom:-1px;width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:inset -4px -2px 0 0 #6b5aa8}
.brand-text{display:flex;flex-direction:column;line-height:1.15}
.brand-text strong{font-size:17px;font-weight:650;letter-spacing:.5px}
.brand-text small{font-size:11px;color:var(--muted);letter-spacing:2px;margin-top:3px;font-weight:400}
.home{padding-top:56px}
.hero{margin-bottom:58px}
.hero h1{font-family:var(--serif);font-size:56px;font-weight:600;line-height:1.28;letter-spacing:3px;margin:0 0 20px;color:var(--ink)}
.hero-mark{position:relative;white-space:nowrap;z-index:0}
.hero-mark:after{content:'';position:absolute;left:-4px;right:-4px;bottom:.08em;height:.36em;border-radius:6px;background:linear-gradient(90deg,#f7d3de,#ddd5f6);z-index:-1}
.hero-sub{font-size:16px;line-height:1.95;color:var(--muted)}
@media (max-width:900px){.hero h1{font-size:46px}}
@media (max-width:520px){.home{padding-top:34px}.hero{margin-bottom:42px}.hero h1{font-size:38px;letter-spacing:1.5px;margin:0 0 14px}.hero-sub{font-size:14px}.brand-text small{display:none}.brand-avatar{width:34px;height:34px}.brand-avatar img{width:30px;height:30px}}

/* Headword card, with a compact excerpt from the selected story occurrence. */
.word-card .dialog-heading h2{overflow-wrap:anywhere}
.word-card .card-top{margin:8px 0 20px;gap:14px;display:flex;align-items:center;justify-content:flex-start}
.card-definitions{font-size:17px;line-height:1.8;margin-bottom:24px}
.card-definitions p+p{margin-top:7px}
.card-pos{font-family:var(--en);font-size:14px;color:var(--muted)}
.card-story{border-top:1px solid var(--line);padding:20px 0 22px}
.card-story h3{font-size:14px;font-weight:600;margin:0 0 16px;color:var(--muted)}
.card-context-meaning,.card-form{font-size:15px;line-height:1.8}
.card-context-meaning span,.card-form span{display:inline-block;margin-right:14px;color:var(--muted);font-size:13px}
.card-form{margin-top:7px}
.card-story-label{font-size:13px;color:var(--muted);margin:16px 0 7px}
.card-story .context{font-family:var(--serif);font-size:17px;line-height:1.85;overflow-wrap:anywhere}
.card-story mark{background:#dce9f1;color:var(--blue);border-radius:3px;padding:1px 3px;font-family:var(--en)}

.card-lexical-example{margin:-6px 0 24px;line-height:1.75}.card-lexical-example .card-story-label{margin-top:0}.card-lexical-example .example{font-size:16px;overflow-wrap:anywhere}.example-translation{font-size:14px;color:var(--muted);margin-top:6px}

/* Small review rounds, with the full word table behind its management entry. */
.learning-page{max-width:800px}.learning-book-label{display:block;margin:20px 0;font-size:14px;color:var(--muted)}.learning-book-label select{display:block;width:100%;max-width:600px;min-height:44px;margin-top:8px;padding:9px;border:1px solid var(--line);border-radius:7px;background:var(--paper);color:var(--ink);font:inherit}
.review-mode-picker{display:flex;gap:10px;flex-wrap:wrap;margin:26px 0}.review-mode-picker button{padding:12px 18px;min-height:44px;border:1px solid var(--line);border-radius:8px}.review-mode-picker [aria-pressed=true]{background:var(--blue);color:white}.learning-start{margin:0 0 16px}.learning-manage{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}.learning-page>.text-button{display:block}.learning-word-group{margin-top:32px}.learning-word-list li{align-items:flex-start}.learning-word-list .list-actions{flex-wrap:wrap;justify-content:flex-end;max-width:200px}.learning-word-list small{display:block;color:var(--muted);font-size:12px;margin-top:7px}.learning-card-details{margin-top:10px;line-height:1.8;font-size:14px}.learning-card-details summary{cursor:pointer;color:var(--blue)}.learning-card-details .example{margin-top:10px;font-size:15px}.learning-word-list>li>div:first-child{min-width:0;flex:1}.practice-word{font-family:var(--en);font-size:34px;line-height:1.6;margin:18px 0}.learning-page .practice-meaning{font-size:25px;line-height:1.7;margin:18px 0}.review-feedback>p+p{margin-top:12px}.review-feedback .example{line-height:1.8;margin-top:22px}.review-schedule{padding-top:16px;border-top:1px solid var(--line);font-size:14px;color:var(--muted)}#learning-dictation{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}#learning-answer{min-width:0;flex:1;min-height:48px;border:1px solid var(--line);border-radius:7px;padding:12px;font-size:20px}#learning-message{font-size:14px;color:var(--muted)}.book-review-end{margin:40px 0;padding:24px 0;border-top:1px solid var(--line);line-height:1.9}.book-review-end h2{font-family:var(--serif);font-size:23px;margin-bottom:12px}.card-learning-actions .mark-button{width:100%}.card-learning-actions p{margin-top:10px;font-size:13px}
@media(max-width:520px){.learning-word-list li{display:block}.learning-word-list .list-actions{justify-content:flex-start;max-width:none;margin-top:12px}.learning-page .quiz-options{grid-template-columns:1fr}.learning-manage>*{flex:1}.learning-manage .primary,.learning-manage .secondary{white-space:nowrap}#learning-dictation{display:block}#learning-answer{width:100%;margin-bottom:12px}}

.chapter-preview{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.chapter-practice{margin:28px 0;padding:22px 0;border-top:1px solid var(--line,#dedbd4)}.chapter-practice h2{font-size:20px}.chapter-practice h2 small{font-size:14px;font-weight:400;color:#79776f}.learning-selection{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.learning-select{flex:0 0 22px;padding-top:6px}.learning-select input{width:18px;height:18px;accent-color:#51654b}.learning-word-info{flex:1;min-width:0}.learning-book-label{display:block;margin:14px 0}.learning-word-list>li{gap:12px}.learning-word-list .list-actions{flex-shrink:0}.learning-word-list .list-actions .secondary{white-space:nowrap}@media(max-width:600px){.learning-word-list>li{display:grid;grid-template-columns:22px minmax(0,1fr)}.learning-word-list .list-actions{grid-column:2;justify-content:flex-start}.chapter-preview>button{width:100%}.chapter-practice .learning-manage{gap:10px}.chapter-practice .learning-manage button{flex:1}.learning-book-label select{max-width:100%}}

/* Explicit compound cards retain the existing learning target. */
.card-compound-part h3{font-family:Georgia,serif;font-size:22px;font-weight:500;margin:20px 0 12px}.card-compound-part+.card-compound-part{border-top:1px solid var(--line);margin-top:22px;padding-top:4px}

/* Keep the reading surface inside Safari chrome and give scroll edges an opaque page color. */
html{color-scheme:light;background-color:var(--bg)}
body{background-color:var(--bg)}
html:has(body[data-book]){background-color:#fbfaf8}
