@font-face{font-family:PreschoolKai;src:url('/sync-reading/shared/assets/fonts/school-reading-kai.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
.pb-reader{--pb-font:38px;color:#193b55;background:#fff;border:1px solid #dce8ef;border-radius:20px;padding:12px 18px 8px;overflow:hidden;container-type:inline-size;font-family:Arial,'Microsoft YaHei',sans-serif}
.pb-toolbar,.pb-bottom,.pb-sections,.pb-tools,.pb-listen{display:flex;align-items:center;gap:8px}
.pb-toolbar{justify-content:space-between;flex-wrap:wrap;padding-bottom:6px}
.pb-reader button{font:inherit;color:#224961;cursor:pointer;border:1px solid #dce7ef;background:#fff;border-radius:10px;padding:8px 11px;line-height:1.3;min-height:40px;box-shadow:none}
.pb-reader button:hover{background:#f0f7fc;border-color:#aecde2}
.pb-reader button:focus-visible,.pb-line:focus-visible,.pb-stage:focus-visible,.pb-reader ruby:focus-visible{outline:3px solid #72b6e5;outline-offset:3px}
.pb-sections button{font-weight:600;white-space:nowrap}
.pb-sections button[aria-current=page],.pb-tools button[aria-pressed=true]{color:#173f67;background:#e7f3ff;border-color:#b8d9ef}
.pb-tools{margin-left:auto;flex-wrap:wrap;gap:5px}
.pb-tools button{font-size:13px;min-height:34px;padding:6px 9px}
.pb-stage{position:relative;cursor:pointer;padding:4px 15px 8px 0;min-height:400px;display:flex;align-items:center;justify-content:center}
.pb-page{width:100%;display:flex;flex-direction:column;align-items:center;gap:4px}
.pb-scene{width:100%;height:clamp(240px,33vw,355px);object-fit:contain;display:block;background:#fff}
.pb-lines{width:100%;text-align:center;padding:4px 0 2px}
.pb-line{font-family:PreschoolKai,KaiTi,serif;font-size:var(--pb-font);line-height:1.48;cursor:pointer;border-radius:12px;padding:3px 8px;max-width:100%;overflow-wrap:anywhere;letter-spacing:.035em;color:#233c4b}
.pb-dialogue{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}
.pb-dialogue .pb-line{font-size:clamp(27px,4.8cqw,var(--pb-font))}
.pb-lines.pb-inline{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0}
.pb-inline .pb-line{padding-left:0;padding-right:0;font-size:clamp(23px,4.6cqw,var(--pb-font))}
.pb-reader ruby{position:relative;cursor:pointer;ruby-align:center;letter-spacing:0;outline-offset:1px}
.pb-reader rt{font-family:Arial,sans-serif;font-size:.39em;font-weight:400;letter-spacing:0;line-height:1.2;visibility:hidden;color:#526f85}
.pb-show-pinyin rt,.pb-reader .pb-pinyin-reveal rt{visibility:visible}
.pb-cards{width:100%;display:grid;grid-template-columns:repeat(var(--pb-cols),minmax(0,1fr));gap:12px;align-items:end;padding:8px 0}
.pb-reader .pb-word-card{padding:10px 3px 13px;border:0;background:#fff;border-radius:14px;display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0;color:#233c4b}
.pb-reader .pb-word-card:hover{background:#f5faff}
.pb-portrait{width:100%;height:clamp(210px,30vw,310px);object-fit:contain;display:block;background:#fff}
.pb-word{font:var(--pb-font)/1.4 PreschoolKai,KaiTi,serif;white-space:nowrap}
.pb-progress{position:absolute;right:0;top:17%;height:66%;width:5px;border-radius:4px;background:#eaf1f6;overflow:hidden}
.pb-progress span{display:block;width:100%;background:#6ca9ce;border-radius:4px;transition:height .15s}
.pb-bottom{border-top:1px solid #e7eef3;justify-content:space-between;gap:10px;padding-top:8px;flex-wrap:wrap}
.pb-bottom button{font-size:14px;white-space:nowrap}
.pb-bottom button:disabled{opacity:.32;cursor:default}
.pb-counter{color:#648095;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.pb-listen{margin:auto;gap:6px}
.pb-audio-status{font-size:12px;color:#648095;max-width:180px}
.pb-speaking-line{background:#edf7ff!important}
.pb-reader:fullscreen{display:flex;flex-direction:column;width:100%;height:100%;border:0;border-radius:0;padding:16px 6vw;background:#fff;box-sizing:border-box;overflow:auto}
.pb-reader:fullscreen .pb-stage{flex:1;min-height:0}
.pb-reader:fullscreen .pb-scene{height:clamp(220px,55vh,680px)}
.pb-reader:fullscreen .pb-portrait{height:clamp(240px,55vh,650px)}
.pb-reader:fullscreen .pb-bottom{margin-top:auto;flex-shrink:0}
.pb-count-art{width:100%;height:260px;display:grid;grid-template-columns:repeat(var(--count-cols),minmax(0,1fr));align-content:center;justify-items:center;gap:1px}
.pb-count-art img{width:100%;height:auto;max-height:72px;object-fit:contain}
body[data-default-book=preschool] .lesson-workspace-content:has(.pb-reader){padding:0!important;background:#fff!important}
body[data-default-book=preschool] .lesson-workspace:has(.pb-reader) .lesson-workspace-intro{display:none}
body[data-default-book=preschool] .lesson-listen{margin:8px 0}
body[data-default-book=preschool] .lesson-workspace-content:has(.pb-reader)>h2{display:none!important}
@media(min-width:761px){body[data-default-book=preschool] .lesson-workspace-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;display:grid!important}body[data-default-book=preschool] .lesson-workspace-nav button{width:100%!important;max-width:none!important;min-width:0!important}body[data-default-book=preschool] .review-heading{margin-top:8px!important;margin-bottom:12px!important}body[data-default-book=preschool] .lesson-context-nav{margin:8px 0 12px!important}}
@media(max-width:760px){.pb-reader{--pb-font:30px;padding:10px 12px 8px;border-radius:14px}.pb-toolbar{gap:9px}.pb-sections{gap:4px;flex-wrap:wrap}.pb-sections button{font-size:14px;padding:7px 9px}.pb-tools{margin-left:0}.pb-stage{min-height:340px;padding-right:10px}.pb-scene{height:250px}.pb-line{font-size:clamp(23px,5.8cqw,var(--pb-font));padding:3px 0;letter-spacing:0}.pb-dialogue{gap:6px}.pb-dialogue .pb-line{font-size:clamp(22px,4.7cqw,var(--pb-font))}.pb-cards{gap:4px}.pb-portrait{height:235px}.pb-word{font-size:clamp(23px,5.8cqw,var(--pb-font))}.pb-cards:has(>:nth-child(4)) .pb-word{font-size:clamp(21px,5.2cqw,var(--pb-font))}.pb-bottom{gap:7px}.pb-bottom button{padding:7px 8px;font-size:13px}.pb-listen{order:4;width:100%;justify-content:center}.pb-counter{margin:auto}.pb-count-art{height:235px}.pb-count-art img{max-height:56px}}
@media(prefers-reduced-motion:reduce){.pb-progress span{transition:none}}
.pb-page,.pb-lines,.pb-scene,.pb-cards{margin-left:auto;margin-right:auto}.pb-page{min-width:0;text-align:center}.pb-scene,.pb-portrait{object-position:center center}.pb-lines,.pb-line{text-align:center!important}.pb-stage:has(.school-hanzi-practice){min-height:0;max-height:560px;overflow:auto;padding:10px 12px}.pb-stage:has(.school-hanzi-practice) .pb-page,.pb-stage:has(.school-hanzi-practice) .pb-activity-area{width:100%;min-width:0;margin-inline:auto}.pb-reader:has(.school-hanzi-practice) .pb-progress{display:none}
@media(max-width:760px){.pb-stage{padding-left:10px;padding-right:10px}.pb-stage:has(.school-hanzi-practice){padding:10px 4px;max-height:560px}.pb-activity-area .school-hanzi-practice{max-width:100%;padding:0 4px}}
body:has(.pb-reader) .sh-dock{display:none!important}
@media(max-width:760px){.pb-reader:has(.school-hanzi-practice){padding-inline:12px}.pb-stage:has(.school-hanzi-practice){align-items:flex-start;justify-content:center}.school-hanzi-practice{align-self:center}}
/* One fixed reading viewport across text, pictures, drawing and writing. */
.pb-reader{--pb-stage-height:clamp(430px,62svh,600px)}
.pb-reader .pb-stage,.pb-reader .pb-stage:has(.school-hanzi-practice),.pb-reader .pb-stage:has(.pb-drawing-surface){height:var(--pb-stage-height)!important;min-height:0!important;max-height:none!important;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;align-items:flex-start;justify-content:center;touch-action:pan-y;padding:12px 8px}
.pb-page{margin-block:auto;flex-shrink:0}.pb-reader .pb-bottom{height:94px;box-sizing:border-box;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:40px 40px;gap:4px 8px;flex-shrink:0}.pb-bottom>[data-pb-prev]{grid-column:1;grid-row:1;justify-self:start}.pb-bottom>.pb-counter{grid-column:2;grid-row:1}.pb-bottom>[data-pb-next]{grid-column:3;grid-row:1;justify-self:end}.pb-bottom>.pb-listen{grid-column:1/-1;grid-row:2;justify-content:center;margin:0;min-width:0;gap:5px}.pb-audio-status{font-size:11px;max-width:90px}.pb-reader:fullscreen{overflow:hidden}.pb-reader:fullscreen .pb-stage{height:auto!important;flex:1;min-height:0!important}.pb-reader .school-hanzi-practice{margin-block:auto}
.pb-reader,.pb-reader *{overflow-anchor:none}


.g1-picture .g1p-speaking,.pb-reader .pb-speaking-line{background:transparent!important;box-shadow:none!important}
.school-reading-character.school-char-read{background:#fff8d7!important;border-radius:2px}
.school-reading-character.school-char-current{background:#fff3c2!important;border-radius:2px;position:relative}
.school-reading-character.school-char-current::before{content:"";position:absolute;left:-2px;top:0;width:2px;height:1.2em;background:#9b7a24;border-radius:2px}
