/* Shared My Learning workspace: compact navigation, full textbook catalogue. */
:root{--ml-line:#dfe8f2;--ml-ink:#213c55;--ml-muted:#657e95;--ml-blue:#2164d8;--ml-radius:20px}
.ml-workspace{color:var(--ml-ink);max-width:1200px;margin:auto;display:grid;gap:24px}
.ml-scope{display:grid;gap:14px}.ml-levels,.ml-subjects{display:flex;gap:10px;flex-wrap:wrap}
.ml-workspace button{font:inherit;cursor:pointer;touch-action:manipulation;transition:background-color .18s,color .18s,transform .18s;min-height:44px}
.ml-levels button,.ml-subjects button{padding:10px 20px;border:1px solid var(--ml-line);border-radius:10px;background:#fff;color:var(--ml-muted);font-weight:600;white-space:nowrap}
.ml-levels button[aria-pressed=true]{background:var(--ml-ink);color:white;border-color:var(--ml-ink)}
.ml-subjects button[aria-pressed=true]{background:#e0edff;color:#164fa6;border-color:#a9c8f8}
.ml-resume{display:flex;align-items:center;gap:20px;padding:24px;border:1px solid #cde4ee;border-radius:var(--ml-radius);background:linear-gradient(110deg,#e3f7f0,#eef6ff)}
.ml-resume-icon{width:76px;height:76px;flex:none;background:#ffffff8c;border-radius:18px;display:grid;place-items:center}.ml-resume-icon img{width:64px;height:64px}
.ml-resume-copy{flex:1;min-width:0}.ml-resume-copy>span{font-size:13px;color:#456d7b}.ml-resume-copy h2{margin:5px 0;font-size:24px;line-height:1.4;max-width:none}.ml-resume-copy small{font-size:13px;color:var(--ml-muted)}
.ml-resume>.btn{flex:none;min-height:46px;white-space:nowrap;border-radius:10px;padding:10px 24px}
.ml-textbook{background:#fff;border:1px solid var(--ml-line);border-radius:var(--ml-radius);padding:8px 24px 18px}
.ml-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}.ml-section-title h2{margin:0;font-size:20px}.ml-section-title h2 small{font-size:13px;font-weight:400;color:var(--ml-muted);margin-left:8px}
.ml-text-action{background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ml-blue)!important;padding:6px 8px!important;border-radius:8px!important;font-size:14px!important;white-space:nowrap}
.ml-chapters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
.ml-chapter{display:flex;align-items:center;gap:14px;text-align:left;padding:20px 0;background:transparent;border:0;border-bottom:1px solid var(--ml-line);width:100%;min-width:0;color:var(--ml-ink)}
.ml-chapter-index{display:grid;place-items:center;flex:none;width:50px;height:56px;border-radius:12px;font-size:19px;font-weight:600}.ml-tone-0{background:#e1f0ff;color:#2668ac}.ml-tone-1{background:#eee6fc;color:#7855ae}.ml-tone-2{background:#fff0cc;color:#976312}.ml-tone-3{background:#ddf4ea;color:#21745b}
.ml-chapter-copy{flex:1;min-width:0}.ml-chapter-copy b{font-size:17px;line-height:1.4;display:block}.ml-chapter-copy small{display:block;margin-top:6px;color:var(--ml-muted);font-size:13px}
.ml-read-status{font-size:12px;color:var(--ml-muted);white-space:nowrap;flex:none}.ml-read-status.is-read{color:#187760}.ml-chevron{color:#8a9eb2;font-size:22px;flex:none}
.ml-chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;color:var(--ml-muted)}
.ml-panes{display:flex;gap:8px;border-bottom:1px solid var(--ml-line)}.ml-panes button{background:transparent;border:0;border-bottom:3px solid transparent;padding:10px 16px;color:var(--ml-muted);font-weight:600}.ml-panes button[aria-pressed=true]{color:var(--ml-blue);border-bottom-color:var(--ml-blue)}
.ml-chapter-content{background:#fff;border:1px solid var(--ml-line);border-radius:var(--ml-radius);padding:8px 24px}
.ml-lessons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}.ml-lesson{display:flex;align-items:center;gap:16px;padding:22px 0;border-bottom:1px solid var(--ml-line);min-width:0}.ml-lesson-cover{width:128px;aspect-ratio:16/9;object-fit:cover;border-radius:10px;flex:none}.ml-lesson-copy{flex:1;min-width:0}.ml-lesson-copy h3,.ml-published h3{margin:0 0 6px;font-size:17px;line-height:1.45}.ml-lesson-copy small,.ml-published small{font-size:12px;color:var(--ml-muted)}
.ml-lesson-actions{display:flex;align-items:center;gap:8px;margin-top:8px}.ml-watch{background:#e7efff!important;border:0!important;border-radius:8px!important;color:#1d59be!important;box-shadow:none!important;padding:8px 12px!important;font-size:14px!important;white-space:nowrap}
.ml-published{display:flex;align-items:center;gap:12px;padding:20px 0;border-bottom:1px solid var(--ml-line)}.ml-published img{width:48px;height:48px}.ml-published>div{flex:1;min-width:0}
.ml-points{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}.ml-points>button{display:flex;align-items:center;gap:12px;width:100%;padding:18px 0;text-align:left;background:none;border:0;border-bottom:1px solid var(--ml-line);color:var(--ml-ink);min-width:0}.ml-point-index{font-size:13px;color:#7893ad}.ml-point-copy{flex:1;min-width:0}.ml-point-copy b{font-size:16px;line-height:1.5;display:block}.ml-point-copy small{font-size:12px;color:var(--ml-muted);display:block;margin-top:4px}
.ml-chapter-pager{display:flex;align-items:center;justify-content:space-between;gap:12px}.ml-chapter-pager>span{font-size:13px;color:var(--ml-muted)}.ml-chapter-pager .btn{min-height:44px;border-radius:10px;font-size:14px;white-space:nowrap}.ml-chapter-pager button:disabled{opacity:.4;cursor:default}
.ml-empty{padding:32px;text-align:center;color:var(--ml-muted)}
.ml-workspace button:focus-visible{outline:3px solid #6195e6;outline-offset:3px}.ml-workspace button:active:not(:disabled){transform:translateY(1px)}
@media(hover:hover){.ml-chapter:hover,.ml-points>button:hover{background:#f4f8ff}.ml-text-action:hover{background:#eef4ff!important}.ml-subjects button:hover{border-color:#93b6ed}}
body[data-surface=mini] .ml-workspace{gap:18px}body[data-surface=mini] .ml-levels button{padding:8px 20px;font-size:14px}body[data-surface=mini] .ml-subjects{gap:8px;flex-wrap:wrap}body[data-surface=mini] .ml-subjects button{padding:8px 12px;font-size:14px}
body[data-surface=mini] .ml-resume{padding:16px;gap:12px;border-radius:18px}body[data-surface=mini] .ml-resume-icon{display:none}body[data-surface=mini] .ml-resume-copy h2{font-size:18px}body[data-surface=mini] .ml-resume>.btn{padding:10px 14px;font-size:14px}
body[data-surface=mini] .ml-textbook{padding:4px 16px 12px;border-radius:18px}body[data-surface=mini] .ml-section-title h2{font-size:17px}body[data-surface=mini] .ml-chapters,body[data-surface=mini] .ml-lessons,body[data-surface=mini] .ml-points{grid-template-columns:minmax(0,1fr)}body[data-surface=mini] .ml-chapter{padding:16px 0;gap:12px}body[data-surface=mini] .ml-chapter-index{width:42px;height:48px;font-size:16px}body[data-surface=mini] .ml-chapter-copy b{font-size:16px}body[data-surface=mini] .ml-chapter-copy small{font-size:12px}
body[data-surface=mini] .ml-chapter-heading{font-size:12px}body[data-surface=mini] .ml-chapter-content{padding:2px 16px;border-radius:18px}body[data-surface=mini] .ml-lesson{padding:16px 0;gap:12px}body[data-surface=mini] .ml-lesson-cover{width:100px}body[data-surface=mini] .ml-lesson-copy h3{font-size:16px}body[data-surface=mini] .ml-lesson-actions{gap:4px}body[data-surface=mini] .ml-text-action,body[data-surface=mini] .ml-watch{font-size:13px!important;padding:7px 8px!important}body[data-surface=mini] .ml-resume-copy small{font-size:12px}
@media(max-width:900px){body[data-surface=pc] .ml-chapters,body[data-surface=pc] .ml-lessons,body[data-surface=pc] .ml-points{grid-template-columns:1fr}}
@media(max-width:360px){body[data-surface=mini] .ml-lesson-cover{width:78px}body[data-surface=mini] .ml-resume{gap:8px;padding:14px}body[data-surface=mini] .ml-resume-copy h2{font-size:16px}body[data-surface=mini] .ml-resume>.btn{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.ml-workspace button{transition:none}}
/* Textbook bookshelf. Real cover images carry the visual identity. */
.book-library{max-width:1040px;gap:24px}.bookshelf-switch{display:inline-flex;justify-self:start;gap:4px;padding:4px;border-radius:14px;background:#e3edf7}.bookshelf-switch button{min-width:120px;border:1px solid transparent;border-radius:11px;padding:10px 24px;color:#58708a;background:transparent;font-size:16px;font-weight:600}.bookshelf-switch button[aria-pressed=true]{background:#fcfdff;border-color:#d7e3f0;color:#235db6;box-shadow:0 2px 6px #284b7020}.bookshelf-switch button:hover{background:#f4f8fc}
.bookshelf{padding:24px 32px 28px;border:1px solid #dae5ed;background:#f8fbfe;border-radius:24px}.bookshelf-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:30px}.bookshelf-title h2{font-size:20px;margin:0;font-weight:650}.bookshelf-title>span{font-size:13px;color:#688097}
.bookshelf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 40px;align-items:start}.bookshelf-book{display:flex;align-items:center;flex-direction:column;border:0;background:transparent;padding:0 10px 6px;text-align:left;border-radius:12px;min-width:0;width:100%;color:#253e58}
.textbook-object{position:relative;display:block;width:170px;aspect-ratio:522/743;flex-shrink:0;isolation:isolate;filter:drop-shadow(7px 9px 5px #223b501b);transition:transform .22s cubic-bezier(.22,.61,.36,1)}.textbook-object img{position:absolute;max-width:none!important;height:auto!important;object-fit:contain;left:50%;top:50%;transform:translate(-50%,-50%);width:153.26%!important}.textbook-object.textbook-middle{aspect-ratio:562/800}.textbook-object.textbook-middle img{width:142.35%!important}
.textbook-fallback{display:none;position:absolute;inset:0;padding:20px 14px;background:#d7eaf6;border:1px solid #abc8dc;border-radius:2px 8px 8px 2px;flex-direction:column;gap:26px}.textbook-fallback small{font-size:12px}.textbook-fallback b{font-size:20px}.textbook-middle .textbook-fallback{background:#f3d0b5;border-color:#c89f82}.is-cover-missing .textbook-fallback{display:flex}.is-cover-missing img{display:none}
.bookshelf-caption{display:grid;gap:6px;width:100%;max-width:190px;margin-top:22px;padding-top:16px;border-top:1px solid #d7e2ed}.bookshelf-caption>b{font-size:18px;line-height:1.45;font-weight:650}.bookshelf-caption>small{font-size:13px;color:#657e96}.bookshelf-enter{display:flex;align-items:center;justify-content:space-between;margin-top:9px;color:#2963b1;font-size:14px;font-weight:600}.bookshelf-enter i{font-size:20px;font-style:normal}
.bookshelf-resume{display:flex;align-items:center;gap:16px;padding:20px 2px;border-top:1px solid #dbe5ef}.bookshelf-resume>div{flex:1;min-width:0}.bookshelf-resume small{font-size:12px;color:#617c96}.bookshelf-resume h2{font-size:17px;line-height:1.5;margin:6px 0 0}.bookshelf-resume button{flex-shrink:0}
.textbook-course{max-width:1100px}.textbook-course-intro{display:flex;align-items:center;gap:22px;padding:6px 8px 12px}.textbook-object.textbook-small{width:72px}.textbook-course-intro>div{display:grid;gap:10px}.textbook-course-intro span:not(.textbook-object):not(.textbook-fallback){font-size:13px;color:#627b92}.textbook-course-intro b{font-size:23px;line-height:1.4}.textbook-course-intro small{font-size:13px;color:#688096}.textbook-course .ml-resume{padding:18px 22px;background:#eaf3f9;border-color:#d3e3ed}.textbook-course .ml-resume-icon{display:none}.textbook-course .ml-resume-copy h2{font-size:19px}
@media(hover:hover){.bookshelf-book:hover .textbook-object{transform:translateY(-5px)}.bookshelf-book:hover .bookshelf-enter{color:#12478f}.bookshelf-book:hover{background:#eff5fa}}
body[data-surface=mini] .book-library{gap:20px}body[data-surface=mini] .bookshelf-switch{justify-self:stretch;display:grid;grid-template-columns:1fr 1fr}body[data-surface=mini] .bookshelf-switch button{min-width:0;padding:8px 16px;font-size:16px;min-height:44px}body[data-surface=mini] .bookshelf{padding:20px 14px;border-radius:20px}body[data-surface=mini] .bookshelf-title{margin-bottom:24px}body[data-surface=mini] .bookshelf-title h2{font-size:17px}body[data-surface=mini] .bookshelf-title>span{font-size:12px}body[data-surface=mini] .bookshelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 18px}body[data-surface=mini] .bookshelf-book{padding:0;align-items:center}body[data-surface=mini] .textbook-object:not(.textbook-small){width:min(100%,128px)}body[data-surface=mini] .bookshelf-caption{margin-top:16px;padding-top:12px;gap:5px}body[data-surface=mini] .bookshelf-caption>b{font-size:16px}body[data-surface=mini] .bookshelf-caption>small{font-size:12px}body[data-surface=mini] .bookshelf-enter{font-size:13px;margin-top:5px}body[data-surface=mini] .bookshelf-resume{padding:16px 0}body[data-surface=mini] .bookshelf-resume h2{font-size:16px}body[data-surface=mini] .textbook-course-intro{gap:18px;padding:4px 2px 8px}body[data-surface=mini] .textbook-course-intro b{font-size:20px}body[data-surface=mini] .textbook-object.textbook-small{width:58px}body[data-surface=mini] .textbook-course-intro>div{gap:6px}body[data-surface=mini] .textbook-course-intro small{font-size:12px}body[data-surface=mini] .textbook-course .ml-resume{padding:14px}body[data-surface=mini] .textbook-course .ml-resume-copy h2{font-size:17px}
@media(max-width:360px){body[data-surface=mini] .bookshelf{padding:18px 12px}body[data-surface=mini] .bookshelf-grid{gap:24px 14px}body[data-surface=mini] .textbook-object:not(.textbook-small){width:min(100%,112px)}}
@media(prefers-reduced-motion:reduce){.textbook-object{transition:none}.bookshelf-book:hover .textbook-object{transform:none}}
.bookshelf[data-books="2"] .bookshelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:720px;margin-inline:auto}
body[data-surface=mini] .bookshelf[data-books="3"] .bookshelf-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 12px}body[data-surface=mini] .bookshelf[data-books="3"] .textbook-object{width:100%}body[data-surface=mini] .bookshelf[data-books="3"] .bookshelf-caption>b{min-height:2.9em}body[data-surface=mini] .bookshelf[data-books="3"] .bookshelf-enter{gap:3px;font-size:12px}body[data-surface=mini] .bookshelf[data-books="3"] .bookshelf-enter i{font-size:17px}
/* V6.4.1: a single action family across bookshelf, resume and chapter controls. */
:root{--ml-action-height:44px;--ml-action-radius:12px;--ml-action-accent:#245eb7;--ml-action-border:#cbdcf0;--ml-action-surface:#edf4fc;--ml-action-hover:#e2edfb;--ml-action-focus:#5c8bcd}
.book-library .bookshelf-enter{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--ml-action-height);margin-top:10px;padding:10px 12px;box-sizing:border-box;border:1px solid var(--ml-action-border);border-radius:var(--ml-action-radius);background:var(--ml-action-surface);color:#245692;font-size:14px;font-weight:600;line-height:1.4;letter-spacing:.02em;white-space:nowrap;transition:background-color 180ms,border-color 180ms}
.book-library .bookshelf-book{border-radius:14px}.book-library .bookshelf-book:active .bookshelf-enter{background:#d8e7fa;border-color:#a8c2e4}.book-library .bookshelf-book:focus-visible{outline:2px solid var(--ml-action-focus);outline-offset:6px}
.ml-workspace .ml-continue-action{display:inline-flex;align-items:center;justify-content:center;min-height:46px;min-width:108px;padding:11px 20px;border:1px solid #245bb0;border-radius:var(--ml-action-radius);background:#285fb7;color:#fafdff;font-size:14px;font-weight:600;line-height:1.4;white-space:nowrap;box-shadow:0 2px 4px #234e8614;cursor:pointer;transition:background-color 180ms,border-color 180ms,transform 180ms}
.ml-workspace .ml-continue-action:active{background:#1a488f;border-color:#1a488f;transform:translateY(1px)}.ml-workspace .ml-continue-action:focus-visible{outline:3px solid var(--ml-action-focus);outline-offset:3px}
.bookshelf-resume{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:20px 0}.bookshelf-resume>div{min-width:0}.bookshelf-resume h2{line-height:1.6}.bookshelf-resume .ml-continue-action{justify-self:end}
.ml-workspace .ml-text-action,.closure-heading .ml-text-action{display:inline-flex;align-items:center;justify-content:center;min-height:var(--ml-action-height);padding:10px 14px!important;border:1px solid var(--ml-action-border)!important;border-radius:var(--ml-action-radius)!important;background:#f4f8fd!important;color:#315c91!important;font-size:14px!important;font-weight:500;line-height:1.4;box-shadow:none!important;text-decoration:none}
.ml-workspace .ml-watch{min-height:var(--ml-action-height);padding:10px 14px!important;border:1px solid var(--ml-action-border)!important;border-radius:var(--ml-action-radius)!important;background:var(--ml-action-surface)!important;color:#245692!important;font-size:14px!important;font-weight:600;line-height:1.4}
.ml-workspace .ml-chapter-pager .btn{min-height:44px;border-radius:var(--ml-action-radius);border:1px solid var(--ml-action-border);background:#edf4fc;color:#315c91;padding:10px 18px}.ml-workspace .ml-chapter-pager .btn:disabled{background:#f0f3f7;border-color:#e0e7ee;color:#8798aa;opacity:1}
.book-library .bookshelf-switch{padding:4px;border:1px solid #dce6ef;background:#e9f0f7;border-radius:15px;gap:4px}.book-library .bookshelf-switch button{border-radius:11px;min-height:44px;color:#5d738a}.book-library .bookshelf-switch button[aria-pressed=true]{background:#fcfdff;border-color:#d4dfeb;color:#244f80;box-shadow:0 1px 3px #294f7510}
@media(hover:hover){.book-library .bookshelf-book:hover{background:transparent}.book-library .bookshelf-book:hover .bookshelf-enter{color:#1f4f8a;background:var(--ml-action-hover);border-color:#afc7e5}.ml-workspace .ml-continue-action:hover{background:#214f9a;border-color:#214f9a}.ml-workspace .ml-text-action:hover,.closure-heading .ml-text-action:hover{background:#e7effa!important;border-color:#b5cce8!important}.ml-workspace .ml-watch:hover{background:var(--ml-action-hover)!important}}
body[data-surface=mini] .book-library .bookshelf-enter{min-height:44px;margin-top:10px;padding:10px 8px;font-size:14px;gap:0}body[data-surface=mini] .book-library .bookshelf[data-books="3"] .bookshelf-enter{min-height:44px;font-size:13px;padding:10px 4px;letter-spacing:0}
body[data-surface=mini] .bookshelf-resume{gap:14px;padding:18px 0}body[data-surface=mini] .ml-workspace .ml-continue-action{min-height:46px;padding:11px 16px;font-size:14px;min-width:104px}body[data-surface=mini] .ml-workspace .ml-text-action,body[data-surface=mini] .ml-workspace .ml-watch{padding:10px 12px!important;font-size:14px!important;min-height:44px}body[data-surface=mini] .ml-workspace .ml-lesson-actions{gap:8px;flex-wrap:wrap}
@media(max-width:360px){body[data-surface=mini] .ml-workspace .ml-text-action,body[data-surface=mini] .ml-workspace .ml-watch{padding:10px!important}}
@media(prefers-reduced-motion:reduce){.book-library .bookshelf-enter,.ml-workspace .ml-continue-action{transition:none}}
@media(max-width:360px){body[data-surface=mini] .book-library{gap:16px}body[data-surface=mini] .book-library .bookshelf{padding:16px 12px}body[data-surface=mini] .book-library .bookshelf-title{margin-bottom:18px}body[data-surface=mini] .book-library .bookshelf[data-books="2"] .textbook-object{width:104px}body[data-surface=mini] .book-library .bookshelf-resume{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px 0}body[data-surface=mini] .book-library .bookshelf-resume .ml-continue-action{width:auto;justify-self:end;min-width:96px;padding:10px 12px}body[data-surface=mini] .book-library .bookshelf-resume h2{line-height:1.5}}
