:root{font-family:Inter,"PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#3d2f28;background:#e7e4df;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}.frame{width:min(100%,448px);min-height:100vh;margin:0 auto;background:#fbf9f4;box-shadow:0 0 55px #3b29151a;padding:0 20px 90px}.nav{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px}.navtitle{font-size:14px;letter-spacing:.07em;font-weight:700}.navside{width:33px;text-align:center;color:#af7253}.back{border:none;background:none;font-size:24px;color:#54392a;width:34px;height:40px}.hero{padding:26px 12px 30px;background:#f6efe4;border:1px solid #e9dbcc;border-radius:24px;margin-top:10px;text-align:center}.eyebrow,.cardmeta{color:#a0674a;font-size:11px;font-weight:800;letter-spacing:.23em}.hero-title,.cardtitle{font-family:Georgia,"Times New Roman",serif;white-space:pre-line;font-weight:600;color:#573727}.hero-title{font-size:43px;line-height:1.18;letter-spacing:-.045em;margin:19px 0 14px}.muted{color:#928279;font-size:13px;line-height:1.75}.homeactions{display:grid;gap:12px;margin:31px auto 0;max-width:320px}.primary,.outline,.practice-button{border-radius:15px;padding:13px 18px;border:1px solid #693f2e;font-weight:700}.primary{background:#684333;color:#fff}.primary:hover{background:#533223}.outline{background:transparent;color:#684333;border-color:#c9ad9a}.big{width:100%;min-height:50px}.home-info{display:flex;gap:10px;justify-content:space-between;color:#977c67;font-size:11px;padding:18px 8px}.home-section{margin-top:25px}.section-title{font-size:17px;margin:0 0 13px}.empty{background:#f4f0e9;color:#947d6c;padding:25px;border-radius:13px;text-align:center;font-size:13px}.demo-box{margin:26px auto;text-align:center}.text-button{border:0;background:none;color:#a06448;font-size:13px;text-decoration:underline}.bottom{display:flex;position:sticky;bottom:0;justify-content:space-around;background:rgba(251,249,244,.97);border-top:1px solid #e7ded3;backdrop-filter:blur(15px);margin:32px -20px -90px;padding:11px 15px max(12px,env(safe-area-inset-bottom));z-index:5}.tab{display:flex;flex-direction:column;align-items:center;gap:4px;width:33%;background:none;border:none;color:#aa9a8b;font-size:11px}.tab.on{color:#673a2a;font-weight:700}.tabicon{font-size:22px}.lessoncard{background:#f9f2e9;border:1px solid #ede0d1;border-radius:20px;padding:24px 20px 25px;margin:8px 0 18px;box-shadow:0 10px 32px #7251390d}.cardtitle{font-size:34px;line-height:1.14;letter-spacing:-.035em;margin:12px 0 5px;overflow-wrap:anywhere}.cardsubtitle{color:#876956;font-size:14px;margin:6px 0 17px}.cover{width:100%;height:235px;display:block;object-fit:cover;object-position:center;border-radius:12px;margin:19px 0 14px}.notice{padding:12px 14px;background:#fff7dc;color:#805a36;border-radius:9px;font-size:12px;line-height:1.5;margin-bottom:10px}.module{padding:21px 0;border-bottom:1px solid #e3d4c2}.module:last-child{border:0;padding-bottom:0}.module-head{font-family:Georgia,serif;color:#9c614a;font-size:18px;font-weight:700}.module-sub{font-size:12px;color:#a48d7b;margin:4px 0 13px}.word-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.line{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:12px 0}.line.compact{background:#f1e5d5;border-radius:9px;padding:10px 8px 10px 11px;margin:0;min-height:72px}.line-text{flex:1;min-width:0}.english{font-size:15px;font-weight:600;line-height:1.55;color:#443026;overflow-wrap:anywhere}.chinese{font-size:13px;color:#8b735e;line-height:1.5;margin-top:2px}.play{border:none;background:#fff9ef;color:#885f45;border-radius:50%;font-size:12px;min-width:38px;min-height:42px}.paragraph .english{font-size:16px;font-weight:400;line-height:1.75}.paragraph{align-items:flex-start}.paragraph .play{margin-top:0}.practice-hint{font-size:13px;color:#8c7665}.practice-button{background:#ead8c3;color:#654735;width:100%;border:0;margin:16px 0 0;min-height:48px}.lesson-controls{display:flex;gap:10px}.lesson-controls button{flex:1}.waiting{text-align:center;padding-top:25px}.wait-photo{width:100%;height:255px;object-fit:cover;border-radius:18px;margin:15px 0 30px}.spinner{margin:20px auto;border:4px solid #f0e0d0;border-top-color:#986343;width:37px;height:37px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.waiting h2{font-size:19px}.waiting .primary,.waiting .outline{margin:10px auto;display:block;width:80%}.err{color:#9c392b;font-size:13px;line-height:1.7}.history-area{margin-top:20px}.history-wrap{background:#fffdf8;border:1px solid #eee2d4;border-radius:14px;margin-bottom:12px;overflow:hidden}.history-entry{border:none;background:transparent;padding:12px;display:flex;align-items:center;gap:13px;width:100%;text-align:left}.history-img{width:68px;height:68px;object-fit:cover;border-radius:9px}.history-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}.history-text strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-text span{font-size:12px;color:#8c7466}.history-text small{font-size:11px;color:#b2a193}.chevron{font-size:26px;color:#ac8e77}.delete{display:block;margin:0 15px 11px auto;background:none;border:0;color:#b56f5e;font-size:12px}.settings{margin-top:15px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #ebe1d4;min-height:90px}.setting-text{display:grid;gap:5px}.setting-text strong{font-size:14px}.setting-text small{color:#a18b79;font-size:11px}.select{border:1px solid #d8c9b7;border-radius:8px;background:#fffdf8;padding:9px 8px;max-width:110px}.settings-note{background:#f0e6dc;border-radius:12px;padding:17px;margin-top:26px;color:#876d5a;font-size:12px;line-height:1.8}.practice-area,.edit-area{padding:10px 0 35px}.practice-area h2{font-size:22px}.question{margin:22px 0;background:#fffdf7;border:1px solid #ecddce;border-radius:17px;padding:20px}.question-count{font-size:11px;color:#b07a5b;letter-spacing:.18em;font-weight:800}.question h3{font-size:18px;margin:13px 0 8px;line-height:1.45}.question-cn,.hint{color:#846d5b;font-size:13px;line-height:1.6}.hint{background:#f5ebdb;padding:10px;border-radius:9px}.answer{width:100%;margin:10px 0;min-height:93px;border:1px solid #d8c4b4;border-radius:10px;resize:vertical;padding:13px;background:#fff}.feedback{margin-top:15px;font-size:13px;line-height:1.6;color:#644d3a}.feedback strong{color:#956146}.edit-area>p{margin:12px 0 23px}.edit-subtitle{border-top:1px solid #e9d8c5;padding-top:18px;font-size:16px;color:#8a6347}.edit-field{margin:13px 0}.edit-field label{display:block;color:#947963;font-size:12px;margin-bottom:6px}.editor{display:block;border:1px solid #d9c7b6;background:#fffdf9;border-radius:9px;width:100%;padding:11px;resize:vertical}.edit-area>.primary{margin-top:20px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:350px;min-width:200px;padding:14px 19px;border-radius:11px;background:#45362d;color:white;font-size:13px;z-index:100;text-align:center;box-shadow:0 12px 30px #2224}
@media (max-width:359px){.frame{padding:0 14px 80px}.lessoncard{padding:20px 13px}.cardtitle{font-size:30px}.english{font-size:14px}.chinese{font-size:12px}.word-grid{gap:7px}.line.compact{padding:9px 6px}.play{min-width:34px}.bottom{margin-left:-14px;margin-right:-14px}}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}

/* V1.1：英文标题朗读与课程备份入口 */
.card-title-row{display:flex;align-items:center;gap:10px;min-width:0;margin:12px 0 5px}
.card-title-row .cardtitle{flex:1;min-width:0;margin:0}
.title-play{flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;border:1px solid #decbb7;background:#fff7eb;font-size:15px}
.backup-panel{margin-top:26px;padding:18px 15px;background:#f5eee4;border:1px solid #e6d5c3;border-radius:15px}
.backup-heading{margin:0 0 8px;font-size:17px;color:#60422f}
.backup-description{font-size:12px;line-height:1.75;color:#826d5a;margin:0 0 16px}
.backup-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.backup-actions button{padding:12px 6px;min-width:0;min-height:45px;font-size:13px}
.backup-status{font-size:12px;line-height:1.6;color:#694b37;min-height:20px;margin-top:12px;overflow-wrap:anywhere}

/* V1.2：四模块杂志式海报。小缩略图紧贴正文，点击放大或下载。 */
.poster-panel{display:flex;align-items:center;gap:12px;padding:12px;background:#f2e7d8;border:1px solid #e4d0b9;border-radius:13px;margin:11px 0 0;min-height:125px}
.poster-preview{flex:0 0 74px;width:74px;height:98px;overflow:hidden;display:grid;place-items:center;border:1px solid #d1b69d;border-radius:6px;background:#fff8ee;padding:0;box-shadow:0 3px 8px #62462e1b}
.poster-preview img{width:100%;height:100%;object-fit:contain;display:block}
.poster-placeholder{font-size:11px;color:#8b6c58;padding:6px;line-height:1.6}
.poster-detail{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1}
.poster-detail strong{font-size:14px;color:#4c3125}
.poster-detail small{font-size:11px;color:#967761;line-height:1.5}
.poster-actions{display:flex;gap:7px;flex-wrap:wrap}
.poster-btn{border:1px solid #cba98c;border-radius:9px;color:#684632;background:#fffaf3;font-size:12px;padding:9px 12px;min-height:38px;font-weight:700}
.poster-btn-primary{background:#684333;border-color:#684333;color:#fff}

.poster-mode-note,.poster-mode-inline{font-size:11px;color:#8b6a57;line-height:1.5}
.poster-mode-toggle{display:flex;gap:6px;flex-wrap:wrap}
.poster-mode-btn{border:1px solid #d8bda4;border-radius:999px;background:#fff9f1;color:#745241;font-size:11px;font-weight:700;padding:7px 10px;min-height:34px}
.poster-mode-btn.active{background:#6a4433;border-color:#6a4433;color:#fff}
.poster-dialog-top .poster-mode-toggle{margin-right:auto}
.poster-dialog-top .poster-mode-inline{flex:1 1 100%;order:10}
.poster-overlay{position:fixed;inset:0;background:#211910e8;z-index:1200;display:flex;align-items:center;justify-content:center;padding:12px}
.poster-dialog{width:min(100%,1040px);max-height:95dvh;display:flex;flex-direction:column;background:#faf6ee;border-radius:13px;overflow:hidden}
.poster-dialog-top{padding:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e9ddcf}
.poster-dialog-top strong{flex:1;min-width:50px;font-size:13px}
.poster-close{border:0;background:transparent;color:#624332;font-size:13px;padding:10px 6px}
.poster-viewport{flex:1;min-height:0;overflow:auto;text-align:center;padding:12px;background:#e7dcca;overscroll-behavior:contain}
.poster-large{width:min(100%,600px);height:auto;display:block;margin:0 auto;box-shadow:0 6px 24px #38261b30;cursor:zoom-in}
.poster-large.magnified{width:1200px;max-width:none;cursor:zoom-out;margin:0}
.poster-wait{font-size:13px;color:#745641}
@media(max-width:359px){.poster-panel{gap:8px;padding:9px}.poster-preview{flex-basis:64px;width:64px;height:86px}.poster-detail strong{font-size:13px}.poster-btn{padding:8px 9px;font-size:11px}}

/* V1.4.1：练习提示默认隐藏，用户需要时再显示 */
.hint[hidden]{display:none!important}
.hint-toggle{border:1px solid #d8c2ab;border-radius:8px;background:#f8f0e5;color:#79553f;padding:8px 12px;font-size:12px;font-weight:700;margin:8px 0}

/* V1.5 iPhone LAN pairing gate */
.lan-pairing-overlay{position:fixed;inset:0;z-index:4000;background:#211810d9;display:flex;align-items:center;justify-content:center;padding:20px}
.lan-pairing-card{width:min(100%,430px);border-radius:18px;background:#faf6ee;color:#443026;padding:26px 22px;box-shadow:0 12px 35px #130b0550}
.lan-pairing-card h2{font-size:20px;margin:0 0 10px}
.lan-pairing-card p{font-size:13px;line-height:1.75;color:#806858}
.lan-code-input{display:block;width:100%;padding:14px;border-radius:10px;border:1px solid #cba98c;text-transform:uppercase;letter-spacing:.12em;font-size:19px;margin:16px 0;background:#fffdf9}
.lan-pairing-card button{background:#684333;color:#fff;border:0;border-radius:11px;width:100%;padding:12px;font-weight:700;min-height:47px}
.lan-pairing-error{color:#aa3d2d!important;min-height:22px}
.lan-pairing-tip{font-size:11px!important}
@supports(padding:env(safe-area-inset-bottom)){.frame{padding-bottom:calc(90px + env(safe-area-inset-bottom))}}

/* Privacy mode: one clear export action and explicit separate legacy deletion */
.lesson-controls{flex-wrap:wrap}
.lesson-controls .export-course{flex:1 0 100%;min-height:48px}
.backup-panel>.delete{display:block;width:100%;text-align:center;margin:12px 0 8px;padding:13px 9px;border:1px solid #cfb2a9;border-radius:12px;background:#fffaf6;color:#9c4c42;font-weight:600;font-size:13px}

/* V1.6.6: iPhone Photos export. The original image remains a real <img> for native long-press. */
.poster-save-hint{display:block;color:#876956;line-height:1.6}
.poster-save-tip{padding:6px 15px 12px;margin:0;font-size:12px;color:#694b37;line-height:1.65}
.poster-original-viewport{min-height:200px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.poster-original-image{display:block;width:min(100%,600px);height:auto;margin:0 auto;-webkit-touch-callout:default;user-select:auto;-webkit-user-select:auto;touch-action:auto}
