.ja-bank{--jb-border:#c8d7e6;font:14px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#20344d;min-width:0}.ja-bank *{box-sizing:border-box}.jb-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}.jb-heading h2{font-size:22px;margin:0 0 2px}.ja-bank small,.jb-muted{color:#53677e}.jb-filters{display:grid;grid-template-columns:minmax(180px,2fr) 1fr 1.4fr 140px;gap:8px}.ja-bank button,.ja-bank input,.ja-bank select{font:inherit}.jb-filters input,.jb-filters select{min-width:0;width:100%;height:42px;border:1px solid var(--jb-border);border-radius:10px;background:#fff;padding:8px 11px;color:#20344d}.jb-status{font-size:12px;min-height:20px;margin:7px 0}.jb-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:14px;align-items:start}.jb-list,.jb-detail{height:clamp(360px,65dvh,800px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--jb-border);border-radius:14px;background:#fff}.jb-list{background:#f4f7fb;padding:10px}.jb-detail{padding:20px;overflow-wrap:anywhere}.jb-card{border:1px solid #b9cadc;border-radius:11px;background:#fff;margin:0 0 10px;overflow:hidden}.jb-select{display:flex;gap:10px;text-align:left;width:100%;border:0;background:#fff;color:inherit;padding:13px;cursor:pointer;line-height:1.55}.jb-select>span:last-child{display:grid;gap:3px;min-width:0}.jb-select p{margin:0}.jb-select b{font-size:17px}.jb-select[aria-current=true]{background:#eaf3ff;box-shadow:inset 3px 0 #0066cc}.jb-number{flex:0 0 27px;height:27px;background:#e7eef8;color:#234c7d;border-radius:7px;text-align:center;line-height:27px;font-size:12px;font-weight:700}.jb-choices{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 12px}.jb-choices button{min-height:40px;text-align:left;padding:8px 10px;border:1px solid #c8d7e6;border-radius:8px;background:#f8faff;color:#233b56;cursor:pointer}.jb-choices .jb-chosen{border-color:#0066cc;background:#e8f2ff}.jb-result{margin:6px 13px;color:#225c43;font-size:12px}.jb-source{display:block;max-width:100%;border:0;background:none;color:#53677e;font-size:11px!important;text-align:left;padding:8px 13px;cursor:pointer;white-space:normal}.jb-source:hover{color:#0057af;text-decoration:underline}.jb-detail-head{border-bottom:1px solid #dae4ef;padding-bottom:12px;margin-bottom:14px}.jb-detail-head h3{font-size:21px;margin:5px 0}.jb-detail-head .jb-source{padding:3px 0}.jb-reading{margin-top:-6px}.jb-detail h4{font-size:13px;color:#49627e;margin:20px 0 7px}.jb-examples{padding:12px;border-radius:10px;background:#f4f7fb}.jb-examples p{margin:6px 0}.jb-examples [data-example]{padding:9px 0;border-bottom:1px solid #d6e0eb}.jb-examples [data-example] span{display:block}.jb-answer{display:inline-block;border-radius:8px;padding:6px 12px;background:#e5f4ee;color:#17533b;font-weight:700;margin-bottom:12px}.jb-primary{display:block;background:#0066cc;color:white;border:0;border-radius:9px;padding:10px 16px;margin:14px 0;cursor:pointer}.jb-check{display:flex;align-items:center;gap:8px;padding:2px 13px;font-size:12px}.jb-check input{width:18px;height:18px;accent-color:#0066cc}.jb-vocab{border-bottom:1px solid #dce5ef;padding:10px 0}.jb-vocab p{margin:4px 0}.jb-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;font-size:12px}.jb-pages button{border:1px solid var(--jb-border);background:#fff;border-radius:8px;padding:8px 12px;color:#234c7d;cursor:pointer}.ja-bank button:disabled{opacity:.5;cursor:default}.ja-bank :focus-visible{outline:3px solid #0066cc;outline-offset:2px}.ja-bank img{max-width:100%;height:auto}.ja-bank audio{max-width:100%}.ja-bank table{border-collapse:collapse;width:100%}.ja-bank td,.ja-bank th{border:1px solid #c8d7e6;padding:6px}.jb-context:empty{display:none}.jb-context{padding:0 12px}.jb-mobile{display:none}.jb-empty{padding:15px;color:#53677e}body:has(.ja-bank) .ja38-greeting{display:none}body:has(.ja-bank) .ja38-hub-header{margin-bottom:12px;padding-bottom:10px}body:has(.ja-bank) #ja37StudentBody{padding-top:8px}.ja-bank rt{font-size:.6em}
@media(min-width:1400px){.jb-split{grid-template-columns:minmax(370px,.85fr) minmax(0,1.15fr)}}
@media(max-width:760px){.jb-filters{grid-template-columns:1fr 1fr}.jb-filters [data-search]{grid-column:1/-1}.jb-filters [data-source]{grid-column:1/-1;grid-row:3}.jb-mobile{display:flex;gap:5px;margin-bottom:8px;background:#e7edf4;border-radius:10px;padding:3px}.jb-mobile button{flex:1;min-height:40px;border:0;border-radius:8px;background:transparent;color:#304b69}.jb-mobile [aria-pressed=true]{background:#fff;box-shadow:0 1px 4px #1839571a}.jb-split{display:block}.jb-list,.jb-detail{height:62dvh;min-height:320px}.jb-detail{display:none;padding:15px}.ja-bank[data-pane=detail] .jb-list{display:none}.ja-bank[data-pane=detail] .jb-detail{display:block}.jb-pages button{padding:8px}.jb-heading small{font-size:11px}}

.jb-select>span:last-child>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.jb-list .jb-source{font-size:11px;line-height:1.45}body:has(.ja-bank) .ja38-hub-main{padding-top:16px}body:has(.ja-bank) .ja38-hub-header h2{font-size:23px;margin-top:3px}

/* Student layout follows the study room: source rail, work area, explanation. */
.jb-study{--jb-border:#dddcd4;--jb-surface:#fbfaf6;--jb-blue:#0079c9;display:grid;gap:8px;color:#193652}
.jb-study .jb-heading{margin:0;gap:10px}
.jb-study .jb-heading h2{font-size:23px}
.jb-study .jb-review{border:1px solid #e3c1ae;border-radius:12px;background:#fff8f2;color:#8c421e;padding:9px 14px;font-weight:750;white-space:nowrap;cursor:pointer}
.jb-study .jb-review[aria-pressed=true]{background:#8c421e;color:#fff}
.jb-study .jb-status{margin:0;min-height:1.35em}
.jb-study .jb-progress{padding:9px 13px;background:var(--jb-surface);border:1px solid var(--jb-border);border-radius:15px;min-width:0}
.jb-progress-top{display:flex;justify-content:space-between;gap:8px;font-size:12px}
.jb-progress-numbers{display:flex;gap:5px;overflow:auto;padding:5px 3px 3px}
.jb-progress-numbers button{min-width:28px;height:28px;border:1px solid var(--jb-border);border-radius:8px;background:#f6f4ef;color:#365571;font-size:11px;font-weight:700;cursor:pointer}
.jb-progress-numbers button.is-done{background:#dff4ea;color:#146747;border-color:#a4d9c2}
.jb-progress-numbers button.is-wrong{background:#fff0e7;color:#873d1f;border-color:#edc9b5}
.jb-progress-numbers button[aria-current=true]{outline:2px solid var(--jb-blue);outline-offset:0}
.jb-study .jb-split{grid-template-columns:minmax(154px,.64fr) minmax(0,1.65fr) minmax(235px,1.05fr);gap:12px;min-width:0}
.jb-study .jb-rail,.jb-study .jb-list,.jb-study .jb-detail{border-radius:19px;background:var(--jb-surface);border:1px solid var(--jb-border);height:max(250px,calc(100dvh - var(--jb-panel-top,200px) - 8px));min-width:0}
.jb-study .jb-rail{display:flex;flex-direction:column;overflow:hidden}
.jb-study .jb-rail h3{margin:0;padding:13px 11px;font-size:13px;border-bottom:1px solid var(--jb-border)}
.jb-source-list{padding:8px;overflow:auto;overscroll-behavior:contain}
.jb-source-card{display:block;width:100%;text-align:left;margin:0 0 7px;padding:9px 8px;background:#fff;border:1px solid var(--jb-border);border-radius:11px;color:#213c59;overflow-wrap:anywhere;cursor:pointer}
.jb-source-card[aria-pressed=true]{border-color:#9bd0f2;box-shadow:inset 3px 0 #00a0ed;background:#eef8ff}
.jb-study .jb-source-card{font-size:12px;font-weight:700}
.jb-study .jb-card{border-color:#e1dfd8;border-radius:17px;background:#fff;box-shadow:0 2px 6px #233d5510}
.jb-study .jb-select{padding:13px 14px;font-weight:680}
.jb-study .jb-select[aria-current=true]{box-shadow:inset 4px 0 #00a0ed;background:#f3faff}
.jb-study .jb-select [lang=ja]{font-size:clamp(15px,1.25vw,20px);line-height:1.65;overflow-wrap:anywhere}
.jb-study .jb-number{background:#e7f5ff;color:#006cb1}
.jb-study .jb-choices button{border-radius:12px;background:#f6f5f1;border-color:#e5e1d7;overflow-wrap:anywhere}
.jb-study [data-correct=true] .jb-choices .jb-chosen{background:#d7f4e4;border-color:#38ac80;color:#175f46}
.jb-study [data-correct=false] .jb-choices .jb-chosen{background:#ffebe9;border-color:#e6a39b;color:#8c332b}
.jb-study .jb-discuss{display:block;margin:6px 12px 0 auto;padding:5px 10px;border:1px solid #c5e1f1;border-radius:10px;background:#eaf6ff;color:#006898;font-size:12px;font-weight:750;cursor:pointer}
.jb-study .jb-detail{padding:14px}
.jb-study .jb-detail h3{font-size:17px}
.jb-study .jb-pages{position:sticky;bottom:-10px;background:var(--jb-surface);padding:6px 4px;border-top:1px solid var(--jb-border)}
@media(max-width:1020px){
 .jb-study .jb-mobile{display:flex;min-width:0;gap:4px;margin:0}
 .jb-study .jb-mobile button{flex:1;min-width:0;padding:7px 4px;border:1px solid #c3d6e6;border-radius:9px;background:#fff;color:#214767;font-weight:650;cursor:pointer}
 .jb-study .jb-mobile button[aria-pressed=true]{background:#e4f3ff;border-color:#78bce6}
 .jb-study .jb-split{display:block}
 .jb-study .jb-rail,.jb-study .jb-detail{display:none}
 .jb-study[data-pane=sources] .jb-rail{display:flex}
 .jb-study[data-pane=detail] .jb-detail{display:block}
 .jb-study:is([data-pane=detail],[data-pane=sources]) .jb-list{display:none}
}
@media(max-width:560px){
 .jb-study .jb-heading h2{font-size:19px}
 .jb-study .jb-heading small{display:none}
 .jb-study .jb-review{font-size:12px}
 .jb-study .jb-choices{grid-template-columns:minmax(0,1fr)}
 .jb-study .jb-filters input,.jb-study .jb-filters select{height:36px;font-size:12px}
}

.jb-word .jb-card{position:relative;padding-right:58px}
.jb-word .jb-check{position:absolute;right:12px;top:13px;margin:0;padding:4px;font-size:0}
.jb-word .jb-check input{width:20px;height:20px;margin:0;accent-color:#0079c8}
.jb-word .jb-word-line{display:grid!important;grid-template-columns:minmax(4em,max-content) minmax(0,1fr);align-items:center;gap:12px;overflow:visible!important}
.jb-word .jb-select{min-width:0;align-items:center}
.jb-word .jb-select>span:last-child{min-width:0;flex:1}
.jb-word .jb-word-meaning{overflow-wrap:anywhere;white-space:normal}
.jb-word ruby{ruby-position:over}
.jb-word rt{font-size:.52em;font-weight:500;color:#496883}
.jb-word .jb-word-note{margin:6px 10px 8px 14px;padding:6px 9px;border-inline-start:2px solid #bc985c;background:#fbf4e9;color:#64481f}
.jb-word .jb-progress{position:sticky;top:var(--jb-sticky-top,0px);z-index:4}
.jb-word .jb-progress-numbers{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:2px}
.jb-word .jb-progress-numbers button{flex:none}
@media(max-width:500px){.jb-word .jb-card{padding-right:42px}.jb-word .jb-word-line{gap:8px;grid-template-columns:minmax(3em,36%) minmax(0,1fr)}}

body:has(.jb-study) .ja-shell-page .ja38-hub-main{padding-bottom:0!important}

/* Student banks: tracker stays above a viewport-filling, independently scrolling workspace. */
body:has(#jaStudentPage:not([hidden]) .jb-study){overflow:hidden}
#jaStudentPage .jb-study{
 position:fixed;z-index:20;inset:var(--jb-viewport-top,72px) 0 0 var(--ja-rail-width,0px);
 display:flex;flex-direction:column;gap:8px;padding:8px 10px 6px;min-height:0;
 background-color:#f0eee6;
 background-image:linear-gradient(#dedbd34d 1px,transparent 1px),linear-gradient(90deg,#dedbd34d 1px,transparent 1px);
 background-size:40px 40px
}
#jaStudentPage .jb-study>.jb-heading{display:none}
#jaStudentPage .jb-study>.jb-progress{position:relative;order:-2;flex:none;z-index:5}
#jaStudentPage .jb-study>.jb-mobile{order:-1;flex:none;margin-bottom:0}
#jaStudentPage .jb-study>.jb-split{flex:1 1 0;min-height:0}
#jaStudentPage .jb-study .jb-split>:is(.jb-rail,.jb-list,.jb-detail){height:100%;max-height:none;min-height:0;overscroll-behavior:contain}
#jaStudentPage .jb-study .jb-progress-top{align-items:center;justify-content:flex-start}
#jaStudentPage .jb-study .jb-progress-top>small{margin-inline-start:auto}
.jb-viewport-filters summary{cursor:pointer;border:1px solid #dddcd4;border-radius:8px;background:#fff;padding:4px 9px}
.jb-filter-popover{position:absolute;inset:calc(100% + 5px) 0 auto;padding:10px;background:#fbfaf6;border:1px solid #dddcd4;border-radius:12px;box-shadow:0 8px 18px #19365220;max-height:40dvh;overflow:auto}

#jaStudentPage .jb-study .jb-progress-top{flex-wrap:wrap}
#jaStudentPage .jb-study .jb-progress-top .jb-review{min-height:30px;padding:3px 9px;font-size:inherit}

#jaStudentPage .jb-study>.jb-alert{order:-1;flex:none;margin:0;padding:7px 12px;border:1px solid #deb6aa;border-radius:10px;background:#fff4ee;color:#843621}
