/* A compact, centered game lobby. Curriculum illustrations remain unchanged. */
body[data-view=home]{--ink:#29445b;--muted:#758799;--line:#e4eaf0;background:#fff;color:var(--ink)}
body[data-view=home] main{max-width:1080px;padding:0 24px;margin:0 auto;width:100%}
body[data-view=home] .app-header{max-width:1080px;min-height:62px;padding:12px 24px;border:0;gap:12px}
body[data-view=home] .brand strong{font-size:18px;color:#29445b}body[data-view=home] .brand small{font-size:10px}
.settings-button{display:grid;place-items:center;min-height:38px;width:40px;padding:4px;border:2px solid #e4eaf0;border-bottom-width:4px;border-radius:13px;background:#fff;color:#5b7187;font-size:23px;line-height:1}
body[data-view=home] #schoolLink{margin-left:auto;font-size:12px}body[data-view=home] #home{padding:10px 0 8px!important;gap:14px;max-height:none;margin:0;overflow:auto;scrollbar-width:thin}
body[data-view=home] .home-heading{position:relative;min-height:90px;padding:18px 24px;border-radius:22px;border:0;background:#eff8ff;display:flex;justify-content:space-between;gap:20px;align-items:center;margin:0;flex:none;overflow:hidden}
body[data-view=home] .home-heading h1{font-size:28px;letter-spacing:0;font-weight:850;margin:0 0 7px;color:#29445b;line-height:1.25}body[data-view=home] .home-heading p{font-size:13px;letter-spacing:0;color:#6b88a0;line-height:1.3}
body[data-view=home] .game-hero{display:none}
body[data-view=home] .today-mini{display:flex;gap:7px;align-items:center;background:transparent;padding:0;border:0;margin:0;flex:none}
body[data-view=home] .today-mini>.goal-ring,body[data-view=home] .today-mini>div:not(.today-counts),body[data-view=home] .today-mini>p{display:none}
body[data-view=home] .today-counts{display:flex;gap:8px;padding:0;grid-column:auto}
body[data-view=home] .today-counts>div{display:flex;align-items:center;gap:7px;padding:9px 13px;border-radius:13px;background:#fff;border:1px solid #ddebf6}
body[data-view=home] .today-counts strong{font-size:23px;color:#328ab3;font-weight:850}body[data-view=home] .today-counts span{font-size:10px;color:#758799;max-width:70px}
body[data-view=home] .today-mini #dailyLink{font-size:11px;padding:7px;color:#527e9b;min-height:32px;grid-column:auto}
body[data-view=home] .track-tabs{padding:0;border:0;gap:8px;align-items:center}
body[data-view=home] .track-tabs>button{padding:8px 15px;min-height:36px;font-size:12px;border:2px solid #e5ecf2!important;border-bottom-width:4px!important;border-radius:13px;background:#fff!important;color:#81909e!important;box-shadow:none!important;font-weight:750}
body[data-view=home] .track-tabs>button[aria-pressed=true]{border-color:#8dcbd6!important;background:#eaf8fa!important;color:#227f91!important}
body[data-view=home] .track-tabs .library-open{font-size:11px;margin-left:auto;border:0!important;background:transparent!important;color:#617d91!important;padding:6px;min-height:30px}
body[data-view=home] .home-grid{display:block;flex:1;min-height:0;overflow:visible}
body[data-view=home] .setup-panel{display:none}
body[data-view=home] .mode-panel{padding:0;border:0;background:#fff;box-shadow:none;display:flex;flex-direction:column;height:100%}
body[data-view=home] .mode-panel h2{display:none}
body[data-view=home] .mode-list,body[data-track=recognize][data-view=home] .mode-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(104px,1fr));gap:7px 24px;flex:1;min-height:0;max-width:840px;width:100%;margin:0 auto;padding:4px 8px 8px;position:relative;isolation:isolate}
body[data-view=home] .mode-card{--node:#e8f4ff;--edge:#b9d7ec;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;min-height:104px;padding:5px!important;border:0!important;border-radius:18px;background:transparent!important;box-shadow:none!important;transform:none!important;text-align:center;transition:none}
body[data-view=home] .mode-card .level-art,body[data-track=recognize][data-view=home] .mode-card .level-art{display:grid;place-items:center;position:relative;width:94px;height:80px;border-radius:28px;background:var(--node);border:2px solid var(--edge);box-shadow:0 6px 0 var(--edge);margin:0;transform:rotate(-3deg);transition:transform .16s,box-shadow .16s;overflow:visible}
body[data-view=home] .mode-card:nth-child(3n+2){--node:#f2ecff;--edge:#d2c4ed}
body[data-view=home] .mode-card:nth-child(3n){--node:#e7f7f0;--edge:#b8dfd0}
body[data-view=home] .mode-card:nth-child(2n) .level-art{transform:rotate(3deg)}
body[data-view=home] .mode-card .level-art svg{width:77px;height:77px;overflow:visible;filter:drop-shadow(0 2px 0 #294b6610)}
body[data-view=home] .mode-card strong{font-size:15px;line-height:1.3;font-weight:800;letter-spacing:0;color:#526c82;max-width:100%;min-height:20px;margin-top:3px}
body[data-view=home] .mode-card .level-number{display:block;position:absolute;z-index:2;top:3px;left:calc(50% - 57px);font-size:10px;font-weight:850;color:#728b9f;background:#fff;border:2px solid #e2eaf0;border-radius:8px;padding:2px 5px;line-height:1.2;opacity:1}
body[data-view=home] .mode-card::after{display:none!important}
body[data-view=home] .mode-card:hover .level-art{transform:translateY(-3px) rotate(0deg);box-shadow:0 9px 0 var(--edge)}
body[data-view=home] .mode-card:active .level-art{transform:translateY(4px);box-shadow:0 2px 0 var(--edge)}
body[data-view=home] .mode-card[aria-pressed=true] .level-art{outline:3px solid #29a888;outline-offset:6px;background:#e0f6ed;border-color:#96d6bd;box-shadow:0 6px 0 #96d6bd}
body[data-view=home] .mode-card[aria-pressed=true] strong{color:#168369}
body[data-view=home] #startbar{position:static!important;display:flex;align-items:center;flex-direction:row;gap:13px;width:100%!important;padding:13px 17px!important;border:2px solid #e5edf1!important;border-radius:20px;background:#fff;min-height:76px;margin:0;flex:none;box-shadow:0 4px 0 #eef2f5;z-index:5}
body[data-view=home] #startbar>span:not(.selected-art){display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:0;max-width:none;flex:1;min-width:0}
body[data-view=home] #selectedMode{font-size:15px;color:#3a596e;font-weight:800}body[data-view=home] #scopeCount{font-size:11px;color:#8b9ca8}
body[data-view=home] .selected-art{width:47px;height:47px;flex:none;display:block}body[data-view=home] .selected-art svg{width:100%;height:100%}
body[data-view=home] #start{flex:0 0 240px;min-height:44px;border:0;border-bottom:5px solid #128060;border-radius:14px;background:#21a680;color:#fff;box-shadow:none;font-size:17px;font-weight:850;padding:10px 20px;transition:transform .12s,border-bottom-width .12s}
body[data-view=home] #start:hover{background:#159a73}body[data-view=home] #start:active{border-bottom-width:2px;transform:translateY(3px)}
body[data-view=home] footer{display:none}
/* Settings retain the existing controls and storage. */
#preferencesDialog{width:min(440px,92vw);border:2px solid #e1e9ef;border-radius:24px;padding:20px;color:#36566b}
#preferencesContent{display:flex;flex-direction:column;gap:18px}
#preferencesContent .languages{display:flex;gap:6px;margin:0;justify-content:center}#preferencesContent .languages button{flex:1;min-height:38px;border:2px solid #e5ecf2;border-bottom-width:4px;border-radius:12px}
#preferencesContent .learning-tools{display:flex!important;flex-wrap:wrap;justify-content:flex-start;padding:0;gap:10px;min-height:0}
#preferencesContent .scope-panel{display:flex;flex-direction:column;padding:0;gap:12px}
#preferencesContent .scope-panel h2{display:none}#preferencesContent .scope-buttons,#preferencesContent .clock-buttons{display:flex;gap:8px;margin:0;background:none;padding:0}
#preferencesContent .scope-buttons button,#preferencesContent .clock-buttons button{font-size:12px;flex:1;border:2px solid #e5ecf2;border-bottom-width:4px;padding:9px 6px;border-radius:12px;background:#fff}
#preferencesContent button[aria-pressed=true]{border-color:#90cdbf;background:#edf9f3;color:#197c63}
#preferencesContent .duration-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#6b8394}#preferencesContent input{width:70px;padding:8px;border:2px solid #e1e9ef;border-radius:10px;text-align:center;font:inherit}
#preferencesContent #resume{font-size:12px;padding:10px;background:#fff7e7;color:#9b7329;border:1px solid #f0dfb8}
#preferencesContent .timer-bar{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:12px;background:#f2f7fa;border-radius:12px;font-size:12px}
#preferencesContent .timer-bar[hidden]{display:none!important}#preferencesContent .minute-buttons,#preferencesContent #timerNote{display:none}
.time-visibility{display:flex;align-items:center;gap:8px;font-size:13px}.time-visibility input{width:18px!important;height:18px;accent-color:#21a680}.focus-time{font-size:12px;color:#7c91a3;font-variant-numeric:tabular-nums;margin-left:auto}.focus-time[hidden]{display:none}
/* Focus mode: the question is the screen. */
body[data-view=play] .app-header,body[data-view=play] footer{display:none!important}
body[data-view=play] main{max-width:1000px;padding:12px 26px 0;width:100%;margin:auto;flex:1;min-height:0}
body[data-view=play] #play{padding:0!important;gap:0}
body[data-view=play] .practice-top{min-height:42px;display:flex;align-items:center;gap:12px;flex:none}
body[data-view=play] #modeName{color:#637d91;font-size:13px;font-weight:750;order:1}
body[data-view=play] #batchCount{font-size:12px;color:#90a1ae;order:2}
body[data-view=play] #endPractice{order:-2;font-size:0!important;width:36px;height:36px;min-height:36px;padding:0;border:0;background:transparent;color:#8b9aa6;flex:none}
body[data-view=play] #endPractice::after{content:'×';font:30px/1 system-ui}
body[data-view=play] #practicePreferences{order:4;flex:none;margin-left:auto;min-height:34px;width:36px;font-size:22px;border:0;background:transparent;box-shadow:none}
body[data-view=play] .focus-time{order:3;margin-left:auto}
body[data-view=play] #batchProgress{height:10px;border:0;border-radius:10px;margin:8px 0 20px;overflow:hidden;accent-color:#27b58b}
body[data-view=play] #batchProgress::-webkit-progress-bar{background:#eaf0f4;border-radius:10px}body[data-view=play] #batchProgress::-webkit-progress-value{background:#34b596;border-radius:10px;transition:width .22s}
body[data-view=play] .answer-button{border:2px solid #dfe7ed;border-bottom-width:5px;border-radius:18px;transition:transform .12s,border-color .12s;background:#fff}
body[data-view=play] .answer-button:hover{border-color:#9dccd4;background:#f3fbfc}body[data-view=play] .answer-button:active{transform:translateY(3px);border-bottom-width:2px}
body[data-view=play] #next{background:#20a37e;border:0;border-bottom:5px solid #168060;border-radius:15px;min-height:46px;font-weight:800}
.word-full-audio{width:27px!important;height:25px!important;min-height:25px!important;padding:3px!important;border:0;background:transparent;color:#247d98;flex:none}.word-full-audio svg{width:20px;height:20px}
.word-card .word-line .char-sound{cursor:pointer}.word-card .word-line:hover{background:#f0f8fc;border-radius:6px}
/* Character in the center, words below, then short expressions. */
body[data-view=detail] .detail-grid{display:flex;flex-direction:column;align-items:center;gap:14px;overflow:auto;min-height:0}
body[data-view=detail] .detail-character{width:100%;max-width:800px;display:flex;flex-direction:column;align-items:center;background:#fff!important;border:0!important;padding:5px 12px;overflow:visible;flex:none}
body[data-view=detail] .detail-title{justify-content:center;display:flex}
body[data-view=detail] .detail-title .word-hanzi{font-size:82px}
body[data-view=detail] #detailMeaning{margin:2px;font-size:12px}
body[data-view=detail] #detailWrite{font-size:12px;min-height:30px;padding:5px 13px;background:#ecf7f4;color:#258570;border:1px solid #d1e8e1;border-radius:10px;margin:5px 0}
body[data-view=detail] #detailWordsTitle,body[data-view=detail] #detailSentencesTitle{display:none}
body[data-view=detail] #detailWords{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:5px}
body[data-view=detail] .detail-expressions{width:100%;max-width:960px;overflow:visible;flex:none;padding:0 10px 12px}
body[data-view=detail] #detailSentences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body[data-view=detail] #detailSentences>.sentence-card:only-child{grid-column:1/-1;max-width:650px;justify-self:center;width:100%}
body[data-view=detail] .sentence-card{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px;border-radius:17px;min-height:0}
body[data-view=detail] .sentence-picture img{width:220px;height:135px}body[data-view=detail] .sentence-picture{width:auto;height:auto}
body[data-view=detail] .sentence-words{justify-content:center}body[data-view=detail] .sentence-top{justify-content:center}
@media(min-width:801px) and (min-height:850px){body[data-view=home] #home{max-height:790px;padding-top:24px!important;gap:20px}body[data-view=home] .mode-list{grid-template-rows:repeat(3,146px)}body[data-view=home] .mode-card .level-art{width:110px;height:95px}body[data-view=home] .mode-card .level-art svg{width:91px;height:91px}body[data-view=home] .mode-card .level-number{left:calc(50% - 63px);top:9px}body[data-view=home] .home-heading{min-height:102px}}
@media(max-width:800px){body[data-view=home] .app-header{padding:9px 15px;min-height:52px}body[data-view=home] main{padding:0 15px}body[data-view=home] .brand strong{font-size:16px}body[data-view=home] .brand small{display:none}body[data-view=home] #schoolLink{font-size:10px}body[data-view=home] #home{padding:5px 0 0!important;gap:11px}body[data-view=home] .home-heading{min-height:80px;padding:14px 17px;gap:9px;border-radius:18px}body[data-view=home] .home-heading h1{font-size:22px;margin-bottom:5px}body[data-view=home] .home-heading p{font-size:11px}body[data-view=home] .today-mini{display:none}body[data-view=home] .track-tabs{gap:6px;flex-wrap:wrap}body[data-view=home] .track-tabs>button{padding:7px 9px;font-size:11px;min-height:34px}body[data-view=home] .track-tabs .library-open{font-size:10px;padding:4px;min-height:25px}body[data-view=home] .mode-list{gap:8px 5px;grid-template-rows:repeat(3,minmax(91px,1fr));padding:6px 3px 8px;max-width:600px}body[data-view=home] .mode-card{min-height:91px;gap:7px}body[data-view=home] .mode-card .level-art,body[data-track=recognize][data-view=home] .mode-card .level-art{width:70px;height:63px;border-radius:22px}body[data-view=home] .mode-card .level-art svg{width:62px;height:62px}body[data-view=home] .mode-card .level-number{top:0;left:calc(50% - 43px);font-size:8px;padding:2px 4px}body[data-view=home] .mode-card strong,html:lang(zh-CN) body[data-view=home] .mode-card strong{font-size:12px;min-height:16px;font-weight:800}html:not(:lang(zh-CN)) body[data-view=home] .mode-card strong{font-size:10px;line-height:1.3}body[data-view=home] #startbar{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;min-height:68px;padding:9px 10px!important;gap:8px;border-radius:17px;margin-top:auto}body[data-view=home] #startbar>span:not(.selected-art){display:flex}body[data-view=home] #selectedMode{font-size:11px}body[data-view=home] #scopeCount{font-size:9px}body[data-view=home] .selected-art{width:34px;height:34px}body[data-view=home] #start{flex:0 0 132px;font-size:14px;min-height:42px;padding:8px 10px}body[data-track=recognize][data-view=home] .mode-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(110px,1fr));padding-top:10px}body[data-track=recognize][data-view=home] .mode-card{min-height:110px}body[data-view=play] main{padding:6px 15px 0}body[data-view=play] .practice-top{gap:9px}body[data-view=play] #modeName{font-size:11px}body[data-view=play] #batchProgress{margin:7px 0 12px;height:8px}body[data-view=play] #next{min-height:44px;margin-bottom:4px!important}body[data-view=detail] .detail-grid{gap:10px}body[data-view=detail] .detail-title .word-hanzi{font-size:65px}body[data-view=detail] .detail-character{padding:2px 0}body[data-view=detail] #detailWords{gap:6px}body[data-view=detail] .detail-expressions{padding:0 0 10px}body[data-view=detail] #detailSentences{grid-template-columns:1fr}body[data-view=detail] .sentence-card{flex-direction:row;gap:8px;padding:9px}body[data-view=detail] .sentence-picture img{width:100px;height:90px}body[data-view=detail] .sentence-content{min-width:0;flex:1}body[data-view=detail] .sentence-words{justify-content:flex-start}body[data-view=detail] .sentence-top{justify-content:flex-start}}
@media(max-width:800px) and (max-height:700px){body[data-view=home] #home{gap:7px}body[data-view=home] .home-heading{min-height:66px;padding:11px 14px}body[data-view=home] .home-heading h1{font-size:20px}body[data-view=home] .home-heading p{font-size:10px}body[data-view=home] .mode-list{grid-template-rows:repeat(3,minmax(82px,1fr));gap:6px 4px}body[data-view=home] .mode-card{min-height:82px}body[data-view=home] .mode-card .level-art{height:55px;width:64px;border-radius:19px}body[data-view=home] .mode-card .level-art svg{height:54px;width:54px}body[data-view=home] .mode-card strong{font-size:11px}body[data-view=home] #startbar{min-height:61px}}
@media(prefers-reduced-motion:reduce){body[data-view=home] .level-art,body[data-view=home] #start,body[data-view=play] #batchProgress{transition:none!important}}
body[data-view=home] .mode-card[aria-pressed=true]{background:transparent!important;border:0!important;box-shadow:none!important}
@media(max-width:800px){body[data-view=home] .app-header{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:8px}body[data-view=home] .brand{flex:1;min-width:0}body[data-view=home] #schoolLink{margin:0;white-space:nowrap;flex:none}body[data-view=home] #openPreferences{flex:none}body[data-view=home] .brand img{width:30px;height:30px}body[data-view=home] #home{padding-bottom:7px!important}}
.review-grid{display:flex;flex-direction:column;align-items:center;gap:12px}.review-character{width:100%;max-width:740px;border:0!important;padding:0!important;background:#fff}.review-character .open-character{justify-content:center}.review-character .word-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.review-grid>.sentence-list{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.review-grid .sentence-card{display:flex;flex-direction:column;align-items:center;padding:10px;border-radius:16px;gap:8px}.review-grid .sentence-picture img{width:200px;height:120px}.review-grid .sentence-words{justify-content:center}.review-grid .sentence-top{justify-content:center}.word-full-audio{position:absolute;right:4px;top:3px;z-index:1}.word-card{position:relative}.success-message{text-align:center}.practice-top::before,.practice-top::after{display:none!important}
@media(max-width:800px){.review-grid{gap:9px}.review-grid>.sentence-list{grid-template-columns:1fr;gap:7px}.review-grid .sentence-card{flex-direction:row;padding:7px;gap:7px}.review-grid .sentence-picture img{width:95px;height:83px}.review-grid .sentence-picture{width:auto;height:auto}.review-grid .sentence-content{min-width:0;flex:1}.review-grid .sentence-words,.review-grid .sentence-top{justify-content:flex-start}.review-character .open-character .word-hanzi{font-size:57px}.review-character .word-list{gap:6px}.review-character .word-photo img{height:48px}.review-character>.text-button{min-height:22px;padding:3px;font-size:10px}.word-card .word-line{position:relative}.word-card .word-full-audio{right:1px;top:0;width:22px!important;height:22px!important;min-height:22px!important}.word-full-audio svg{width:17px;height:17px}}
.app-header{display:flex;flex-wrap:nowrap;align-items:center}.app-header .brand{min-width:0}.app-header #schoolLink{margin-left:auto;white-space:nowrap}.app-header #openPreferences{flex:none}
@media(min-width:601px) and (max-width:1100px) and (min-height:800px){body[data-view=home] .home-heading{min-height:100px;padding:20px}body[data-view=home] .home-heading h1{font-size:28px}body[data-view=home] .today-mini{display:flex}body[data-view=home] .mode-list{grid-template-rows:repeat(3,minmax(130px,1fr));gap:16px}body[data-view=home] .mode-card .level-art,body[data-track=recognize][data-view=home] .mode-card .level-art{width:106px;height:91px;border-radius:29px}body[data-view=home] .mode-card .level-art svg{width:88px;height:88px}body[data-view=home] .mode-card strong,html:lang(zh-CN) body[data-view=home] .mode-card strong{font-size:16px}body[data-view=home] .mode-card .level-number{left:calc(50% - 61px);top:3px;font-size:10px}body[data-view=home] #start{flex-basis:230px;font-size:17px}body[data-view=home] #selectedMode{font-size:14px}body[data-view=home] #startbar{min-height:77px}body[data-view=home] .track-tabs>button{font-size:13px}}
.app-header #schoolLink,body[data-view=home] .app-header #schoolLink{width:auto!important;flex:0 0 auto!important}.app-header .brand{width:auto;flex:1 1 auto;min-width:0}
#preferencesContent #helperControl{display:flex;flex-direction:column;align-items:stretch;width:100%;gap:9px;font-size:12px;color:#758b9c}#preferencesContent #helperLang{display:none!important}.helper-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.helper-choice{font-size:12px;min-height:39px;border:2px solid #e3ebf1;border-bottom-width:4px;padding:8px 6px;border-radius:12px;background:#fff}.helper-choice[aria-pressed=true]{border-color:#85cbbb!important;color:#167e68!important;background:#edf9f5!important}.setting-section-label{font-size:12px;font-weight:650;color:#758b9c;margin-bottom:-10px}#preferencesContent .learning-tools{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:10px;justify-content:stretch;align-items:center}#preferencesContent #helperControl{grid-column:1/-1}#preferencesContent .learning-tools>a{font-size:12px;min-height:34px;display:flex;align-items:center;gap:7px}#preferencesContent #pinyinToggle{font-size:12px;min-height:34px;display:flex;align-items:center;gap:7px;justify-content:flex-start}#preferencesContent #helperControl input{accent-color:#29a888}
/* Distribute the three learning layers over the available canvas. */
#reviewView{display:flex;flex-direction:column;gap:6px}.success-message{flex:none;margin:0;font-size:12px;min-height:18px}.review-grid{flex:1;display:grid;grid-template-rows:minmax(245px,1fr) minmax(210px,1fr);align-items:stretch;gap:13px;width:100%;min-height:0}.review-character{display:grid;grid-template-rows:92px 23px minmax(110px,1fr);align-items:center;justify-items:center;max-width:none;gap:4px}.review-character .open-character .word-hanzi{font-size:76px}.review-character .word-list{width:100%;max-width:820px;height:100%;margin:0 auto}.review-character .word-list .word-card{justify-content:center;padding:8px!important}.review-grid>.sentence-list{align-items:stretch;min-height:0}.review-grid .sentence-card{justify-content:center}.review-grid .sentence-picture img{width:240px;height:clamp(115px,16vh,160px)}
@media(max-width:800px){.review-grid{grid-template-rows:minmax(195px,1fr) minmax(190px,1fr);gap:10px}.review-character{grid-template-rows:73px 22px minmax(94px,1fr);gap:2px}.review-character .open-character .word-hanzi{font-size:59px}.review-character .word-list .word-card{padding:5px!important}.review-grid .sentence-picture img{width:95px;height:80px}.review-grid .sentence-card{justify-content:flex-start}.review-grid>.sentence-list{grid-template-rows:repeat(2,minmax(90px,1fr));gap:7px}.review-character .word-photo img{height:45px}}
@media(max-height:650px){.review-grid{flex:none;grid-template-rows:auto auto}.review-character{display:flex;flex-direction:column;gap:2px}.review-character .word-list{height:auto}.review-grid>.sentence-list{grid-template-rows:auto auto}.review-character .open-character .word-hanzi{font-size:52px}}
.review-grid{grid-template-columns:minmax(0,1fr)!important}.setting-icon{width:29px;height:29px;object-fit:contain;display:block;flex:none}.setting-section-label,#helperLabel,#durationLabel,#timeVisibilityLabel{display:flex;align-items:center;gap:7px}.setting-section-label .setting-icon,#helperLabel .setting-icon{width:25px;height:25px}#preferencesContent [data-scope],#preferencesContent [data-clock]{display:flex;align-items:center;justify-content:center;gap:8px}#preferencesContent [data-clock] .setting-icon{width:33px;height:33px}#preferencesContent #preferencesRecords{display:flex;align-items:center;justify-content:center;gap:7px}#preferencesContent .learning-tools #pinyinToggle{border:0;background:#f4f8fb;border-radius:12px;padding:5px 8px}#preferencesContent .duration-control .setting-icon{width:23px;height:23px}.settings-button .setting-icon{width:27px;height:27px}.setting-button-label{line-height:1.35}#preferencesContent{gap:15px}#preferencesDialog .dialog-top{margin-bottom:15px}.time-visibility input{flex:none}#preferencesContent .scope-panel{gap:8px}#preferencesContent [data-clock]{min-height:48px}#preferencesContent [data-scope]{min-height:46px}
@media(max-width:600px){#preferencesDialog{padding:16px;border-radius:22px;max-height:92dvh}#preferencesContent{gap:13px}#preferencesContent [data-clock],#preferencesContent [data-scope]{font-size:11px;padding:6px;gap:5px}#preferencesContent [data-clock] .setting-icon,#preferencesContent [data-scope] .setting-icon{width:27px;height:27px}#preferencesContent .languages button{padding:6px 8px;min-height:34px}.helper-choice{min-height:35px;font-size:11px}.setting-section-label{margin-bottom:-7px}#helperControl{gap:6px!important}}
body[data-view=home]{padding-bottom:0!important}.review-character{grid-template-rows:112px 20px minmax(110px,1fr)}.review-character .word-photo img{height:56px}.review-character .word-list .word-card{padding:6px!important;gap:3px}.review-character .open-character{padding:0}.review-character .open-character .word-hanzi{line-height:1.05}.review-character .open-character rt{font-size:20px;line-height:1.2}.review-grid .sentence-picture,body[data-view=detail] .sentence-picture{display:flex;align-items:center;justify-content:center;flex:0 0 auto;overflow:visible!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0;padding:0!important;background:transparent!important;border:0!important;max-width:100%}.review-grid .sentence-picture img,body[data-view=detail] .sentence-picture img{display:block;object-fit:contain!important;flex:none;max-height:none!important;max-width:100%;height:110px;width:230px}.review-grid .sentence-content,body[data-view=detail] .sentence-content{flex:0 0 auto;min-width:0}.review-grid .sentence-card,body[data-view=detail] .sentence-card{overflow:visible!important}.word-full-audio,.detail-character .word-card>.word-full-audio,.review-character .word-card>.word-full-audio{display:inline-flex!important}.detail-character #detailWrite{width:auto!important}body[data-view=detail] .detail-character{display:flex!important;flex-direction:column;align-items:center;flex-shrink:0;gap:5px}body[data-view=detail] #detailTitle{position:static!important;min-height:112px;display:flex;align-items:center;justify-content:center;flex:none}body[data-view=detail] #detailWords{flex:none;height:auto}.detail-title .word-hanzi{line-height:1.1}body[data-view=detail] #detailSentences{align-items:stretch}
@media(max-width:800px){.review-character{grid-template-rows:80px 20px minmax(94px,1fr)}.review-character .word-photo img{height:45px}.review-character .open-character rt{font-size:18px}.review-grid .sentence-picture img,body[data-view=detail] .sentence-picture img{width:93px;height:85px}.review-grid .sentence-content,body[data-view=detail] .sentence-content{flex:1;min-width:0}body[data-view=detail] #detailTitle{min-height:94px}.review-grid .sentence-card,body[data-view=detail] .sentence-card{align-items:center}}
@media(max-height:650px){.review-character{display:flex}.review-character .word-list{height:auto}.review-character .open-character rt{font-size:17px}}
.review-character{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:112px 20px minmax(110px,160px);align-content:space-evenly}.review-character .open-character{grid-column:1!important;grid-row:auto!important;width:100%;display:flex;justify-content:center;align-items:center}.review-character>.text-button{grid-column:1!important;grid-row:auto!important;margin:0 auto;width:auto}.review-character .word-list{grid-column:1!important;grid-row:auto!important}.success-message{display:none!important}
@media(max-width:800px){.review-character{grid-template-rows:80px 20px minmax(94px,145px)}.review-grid{grid-template-rows:minmax(205px,1fr) minmax(190px,1fr)}}
@media(min-width:601px) and (max-width:900px) and (min-height:800px){.review-character{grid-template-rows:112px 20px 165px}.review-character .open-character .word-hanzi{font-size:76px}.review-character .open-character rt{font-size:22px}.review-character .word-photo img{height:70px}.review-character .word-list .word-hanzi{font-size:30px}.review-character .word-list rt{font-size:15px!important}.review-grid>.sentence-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;gap:12px}.review-grid .sentence-card{flex-direction:column;justify-content:center;gap:10px;padding:12px}.review-grid .sentence-picture img{width:230px;height:165px}.review-grid .sentence-content{flex:0 0 auto;width:100%}.review-grid .sentence-words,.review-grid .sentence-top{justify-content:center}}
/* Natural card heights: distribute space between learning layers, never inside oversized boxes. */
.review-grid{display:flex!important;flex-direction:column;justify-content:space-evenly;align-items:center;gap:14px;min-height:0;flex:1}.review-character{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:7px;flex:none;width:100%;height:auto}.review-character .open-character{height:105px;flex:none;width:100%;padding:0}.review-character>.text-button{min-height:20px;flex:none;margin:0;padding:2px}.review-character .word-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));height:auto!important;flex:none;width:100%;max-width:820px;gap:9px}.review-character .word-list .word-card{height:auto!important;min-height:140px;padding:8px!important;justify-content:center;align-self:stretch}.review-grid>.sentence-list{flex:none;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto!important;align-items:stretch;gap:12px}.review-grid .sentence-card{height:auto;min-height:238px;flex-direction:column;justify-content:center;gap:8px;padding:12px}.review-grid .sentence-picture img{height:110px;width:230px}.review-grid .sentence-content{flex:0 0 auto}.review-character .word-list:empty{display:none!important}
@media(max-width:600px){.review-grid{justify-content:space-evenly;gap:11px}.review-character{gap:5px}.review-character .open-character{height:78px}.review-character .word-list{gap:6px}.review-character .word-list .word-card{min-height:116px;padding:5px!important}.review-grid>.sentence-list{grid-template-columns:1fr;gap:8px}.review-grid .sentence-card{flex-direction:row;min-height:100px;padding:8px;gap:8px;justify-content:flex-start}.review-grid .sentence-picture img{width:93px;height:85px}.review-grid .sentence-content{flex:1}.review-grid .sentence-top,.review-grid .sentence-words{justify-content:flex-start}.review-character .word-photo img{height:45px}}
@media(min-width:601px) and (max-width:900px) and (min-height:800px){.review-grid{gap:20px}.review-character .open-character{height:115px}.review-character .word-list .word-card{min-height:176px;padding:10px!important}.review-character .word-photo img{height:86px}.review-grid .sentence-card{min-height:330px;padding:16px;gap:12px}.review-grid .sentence-picture img{height:180px;width:260px}.review-grid .sentence-words,.review-grid .sentence-top{justify-content:center}}
@media(max-height:650px){.review-grid{flex:none;justify-content:flex-start}.review-character .open-character{height:73px}.review-character .word-list .word-card{min-height:110px}.review-grid .sentence-card{min-height:100px}}
@media(max-width:600px) and (max-height:750px){.review-grid{gap:8px;justify-content:flex-start}.review-character{gap:3px}.review-character .open-character{height:69px}.review-character .open-character .word-hanzi{font-size:52px;line-height:1}.review-character .open-character rt{font-size:16px;line-height:1.1}.review-character .word-list .word-card{min-height:105px;padding:5px!important;gap:3px}.review-character .word-photo img{height:38px}.review-character .word-card .word-hanzi{font-size:23px!important;line-height:1.1}.review-character .word-card .word-reading{line-height:1;gap:0}.review-character .word-card rt{font-size:12px!important;line-height:1.1;padding-bottom:2px}.review-character .word-card .word-pinyin{line-height:1}.review-character .word-card .nl-help{font-size:9px;line-height:1.15;margin:0}.review-grid>.sentence-list{gap:7px}.review-grid .sentence-card{min-height:98px;padding:7px;gap:7px}.review-grid .sentence-picture img{width:80px;height:76px}.review-grid .sentence-content{padding:0}.review-grid .sentence-top{min-height:0;margin:0 0 2px}.review-grid .sentence-audio{width:24px;min-width:24px;min-height:22px;height:22px;padding:2px}.review-grid .sentence-audio svg{width:18px;height:18px}.review-grid .sentence-words{gap:3px}.review-grid .unit-block{gap:1px}.review-grid .sentence-card .word-hanzi{font-size:22px!important;line-height:1.15}.review-grid .sentence-card .word-reading{line-height:1;gap:0}.review-grid .sentence-card rt{font-size:11px!important;line-height:1.1;padding-bottom:1px}.review-grid .sentence-card .word-pinyin{line-height:1}.review-grid .unit-gloss{font-size:8.5px!important;line-height:1.1;max-width:10ch}.review-grid .sentence-gloss{font-size:10px!important;line-height:1.2;margin:4px 0 0}.review-grid .punctuation{font-size:21px}}
body[data-view=home] #startbar{display:none!important}.track-tabs .track-topic{display:flex;align-items:center;justify-content:center;min-height:36px;border:2px solid #e5ecf2;border-bottom-width:4px;border-radius:13px;font-size:12px;padding:8px 15px;color:#617d91;font-weight:750;background:#fff}.track-tabs .track-topic:hover{background:#f4f9fc;border-color:#bad5e6}body[data-view=home] .track-tabs>button,body[data-view=home] .track-tabs .track-topic{flex:1;margin:0;white-space:nowrap}body[data-view=home] .track-tabs{max-width:660px;width:100%;margin:0 auto}#preferencesContent #libraryOpen{display:flex;align-items:center;justify-content:center;font-size:12px;padding:8px;border:1px solid #e1eaf0;border-radius:12px;background:#f6fafc}body[data-track=recognize][data-view=home] .mode-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(135px,1fr));max-width:640px;max-height:520px;align-self:center;margin:auto}.writing-board{box-sizing:border-box;width:min(34dvh,280px,86vw)!important;height:auto!important;aspect-ratio:1/1;min-height:0!important;flex:none;margin:8px auto!important;padding:0!important}.writing-board svg{display:block;width:100%!important;height:100%!important;max-width:none;overflow:visible}.writing-status:empty,.stroke-status:empty{display:none!important}.writing-mistake{border-color:#eaa09a!important}.writing-heading{margin:0!important}.writing-controls{margin-top:5px!important}.writing-status{font-size:11px}
@media(max-width:600px){body[data-view=home] .track-tabs>button,body[data-view=home] .track-tabs .track-topic{font-size:12px;padding:7px 8px;min-height:35px}.writing-board{width:min(35dvh,260px,86vw)!important}.writing-heading .word-hanzi{font-size:34px}.writing-heading rt{font-size:17px!important}.writing-controls button{min-height:35px}.writing-controls{gap:7px}}
.question-counts{display:flex;gap:8px}.question-counts button{flex:1;min-height:36px;border:2px solid #e3ebf1;border-bottom-width:4px;padding:7px;border-radius:12px;background:#fff}.question-counts button[aria-pressed=true]{border-color:#85cbbb!important;background:#edf9f5!important;color:#167e68}.pinyin-hint{width:37px;height:37px;min-height:37px;border:1px solid #e5dfce;background:#fffdf4;border-radius:12px;padding:6px;display:inline-flex;align-items:center;justify-content:center}.pinyin-hint svg{width:25px;height:25px}.pinyin-hint[aria-pressed=true]{background:#fff0b8;border-color:#d6b563}.answer-reading{display:flex;flex-direction:column;align-items:center;gap:3px}.answer-py{font-size:15px;line-height:1.2}.answer-py[hidden]{display:none!important}.answer-hanzi{line-height:1.15}.mistake-button{font-size:12px;min-height:38px;border:1px solid #dfe9ef;border-radius:12px;background:#f6fafc;padding:8px 12px;color:#57788d}#preferencesContent #finishMistakes[hidden]{display:none}.writing-status:empty{display:none!important}

/* Keep the current scene painted until the next is decoded. */
#busy{display:none!important}html,body,#app,main,section{view-transition-name:none!important}#reviewView,#questionView,#detail{animation:none!important;transition:none!important}

header .languages{display:none!important}

.home-heading>.lp-badge{align-self:center;flex:none;margin-left:auto}#detailTitle>.lp-read{margin:3px auto}.word-card>.lp-read{position:relative;z-index:1}.sentence-content>.lp-read{margin-top:5px}.word-card .word-photo img{object-fit:contain}

.open-character,.detail-title{text-align:center;margin:8px 0 22px!important}.open-character .word-hanzi,.detail-title .word-hanzi{font-size:108px!important;line-height:1.15!important}.open-character rt,.detail-title rt{font-size:24px!important}.word-list{grid-template-columns:repeat(var(--word-cols,3),minmax(0,1fr))!important;justify-items:center;gap:12px!important}.word-list>.word-card{width:100%;max-width:330px}.word-card .word-hanzi{font-size:36px!important;line-height:1.3!important}.word-card .word-reading rt{font-size:19px!important;line-height:1.6!important}.sentence-words .word-hanzi{font-size:32px!important;line-height:1.3!important}.sentence-words rt{font-size:18px!important;line-height:1.6!important}.target-reading{font-size:24px;text-align:center;margin-bottom:6px}.word-card .word-line{max-width:100%}#preferencesContent{display:block!important;overflow:hidden!important}#preferencesDialog .setting-section-label{font-size:12px;margin:3px 0}#preferencesDialog{padding:16px!important}#preferencesDialog #helperLabel{display:none}#preferencesDialog .language-helper-note{display:none}@media(max-width:700px){.open-character,.detail-title{margin:5px 0 16px!important}.open-character .word-hanzi,.detail-title .word-hanzi{font-size:90px!important}.word-card .word-hanzi{font-size:31px!important}.word-card .word-reading rt{font-size:17px!important}.sentence-words .word-hanzi{font-size:28px!important}.sentence-words rt{font-size:16px!important}.word-list{gap:7px!important}.word-card{padding-left:4px!important;padding-right:4px!important}#preferencesDialog .helper-choice{min-height:34px;padding:6px!important;font-size:12px}#preferencesDialog .scope-panel{padding:0!important}.settings-pane{gap:5px}#preferencesDialog #customMinutes{max-width:75px}#preferencesDialog .clock-choices{gap:5px}}

#preferencesDialog #resume{display:none!important}@media(max-width:700px){.review-character .word-card .word-hanzi,#detailWords .word-card .word-hanzi{font-size:var(--compact-word-size,31px)!important}.review-character .word-card .word-reading rt,#detailWords .word-card .word-reading rt{font-size:var(--compact-pinyin-size,17px)!important}}
body[data-view=detail] #detailTitle{position:relative!important;display:block!important;width:100%;min-height:165px}body[data-view=detail] #detailTitle .hero-reading{min-height:160px}@media(max-width:600px){body[data-view=detail] #detailTitle{min-height:150px}body[data-view=detail] #detailTitle .hero-reading{min-height:145px}}
body[data-track=recognize][data-view=home] .mode-list{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(90px,1fr));max-width:900px;max-height:none;margin:0 auto;width:100%}body[data-track=recognize][data-view=home] .mode-card{min-height:90px}@media(max-width:800px){body[data-track=recognize][data-view=home] .mode-list{max-width:600px;padding:6px 3px 8px;grid-template-rows:repeat(3,minmax(91px,1fr))}body[data-track=recognize][data-view=home] .mode-card{min-height:91px}}
