/* Reader controls only. Book content, learning records and Teaching Books are unchanged. */
.book-reader-page .book-toolbar__primary{gap:10px!important}
.book-reader-page .book-toolbar__back{background:#fff!important;color:#475569!important;border:1px solid #d7dee8!important;box-shadow:none!important;border-radius:11px!important}
.book-reader-page [data-book-learning-toggle]{background:#6842c2!important;color:#fff!important;border:1px solid #6842c2!important;box-shadow:0 3px 9px #6842c21f!important;outline:none!important;border-radius:11px!important;min-height:44px!important;padding:10px 20px!important}
.book-reader-page [data-book-learning-toggle]:hover{background:#5632aa!important}
.book-reader-page [data-book-learning-toggle]:focus-visible{outline:3px solid #c5b4ef!important;outline-offset:3px!important}
.book-reader-page .book-toolbar__identity>a[role="status"][href="/library/study-progress.php"]{display:none!important}
.book-reader-page .book-inline-tools{display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:10px 14px!important;padding:0 0 16px!important;margin:0 0 14px!important;border-bottom:1px solid #e8edf3!important;max-width:100%!important}
.book-reader-page .reader-tool-group{display:flex;align-items:center;flex-wrap:wrap;gap:6px;max-width:100%}
.book-reader-page .book-inline-tools button{min-height:38px!important;padding:8px 12px!important;border-radius:9px!important;font:600 13px/1.3 system-ui,sans-serif!important;white-space:nowrap!important;border:1px solid #d5dde8!important;background:#fff!important;color:#475569!important;box-shadow:none!important;transition:background .15s,border-color .15s}
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"]{background:#176bb5!important;border-color:#176bb5!important;color:#fff!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"][aria-pressed="true"]{background:#104d84!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]{background:#edf5fc!important;border-color:#c5daed!important;color:#25557d!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"][aria-expanded="true"]{background:#dcecf9!important;border-color:#176bb5!important}
.book-reader-page .book-inline-tools .book-lecture-trigger{background:#b94e24!important;border-color:#b94e24!important;color:#fff!important;margin:0 0 0 4px!important;order:1!important}
.book-reader-page .book-inline-tools .book-lecture-trigger[aria-expanded="true"]{background:#923b19!important}
.book-reader-page .book-inline-tools [data-book-action="word-cover"][aria-pressed="true"],.book-reader-page .book-inline-tools [data-book-action="translation"][aria-pressed="true"]{background:#f0eafb!important;border-color:#9e82d6!important;color:#6037a6!important}
.book-reader-page .book-inline-tools button:disabled{opacity:.45!important;cursor:not-allowed!important}
.book-reader-page .book-inline-tools button:focus-visible{outline:3px solid #a5c9ed!important;outline-offset:2px!important}
.book-reader-page .book-lecture-controls{background:#fff7f2!important;border:1px solid #efd6c8!important;border-radius:13px!important;padding:16px!important;margin:0 0 20px!important;box-shadow:none!important}
.book-reader-page .book-lecture-controls>header{display:flex!important;align-items:center!important;justify-content:space-between!important;color:#92421f!important;margin-bottom:8px!important}
.book-reader-page .book-lecture-controls>header strong{font-size:15px!important}
.book-reader-page .book-lecture-controls>header button{display:inline-flex!important;align-items:center;justify-content:center;width:32px!important;height:32px!important;border:1px solid #e6c7b8!important;border-radius:8px;background:#fff!important;color:#92421f!important}
.book-reader-page .book-lecture-controls audio{width:100%!important;height:40px!important}
.book-reader-page .book-lecture-controls [data-status]{font-size:13px!important;line-height:1.5!important;color:#765f52!important;margin:0 0 10px!important}
.book-reader-page .book-lecture-rates{display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-top:10px!important}
.book-reader-page .book-lecture-rates button{padding:7px 11px!important;min-height:34px!important;border:1px solid #e5cfc3!important;border-radius:8px!important;background:#fff!important;color:#744832!important;font-size:13px!important}
.book-reader-page .book-lecture-rates [aria-pressed="true"]{background:#b94e24!important;color:#fff!important;border-color:#b94e24!important}
.book-reader-page .book-audio-dock{background:#f1f7fd!important;border-color:#c6dced!important;border-radius:12px!important}
.book-reader-page .book-audio-dock__rates button{border-radius:8px!important;min-height:36px!important}
.book-reader-page .book-audio-dock__rates [aria-pressed="true"]{background:#176bb5!important;color:#fff!important}
@media(max-width:760px){.book-reader-page .book-inline-tools{gap:9px!important;padding-bottom:12px!important}.book-reader-page .book-inline-tools button{padding:8px 10px!important;min-height:40px!important;font-size:12px!important}.book-reader-page [data-book-learning-toggle]{padding:9px 13px!important}.book-reader-page .book-lecture-controls{padding:12px!important}}

.book-reader-page .reader-tool-group[aria-label="읽기 보조"]{order:2}
.book-reader-page [data-book-action="word-cover"]{background:#146e70!important;color:#fff!important;border:2px solid #146e70!important;font-weight:800;box-shadow:0 2px 5px #146e7026}
.book-reader-page [data-book-action="word-cover"][aria-pressed="true"]{background:#084f51!important;border-color:#073c3d!important;box-shadow:0 0 0 3px #c4e8df}
.reader-tool-help{order:3;flex-basis:100%;margin:0;padding:10px 12px;border-radius:8px;background:#f2f5f9;color:#354e66;font:14px/1.55 system-ui}
.reader-tool-help[hidden]{display:none}
.book-reader-page .book-footer__neighbor--previous{display:flex;gap:18px;text-align:left}
.book-reader-page .book-footer__neighbor--previous>.is-empty{display:none}
.reader-suggestion-button{justify-self:end;background:#6842c2;color:white;border:0;border-radius:10px;padding:12px 16px;font:700 14px system-ui;cursor:pointer}
.reader-learning-help{position:absolute;z-index:3;top:0;left:0;right:58px;margin:0;padding:12px 18px;background:#f1ebfb;color:#4b318b;font:14px/1.5 system-ui}
.book-reader-page [data-book-learning-player]:has(.reader-learning-help:not([hidden])){padding-top:46px}
.reader-suggestion-dialog{box-sizing:border-box;width:min(540px,calc(100% - 28px));border:0;border-radius:18px;padding:28px;color:#18374c;box-shadow:0 20px 80px #18374c33;font:15px/1.6 system-ui;max-height:90vh;overflow:auto}
.reader-suggestion-dialog::backdrop{background:#152e4666}
.reader-suggestion-dialog h2{font-size:23px;margin:0 35px 12px 0}
.reader-suggestion-dialog label{display:block;font-weight:700;margin:16px 0}
.reader-suggestion-dialog select,.reader-suggestion-dialog textarea{box-sizing:border-box;width:100%;display:block;margin-top:6px;padding:10px;border:1px solid #b9c7d8;border-radius:8px;font:inherit}
.reader-suggestion-dialog button{cursor:pointer;padding:10px 16px;border:0;border-radius:8px;background:#6842c2;color:white;font:700 14px system-ui}
.reader-suggestion-dialog button:disabled{opacity:.5;cursor:wait}.reader-suggestion-dialog .suggestion-close{position:absolute;right:14px;top:14px;background:#edf1f6;color:#18374c}
.suggestion-status{color:#146e70;margin-bottom:0}.suggestion-context{color:#61728b}
@media(max-width:600px){.reader-suggestion-button{font-size:12px;padding:10px}.book-reader-page .book-footer{gap:6px}.book-reader-page .book-footer__neighbor--previous{font-size:11px}.reader-learning-help{font-size:12px;padding:8px}.book-reader-page [data-book-learning-player]:has(.reader-learning-help:not([hidden])){padding-top:55px}}

.book-reader-page .book-inline-tools [data-book-action="word-cover"]{background:#146e70!important;color:#fff!important;border-color:#146e70!important}
.book-reader-page .book-inline-tools [data-book-action="word-cover"][aria-pressed="true"]{background:#084f51!important;color:white!important;border-color:#073c3d!important}
.book-reader-page .book-footer__neighbor--previous{display:none!important}
.book-reader-page .book-footer__neighbor--next{grid-column:1;grid-row:1;text-align:left;justify-self:start;order:-1}
.book-reader-page .book-footer__neighbor--next a{align-items:flex-start;text-align:left}
.book-reader-page .book-footer__position{grid-column:2;grid-row:1}
.book-reader-page .reader-suggestion-button{grid-column:3;grid-row:1}
.book-reader-page .reader-learning-help{position:relative;top:auto;left:auto;right:auto;flex:none;min-height:46px;box-sizing:border-box;padding:12px 170px 12px 18px}
.book-reader-page [data-book-learning-player]:has(.reader-learning-help:not([hidden])){padding:0!important}
.book-reader-page [data-book-learning-player]:has(.reader-learning-help:not([hidden])) .book-learning-player__close{position:absolute!important;right:12px;top:5px;margin:0!important}
@media(max-width:600px){.book-reader-page .reader-learning-help{padding-right:135px;min-height:66px}.book-reader-page .book-footer__neighbor--next{max-width:100px}.book-reader-page .reader-suggestion-button{max-width:125px}}

.book-reader-page .reader-tool-help{background:#eaf4f7;color:#153e50;font-size:16px;font-weight:650;line-height:1.65;border-left:4px solid #146e70;padding:12px 15px}
.book-reader-page .book-footer__neighbor--next .is-empty{display:none!important}
.book-reader-page .reader-suggestion-button{background:#fff!important;border:1px solid #222!important;color:#111!important;box-shadow:none!important;font-weight:600}
.reader-suggestion-dialog input[readonly]{box-sizing:border-box;width:100%;display:block;margin-top:6px;padding:10px;border:1px solid #d3dce4;border-radius:8px;background:#f5f7f9;color:#243c4d;font:inherit}
.reader-suggestion-dialog input[type=file]{display:block;width:100%;margin-top:8px;font-size:13px}
.capture-hint{font-size:12px;color:#526779}.capture-preview{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.capture-preview>div{width:120px}.capture-preview img{width:120px;height:90px;object-fit:contain;border:1px solid #ddd}.capture-preview button{padding:4px 8px;font-size:12px}

.book-reader-page #reader-instant-help{position:fixed;z-index:20050;box-sizing:border-box;width:max-content;max-width:min(340px,calc(100vw - 20px));margin:0;padding:12px 15px;background:#173e4c;color:#fff;border:0;border-radius:10px;box-shadow:0 6px 22px #173e4c33;font:600 15px/1.6 system-ui;pointer-events:none;transition:none!important;animation:none!important}
.book-reader-page #reader-instant-help[hidden]{display:none!important}
.book-reader-page:not(:has([data-reading-section].is-active)) .book-inline-tools,.book-reader-page:not(:has([data-reading-section].is-active)) .book-lecture-controls,.book-reader-page:not(:has([data-reading-section].is-active)) .book-audio-dock,.book-reader-page:not(:has([data-reading-section].is-active)) #reader-instant-help{display:none!important}
.book-reader-page .book-page:not([data-reading-section]).has-page-tools-row{padding-top:0!important}

/* Keep the completion spread centered in the reader viewport. */
body.book-reader-page .book-toolbar__primary .book-lecture-trigger{display:none!important}
body.book-reader-page:has(.book-page--finish.is-active) .book-lecture-trigger,
body.book-reader-page:has(.book-page--finish.is-active) .book-lecture-controls{display:none!important}
body.book-reader-page .book-page--finish:not([hidden]){display:grid!important;place-items:center!important;height:100%!important;min-height:0!important;padding:0!important;box-sizing:border-box}
body.book-reader-page .book-page--finish .book-finish{margin:auto!important;align-self:center!important;justify-self:center!important;max-height:100%;box-sizing:border-box}

/* Reader control hierarchy: one English playback action with a nearby speed setting,
   then study helpers and Korean playback beside the translation control. */
.book-reader-page .book-inline-tools{display:grid!important;gap:8px!important;justify-items:start!important}
.book-reader-page .book-inline-tools .reader-tool-group{display:flex!important;align-items:center!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important}
.book-reader-page .book-inline-tools .reader-tool-group[aria-label="듣기 도구"]{order:1!important}
.book-reader-page .book-inline-tools .reader-tool-group[aria-label="읽기 보조"]{order:2!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]{background:#edf5fc!important;border-color:#c5daed!important;color:#25557d!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"]{background:#f2f6fb!important;border-color:#cbd8e6!important;color:#304c66!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"][aria-pressed="true"]{background:#dce9f5!important;border-color:#7fa6c7!important;color:#174b75!important}
.book-reader-page .book-inline-tools .book-lecture-trigger{margin-left:10px!important;order:0!important}
.book-reader-page .book-audio-dock [data-book-audio-play],
.book-reader-page .book-audio-dock [data-book-audio-replay]{display:none!important}
@media(max-width:760px){
 .book-reader-page .book-inline-tools .reader-tool-group{flex-wrap:wrap!important}
 .book-reader-page .book-inline-tools .book-lecture-trigger{margin-left:0!important}
 .book-reader-page .book-inline-tools button{min-height:44px!important}
}

/* Compact, consistent reader controls. Keep short labels only where two audio actions
   would otherwise be hard to distinguish. */
.book-reader-page .book-inline-tools{gap:5px!important;padding-bottom:8px!important;margin-bottom:8px!important}
.book-reader-page .book-inline-tools .reader-tool-group{gap:5px!important}
.book-reader-page .book-inline-tools button{min-height:36px!important;padding:6px 9px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;font-weight:700!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"],
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"]{background:#176bb5!important;border-color:#176bb5!important;color:#fff!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"][aria-pressed="true"],
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"][aria-pressed="true"]{background:#104d84!important;border-color:#104d84!important;color:#fff!important}
.book-reader-page .book-inline-tools :is([data-book-action="whole-book-audio"],[data-book-action="whole-book-korean-audio"],[data-book-action="sentence-audio"],[data-book-action="word-cover"],[data-book-action="translation"])>span:first-child{display:none!important}
.book-reader-page .book-inline-tools :is([data-book-action="sentence-audio"],[data-book-action="word-cover"],[data-book-action="translation"])>span:last-child{display:none!important}
.book-reader-page .book-inline-tools :is([data-book-action="sentence-audio"],[data-book-action="word-cover"],[data-book-action="translation"]){width:38px!important;min-width:38px!important;padding:0!important;background:#edf5fc!important;border-color:#c5daed!important;color:#25557d!important}
.book-reader-page .book-inline-tools :is([data-book-action="sentence-audio"],[data-book-action="word-cover"],[data-book-action="translation"])[aria-pressed="true"],
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"][aria-expanded="true"]{background:#dcecf9!important;border-color:#176bb5!important;color:#174b75!important}
.book-reader-page .book-inline-tools :is([data-book-action="whole-book-audio"],[data-book-action="whole-book-korean-audio"],.book-lecture-trigger)::before{content:"";display:inline-block;flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 4V5L7 9H3zm12-1.5v2a3 3 0 0 1 0 5v2a5 5 0 0 0 0-9z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 4V5L7 9H3zm12-1.5v2a3 3 0 0 1 0 5v2a5 5 0 0 0 0-9z'/%3E%3C/svg%3E") center/contain no-repeat}
.book-reader-page .book-inline-tools .book-lecture-trigger::before{-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a8 8 0 0 0-8 8v7a3 3 0 0 0 3 3h2v-8H6v-2a6 6 0 0 1 12 0v2h-3v8h2a3 3 0 0 0 3-3v-7a8 8 0 0 0-8-8z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a8 8 0 0 0-8 8v7a3 3 0 0 0 3 3h2v-8H6v-2a6 6 0 0 1 12 0v2h-3v8h2a3 3 0 0 0 3-3v-7a8 8 0 0 0-8-8z'/%3E%3C/svg%3E") center/contain no-repeat}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]::before{content:"";display:block;width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 2h2v6l4 2-1 2-5-3V6z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 2h2v6l4 2-1 2-5-3V6z'/%3E%3C/svg%3E") center/contain no-repeat}
.book-reader-page .book-inline-tools [data-book-action="word-cover"]::before{content:"";display:block;width:19px;height:19px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M2 12s4-6 10-6 10 6 10 6-4 6-10 6S2 12 2 12Zm4-8 12 16'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' d='M2 12s4-6 10-6 10 6 10 6-4 6-10 6S2 12 2 12Zm4-8 12 16'/%3E%3C/svg%3E") center/contain no-repeat}
.book-reader-page .book-inline-tools [data-book-action="translation"]::before{content:"가";display:block;font:800 17px/1 system-ui,sans-serif;color:currentColor}
.book-reader-page .book-inline-tools .book-lecture-rate-toggle{min-width:30px!important;padding:0 6px!important}
@media(max-width:760px){.book-reader-page .book-inline-tools button{min-height:40px!important}.book-reader-page .book-inline-tools :is([data-book-action="sentence-audio"],[data-book-action="word-cover"],[data-book-action="translation"]){width:40px!important;min-width:40px!important}}

/* Give each reader action its own visual identity. Keep the speed selector attached
   to English playback, just as the lecture selector is attached to its player. */
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"]{border-radius:9px 0 0 9px!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]{width:38px!important;min-width:38px!important;margin-left:-5px!important;border-radius:0 9px 9px 0!important;border-left-color:#fff6!important;background:#176bb5!important;border-color:#176bb5!important;color:#fff!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"][aria-expanded="true"]{background:#104d84!important;border-color:#104d84!important;color:#fff!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]::before{content:"▾";display:block;width:auto;height:auto;background:none;-webkit-mask:none;mask:none;font:800 18px/1 system-ui,sans-serif}
.book-reader-page .book-inline-tools [data-book-action="word-cover"]{width:auto!important;min-width:68px!important;padding:6px 12px!important;background:#e7f4f1!important;border-color:#9bc9c0!important;color:#126864!important}
.book-reader-page .book-inline-tools [data-book-action="word-cover"][aria-pressed="true"]{background:#146e70!important;border-color:#146e70!important;color:#fff!important}
.book-reader-page .book-inline-tools [data-book-action="word-cover"]::before{display:none!important}
.book-reader-page .book-inline-tools [data-book-action="word-cover"]>span:last-child{display:inline!important}
.book-reader-page .book-inline-tools [data-book-action="translation"]{background:#fff!important;border-color:#cbd5df!important;color:#344d66!important}
.book-reader-page .book-inline-tools [data-book-action="translation"][aria-pressed="true"]{background:#e9eef4!important;border-color:#8ea5bc!important;color:#243f5a!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"]{background:#faeaf0!important;border-color:#e6b6c5!important;color:#a43857!important}
.book-reader-page .book-inline-tools [data-book-action="whole-book-korean-audio"][aria-pressed="true"]{background:#a43857!important;border-color:#a43857!important;color:#fff!important}
@media(max-width:760px){.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]{width:40px!important;min-width:40px!important}.book-reader-page .book-inline-tools [data-book-action="word-cover"]{width:auto!important;min-width:68px!important}}

/* Keep English and Korean playback choices together; show the selected rate on each label. */
.book-reader-page .book-inline-tools [data-book-action="whole-book-audio"]{border-radius:9px!important}
.book-reader-page .book-inline-tools [data-book-action="sentence-audio"]{margin-left:0!important;border-radius:9px!important;border-left-color:#176bb5!important}

/* Reading type scale for R1-R12. Level sets the starting size and measure;
   each spread's existing text-density class makes a small fit adjustment. */
body.book-reader-page[data-library-book-stage="R1"]{--reader-base-size:34px;--reader-heading-size:32px;--reader-translation-size:22px;--reader-line-width:26ch;--reader-leading:1.55}
body.book-reader-page[data-library-book-stage="R2"]{--reader-base-size:32px;--reader-heading-size:31px;--reader-translation-size:22px;--reader-line-width:30ch;--reader-leading:1.54}
body.book-reader-page[data-library-book-stage="R3"]{--reader-base-size:30px;--reader-heading-size:30px;--reader-translation-size:21.5px;--reader-line-width:34ch;--reader-leading:1.53}
body.book-reader-page[data-library-book-stage="R4"]{--reader-base-size:28px;--reader-heading-size:29px;--reader-translation-size:21px;--reader-line-width:38ch;--reader-leading:1.52}
body.book-reader-page[data-library-book-stage="R5"]{--reader-base-size:27px;--reader-heading-size:28px;--reader-translation-size:20.5px;--reader-line-width:40ch;--reader-leading:1.51}
body.book-reader-page[data-library-book-stage="R6"]{--reader-base-size:26px;--reader-heading-size:28px;--reader-translation-size:20px;--reader-line-width:42ch;--reader-leading:1.5}
body.book-reader-page[data-library-book-stage="R7"]{--reader-base-size:25px;--reader-heading-size:27px;--reader-translation-size:20px;--reader-line-width:45ch;--reader-leading:1.5}
body.book-reader-page[data-library-book-stage="R8"]{--reader-base-size:24px;--reader-heading-size:27px;--reader-translation-size:19.5px;--reader-line-width:47ch;--reader-leading:1.49}
body.book-reader-page[data-library-book-stage="R9"]{--reader-base-size:23px;--reader-heading-size:26px;--reader-translation-size:19.5px;--reader-line-width:49ch;--reader-leading:1.49}
body.book-reader-page[data-library-book-stage="R10"]{--reader-base-size:22px;--reader-heading-size:26px;--reader-translation-size:19px;--reader-line-width:52ch;--reader-leading:1.48}
body.book-reader-page[data-library-book-stage="R11"]{--reader-base-size:20.5px;--reader-heading-size:25px;--reader-translation-size:19px;--reader-line-width:54ch;--reader-leading:1.48}
body.book-reader-page[data-library-book-stage="R12"]{--reader-base-size:20px;--reader-heading-size:25px;--reader-translation-size:18.5px;--reader-line-width:56ch;--reader-leading:1.47}
body.book-reader-page.has-reader-level-type .book-spread{--reader-page-size:var(--reader-base-size)}
body.book-reader-page.has-reader-level-type .book-spread--extended{--reader-page-size:calc(var(--reader-base-size) * .97)}
body.book-reader-page.has-reader-level-type .book-spread--dense{--reader-page-size:calc(var(--reader-base-size) * .93)}
body.book-reader-page.has-reader-level-type .book-spread--compact{--reader-page-size:calc(var(--reader-base-size) * .88)}
body.book-reader-page.has-reader-level-type .book-spread .book-spread__story .book-paragraph__english{max-width:min(100%,var(--reader-line-width))!important;font-size:calc(var(--reader-page-size) * var(--book-font-scale,1))!important;line-height:var(--reader-leading)!important}
body.book-reader-page.has-reader-level-type .book-spread .book-spread__story>header h2{font-size:calc(var(--reader-heading-size) * var(--book-font-scale,1))!important}
body.book-reader-page.has-reader-level-type .book-spread .book-paragraph__translation,
body.book-reader-page.has-reader-level-type .book-spread .general-reader-translation{font-size:calc(var(--reader-translation-size) * var(--book-font-scale,1))!important;line-height:1.65!important}
body.book-reader-page.has-reader-level-type .book-spread:is(.book-spread--extended,.book-spread--dense,.book-spread--compact) .book-paragraph__english{text-align:left!important}
@media(max-width:680px){
 body.book-reader-page[data-library-book-stage="R1"]{--reader-base-size:29px;--reader-heading-size:27px}
 body.book-reader-page[data-library-book-stage="R2"]{--reader-base-size:28px;--reader-heading-size:27px}
 body.book-reader-page[data-library-book-stage="R3"]{--reader-base-size:27px;--reader-heading-size:26px}
 body.book-reader-page[data-library-book-stage="R4"]{--reader-base-size:26px;--reader-heading-size:26px}
 body.book-reader-page[data-library-book-stage="R5"]{--reader-base-size:25px;--reader-heading-size:25px}
 body.book-reader-page[data-library-book-stage="R6"]{--reader-base-size:24px;--reader-heading-size:25px}
 body.book-reader-page[data-library-book-stage="R7"]{--reader-base-size:23px;--reader-heading-size:24px}
 body.book-reader-page[data-library-book-stage="R8"]{--reader-base-size:22px;--reader-heading-size:24px}
 body.book-reader-page[data-library-book-stage="R9"]{--reader-base-size:21px;--reader-heading-size:23px}
 body.book-reader-page[data-library-book-stage="R10"]{--reader-base-size:20px;--reader-heading-size:23px}
 body.book-reader-page[data-library-book-stage="R11"]{--reader-base-size:19px;--reader-heading-size:22px}
 body.book-reader-page[data-library-book-stage="R12"]{--reader-base-size:18.5px;--reader-heading-size:22px}
}

/* Reader tools share a touch-sized grid across book levels. */
body.book-reader-page .book-inline-tools:not(.book-lecture-finish-tools){
  container-type:inline-size;grid-template-columns:minmax(0,1fr);align-content:start;
  padding:12px 0!important;gap:8px!important;width:100%;box-sizing:border-box;
}
body.book-reader-page .book-inline-tools .reader-tool-group{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px!important;
}
body.book-reader-page .book-inline-tools .reader-tool-group[aria-label="강의 도구"]{order:2!important}
body.book-reader-page .book-inline-tools .reader-tool-group[aria-label="읽기 보조"]{order:3!important}
body.book-reader-page .book-inline-tools .reader-tool-group:not(:has(button:not([hidden]))){display:none!important}
body.book-reader-page .book-inline-tools .reader-tool-group button{
  order:0!important;width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;
  min-height:46px!important;padding:8px 6px!important;margin:0!important;border-radius:11px!important;
  font:700 18px/1.22 system-ui,"Malgun Gothic",sans-serif!important;letter-spacing:-.025em!important;
  white-space:normal!important;word-break:keep-all;box-sizing:border-box;gap:5px!important;
}
body.book-reader-page .book-inline-tools .reader-tool-group button[hidden]{display:none!important}
body.book-reader-page .book-inline-tools .reader-tool-group button:focus-visible{outline:3px solid #122940;outline-offset:2px}
body.book-reader-page .reader-tool-group [data-book-action="whole-book-audio"]{background:#165da5!important;border-color:#165da5!important;color:#fff!important}
body.book-reader-page .reader-tool-group [data-book-action="whole-book-korean-audio"]{background:#fceaf1!important;border-color:#dc9ab3!important;color:#90224f!important}
body.book-reader-page .reader-tool-group [data-book-action="whole-book-korean-audio"][aria-pressed=true]{background:#91234e!important;color:white!important}
body.book-reader-page .reader-tool-group .book-lecture-trigger{background:#6542a5!important;color:#fff!important}
body.book-reader-page .book-inline-tools .reader-tool-group .book-lecture-rate-toggle{background:#f4effa!important;color:#543489!important;border:1px solid #c5b4df!important}
body.book-reader-page .book-inline-tools .reader-tool-group [data-book-action="sentence-audio"]{background:#f1f5fb!important;border:1px solid #becde0!important;color:#23486a!important}
body.book-reader-page .book-inline-tools .reader-tool-group :is([data-book-action="sentence-audio"],[data-book-action="translation"],[data-book-action="word-cover"])::before{display:none!important}
body.book-reader-page .book-inline-tools .reader-tool-group [data-book-action]>span:last-child{display:inline!important}
body.book-reader-page .book-inline-tools .reader-tool-group button[aria-expanded=true]{box-shadow:inset 0 0 0 2px currentColor!important}
@container(max-width:345px){
  body.book-reader-page .book-inline-tools .reader-tool-group{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.book-reader-page .book-inline-tools .reader-tool-group [data-book-action="sentence-audio"]{grid-column:1/-1}
}
body.book-reader-page .book-toolbar :is([data-book-action="font-up"],[data-book-action="font-down"],[data-book-learning-toggle]){min-height:44px!important;font-size:18px!important}

