html,body{height:100%;overflow:hidden}body{height:100dvh;display:flex;flex-direction:column}.app-header{flex:none}#app,main{flex:1;min-height:0;overflow:hidden}#app{display:flex;flex-direction:column}body>footer{display:none}#play,#detail,#finish{height:100%;min-height:0;overflow:hidden}#play,#detail{display:flex;flex-direction:column}#reviewView{flex:1;min-height:0;overflow:hidden}#questionView{min-height:0;overflow:hidden}#next{flex:none;margin-top:8px!important;margin-bottom:max(14px,env(safe-area-inset-bottom))!important;min-height:43px}
#reviewView .review-grid{height:100%;min-height:0;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:1fr;gap:18px;align-items:stretch;overflow:hidden}#reviewView .review-character{height:100%;min-height:0;display:grid!important;grid-template-rows:minmax(120px,.8fr) minmax(0,1fr);gap:12px;align-content:stretch;justify-content:stretch}#reviewView .review-character>.text-button{display:none}#reviewView .open-character{height:100%!important;min-height:0!important;margin:0!important;display:flex!important;align-items:center;justify-content:center}#reviewView .hero-reading{min-height:0;height:100%}#reviewView .word-list{height:100%!important;min-height:0;align-items:stretch}#reviewView .word-card{height:100%!important;min-height:0!important;max-height:300px;justify-content:space-evenly;gap:5px!important}#reviewView .word-photo img{height:85px;max-width:100%}#reviewView .sentence-list{height:100%;min-height:0;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:12px}#reviewView .sentence-card{min-height:0!important;height:100%;position:relative;display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:10px;padding:12px!important}#reviewView .sentence-picture img{width:110px;height:110px}#reviewView .sentence-content{min-width:0;width:100%}.sentence-card{cursor:pointer;position:relative}.sentence-top{position:absolute;right:5px;top:4px}#reviewView .sentence-words{padding-right:22px;justify-content:center}.sentence-top .icon-button{width:28px;min-width:28px;height:28px;min-height:28px;padding:3px}.sentence-top img{width:23px;height:23px}.sentence-card .sentence-gloss{text-align:center}
#detail .detail-top{flex:none;min-height:38px;margin-bottom:5px}#detail .detail-grid{flex:1;min-height:0;overflow:hidden}#detail .detail-character,#detail .detail-expressions{min-height:0;overflow:hidden}#detailWords,#detailSentences{min-height:0}#detail .detail-character h2,#detail .detail-expressions h2{display:none}#finish{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:15px 8px}#finish .finish-mark,#finish .lp-finish{display:none}#finish #finishedChars{display:flex;justify-content:center;gap:6px;max-height:47px;overflow:hidden}#finishedChars .character-tile:nth-child(n+7){display:none}#finish .finish-stats{margin:0;max-width:500px;gap:8px}#finish .finish-stats>div{padding:10px}#finish .finish-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}#finish .finish-actions button{min-height:39px;padding:7px 12px}#finish #finishTitle{margin:0;font-size:26px}#finish #finishTime{margin:0;font-size:13px}.victory-art{width:145px;height:85px;flex:none;overflow:visible}.victory-star{transform-origin:center;animation:star-pop .4s ease-out both}@keyframes star-pop{from{transform:translateY(7px) scale(.8)}to{transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.victory-star{animation:none}}
@media(max-width:999px){#reviewView .review-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}#reviewView .review-character{grid-template-rows:82px minmax(0,1fr);gap:5px}#reviewView .open-character .word-hanzi,#detail #detailTitle .word-hanzi{font-size:54px!important;line-height:1.1!important}#reviewView .open-character rt,#detail #detailTitle rt{font-size:16px!important}#reviewView .word-card{padding:5px!important;gap:3px!important;max-height:none}#reviewView .word-photo img,#detail .word-photo img{height:43px;max-width:100%}#reviewView .word-card .word-hanzi,#detail .word-card .word-hanzi{font-size:min(var(--compact-word-size,26px),26px)!important;line-height:1.1!important}#reviewView .word-card rt,#detail .word-card rt{font-size:min(var(--compact-pinyin-size,14px),14px)!important;line-height:1.4!important}#reviewView .word-list,#detailWords{gap:6px!important}#reviewView .word-card .nl-help,#detailWords .nl-help{font-size:10px;line-height:1.15;margin:0}#reviewView .sentence-card,#detail .sentence-card{padding:6px!important;display:grid!important;grid-template-columns:67px minmax(0,1fr);gap:7px;min-height:0!important;height:100%;position:relative;align-items:center}#reviewView .sentence-picture img,#detail .sentence-picture img{width:67px!important;height:67px!important}#reviewView .sentence-words,#detail .sentence-words{justify-content:center;padding-right:20px;gap:3px}#reviewView .sentence-words .word-hanzi,#detail .sentence-words .word-hanzi{font-size:24px!important;line-height:1.15!important}#reviewView .sentence-words rt,#detail .sentence-words rt{font-size:12px!important;line-height:1.4!important}#reviewView .unit-gloss,#detail .unit-gloss{display:none!important}#reviewView .sentence-gloss,#detail .sentence-gloss{font-size:10px!important;line-height:1.2!important;margin:4px 0 0!important}#detail .detail-grid{display:grid!important;grid-template-columns:1fr;grid-template-rows:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}body[data-view=detail] #detail .detail-character{display:grid!important;grid-template-rows:82px minmax(0,1fr);align-items:stretch;gap:5px;padding:0!important}body[data-view=detail] #detailTitle{height:82px!important;min-height:0!important;margin:0!important}body[data-view=detail] #detailTitle .hero-reading{height:82px;min-height:0!important}#detailMeaning,#detailWrite,#detailSource{display:none!important}#detailWords{height:100%;grid-row:2}#detailWords .word-card{height:100%;min-height:0;justify-content:space-evenly}#detail .detail-expressions{padding:0!important}#detailSentences{height:100%;display:grid;grid-template-columns:1fr!important;grid-template-rows:repeat(2,minmax(0,1fr));gap:7px}#detail .sentence-content{min-width:0;width:100%}.word-reading{gap:2px!important}.word-full-audio{width:24px;min-width:24px;height:24px;min-height:24px;padding:2px}#detail{padding-bottom:12px}#play .practice-top{min-height:32px}.practice-top .lp-badge{font-size:11px}#batchProgress{margin:5px 0 7px!important;height:7px}#finish{gap:9px}#finish .victory-art{height:72px}#finish .finish-stats strong{font-size:25px}#finish .finish-stats span{font-size:11px}#finish #finishedChars .character-tile{min-width:34px;width:34px;padding:3px}#finish #finishedChars .tile-hanzi{font-size:20px}#finish #finishedChars .py{font-size:10px}}
@media(max-height:500px) and (min-width:500px){#reviewView .review-grid,#detail .detail-grid{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);grid-template-rows:1fr;gap:8px}#reviewView .review-character,body[data-view=detail] #detail .detail-character{grid-template-rows:48px minmax(0,1fr)}#reviewView .open-character .word-hanzi,#detail #detailTitle .word-hanzi{font-size:38px!important}#reviewView .open-character rt,#detail #detailTitle rt{font-size:12px!important}body[data-view=detail] #detailTitle,body[data-view=detail] #detailTitle .hero-reading{height:48px!important}#reviewView .word-photo img,#detail .word-photo img{height:30px}#reviewView .word-card .word-hanzi,#detail .word-card .word-hanzi{font-size:19px!important}#reviewView .word-card rt,#detail .word-card rt{font-size:10px!important}#reviewView .word-card .nl-help,#detailWords .nl-help{font-size:8px}#reviewView .sentence-words .word-hanzi,#detail .sentence-words .word-hanzi{font-size:18px!important}#reviewView .sentence-words rt,#detail .sentence-words rt{font-size:10px!important}#reviewView .sentence-card,#detail .sentence-card{grid-template-columns:45px minmax(0,1fr);gap:4px;padding:4px!important}#reviewView .sentence-picture img,#detail .sentence-picture img{width:45px!important;height:45px!important}#reviewView .sentence-gloss,#detail .sentence-gloss{font-size:9px!important}#next{min-height:34px;margin-bottom:9px!important;margin-top:4px!important}#finish{display:grid;grid-template-columns:1fr 1.3fr;gap:7px 15px;align-content:center;justify-items:center}#finish .victory-art{grid-column:1;grid-row:1 /span 2;width:130px;height:75px}#finishTitle,#finishTime{grid-column:2}#finish .finish-stats{grid-column:2;grid-row:3 /span 2}#finishedChars,#finish .finish-actions{grid-column:1}#finish .finish-stats>div{padding:6px}#finish .finish-stats strong{font-size:22px}#finish #finishTitle{font-size:20px}}
[hidden]{display:none!important}img{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;pointer-events:none}button,a{-webkit-tap-highlight-color:transparent}.word-card,.sentence-card{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
@media(max-width:999px){body[data-view=detail] #detail .detail-character{grid-template-columns:minmax(0,1fr)!important}body[data-view=detail] #detailTitle,#detailWords{grid-column:1 /-1!important}body[data-view=detail] #detailTitle{box-sizing:border-box;padding:0!important}body[data-view=detail] #detailTitle .hero-reading{width:100%;padding:0!important;margin:0!important}}

#daily{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px;overflow:hidden}#daily h1{font-size:21px;margin:3px 0}#daily h2{font-size:14px;margin:3px 0}.week-chart{height:100px;max-height:100px;flex:none}#dayRows{flex:1;min-height:0;display:grid;grid-template-rows:repeat(7,minmax(0,1fr));gap:4px}#dayRows .day-row{min-height:0;padding:4px 7px;font-size:10px}#dayRows .day-row strong{font-size:11px}body:not(.all-pinyin) #library .py,body:not(.all-pinyin) #finishedChars .py{visibility:hidden}#libraryDialog{overflow:hidden!important;max-height:calc(100dvh - 18px);width:min(720px,94vw)}#libraryDialog .library-panel{min-height:0;overflow:hidden;padding:0}#libraryDialog #library{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;max-height:none;overflow:hidden}#libraryDialog #library .character-tile{min-height:0;padding:3px;height:53px}#libraryDialog #library .tile-hanzi{font-size:24px}#libraryDialog #library .py{font-size:10px}#libraryDialog .library-pager{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:8px;font-size:12px}#libraryDialog .library-pager button{min-height:30px;width:42px;padding:3px}@media(max-width:600px){#libraryDialog #library{grid-template-columns:repeat(5,minmax(0,1fr))}#libraryDialog #library .character-tile{height:57px}#libraryDialog #library .tile-hanzi{font-size:25px}#libraryDialog #libraryTitle{display:none}}

@media(min-width:1000px){.word-card{container-type:inline-size}#detailWords .word-card .word-hanzi,#reviewView .word-card .word-hanzi{font-size:clamp(18px,calc(90cqw / var(--word-count,2)),36px)!important}#detailWords .word-card rt,#reviewView .word-card rt{font-size:clamp(11px,calc(55cqw / var(--word-count,2)),19px)!important}}
@media(max-width:999px){#detail .detail-grid{align-items:stretch!important}#detail .detail-character,#detail .detail-expressions{height:100%!important;min-height:0!important;align-self:stretch!important}body[data-view=detail] #detailTitle{grid-row:1!important;grid-area:1 / 1 / 2 / -1!important}body[data-view=detail] #detailWords{grid-row:2!important;grid-area:2 / 1 / 3 / -1!important}#detailSentences{height:100%!important}#detail .sentence-content{min-height:0}#detail .sentence-card{align-self:stretch;min-height:0!important}.word-card .word-reading{gap:0!important}#detailWords .word-card rt,#reviewView .word-card rt{font-size:min(var(--compact-pinyin-size,14px),14px)!important}}
#detail .char-sound,#reviewView .char-sound,#questionBody .word-reading .char-sound{min-height:0!important;height:auto;padding:0!important;line-height:1.15!important}#detail .word-hanzi,#reviewView .word-hanzi{line-height:1.15!important}.word-card .word-line{flex-wrap:nowrap!important;gap:0!important;justify-content:center}.word-card .word-reading{min-width:0;flex:0 1 auto}

@media(max-width:999px) and (min-height:501px){#detail .detail-top{min-height:30px!important;height:32px!important;margin-bottom:3px}#detail .detail-top button,#detail .detail-top a{min-height:30px!important;height:30px!important;padding-top:3px!important;padding-bottom:3px!important}#detail .detail-grid,#reviewView .review-grid{grid-template-rows:minmax(0,.84fr) minmax(0,1.16fr)!important}}

@media(min-width:600px) and (max-width:999px) and (min-height:700px){#detail .word-photo img,#reviewView .word-photo img{height:100px!important}#detail .word-card .word-hanzi,#reviewView .word-card .word-hanzi{font-size:min(var(--compact-word-size,36px),36px)!important}#detail .word-card rt,#reviewView .word-card rt{font-size:18px!important}#detailWords .nl-help,#reviewView .word-card .nl-help{font-size:13px!important}#detail .sentence-card,#reviewView .sentence-card{grid-template-columns:130px minmax(0,1fr);gap:14px;padding:12px!important}#detail .sentence-picture img,#reviewView .sentence-picture img{width:130px!important;height:130px!important}#detail .sentence-words .word-hanzi,#reviewView .sentence-words .word-hanzi{font-size:32px!important}#detail .sentence-words rt,#reviewView .sentence-words rt{font-size:16px!important}#detail .sentence-gloss,#reviewView .sentence-gloss{font-size:14px!important}}

#finish #finishedChars .character-tile{box-sizing:border-box;height:44px!important;min-height:44px!important;padding:3px!important;display:flex;flex-direction:column;justify-content:center;gap:0}#finish #finishedChars .tile-hanzi{line-height:1.15}#finish #finishedChars .py{line-height:1.2;margin:0}#daily{gap:4px;padding:10px!important}#weekChart{height:85px!important;min-height:85px!important;max-height:85px!important;flex:none;margin:0!important}#dayRows .day-row{grid-template-columns:1fr 1fr!important;grid-template-rows:14px 14px;align-content:center;line-height:1.2;padding:3px 6px!important;gap:0 6px}#dailyLocal{font-size:10px;line-height:1.3;margin:0}#dailyBack{min-height:30px;padding:3px}#daily h1{line-height:1.2}#daily h2{line-height:1.2}
@media(max-height:500px) and (min-width:500px){#daily{display:grid;grid-template-columns:1fr 1.5fr;grid-template-rows:25px 25px 18px 1fr 24px;gap:3px 12px}#dailyBack,#dailyTitle,#weekTitle,#weekChart,#dailyLocal{grid-column:1}#weekChart{height:90px!important;min-height:90px!important}#dayRows{grid-column:2;grid-row:1 /-1;height:100%}#daily h1{font-size:18px}#daily h2{font-size:11px}#libraryDialog #library .character-tile{height:41px}#libraryDialog .dialog-top{height:35px}#libraryDialog #libraryTitle{display:none}}

@media(max-height:500px) and (min-width:500px){body[data-view=home] #home{overflow:hidden!important;gap:5px!important}body[data-view=home] .home-heading{min-height:44px!important;height:44px!important;padding:7px 16px!important}body[data-view=home] .home-heading h1{font-size:20px;margin:0}body[data-view=home] .home-heading p{display:none}body[data-view=home] .track-tabs{height:33px;min-height:33px}body[data-view=home] .track-tabs>button,body[data-view=home] .track-tabs .track-topic{min-height:30px;padding:4px}body[data-view=home] .mode-list,body[data-track=recognize][data-view=home] .mode-list{grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:3px 8px;padding:3px!important;max-width:none}body[data-view=home] .mode-card,body[data-track=recognize][data-view=home] .mode-card{min-height:0!important;height:100%!important;padding:3px!important;gap:1px}body[data-view=home] .mode-card .level-art,body[data-track=recognize][data-view=home] .mode-card .level-art{width:53px;height:47px}body[data-view=home] .mode-card strong{font-size:11px;min-height:14px;line-height:1.2;margin:0}body[data-view=home] .mode-card .level-number{font-size:8px;top:2px;left:8px;padding:1px 3px}}
