@font-face{font-family:SchoolSceneKai;src:url('/sync-reading/shared/assets/fonts/school-reading-kai.woff2') format('woff2');font-display:swap}@font-face{font-family:SchoolSceneKai;src:url('/sync-reading/shared/assets/fonts/school-reading-kai-extra.woff2') format('woff2');font-display:swap;unicode-range:U+5570,U+8E5A}@font-face{font-family:SchoolScenePinyin;src:url('/sync-reading/shared/assets/fonts/noto-sans-pinyin.woff2') format('woff2');font-display:swap}
.school-stable-learning .lesson-workspace-content>.ps-reader{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important;width:100%;border:0;background:#fff;color:#193d52;padding:0!important;gap:0}
.ps-reader *{box-sizing:border-box}.ps-tools,.ps-footer{flex:none;background:white;position:relative;z-index:1}.ps-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #e6edf3;flex-wrap:wrap}.ps-group{display:flex;gap:6px;align-items:center}.ps-reader button{min-height:40px;border:1px solid #cedfe9;background:#fff;color:#22475e;border-radius:10px;padding:7px 11px;font:600 15px/1.25 system-ui;cursor:pointer;box-shadow:none}.ps-reader button[aria-pressed=true]{background:#e9f3fb;border-color:#7faac6}.ps-reader button:disabled{opacity:.4;cursor:default}.ps-reader :focus-visible{outline:3px solid #4488b4;outline-offset:2px}
.ps-stage{min-height:0!important;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:16px;width:100%;scrollbar-gutter:stable both-edges}.ps-scene{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);align-items:center;gap:22px;min-height:100%;max-width:1060px;margin:auto}.ps-scene figure{margin:0;display:flex;align-items:center;justify-content:center;min-width:0}.ps-scene img{display:block;width:100%;height:auto;max-height:430px;object-fit:contain;object-position:center}.ps-text{min-width:0;font-family:SchoolSceneKai,serif;font-size:var(--ps-font-size,32px);line-height:1.85;text-align:left;color:#193d52}.ps-paragraph{padding:6px 7px;margin:4px 0;border-radius:10px;cursor:pointer;overflow-wrap:anywhere;white-space:pre-wrap}.ps-heading{font-size:.76em;text-align:center;cursor:default;padding:0}.ps-sentence{border-radius:5px}.ps-character{position:relative;ruby-align:center;white-space:nowrap}.ps-character rt{font-family:SchoolScenePinyin,sans-serif;font-size:.39em;line-height:1.15;visibility:hidden;font-weight:400;letter-spacing:0}.ps-show-pinyin rt,.ps-character.ps-reveal rt{visibility:visible}.ps-playing{background:#e9f5fc;box-shadow:0 0 0 2px #afcfe3}.ps-reader[data-play-state=paused] .ps-playing{background:#f3f7fa}.ps-footer{border-top:1px solid #e6edf3;padding:9px 12px;display:flex;flex-direction:column;gap:8px}.ps-page-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}.ps-page-controls button:first-child{justify-self:start}.ps-page-controls button:last-child{justify-self:end}.ps-page-controls>span{font:15px system-ui;color:#637f91}.ps-audio-controls{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}.ps-audio-controls [data-ps-status]{font:13px system-ui;color:#617b8c;min-width:96px;text-align:center}.ps-whole .ps-scene{min-height:0;border-bottom:1px solid #e6edf3;padding:18px 0}.ps-whole .ps-scene:last-child{border:0}.ps-whole .ps-scene img{max-height:300px}
@media(max-width:760px){.ps-tools{padding:8px;gap:5px}.ps-group{gap:4px}.ps-reader button{font-size:13px;padding:6px 8px;min-height:39px}.ps-stage{padding:10px 12px}.ps-scene{display:flex;flex-direction:column;justify-content:center;gap:9px;min-height:100%;width:100%}.ps-scene figure{width:100%;flex:0 0 auto}.ps-scene img{width:100%;max-height:250px;max-width:450px}.ps-text{width:100%;font-size:calc(var(--ps-font-size,32px) - 2px);line-height:1.8}.ps-paragraph{padding:4px;margin:2px 0}.ps-footer{padding:8px 10px;gap:6px}.ps-audio-controls [data-ps-status]{display:none}.ps-whole .ps-scene{padding:14px 0}.ps-whole .ps-scene img{max-height:200px}}
@media(prefers-reduced-motion:reduce){.ps-reader *{scroll-behavior:auto!important}}

.ps-reader [hidden]{display:none!important}

.ps-verse .ps-text{text-align:center}.ps-verse .ps-paragraph{margin:0;padding:3px}.ps-whole.ps-two-poems .ps-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.ps-whole.ps-two-poems .ps-scene{display:flex;flex-direction:column;width:100%;border:0;gap:8px}.ps-whole.ps-two-poems .ps-text{width:100%}@media(max-width:760px){.ps-whole.ps-two-poems .ps-stage{display:block}.ps-whole.ps-two-poems .ps-scene{border-bottom:1px solid #e6edf3}}

.ps-character rt[data-tone="1"]{color:#2463ad}.ps-character rt[data-tone="2"]{color:#24764f}.ps-character rt[data-tone="3"]{color:#a45a12}.ps-character rt[data-tone="4"]{color:#8251a5}.ps-character rt[data-tone="0"]{color:#637486}

@media(min-width:1024px){.ps-whole.ps-two-poems .ps-stage{align-items:center}.ps-whole.ps-two-poems .ps-scene{display:grid;grid-template-columns:minmax(110px,.72fr) minmax(0,1fr);align-items:center;gap:16px;padding:12px 0}.ps-whole.ps-two-poems .ps-text{font-size:calc(var(--ps-font-size,32px) - 6px);line-height:1.5}.ps-whole.ps-two-poems .ps-scene img{max-height:180px}}

.ps-original-pending{margin:0;padding:8px 0;font-size:14px;line-height:1.6;color:#637486}.ps-reader button[data-ps-read]:disabled{opacity:.65}

/* Keep full annotated characters together while allowing natural prose wrapping. */
.ps-paragraph{white-space:normal;word-break:normal;overflow-wrap:normal;line-break:strict}.ps-character{display:inline-flex;flex-direction:column-reverse;align-items:center;vertical-align:bottom;line-height:1.5}.ps-character rt{display:block;line-height:1.15}.ps-scene figure[data-ps-read-scene]{cursor:pointer;border-radius:10px}.ps-scene figure[data-ps-read-scene]:focus-visible{outline:3px solid #4488b4;outline-offset:2px}.ps-scene figure[data-ps-read-scene][aria-disabled=true]{cursor:default}
@media(max-width:760px){.ps-scene{justify-content:safe center}.ps-stage{overflow-x:hidden}.ps-text{max-width:100%}}

.ps-punctuation-unit{display:inline-block;white-space:nowrap}

@media(min-width:761px){.ps-scene.ps-long{align-items:start}.ps-scene.ps-long figure{position:sticky;top:16px;align-self:start}}

.ps-without-pictures .ps-scene{grid-template-columns:minmax(0,1fr);max-width:1000px}.ps-without-pictures .ps-text{width:100%;margin:auto}.ps-without-pictures .ps-scene.ps-verse .ps-text{text-align:center}

.ps-source-dialog{width:min(94vw,1100px);max-height:94dvh;border:1px solid #c9dbe8;border-radius:12px;padding:16px;background:white}.ps-source-dialog::backdrop{background:#142f4666}.ps-source-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:14px}.ps-source-dialog h2{font:600 20px/1.4 sans-serif;margin:0}.ps-source-dialog button{padding:8px 16px;border:1px solid #c9dbe8;border-radius:8px;background:white}.ps-source-dialog section{display:grid;gap:18px;margin-top:14px}.ps-source-dialog img{width:100%;height:auto}

/* Read text accumulates softly; unread text keeps its white background. */
.ps-reader .ps-sentence.ps-speaking-sentence,.ps-reader .ps-paragraph.ps-playing{background:transparent!important;box-shadow:none!important}
.ps-reader .ps-speaking-sentence::before{display:none!important}
.ps-reader .ps-character.ps-read,.g1-picture .g1p-char.g1p-read{background:#fff8d7;border-radius:2px;box-shadow:none}
.ps-reader .ps-character.ps-reading-word{background:#fff3c2;border-radius:2px}
.ps-reader .ps-reading-caret::before{width:2px;background:#9b7a24;left:-2px}
.ps-reader .ps-character:not(.ps-read):not(.ps-reading-word){background:transparent}
