/* A shared, quiet workspace: textbook first; notes and occasional tools on demand. */
.study-workspace{--paper:#f5f2f8;--ink:#352d40;--green:#705a81;--muted:#6b5f74;--line:#ddd4e6;color:var(--ink);background:var(--paper)}
.study-workspace .workspace-header{position:relative;z-index:20;display:flex;align-items:center;gap:14px;min-height:64px;padding:10px 22px;background:#fffeff;border-bottom:1px solid var(--line);flex-shrink:0}
.workspace-header .back{display:flex;gap:7px;align-items:center;font-size:12px;white-space:nowrap;color:var(--muted);min-height:40px}
.workspace-header .reader-title{flex:1;min-width:0;display:flex;align-items:center;gap:15px;margin-left:12px}
.workspace-header .reader-title strong{font-size:18px;font-weight:500;letter-spacing:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace-header .reader-title span{font-size:10px;white-space:nowrap;color:var(--muted)}
.workspace-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.workspace-actions>button,.workspace-tools>summary{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 15px;font:12px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--ink);white-space:nowrap;cursor:pointer;list-style:none}
.workspace-tools>summary::-webkit-details-marker{display:none}.workspace-actions>button:hover,.workspace-tools>summary:hover,.workspace-tools[open]>summary{background:#f0ebf5}
.workspace-actions>.reader-notes-toggle{background:#705a81;border-color:#705a81;color:#fff}.workspace-actions>.reader-notes-toggle:hover,.workspace-actions>.reader-notes-toggle[aria-expanded=true]{background:#5f486f;color:white;border-color:#5f486f}
.workspace-tools{position:relative}.workspace-tools>summary:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.workspace-tool-panel{position:absolute;right:0;top:calc(100% + 12px);width:min(360px,calc(100vw - 28px));max-height:calc(100dvh - 90px);overflow-y:auto;padding:18px;border:1px solid var(--line);border-radius:10px;background:#fffeff;box-shadow:0 12px 36px #352d4020}
.workspace-resource-link{display:block;padding:0 0 15px;border-bottom:1px solid var(--line);color:var(--green);font-size:12px}
.study-workspace .reader-controls{display:flex;flex-wrap:wrap;gap:12px;padding:16px 0;border:0}.study-workspace .reader-controls label{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px}.study-workspace .reader-controls select{max-width:220px;min-width:0;width:70%;font-size:12px}.study-workspace .reader-controls #pageForm{width:100%}.study-workspace #pageForm label{width:auto;margin-right:auto}.study-workspace #printedPage{width:88px}.study-workspace .reader-controls button{background:#f5f2f8;border-color:var(--line)}
.study-workspace #downloadBook{display:block;text-align:center;background:#f0ebf5;border-color:var(--line);color:var(--green);padding:11px}.workspace-tools-note{font-size:10px;line-height:1.8;color:var(--muted);margin:13px 0 0}
.study-workspace .reader-main{display:flex;min-height:0;flex:1;background:#e9e5ed}.study-workspace .reader-main>#pdfFrame{flex:1;min-width:0;width:0;height:100%}.study-workspace .study-sidebar{background:var(--paper);border-color:var(--line)}.study-workspace .sidebar-tabs button[aria-selected=true],.study-workspace .toc-entry[aria-current=page]{background:#e9e1f0}.study-workspace .toc-level-0{background:#f0ebf5}.study-workspace .loading-overlay{background:var(--paper)}.study-workspace .loading-card{background:#fffeff;border-color:var(--line)}.study-workspace .loading-mark{color:#a18bb2}
.study-workspace .reader-notes{display:flex;flex-direction:column;flex:0 0 46%;width:46%;height:100%;min-width:0;background:#f5f2f8;border-left:1px solid #ddd4e6;z-index:7}.reader-notes-heading{display:flex;align-items:center;gap:12px;min-height:45px;padding:8px 12px;border-bottom:1px solid #ddd4e6;color:#6b5f74;font-size:11px}.reader-notes-heading strong{margin-right:auto;font-size:12px;font-weight:500}.reader-notes-heading a{text-decoration:underline;text-underline-offset:3px}.reader-notes-heading button{min-width:32px;min-height:32px;padding:3px 8px;font-size:20px;background:transparent;border:0}.study-workspace .reader-notes iframe{display:block;flex:1;width:100%;min-height:0;border:0;background:#f5f2f8}
@media(max-width:1100px){.study-workspace .reader-notes{position:absolute;inset:0 0 0 auto;width:62%;box-shadow:-5px 0 20px #352d4020}}
@media(max-width:720px){.study-workspace .workspace-header{gap:8px;padding:8px 12px;min-height:58px;flex-wrap:nowrap}.workspace-header .back-label{display:none}.workspace-header .back{min-width:28px;justify-content:center;font-size:18px}.workspace-header .reader-title{margin-left:0;gap:0}.workspace-header .reader-title strong{font-size:15px;letter-spacing:0}.workspace-header .reader-title span{display:none}.workspace-actions{gap:5px}.workspace-actions>button,.workspace-tools>summary{font-size:11px;min-height:40px;padding:8px 10px}.study-workspace .reader-notes{width:100%}.study-workspace .reader-controls .topic-select{display:flex}.workspace-tool-panel{position:fixed;top:66px;right:12px}.study-workspace .reader-main{min-height:0}}
@media(prefers-reduced-motion:reduce){.study-workspace *{scroll-behavior:auto!important;transition:none!important}}
.workspace-actions>#readerFitWidth[aria-pressed=true]{color:#705a81;background:#f0ebf5;border-color:#cabbd5}.workspace-search-icon{font-size:19px;line-height:1;margin-right:5px}.workspace-logo{width:35px;height:35px;object-fit:contain}.workspace-header .back{gap:2px}.reader-search-dialog{width:min(920px,calc(100vw - 40px));height:min(820px,calc(100dvh - 70px));padding:0;border:1px solid #d9cde3;border-radius:12px;background:#fcfbfd;color:#40364c;box-shadow:0 25px 100px #352d4030;overflow:hidden}.reader-search-dialog[open]{display:flex;flex-direction:column}.reader-search-dialog::backdrop{background:#36294365;backdrop-filter:blur(3px)}.reader-search-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 20px;border-bottom:1px solid #e9e3ee;font-size:13px}.reader-search-heading strong{font-weight:500}.reader-search-heading span{color:#9a89a5;font-size:11px;margin-left:14px}.reader-search-heading button{background:none;border:0;color:#7e6a8b;font-size:22px;min-width:36px;min-height:32px;cursor:pointer}.reader-search-dialog iframe{border:0;width:100%;flex:1;min-height:0}.study-bridge{display:none!important}@media(min-width:721px) and (max-width:1100px){.study-workspace .reader-notes{position:relative;inset:auto;flex:0 0 50%;width:50%;box-shadow:none}}@media(max-width:720px){.workspace-search-label{display:none}.workspace-search-icon{margin:0}.workspace-header .back-label{display:none}.workspace-header .workspace-logo{width:30px;height:30px}.workspace-actions>button,.workspace-tools>summary{padding:7px 9px}.reader-search-dialog{width:calc(100vw - 20px);height:calc(100dvh - 30px)}.reader-search-heading span{display:none}}@media(max-width:380px){.workspace-header .reader-title strong{font-size:12px}.workspace-actions>button,.workspace-tools>summary{padding:7px}.study-workspace .workspace-header{gap:5px;padding:8px}}
.workspace-tool-panel>.workspace-switch-link,.workspace-tool-panel>.workspace-return-link{display:block;width:100%;border:0;border-bottom:1px solid #e8dfef;background:transparent;text-align:left;color:#80648f;font:12px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;padding:4px 0 14px;margin-bottom:14px;cursor:pointer}.workspace-tool-panel>.workspace-return-link{color:#9b84aa;font-size:11px;padding-top:0}.workspace-tool-panel>.workspace-switch-link:hover,.workspace-tool-panel>.workspace-return-link:hover{color:#644776}.reader-subject-dialog{width:min(580px,calc(100vw - 40px));height:min(740px,calc(100dvh - 70px))}.reader-subject-dialog .reader-search-heading{font-size:12px}.reader-subject-dialog iframe{background:#fcfbfd}@media(max-width:720px){.reader-subject-dialog{width:calc(100vw - 24px);height:calc(100dvh - 40px)}}
/* A focusable divider works with a mouse, touch, or the arrow keys. */
.reader-split-handle{display:none}.study-workspace .reader-notes[hidden],.reader-split-handle[hidden]{display:none!important}
@media(min-width:721px){
 .study-workspace .reader-main.workspace-notes-open{display:grid;grid-template-columns:minmax(0,var(--reader-book-share,54fr)) 12px minmax(0,var(--reader-note-share,46fr))}
 .study-workspace .workspace-notes-open>#pdfFrame{grid-column:1;width:100%}
 .study-workspace .workspace-notes-open>.reader-notes{grid-column:3;position:relative;inset:auto;width:100%;min-width:0;box-shadow:none;border-left:0}
 .reader-split-handle{grid-column:2;position:relative;display:block;cursor:col-resize;touch-action:none;background:#f0ebf5;border-inline:1px solid #ddd4e6;z-index:8}
 .reader-split-handle:after{content:'';position:absolute;top:50%;left:4px;width:2px;height:38px;border-radius:2px;background:#b8a7c8;transform:translateY(-50%)}
 .reader-split-handle:hover,.reader-split-handle:focus-visible,.workspace-resizing .reader-split-handle{background:#e3d8ec;outline:0}
 .reader-split-handle:focus-visible{box-shadow:inset 0 0 0 2px #705a81}
 .workspace-resizing,.workspace-resizing *{cursor:col-resize!important;user-select:none!important}
 .workspace-resizing .reader-main>iframe,.workspace-resizing .reader-notes iframe{pointer-events:none}
}
