@font-face{font-family:LotusKai;src:url("fonts/lotus-kai-extra-v1.woff2") format("woff2");font-display:swap;unicode-range:U+5B8C,U+5F62,U+9996}
/* Hidden panels are a state boundary, never a layout preference. */
html body #app [hidden]:is(#home,#play,#detail,#finish,#daily,#questionView,#reviewView,#studyNavigation,#studyPrevious,#next){display:none!important}
#detailTitle .char-sound.target,#reviewView .open-character .char-sound.target,#questionBody>.large-character{background:transparent!important;box-shadow:none!important;border-color:transparent!important}
/* Home: a learning group above a balanced grid of direct-entry games. */
body[data-learning-area=characters][data-view=home] #home{display:flex!important;flex-direction:column!important;gap:12px!important;height:100%!important;overflow:auto!important;padding-bottom:16px!important}
body[data-learning-area=characters][data-view=home] .home-heading{min-height:68px!important;padding:12px 14px!important;flex:none!important}
body[data-learning-area=characters][data-view=home] #homeTitle{font-size:clamp(20px,4.7vw,28px)!important;margin:0!important}
body[data-learning-area=characters][data-view=home] #homeTagline{font-size:12px!important;margin:4px 0 0!important}
.daily-study{flex:none;padding:15px;border:1px solid #d5e4c9;border-radius:22px;background:linear-gradient(145deg,#f3f8e9,#fff 70%);box-shadow:0 3px 0 #e1ead9}
.daily-study-top h2{font-size:21px;line-height:1.3;margin:0;color:#315b3c}.daily-study-top p{font-size:12px;line-height:1.4;margin:4px 0 10px;color:#60785e}
.study-size-label{font-size:12px;color:#5a7055;margin:8px 0 5px}.study-size-options,.study-order-options{display:grid;gap:7px}.study-size-options{grid-template-columns:repeat(4,minmax(0,1fr))}.study-order-options{grid-template-columns:repeat(2,minmax(0,1fr))}.study-size-options button,.study-order-options button{min-height:36px;border:1px solid #d5e2c9;border-radius:12px;background:#fff;color:#52704b;font:700 15px system-ui}.study-size-options button[aria-pressed=true],.study-order-options button[aria-pressed=true]{background:#e5efce;border-color:#94b875;color:#355c35;box-shadow:0 2px 0 #a9bf91}
.daily-study-characters,.completed-characters{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;padding:12px 0}.daily-study-char,.completed-characters>span{text-align:center;font-family:LotusKai,serif;font-size:28px;line-height:1.3}
.daily-study-actions{display:grid;grid-template-columns:1.3fr 1fr;gap:8px}.daily-study-actions button{width:100%;min-height:44px;margin:0!important;font-size:15px!important;line-height:1.3;padding:7px!important}.daily-study-actions .secondary{border:1px solid #a9bf99;border-radius:14px;background:#fff;color:#46683e;font-weight:700}
body[data-learning-area=characters][data-view=home] .home-grid{flex:1 0 230px!important;min-height:230px!important;height:auto!important;display:flex!important}
body[data-learning-area=characters][data-view=home] .mode-panel{height:100%!important;min-height:0!important;width:100%;display:flex!important;flex-direction:column!important}
body[data-learning-area=characters][data-view=home] #modeTitle{display:block!important;flex:none;font-size:14px!important;margin:2px 0 10px;color:#5c7156}
body[data-learning-area=characters][data-view=home] #modeList{height:auto!important;flex:1!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(100px,1fr))!important;gap:10px!important;max-height:320px!important}
body[data-learning-area=characters][data-view=home] .mode-card{grid-column:span 3;padding:8px 3px!important;gap:4px!important;min-height:100px!important;justify-content:center!important}body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:nth-child(n+5){grid-column:span 4}
body[data-learning-area=characters][data-view=home] .mode-card .level-art{width:clamp(50px,8dvh,72px)!important;height:clamp(48px,7.5dvh,68px)!important;flex:none!important}body[data-learning-area=characters][data-view=home] .mode-card strong{font-size:12px!important;line-height:1.3!important;overflow-wrap:anywhere;min-height:28px!important}body[data-learning-area=characters][data-view=home] .mode-card .level-number{display:none!important}
/* Learning: the character, word row and sentence row share the available height. */
#reviewView{min-height:0!important;overflow:auto!important}
body[data-study-phase=learn] #reviewView,body[data-study-phase=practice] #reviewView{flex:1 1 0!important;height:auto!important;max-height:none!important}
#reviewView .review-grid,#detail .detail-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(76px,.7fr) minmax(212px,1.6fr) minmax(200px,1.7fr)!important;height:100%!important;min-height:0!important;gap:12px!important;padding:0!important;align-content:stretch!important}
#reviewView .review-character,#detail .detail-character{display:contents!important}
#reviewView .review-character>.text-button{display:none!important}
#reviewView .open-character,#detail #detailTitle{grid-column:1;grid-row:1;min-height:0!important;height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important}
#reviewView .hero-reading,#detail #detailTitle .hero-reading{height:auto!important;max-height:100%;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important}
#reviewView .open-character .word-hanzi,#detail #detailTitle .word-hanzi{font-size:clamp(58px,8.5dvh,80px)!important;line-height:1.1!important}
#reviewView .word-list,#detail #detailWords{grid-column:1;grid-row:2;display:grid!important;grid-template-columns:repeat(var(--word-cols,3),minmax(0,1fr))!important;grid-template-rows:minmax(64px,1fr) minmax(54px,auto) 28px minmax(34px,auto)!important;align-items:stretch!important;gap:6px 9px!important;height:100%!important;min-height:0!important;overflow:visible!important;margin:0!important}
#reviewView .word-card,#detailWords .word-card{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(64px,1fr) 60px 28px minmax(36px,auto)!important;grid-row:span 4;align-items:center!important;justify-items:center!important;gap:6px!important;padding:8px 4px!important;width:100%!important;min-width:0!important;height:100%!important;min-height:0!important;text-align:center!important;overflow:visible!important}
@supports(grid-template-rows:subgrid){#reviewView .word-card,#detailWords .word-card{grid-template-rows:subgrid!important}}
#reviewView .word-card .word-photo,#detailWords .word-card .word-photo{width:100%!important;height:100%!important;max-height:116px!important;min-height:0!important;min-width:0!important;grid-row:1!important;grid-column:1!important;margin:0!important;padding:0!important;display:flex;align-items:center;justify-content:center}
#reviewView .word-photo img,#detail .word-photo img{width:100%!important;height:100%!important;max-height:116px!important;object-fit:contain!important}
#reviewView .word-line,#detailWords .word-line{grid-row:2!important;grid-column:1!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:wrap!important;width:100%!important;min-width:0!important;margin:0!important;gap:0!important}
#reviewView .word-card .word-hanzi,#detailWords .word-card .word-hanzi{font-size:clamp(24px,7vw,30px)!important;line-height:1.15!important}
#reviewView .word-card .char-sound,#detailWords .word-card .char-sound{padding:0!important;min-height:0!important;min-width:0!important}
#reviewView .word-card rt,#detailWords .word-card rt{font-size:14px!important;white-space:nowrap!important}
#reviewView .word-full-audio,#detailWords .word-full-audio{grid-row:3!important;grid-column:1!important;position:static!important;width:28px!important;height:28px!important;min-height:28px!important;margin:0!important;padding:2px!important;align-self:center!important;justify-self:center!important}
#reviewView .word-card>.nl-help,#detailWords .word-card>.nl-help{grid-row:4!important;grid-column:1!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;width:100%!important;max-width:100%!important;min-height:32px!important;margin:0!important;padding:2px 1px!important;font-size:13px!important;line-height:1.25!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important}
body:not(.with-support) #reviewView .word-card>.nl-help,body:not(.with-support) #detailWords .word-card>.nl-help{visibility:hidden!important}
#reviewView .word-list[style*="--word-cols: 1"]{max-width:220px!important;width:100%!important;justify-self:center!important}
#reviewView .sentence-list,#detail .detail-expressions{grid-column:1;grid-row:3;min-height:0!important;height:100%!important;overflow:visible!important}
#reviewView .sentence-list,#detailSentences{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:repeat(var(--sentence-rows,2),minmax(94px,1fr))!important;gap:10px!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;align-content:stretch!important}
#reviewView .sentence-card,#detail .sentence-card{display:grid!important;grid-template-columns:clamp(54px,16vw,80px) minmax(0,1fr)!important;align-items:center!important;align-self:stretch!important;min-height:94px!important;height:100%!important;gap:8px!important;padding:7px!important;margin:0!important;overflow:visible!important}
#reviewView .sentence-picture img,#detail .sentence-picture img{width:100%!important;height:clamp(54px,16vw,80px)!important;object-fit:contain!important}
#reviewView .sentence-content,#detail .sentence-content{min-width:0!important;padding:3px 0!important}
#reviewView .sentence-words,#detail .sentence-words{justify-content:center!important;text-align:center!important;gap:2px!important}
#reviewView .sentence-words .word-hanzi,#detail .sentence-words .word-hanzi{font-size:clamp(22px,6.1vw,27px)!important;line-height:1.3!important}
#reviewView .sentence-words rt,#detail .sentence-words rt{font-size:14px!important}
#reviewView .sentence-gloss,#detail .sentence-gloss{font-size:14px!important;line-height:1.3!important;text-align:center!important;margin:6px 0 0!important;overflow-wrap:anywhere!important}
#detail .detail-top{padding-bottom:4px!important;margin-bottom:0!important}
.study-navigation{display:grid;grid-template-columns:1fr;gap:9px;flex:none!important;min-height:0!important;margin:14px 0 max(24px,env(safe-area-inset-bottom))!important;align-items:stretch!important}
.study-navigation:has(#studyPrevious:not([hidden])){grid-template-columns:1fr 1.7fr}.study-navigation:has(#next[hidden]):has(#studyPrevious[hidden]){display:none!important}
body #play #studyNavigation #next,body #play #studyNavigation #studyPrevious{min-height:48px!important;height:48px!important;margin:0!important;width:100%;align-self:stretch!important;font-size:15px!important;line-height:1.3!important;padding:8px!important}
#studyPrevious{background:#fff;border:1px solid #d8e3d0;border-radius:14px;color:#58734e}#studyPrevious:disabled{opacity:.35}#studyPrevious[hidden]{display:none!important}
.study-reading-note{text-align:center;color:#64815a;font-size:15px;padding:12px;line-height:1.5}.study-basic .review-grid{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-height:0!important;height:100%!important}.study-basic .word-list:empty,.study-basic .sentence-list:empty{display:none!important}#reviewView.study-basic .open-character{height:180px!important;flex:none}#reviewView.study-basic .open-character .word-hanzi{font-size:110px!important}
/* Completion has a clear next action and uses the same direct-entry icons. */
#reviewView.study-summary-view{flex:1!important;display:flex;align-items:center;justify-content:center;overflow:auto!important}
.study-summary{width:100%;max-width:900px;margin:auto;padding:16px 4px 24px;text-align:center}.study-summary h1{font-size:27px;color:#355e3b;margin:8px 0}.study-summary>p{font-size:15px;color:#63765c;line-height:1.4}.study-summary>.primary{min-height:48px;width:100%;margin:12px 0!important}.study-summary-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.study-summary-actions button{min-height:44px;border:1px solid #c5d7b8;border-radius:14px;background:#fff;color:#52704b;padding:7px}.summary-games{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.summary-games .mode-card{min-height:88px;padding:6px!important;gap:4px}.summary-games .level-art{width:50px;height:46px}.summary-games strong{font-size:12px;line-height:1.3}.summary-game-label{margin-top:20px!important}.completed-characters{max-width:700px;margin:0 auto}
#preferencesDialog .question-counts{grid-template-columns:repeat(4,minmax(0,1fr))!important}
/* The quiz has its own layout, active only while its panel is visible. */
@media (orientation:portrait){
 #questionView:not([hidden]):has(#answerList:not(:empty)){display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,.9fr) minmax(0,1.1fr) auto!important;align-content:stretch!important;justify-content:stretch!important;gap:18px!important;padding:14px 0 clamp(32px,6dvh,60px)!important;min-height:0!important;overflow:auto!important}
 #questionView:not([hidden]):has(#answerList:not(:empty)) #questionTitle,#questionView:not([hidden]):has(#answerList:not(:empty)) #questionHint{display:none!important}
 #questionView:not([hidden]):has(#answerList:not(:empty)) #questionBody{grid-row:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;height:100%!important;min-height:0!important;gap:14px!important;margin:0!important}
 #questionView:not([hidden]):has(#answerList:not(:empty)) #answerList{grid-row:2!important;align-self:stretch!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:repeat(3,minmax(64px,1fr))!important;gap:10px!important;width:92%!important;max-width:560px!important;max-height:350px!important;height:100%!important;min-height:0!important;margin:0 auto!important;padding:0!important}
 #answerList .answer-button{height:auto!important;min-height:0!important;display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;margin:0!important;padding:8px!important;font-size:clamp(30px,8vw,40px)!important;line-height:1.2!important}
 #answerList .answer-hanzi{font-size:clamp(32px,8.5vw,44px)!important}#answerList .answer-py{font-size:16px!important}
 #questionBody>.large-character{font-size:clamp(90px,13dvh,128px)!important;line-height:1.1!important;flex:none!important;order:-1!important;margin:0!important}
 #questionBody .question-sound,#questionBody .listen-button{height:44px!important;width:44px!important;min-height:44px!important;min-width:44px!important;margin:0!important;padding:5px!important;flex:none!important}
 #questionFeedback{grid-row:3!important;margin:0!important;min-height:0!important;line-height:1.3}#questionFeedback:empty{display:none!important}
 #questionBody .question-picture{min-height:0!important;height:clamp(90px,18dvh,190px)!important;max-height:65%!important;flex:1 1 auto!important}#questionBody .question-picture img{height:100%!important;width:100%!important;object-fit:contain!important}
 #questionBody .question-audio-row{min-height:34px!important;flex:none!important;margin:0!important}#questionBody .question-translation{font-size:13px!important;line-height:1.25!important;margin:0!important;flex:none!important}
}
@media(max-width:599px){.daily-study-characters,.completed-characters{grid-template-columns:repeat(5,minmax(0,1fr))}.daily-study{padding:13px}.daily-study-actions button{font-size:14px!important}}
@media(max-height:650px){body[data-learning-area=characters][data-view=home] .home-heading{min-height:54px!important;padding:8px 12px!important}.daily-study{padding:10px}.daily-study-top h2{font-size:19px}.daily-study-top p{margin-bottom:5px}.daily-study-characters{padding:7px 0}.daily-study-char{font-size:23px;line-height:1.15}.daily-study-actions button{font-size:13px!important}.study-size-label{margin:5px 0 4px}.study-size-options button,.study-order-options button{min-height:32px}.study-navigation{margin-bottom:20px!important}#reviewView .review-grid,#detail .detail-grid{grid-template-rows:64px minmax(200px,1.5fr) minmax(190px,1.6fr)!important;gap:8px!important}#reviewView .open-character .word-hanzi,#detail #detailTitle .word-hanzi{font-size:53px!important}#reviewView .word-card .word-hanzi,#detailWords .word-card .word-hanzi{font-size:24px!important}#reviewView .word-card>.nl-help,#detailWords .word-card>.nl-help{font-size:12px!important}}
@media(max-height:650px) and (orientation:portrait){#questionView:not([hidden]):has(#answerList:not(:empty)){gap:12px!important;padding:8px 0 24px!important;grid-template-rows:minmax(0,.85fr) minmax(0,1.15fr) auto!important}#questionView:not([hidden]):has(#answerList:not(:empty)) #questionBody{gap:8px!important}#questionBody>.large-character{font-size:85px!important}#questionBody .question-sound,#questionBody .listen-button{height:36px!important;min-height:36px!important;width:36px!important;min-width:36px!important}#questionView:not([hidden]):has(#answerList:not(:empty)) #answerList{grid-template-rows:repeat(3,minmax(54px,1fr))!important;gap:8px!important}#answerList .answer-button{font-size:28px!important}}
@media(min-width:700px){.daily-study{padding:18px}.daily-study-char{font-size:34px}.daily-study-actions{max-width:700px;margin:0 auto}body[data-learning-area=characters][data-view=home] .mode-card strong{font-size:16px!important}body[data-learning-area=characters][data-view=home] .mode-card .level-art{height:75px!important;width:80px!important}#reviewView .word-card .word-hanzi,#detailWords .word-card .word-hanzi{font-size:36px!important}#reviewView .word-card rt,#detailWords .word-card rt{font-size:18px!important}#reviewView .sentence-words .word-hanzi,#detail .sentence-words .word-hanzi{font-size:32px!important}#reviewView .sentence-gloss,#detail .sentence-gloss{font-size:16px!important}.summary-games strong{font-size:16px}.summary-games .level-art{height:65px;width:70px}}
.study-group-navigation{flex:none!important;min-height:0;padding:4px 0 7px}.study-group-strip{display:flex;gap:5px;overflow-x:auto;scrollbar-width:thin;padding:2px 0 5px}.group-character{flex:1 0 36px;min-width:36px;min-height:36px;padding:2px!important;border:1px solid #d5e2c9;border-radius:10px;background:#fff;font-family:LotusKai,serif;font-size:23px}.group-character[aria-current=true]{border:2px solid #72a25c;background:#eaf3dc}.study-summary-back{margin-top:5px;min-height:32px;background:#f4f8ed;border:1px solid #d2e0c3;border-radius:10px;color:#52704b;font-size:13px}.study-group-navigation[hidden],.study-summary-back[hidden]{display:none!important}
#reviewView .sentence-list.has-sentence-navigation,#detailSentences.has-sentence-navigation{grid-template-rows:repeat(var(--sentence-rows,2),minmax(min-content,1fr)) 34px!important}
.sentence-navigation{grid-column:1;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;min-height:34px}.sentence-navigation button{min-height:32px;padding:4px 6px!important;background:#f5f9ef;border:1px solid #d6e3ca;border-radius:10px;color:#54734b;font-size:12px;line-height:1.2}.sentence-navigation button:disabled{opacity:.35}.sentence-navigation span{font-size:12px;color:#6b7d63}.sentence-current{border-color:#9bbf83!important}.completed-characters>button{min-height:44px;background:#f4f8ec;border:1px solid #d7e5cd;border-radius:12px;font-family:LotusKai,serif;font-size:30px;padding:3px}.result-review-hint{font-size:14px;color:#65795f;text-align:center}
#reviewView .review-grid,#detail .detail-grid{grid-template-rows:minmax(76px,.7fr) minmax(212px,1.6fr) minmax(242px,1.7fr)!important}
html body[data-study-phase] #play #studyNavigation #next,html body[data-study-phase] #play #studyNavigation #studyPrevious{height:48px!important;min-height:48px!important;margin:0!important;align-self:stretch!important}
#reviewView .review-grid,#detail .detail-grid{grid-template-rows:minmax(105px,.7fr) minmax(212px,1.6fr) minmax(min-content,1.7fr)!important}
.study-navigation{margin-bottom:max(32px,env(safe-area-inset-bottom))!important}
html body[data-view=detail] #detail .detail-character{display:contents!important}
html body[data-view=detail] #detail #detailTitle{height:100%!important;min-height:0!important;align-self:stretch!important}
html body[data-view=detail] #detail #detailTitle .hero-reading{height:auto!important;min-height:0!important}
.summary-games .mode-card{background:#fff!important;border-color:#d6e3ca!important;box-shadow:0 3px 0 #e2eadb!important}
#reviewView.study-basic{display:flex!important;flex-direction:column!important}#reviewView.study-basic .review-grid{display:flex!important;flex-direction:column!important;flex:1!important;align-items:center!important;justify-content:center!important;min-height:0!important;height:auto!important}#reviewView.study-basic .word-list:empty,#reviewView.study-basic .sentence-list:empty{display:none!important}.study-reading-note{flex:none;margin:0;padding:8px 12px}.study-group-strip{position:relative}
/* Pinyin belongs to the whole word; gaps belong between words, never inside them. */
#reviewView .sentence-words,#detail .sentence-words{column-gap:8px!important;row-gap:7px!important;align-items:center!important}
#reviewView .sentence-words .unit-block,#detail .sentence-words .unit-block{flex:0 0 auto!important;min-width:0!important;max-width:100%!important}
#reviewView .word-card .word-reading,#detailWords .word-card .word-reading,#reviewView .sentence-words .word-reading,#detail .sentence-words .word-reading{display:inline-grid!important;grid-template-columns:max-content!important;grid-template-rows:auto auto!important;align-items:center!important;justify-items:center!important;min-width:max-content!important;max-width:none!important;margin:0!important;padding:0!important}
#reviewView .word-reading>.word-hanzi,#detail .word-reading>.word-hanzi{grid-row:2!important;grid-column:1!important;letter-spacing:0!important;gap:0!important;white-space:nowrap!important}
#reviewView .word-reading>rt,#detail .word-reading>rt{grid-row:1!important;grid-column:1!important;position:static!important;display:block!important;max-width:none!important;width:auto!important;margin:0!important;padding:0!important;white-space:nowrap!important;line-height:1.3!important;transform:none!important}
#reviewView .word-pinyin,#detail .word-pinyin{min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;line-height:1.3!important}
#reviewView .word-card,#detailWords .word-card{--word-max-size:30px;--pinyin-max-size:14px}
@supports(width:1cqw){#reviewView .word-card,#detailWords .word-card{container-type:inline-size}#reviewView .word-card .word-hanzi,#detailWords .word-card .word-hanzi{font-size:clamp(18px,calc((100cqw - 6px)/var(--word-count)),var(--word-max-size))!important}#reviewView .word-card rt,#detailWords .word-card rt{font-size:clamp(10px,calc((100cqw - 6px)/var(--pinyin-count)*1.65),var(--pinyin-max-size))!important}}
.optional-practice{margin-top:20px;text-align:left;border-top:1px solid #dce6d3;padding-top:14px}.optional-practice>summary{cursor:pointer;min-height:42px;text-align:center;color:#5a7950;font-weight:650;font-size:15px}.optional-practice .summary-games{margin-top:8px}
@media(min-width:700px){#reviewView .word-card,#detailWords .word-card{--word-max-size:36px;--pinyin-max-size:18px}}
/* One compact learning entry; games below remain one-tap tests. */
body[data-learning-area=characters][data-view=home] #dailyStudy{padding:16px 20px;max-width:100%;width:100%;background:#fbfdf8;box-shadow:none;border:1px solid #dce7d3}
#dailyStudy>.daily-study-top,#dailyStudy>.study-size-label,#dailyStudy>.study-size-options,#dailyStudy>.study-order-options,#dailyStudy>.daily-study-characters,#dailyStudy>.daily-study-actions{display:none!important}
.compact-learning-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:960px;margin:0 auto}.compact-learning-copy h2{font-size:23px;margin:0;color:#365b3d}.compact-learning-copy p{font-size:13px;color:#74836c;margin:5px 0 0}.compact-learning-controls{display:flex;align-items:center;gap:9px}.compact-learning-controls select{width:auto;min-width:76px;min-height:44px;border:1px solid #d4dfca;border-radius:12px;background:#fff;color:#526b49;padding:7px 10px;font:600 14px system-ui}.compact-learning-controls #dailyStudyStart{width:auto;min-width:150px;min-height:46px;margin:0!important;padding:8px 18px;font-size:15px;line-height:1.3}
body[data-learning-area=characters][data-view=home] #modeList{max-height:none!important}body[data-learning-area=characters][data-view=home] .mode-card .level-art{width:clamp(64px,12dvh,110px)!important;height:clamp(62px,11.5dvh,106px)!important}body[data-learning-area=characters][data-view=home] .home-heading>.today-mini{display:none!important}
@media(max-width:599px){body[data-learning-area=characters][data-view=home] #dailyStudy{padding:13px}.compact-learning-entry{display:block}.compact-learning-copy{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:11px}.compact-learning-copy h2{font-size:20px}.compact-learning-copy p{font-size:11px;margin:0}.compact-learning-controls{gap:7px}.compact-learning-controls select{min-width:0;padding:7px 5px;font-size:13px}.compact-learning-controls #studyCountSelect{width:66px}.compact-learning-controls #studyOrderSelect{width:82px}.compact-learning-controls #dailyStudyStart{min-width:0;flex:1;padding:7px;font-size:14px}}
@media(max-width:599px) and (orientation:portrait){body[data-learning-area=characters][data-view=home] #modeList{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(78px,1fr))!important;gap:9px!important}body[data-learning-area=characters][data-view=home] .mode-card,body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:nth-child(n+5){grid-column:auto!important;min-height:78px!important;display:flex!important;flex-direction:row!important;gap:7px!important;padding:7px!important}body[data-learning-area=characters][data-view=home] .mode-card .level-art{width:53px!important;height:53px!important}body[data-learning-area=characters][data-view=home] .mode-card strong{min-height:0!important;font-size:13px!important}body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:last-child{grid-column:1/-1!important}}
@media(max-width:599px) and (orientation:portrait){body[data-learning-area=characters][data-view=home] .mode-card strong{width:auto!important;flex:1;min-width:0}body[data-learning-area=characters][data-view=home] .mode-card .level-art{margin:0!important}}
html body[data-view=detail] #detail .detail-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(105px,.7fr) minmax(212px,1.6fr) minmax(min-content,1.7fr)!important;width:100%!important;max-width:960px!important;height:100%!important;min-height:0!important;gap:12px!important;margin:0 auto!important;align-content:stretch!important}
html body[data-view=detail] #detail #detailTitle{grid-column:1!important;grid-row:1!important}html body[data-view=detail] #detail #detailWords{grid-column:1!important;grid-row:2!important;width:100%!important;height:100%!important}html body[data-view=detail] #detail .detail-expressions{grid-column:1!important;grid-row:3!important;min-height:0!important;height:100%!important;width:100%!important}
html body[data-view=detail] #detail #detailWords .word-card{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:subgrid!important;grid-row:span 4!important;min-height:0!important;height:100%!important;align-items:center!important;justify-items:center!important}
html body[data-view=detail] #detail #detailWords .word-card .word-photo{min-height:64px!important;max-height:116px!important;align-self:stretch!important}html body[data-view=detail] #detail #detailWords .word-card .word-photo img{min-height:64px!important}
/* Explicit pane layout beats the retained desktop two-column stylesheet. */
html body[data-view=play] #play #reviewView:not([hidden]) .review-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(105px,.7fr) minmax(212px,1.6fr) minmax(min-content,1.7fr)!important;width:100%!important;max-width:1000px!important;height:100%!important;min-height:0!important;gap:12px!important;margin:0 auto!important;padding:0!important;align-content:stretch!important}
html body[data-view=play] #play #reviewView .review-character{display:contents!important}
html body[data-view=play] #play #reviewView .open-character{grid-column:1!important;grid-row:1!important;width:100%!important;height:100%!important}
html body[data-view=play] #play #reviewView .word-list{grid-column:1!important;grid-row:2!important;width:100%!important;height:100%!important}
html body[data-view=play] #play #reviewView .sentence-list{grid-column:1!important;grid-row:3!important;width:100%!important;height:100%!important}
html body[data-view=play] #play #reviewView .word-card{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:subgrid!important;grid-row:span 4!important;min-height:0!important;height:100%!important;align-items:center!important;justify-items:center!important}
html body[data-view=play] #play #reviewView .word-card .word-photo{min-height:64px!important;max-height:116px!important;align-self:stretch!important}html body[data-view=play] #play #reviewView .word-card .word-photo img{min-height:64px!important}
body[data-learning-area=characters][data-view=home] #modeList{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(86px,1fr))!important}body[data-learning-area=characters][data-view=home] .mode-card,body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:nth-child(n+5){grid-column:auto!important;min-height:86px!important}
@media(max-width:599px) and (orientation:portrait){body[data-learning-area=characters][data-view=home] #modeList{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(5,minmax(68px,1fr))!important}body[data-learning-area=characters][data-view=home] .mode-card,body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:nth-child(n+5){grid-column:auto!important;min-height:68px!important}body[data-learning-area=characters][data-view=home] .mode-card:last-child,body[data-learning-area=characters][data-track=recognize][data-view=home] .mode-card:last-child{grid-column:1/-1!important}}
body[data-learning-area=characters][data-view=home] #modeList .mode-card{position:relative}
body[data-learning-area=characters][data-view=home] #modeList .mode-card.study-entry{background:linear-gradient(135deg,#e2efc9,#f2f8e9)!important;border:2px solid #9bbd76!important;box-shadow:0 3px 0 #cfdfbd!important}
#modeList .study-lock-mark{position:absolute;top:7px;right:8px;display:flex;align-items:center;justify-content:center;min-width:22px;min-height:21px;padding:2px 6px;border-radius:8px;background:#d9e8c8;color:#4e6d3e;font:600 11px/1.2 system-ui;pointer-events:none}
body[data-learning-area=characters][data-view=home] #modeList .mode-card.is-locked{background:#f5f7f3!important;border-color:#e0e6dc!important;box-shadow:0 2px 0 #e7ece3!important;color:#7a8673!important;opacity:1!important;cursor:not-allowed!important}
#modeList .mode-card.is-locked .level-art{opacity:.48;filter:grayscale(.4)}#modeList .mode-card.is-locked .study-lock-mark{background:#e8ede3;color:#819073}
@media(max-width:599px){#modeTitle{font-size:13px!important;line-height:1.35!important;min-height:18px!important}#modeList .study-lock-mark{top:4px;right:5px;font-size:10px;min-height:18px;padding:1px 5px}}
/* Only the learning entry keeps a highlight; games launch directly. */
body[data-learning-area=characters][data-view=home] #modeList .mode-card:not(.study-entry):not(.is-locked){background:#fff!important;border-color:#d6e3ca!important;box-shadow:0 3px 0 #e2eadb!important}
body[data-learning-area=characters][data-view=home] #modeList .mode-card:not(.study-entry) .level-art{outline:none!important;outline-offset:0!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important}
body[data-learning-area=characters][data-view=home] #modeList .mode-card:not(.study-entry) strong{color:inherit!important}
