/* A quiet reference desk in both worlds. */
.deck-source-card{display:flex;align-items:center;gap:18px;padding:21px 24px;margin:24px 0;border:1px solid #b7cde4;border-radius:17px;background:linear-gradient(115deg,#edf5fc,#fff);color:#284966}
.deck-source-card>div{flex:1;min-width:0}.deck-source-card h3{font:24px Georgia,serif;margin:6px 0;overflow-wrap:anywhere}.deck-source-card p{font-size:12px;margin:0;opacity:.75}.deck-source-card .eyebrow{font-size:9px;letter-spacing:1.5px}
.deck-source-icon,.source-seal,.source-reader-mark{display:grid;place-items:center;width:48px;height:58px;border:1px solid #b9cadd;border-radius:22px 22px 7px 7px;color:#536c94;background:#ffffff80;flex:none}.deck-source-icon svg,.source-reader-mark svg{width:25px;height:25px}
.source-open-button{display:inline-flex;align-items:center;gap:6px!important;min-height:32px!important;padding:6px 11px!important;font-size:11px!important;white-space:nowrap;border:1px solid #adbad3!important;background:#eef2fa!important;color:#34527a!important}.source-open-button svg{width:16px;height:16px}
.source-manager{text-align:center}.source-manager .source-seal{margin:0 auto 15px}.source-manager>.eyebrow{font-size:9px;letter-spacing:2px}.source-manager h3{font:28px Georgia,serif;margin:12px 0}.source-manager>p{font-size:13px;line-height:1.7}.source-manager label:not(.source-upload){text-align:left}.source-current{display:flex;align-items:center;gap:14px;padding:17px;margin:20px 0;text-align:left;border:1px solid #ccd8e4;border-radius:12px;background:#edf4fc}.source-current>div{flex:1;min-width:0}.source-current strong{display:block;font-size:13px;overflow-wrap:anywhere}.source-current span{font-size:10px;opacity:.75}.source-current>span{font-size:9px;border:1px solid #89ad90;border-radius:20px;padding:4px 7px;color:#34744f}
.source-upload{position:relative;display:flex!important;align-items:center;flex-direction:column;justify-content:center;gap:9px;border:1px dashed #9ab7d0!important;border-radius:14px;padding:27px;background:#f8fbfe;cursor:pointer;overflow:hidden;color:#456886;margin:17px 0!important}.source-upload:hover{background:#e8f0fa}.source-upload strong{font-size:15px}.source-upload span{font-size:11px;opacity:.75}.source-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.source-upload:focus-within{outline:3px solid #8d94c7;outline-offset:3px}.source-storage-note{padding:14px;background:#e9eef3;border-radius:9px;text-align:left;font-size:11px!important;line-height:1.7!important;color:#586c7e}.source-manager .actions{justify-content:center}#source-manager-status{font-size:12px;padding:10px;color:#9c633b}
:root{--pdf-panel-width:min(580px,48vw)}
.source-reader{position:fixed;z-index:1500;right:0;top:0;bottom:0;width:var(--pdf-panel-width);display:flex;flex-direction:column;background:#f5f7fb;color:#294660;box-shadow:-12px 0 50px #091c3530;border-left:1px solid #b9c8dd;isolation:isolate}
.source-reader[hidden]{display:none!important}.source-reader.is-open{animation:source-slide-in .3s ease-out}
@keyframes source-slide-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
.source-reader-head{display:flex;gap:14px;padding:19px 20px;align-items:center;background:#e8eff8;border-bottom:1px solid #bdcce0;flex:none}.source-reader-head>div:nth-child(2){min-width:0;flex:1}.source-reader-head .eyebrow{font:8px/1.6 system-ui,sans-serif;letter-spacing:1.6px;display:block;color:#6a80a0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-reader-head h2{font:22px/1.2 Georgia,serif;color:inherit;margin:6px 0 0;overflow-wrap:anywhere;max-height:55px;overflow:auto}.source-reader-mark{width:36px;height:45px}.source-close{font:27px Georgia,serif!important;width:36px;min-width:36px;height:36px;min-height:36px!important;padding:0!important;border:1px solid #b3c7df!important;background:#ffffff60!important;color:#345a7c!important;border-radius:50%}
.source-reader-tools{padding:16px 18px 10px;border-bottom:1px solid #d0d9e4;flex:none}.source-reader input{min-width:0;color:#244565;background:#fff!important;border:1px solid #c1d0e2!important;box-shadow:none!important;font:13px system-ui,sans-serif;border-radius:8px;padding:9px}
#source-search-form{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #b7c9dd;border-radius:10px;padding:5px 5px 5px 11px}#source-search-form>.icon{width:17px;flex:none;color:#6b859e}#source-search-form input{flex:1;width:100%;border:0!important;background:transparent!important;padding:8px 0;outline-offset:3px}#source-search-form button{background:#365e91!important;color:#f8fcff!important;border:0!important;font-size:11px;padding:10px 12px;min-height:35px;flex:none;border-radius:7px}
.source-search-status{display:flex;align-items:center;gap:8px;justify-content:space-between;margin:9px 0 8px;font-size:10px;line-height:1.5;color:#6e8095}.source-search-status>div{display:flex;gap:3px;flex:none}.source-reader .quiet{color:#4a6c87!important;border:1px solid #c4d2df!important;background:#f5f8fc!important;min-height:28px;font-size:11px;padding:4px 9px;box-shadow:none!important}
.source-page-tools{display:flex;align-items:center;gap:5px;color:#607a93;font-size:11px}.source-page-tools label{display:flex;align-items:center;gap:5px;margin:0!important;font-size:10px}.source-page-tools input{width:54px;padding:5px;min-height:28px}.source-page-tools .source-tool-divider{flex:1}.source-page-tools output{font-size:10px;min-width:34px;text-align:center}.source-page-tools>span{white-space:nowrap}
.source-result-list{max-height:180px;overflow:auto;flex:none;border-bottom:1px solid #c4d2df;background:#f9fbfe;padding:4px 13px}.source-result-list[hidden]{display:none}.source-result-list button{display:flex;align-items:flex-start;gap:12px;text-align:left;width:100%;border:0!important;border-bottom:1px solid #e1e7ee!important;border-radius:0;background:transparent!important;color:#425d76!important;padding:9px 8px;min-height:40px}.source-result-list button.selected{background:#e4edf6!important}.source-result-list span{white-space:nowrap;font-size:8px;letter-spacing:1px;font-weight:700;padding-top:3px}.source-result-list p{margin:0;font-size:11px;line-height:1.65;min-width:0}.source-result-list mark{background:#efd27c;color:#3f483e;padding:1px 2px;border-radius:2px}
.source-paper-scroll{flex:1;min-height:0;overflow:auto;padding:22px 18px 35px;background:radial-gradient(#a8bacc44 .5px,transparent .7px) 0 0/7px 7px,#e0e6ee;overscroll-behavior:contain}.source-paper{position:relative;margin:0 auto;background:white;box-shadow:0 3px 15px #263f5826}.source-paper[hidden]{display:none}.source-paper canvas{display:block;margin:0;max-width:none!important;max-height:none!important;background:#fff}
.source-load-status{display:flex;align-items:center;justify-content:center;min-height:270px;flex-direction:column;gap:15px;text-align:center;max-width:380px;margin:0 auto;color:#5b7387;font-size:12px;line-height:1.7}.source-load-status[hidden]{display:none}.source-load-status>.icon{width:43px;height:43px;opacity:.6}.source-load-status strong{font:20px/1.4 Georgia,serif}.source-load-status span{font-size:11px;opacity:.75}.source-load-status.source-error{color:#8c643a}#source-password-form{width:100%;text-align:left}#source-password-form input{display:block;width:100%;margin:10px 0}
.source-reader-foot{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:12px 15px;background:#ebf0f7;border-top:1px solid #c4d2df;flex:none}.source-reader-foot>span{display:flex;gap:6px;align-items:center;font-size:9px;color:#6c8196}.source-reader-foot .icon{width:14px;height:14px}.source-reader-foot button{font-size:10px!important;min-height:28px!important}
body.pdf-open #root{width:calc(100% - var(--pdf-panel-width));margin-right:var(--pdf-panel-width)}body.pdf-open #daily-dock{width:calc(100% - var(--pdf-panel-width));right:var(--pdf-panel-width)}body.pdf-open #focus-orb{visibility:hidden}
body.pdf-open .study-header{flex-wrap:wrap;gap:8px!important;justify-content:space-between;min-height:54px;height:auto!important;padding:8px 12px!important}body.pdf-open .study-breadcrumb{max-width:220px!important;font-size:10px!important}body.pdf-open .studio-main{padding-left:12px!important;padding-right:12px!important}body.pdf-open .study-controls{min-width:0;gap:7px!important}body.pdf-open .grade{min-width:0!important}body.pdf-open .grade small{font-size:9px!important}body.pdf-open .studio-foot{flex-wrap:wrap}body.pdf-open .flash-question{font-size:clamp(24px,2.3vw,36px)!important}body.pdf-open .flash-answer{font-size:clamp(19px,1.8vw,27px)!important}
html[data-visual-theme=fantasy] .deck-source-card{background:linear-gradient(120deg,#eee7d0,#fbf7e9);border-color:#cbbb91;color:#284d3f}html[data-visual-theme=fantasy] :is(.deck-source-icon,.source-seal,.source-reader-mark){border-color:#b59c60;color:#9b7d39;background:#faf1d8}
html[data-visual-theme=fantasy] .source-open-button{background:#eee8d1!important;color:#355b45!important;border-color:#c8b787!important}html[data-visual-theme=fantasy] .study-dark .source-open-button{background:#325744!important;color:#e5d8a9!important;border-color:#a28b5a!important}
html[data-visual-theme=fantasy] .source-current{background:#f4eeda;border-color:#d4c69e}html[data-visual-theme=fantasy] .source-upload{background:#faf5e6;border-color:#bca66c!important;color:#54714d}html[data-visual-theme=fantasy] .source-storage-note{background:#ece8d7;color:#68705a}
html[data-visual-theme=fantasy] .source-reader{background:#f7f1e4;color:#2b4b3c;border-color:#bda46c;box-shadow:-12px 0 50px #17352536}html[data-visual-theme=fantasy] .source-reader-head{background:#173f32;border-color:#b39758;color:#f4e5ba}html[data-visual-theme=fantasy] .source-reader-head .eyebrow{color:#c5b779}html[data-visual-theme=fantasy] .source-reader-head .source-reader-mark{background:#285341;border-color:#a88d53;color:#e1c484}html[data-visual-theme=fantasy] .source-close{background:#355942!important;color:#efddac!important;border-color:#8f8054!important}
html[data-visual-theme=fantasy] .source-reader-tools{border-color:#d7c8a6}html[data-visual-theme=fantasy] #source-search-form{border-color:#c3b180;background:#fffcf2}html[data-visual-theme=fantasy] #source-search-form input{color:#33553e!important}html[data-visual-theme=fantasy] #source-search-form button{background:#2a6048!important;color:#fff3d2!important}html[data-visual-theme=fantasy] .source-search-status{color:#81816a}html[data-visual-theme=fantasy] .source-page-tools{color:#6f755c}html[data-visual-theme=fantasy] .source-reader .quiet{background:#f7f1df!important;border-color:#d0c199!important;color:#557151!important}
html[data-visual-theme=fantasy] .source-result-list{background:#faf5e7;border-color:#d0c099}html[data-visual-theme=fantasy] .source-result-list button{color:#466045!important;border-color:#e5dbc0!important}html[data-visual-theme=fantasy] .source-result-list button.selected{background:#eae3c8!important}html[data-visual-theme=fantasy] .source-paper-scroll{background:radial-gradient(#b4a17c55 .5px,transparent .7px) 0 0/7px 7px,#e4ddcb}html[data-visual-theme=fantasy] .source-reader-foot{background:#eee7d2;border-color:#cbbc96}html[data-visual-theme=fantasy] .source-reader-foot>span{color:#777b60}html[data-visual-theme=fantasy] .source-load-status{color:#6c795d}
/* PDF.js text geometry; scoped so ordinary flashcards never inherit PDF styles. */
.source-paper .textLayer{color-scheme:only light;position:absolute;text-align:initial;inset:0;overflow:clip;opacity:1;line-height:1;letter-spacing:normal;word-spacing:normal;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;caret-color:CanvasText;z-index:1;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size))}
.source-paper .textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0;user-select:text}
.source-paper .textLayer>:not(.markedContent),.source-paper .textLayer .markedContent span:not(.markedContent){z-index:1;--font-height:0;font-size:calc(var(--text-scale-factor) * var(--font-height));--scale-x:1;--rotate:0deg;transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv))}
.source-paper .textLayer .markedContent{display:contents}.source-paper .textLayer mark{color:transparent;background:#eac95580;font:inherit;padding:0;position:static}.source-paper .textLayer mark.source-selected-match{background:#c795df88;box-shadow:0 0 0 1px #a37ab999}.source-paper .textLayer ::selection{background:#587dc666}
@media(max-width:1050px){:root{--pdf-panel-width:min(540px,90vw)}body.pdf-open #root{width:100%;margin-right:0}body.pdf-open #daily-dock{width:100%;right:0}.source-reader{box-shadow:-15px 0 0 100vw #051e214d}.source-open-button{font-size:10px!important;padding:5px 8px!important}.deck-source-card{gap:12px;padding:17px;flex-wrap:wrap}.deck-source-card>div{min-width:190px}.deck-source-card h3{font-size:20px}}
@media(max-width:600px){:root{--pdf-panel-width:100vw}.source-reader-head{padding:13px 15px}.source-reader-head h2{font-size:20px}.source-reader-tools{padding:12px 12px 9px}.source-page-tools{gap:4px}.source-page-tools .quiet{padding:4px 7px!important}.source-reader-foot{padding:10px;gap:5px}.source-reader-foot>span{font-size:8px}.source-result-list{max-height:137px}.source-open-button{margin-left:auto}.source-paper-scroll{padding:16px 10px 25px}}
@media(prefers-reduced-motion:reduce){.source-reader.is-open{animation:none}}
.no-motion .source-reader.is-open{animation:none}

html[data-visual-theme=fantasy] .source-reader-head #source-title{color:#f4e5ba!important}
.source-result-list p{font-family:system-ui,sans-serif!important;font-weight:400!important}
