.batch-panel #batchList{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;max-height:42vh;overflow:auto}.batch-book{display:flex;align-items:center;gap:10px;border:1px solid var(--line,#d8cfc1);padding:12px;border-radius:14px}.batch-book:has(input:checked){background:#dcebe3}.batch-book input{width:auto}
.study-collection,.mind-notebook{height:100%;display:flex;flex-direction:column;background:var(--bg,#f8f5ef);color:var(--ink,#383832)}.mind-notebook h1,.study-collection h1{font-size:1.35rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.set-tools,.mind-bar{display:flex;gap:8px;align-items:center;overflow:auto;padding:8px 12px;flex:none}.mind-bar button,.set-tools>*{flex:none}.set-results,#mindScroll{flex:1;overflow:auto;min-height:0;padding:12px;overscroll-behavior:contain}.set-group{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px;margin-bottom:10px}.set-group h2{flex-basis:100%;font-size:1.1rem}.set-card{display:grid;max-width:250px;text-align:left;gap:6px;padding:14px;border-radius:16px;border:1px solid var(--line,#d8cfc1);background:var(--surface,#fffdf9)}.set-card span{max-height:4.2em;overflow:hidden}.set-map{display:flex;align-items:flex-start;gap:22px;width:max-content;padding:14px}.set-map .set-group{flex-direction:column;border-left:2px solid #c3ae91;padding-left:12px;max-width:240px}.set-root,.set-branch{padding:12px;border-radius:12px;background:#d9ebdf}.mind-bar label,.set-tools label{white-space:nowrap}.mind-bar input,.set-tools input[type=range]{width:90px}.mind-bar button:disabled{opacity:.45}#mindTree{position:relative}#mindTree svg{position:absolute;inset:0;fill:none;stroke:#968878;stroke-width:3}.mind-tree-node{position:absolute;width:172px;min-height:62px;border:1px solid #8da398;border-radius:14px;white-space:normal;overflow-wrap:anywhere;color:#243a30}.mind-tree-node[aria-pressed=true]{outline:3px solid #467f68}.review-recovery{text-align:center}
.doc-tools [data-doc-action]{white-space:nowrap}.textpaper [data-block-style=H1]{font-size:1.8em!important;font-weight:700!important}.textpaper [data-block-style=H2]{font-size:1.45em!important;font-weight:700!important}.textpaper [data-block-style=H3]{font-size:1.2em!important;font-weight:700!important}.textpaper [data-block-style=Quote]{color:#647169;font-style:italic}.textpaper [data-block-style=Code]{font-family:'JetBrains Mono',monospace!important;background:#eceae3}.textpaper [data-leading]{margin-inline-start:calc(var(--indent,0)*1.4em)}.textpaper [data-leading]::before{content:attr(data-leading);color:#52655e;white-space:pre}.textpaper [data-href]{color:#386d9b;text-decoration:underline}.textpaper [data-highlight]{background:#ffe89e}.textpaper [data-strike]{text-decoration:line-through}

.search-hit .tile-open{display:grid;align-content:start;justify-content:stretch;min-height:5rem;text-align:left;padding:12px;gap:6px}.search-hit .tile-open small{white-space:normal;line-height:1.4}.search-hit mark{background:#ffe58a;color:#1c2230;border-radius:3px}

/* Android StudySetScreen and its map use an independent peach desk and glass toolbar. */
.study-collection { height:100dvh;background:#fff2e4;color:var(--ink);min-height:0; }
:root[data-tone=dark] .study-collection { background:var(--bg); }
.set-header { flex:none;display:flex;align-items:center;gap:0;padding:5px 10px;margin:8px auto;width:min(calc(100% - 28px),1100px);border-radius:28px;border:1px solid var(--surface);background:linear-gradient(#f8fafc,#e0e4e9,#edf0f3);box-shadow:0 2px 4px #35291e22; }
:root[data-tone=dark] .set-header {background:linear-gradient(var(--surface),var(--bg),var(--surface));}
.set-heading {flex:1;min-width:0;padding:0 10px}
.set-heading h1 {font:500 22px/28px Inter,sans-serif;margin:0;}
.set-heading small,.set-unavailable {color:var(--muted);font-size:16px;}
.set-actions {display:flex;}
.set-header button {display:grid;place-items:center;width:52px;height:52px;padding:0;background:transparent;border:0;border-radius:50%;}
.set-header button img {width:36px;height:36px;object-fit:contain;}
.set-header button:disabled {opacity:.35;}
.set-search,.set-filters {flex:none;display:flex;align-items:center;gap:10px;margin:8px 18px;}
.set-search label {display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:0 14px;min-height:52px;border:1px solid var(--muted);border-radius:18px;}
.set-search label img {width:26px;height:26px;}
.set-search #setQuery {width:100%;height:100%;padding:8px 0;min-width:0;background:transparent;border:0;box-shadow:none;}
.set-search button,.set-zoom-tools button {background:transparent;border:0;color:var(--ink);}
.set-filters {margin-top:0;gap:8px;overflow-x:auto;}
.set-filters button {flex:none;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid var(--edge);border-radius:16px;background:transparent;padding:6px 14px;color:var(--ink);}
.set-filters [aria-pressed=true] {background:var(--strong);border-color:var(--accent);}
.set-unavailable {margin:0 18px 6px;}
.study-collection .set-results {position:relative;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);padding:0;overflow:hidden;}
.set-results .set-map-viewport {position:relative;overflow:hidden;touch-action:none;user-select:none;}
.set-map-viewport .set-map {position:absolute;top:0;left:0;display:block;padding:0;transform-origin:0 0;}
.set-map>svg {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;fill:none;stroke:var(--muted);stroke-width:2;opacity:.45;}
.set-map>:is(.set-root,.set-branch,.set-card) {position:absolute;overflow:hidden;}
.study-collection :is(.set-root,.set-branch) {display:flex;flex-direction:column;justify-content:center;align-items:stretch;text-align:start;padding:10px;border-radius:18px;font:500 17px/22px Inter,sans-serif;overflow-wrap:anywhere;border:0;box-shadow:0 1px 3px #35291e26;}
.study-collection .set-root {background:#f4cfa7;color:#4b3f34;}
.study-collection .set-branch {background:var(--surface);color:var(--ink);}
.set-branch small {font-size:14px;font-weight:400;color:var(--muted);}
.study-collection .set-list {display:flex;flex-direction:column;align-items:stretch;gap:14px;min-height:0;overflow:auto;padding:20px;}
.study-collection .set-card {display:flex;flex-direction:column;align-items:stretch;gap:0;flex:none;max-width:none;text-align:start;padding:0 0 12px;background:var(--surface);color:var(--ink);border:0;box-shadow:0 2px 5px #35291e28;border-radius:16px;overflow:hidden;}
.set-list .set-card {width:min(700px,100%);}
.set-card .set-card-title,.set-card .set-card-copy {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;}
.set-card .set-card-title {padding:10px 14px;line-height:24px;font-size:19px;font-weight:500;-webkit-line-clamp:2;}
.set-card :is(.set-card-ref,.set-card-branch) {display:block;line-height:20px;font-size:14px;margin:8px 12px 0;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.set-card .set-card-copy {line-height:24px;font-size:17px;max-height:120px;margin:6px 12px 0;-webkit-line-clamp:5;}
.set-card:has(.set-crop) .set-card-copy {-webkit-line-clamp:2;max-height:48px;}
.set-card .set-crop {display:block;margin:6px 12px 0;max-height:125px;overflow:hidden;}
.set-card .set-crop .excerpt-preview {width:100%;max-height:125px;margin:0;border:0;}
.set-zoom-tools {position:absolute;right:16px;bottom:16px;display:flex;align-items:center;gap:4px;padding:2px 6px;background:var(--surface);color:var(--ink);border-radius:18px;box-shadow:0 2px 4px #35291e24;}
.set-zoom-tools button {min-width:42px;min-height:42px;padding:5px 10px;}
.set-zoom-tools button:not(:last-child) {font-size:24px;}
.set-empty {align-self:center;justify-self:center;text-align:center;padding:24px;max-width:590px;max-height:100%;overflow:auto;}
.set-empty img {width:64px;height:64px;}
.set-empty h2 {font:500 24px/30px Inter,sans-serif;margin:12px 0;}
.set-empty p {color:var(--muted);}
.set-empty button {margin:4px;}
@media(max-width:530px){.set-header{gap:0;padding:4px;}.set-header button{width:42px;height:44px;}.set-heading{padding:0 4px;}.set-heading h1{font-size:19px;}}

/* The editor hosts the real document surface between the StudyWorkspace top bar and dock. */
.workspace.has-study-pane {
  display:grid; position:relative; min-height:0; overflow:hidden;
  grid-template:64px 44px minmax(0,1fr) 66px / minmax(0,var(--study-source,.51fr)) 14px minmax(0,var(--study-notes,.49fr));
  color:var(--ink,#302c29); background:var(--desk,#faf3e6);
}
.workspace.has-study-pane>:is(.notebook-tab-band,.note-tools,.workspace-head,.doc-tools,.foot,.note-nav) {display:none;}
.workspace.has-study-pane .stage {grid-area:3/1; min-width:0;min-height:0;margin:0;padding-top:4px;}
.workspace.has-study-pane .study-topbar {
  grid-area:1/1/2/-1;justify-self:center;align-self:center;
  display:flex;align-items:center;gap:4px;width:min(1040px,calc(100% - 24px));height:48px;
  padding:2px 6px;border:1px solid #fff9;border-radius:28px;background:linear-gradient(#f8fafcf5,#edf0f4ed 24%,#dadee4ef 66%,#e9edf1f2);
  color:#292e36;box-shadow:0 3px 8px #32373e34;z-index:5;
}
.study-topbar button,.study-dock button,.study-layout summary,.study-action-menu summary,.study-pane-heading button {
  display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:44px;min-height:44px;
  padding:3px 8px;border:none;border-radius:22px;background:transparent;color:inherit;font:500 14px/1.3 Inter,sans-serif;
}
.study-topbar img,.study-dock img,.study-pane-heading img {width:28px;height:28px;object-fit:contain;}
.study-heading {display:grid;flex:1;min-width:40px;padding:0 5px;line-height:1.35;}
.study-heading small,.study-topbar label {font:400 14px/1.25 Inter,sans-serif;color:#505a66;}
.study-heading strong {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:500 16px/22px Inter,sans-serif;}
.study-topbar label {display:grid;gap:0;margin:0 4px;padding:0 8px;border-inline:1px solid #75838d55;}
.study-topbar select {min-height:20px;width:auto;padding:0 4px;border:0;background:transparent;color:#292e36;font:500 15px/1.2 Inter,sans-serif;}
.study-layout,.study-action-menu {position:relative;}
.study-layout summary,.study-action-menu summary {list-style:none;cursor:pointer;}
.study-layout summary::-webkit-details-marker,.study-action-menu summary::-webkit-details-marker {display:none;}
.study-layout>div,.study-action-menu>div {position:absolute;display:grid;gap:2px;right:0;top:100%;min-width:160px;padding:6px;background:var(--paper,#fffaf4);color:var(--ink,#302c29);border:1px solid var(--edge,#dbcec0);border-radius:12px;box-shadow:0 8px 22px #2e28252e;z-index:5;}
.study-layout>div button,.study-action-menu>div button {justify-content:flex-start;}
.study-action-menu>div {top:auto;bottom:100%;min-width:200px;max-height:55dvh;overflow:auto;}
.study-layout:not([open])>div,.study-action-menu:not([open])>div {display:none;}
.study-document-label {grid-area:2/1;display:flex;align-items:center;gap:7px;padding-inline:15px;min-width:0;font:400 14px/1.3 Inter,sans-serif;}
.study-document-label>img {width:26px;height:26px;object-fit:contain;}
.study-capture-hint {flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:.8;font-size:13px;}
.study-document-label button {font:inherit;white-space:nowrap;padding:5px;}
.study-splitter {grid-area:2/2/4/3;display:grid;place-items:center;z-index:2;position:relative;touch-action:none;cursor:col-resize;}
.study-splitter::before,.study-splitter::after {content:"";position:absolute;width:1px;height:100%;background:#c6bfb2;}
.study-splitter::after {width:5px;height:30px;border-radius:5px;}
.workspace.has-study-pane #sourceStudyPane {grid-area:2/3/4/4;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--study-wall,#f8e4cd);border:0;padding:0;color:var(--ink,#302c29);}
.study-pane-heading {display:flex;align-items:center;height:44px;flex:none;gap:5px;background:#f5d8b9;color:#302c29;padding-inline:10px 5px;}
.study-pane-heading strong {flex:1;font:500 16px/1.35 Inter,sans-serif;}
.pane-rows {flex:1;min-width:0;min-height:0;overflow:auto;padding:8px;}
.pane-rows article {padding:8px;margin-bottom:8px;border:1px solid #dacdb2;border-radius:12px;background:#fffdfa;color:#302c29;}
.pane-rows article>button {display:grid;gap:5px;text-align:left;width:100%;background:transparent;color:inherit;}
.pane-rows article>button span {white-space:pre-wrap;}
.pane-tools {display:flex;gap:5px;flex-wrap:wrap;}
.study-panel-map {padding:0;overscroll-behavior:contain;}
.study-panel-map svg {display:block;touch-action:pan-x pan-y;}
.study-dock {grid-area:4/1/5/-1;align-self:center;justify-self:center;display:flex;align-items:center;max-width:calc(100% - 24px);gap:3px;padding:4px;border:1px solid var(--edge,#d4c9bb);border-radius:27px;background:var(--app-paper,#fffaf5);box-shadow:0 3px 8px #32373e25;z-index:4;}
.workspace.has-study-pane[data-study-axis=stack] {grid-template:64px 44px minmax(0,var(--study-source,.51fr)) 14px minmax(0,var(--study-notes,.49fr)) 66px / minmax(0,1fr);}
.workspace.has-study-pane[data-study-axis=stack] #sourceStudyPane {grid-area:5/1;}
.workspace.has-study-pane[data-study-axis=stack] .study-splitter {grid-area:4/1;cursor:row-resize;}
.workspace.has-study-pane[data-study-axis=stack] .study-splitter::before {width:100%;height:1px;}
.workspace.has-study-pane[data-study-axis=stack] .study-splitter::after {width:30px;height:5px;}
.workspace.has-study-pane[data-study-axis=stack] .study-dock {grid-area:6/1;}
.workspace.has-study-pane.compact-study-pane {grid-template:64px 44px minmax(0,1fr) 66px / minmax(0,1fr);}
.workspace.has-study-pane.compact-study-pane .study-dock {grid-area:4/1;}
.workspace.has-study-pane.compact-study-pane :is(#sourceStudyPane,.study-splitter) {display:none;}
#studyInkPad {width:100%;height:auto;aspect-ratio:1000/560;touch-action:none;background:white;border:1px solid #bcbab2;border-radius:10px;}
@media(max-width:600px) {
  .study-topbar {gap:0;}
  .study-topbar label,.study-topbar [data-act=outline] {display:none;}
  .study-topbar button,.study-dock button,.study-layout summary,.study-action-menu summary {min-width:34px;padding-inline:4px;}
  .study-topbar img,.study-dock img {width:25px;height:25px;}
  .study-dock {gap:1px;}
}
[data-tone=dark] .workspace.has-study-pane #sourceStudyPane {background:#332d2a;color:#f2ede6;}
[data-tone=dark] .study-pane-heading {background:#534638;color:#fff8ed;}
[data-tone=dark] .pane-rows article {background:#312c28;color:#eee8de;border-color:#65594b;}

.review-scope {position:relative;width:fit-content;max-width:100%;min-height:27px;display:flex;align-items:center;color:var(--muted,#685f55);font:400 16px/1.35 Inter,sans-serif;}
.review-scope #reviewFilter {position:absolute;inset:0;width:100%;height:100%;min-height:0;cursor:pointer;opacity:0;}
.review-scope:focus-within {outline:2px solid currentColor;border-radius:4px;}
.review-card .review-crop {display:grid;place-items:center;margin:12px 0;}
.review-crop .excerpt-preview {display:block;width:100%;max-height:min(550px,54dvh);border:0;}
.review-card-heading,.review-answer>strong {display:flex;align-items:center;gap:10px;}
.review-card-heading {justify-content:space-between;}
.review-card-heading img {width:40px;height:40px;object-fit:contain;}
.review-answer>strong img {width:27px;height:27px;object-fit:contain;}
.answer-link {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;color:var(--review-accent,var(--accent));}
.answer-link img {width:28px;height:28px;object-fit:contain;}
.answer-link[aria-busy=true] {cursor:progress;}
.answer-source-pages {max-width:9em;font:inherit;}
.review-screen>.review-origin {flex:0 0 auto;width:min(960px,calc(100% - 24px));margin:4px auto 8px;}
.review-origin>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media(max-width:599px){
  .review-origin {flex-wrap:wrap;}
  .review-origin:has(.answer-link)>span {flex:1 1 calc(100% - 52px);}
}
.answer-overlay {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;}
.pdf-words [data-word].answer-passage {background:transparent;outline:0;}
.pane-rows .study-answer-selected {border:1.4px solid #9c581e;}
.pane-tools.recall-actions img {display:block;width:36px;height:36px;object-fit:contain;}
.pane-tools.recall-actions button {min-width:48px;min-height:48px;display:grid;place-items:center;}
.pane-tools.recall-actions [data-pane=reveal] {display:inline-flex;align-items:center;gap:6px;}
.map-recall-link {display:inline-flex;align-items:center;gap:6px;}
.map-recall-link img {width:24px;height:24px;object-fit:contain;}
.pane-rows .pane-answer {padding:6px 0;white-space:pre-wrap;}
