/* Reading-first lesson view. Scoped so account, billing and operator pages keep their layout. */
.learning-shell{--ink:#203d37;--muted:#596e66;--green:#246653;--line:#dce6df;background:radial-gradient(ellipse at 92% 0,#f6e9e1 0,transparent 36%),#f3f6f2;grid-template-columns:210px minmax(0,1fr)}
.learning-shell .sidebar{background:#fcfdfb;border-color:#dbe5dd;padding:30px 18px}
.learning-shell .nav a{min-height:50px;font-weight:500}
.learning-shell .nav a.active{background:#e0eee6;color:#174e3d;box-shadow:inset 3px 0 #32755b}
.learning-shell .main{max-width:1550px;padding:24px 36px 52px;margin:0 auto}
.learning-shell .topbar{margin-bottom:16px}
.learning-shell .session-strip{background:transparent;border:0;border-bottom:1px solid #dce5dd;border-radius:0;padding:0 0 14px;margin:0 0 22px;font-size:12px}
.learning-shell .session-strip button{background:transparent;font-size:12px;min-height:44px}
.learning-shell .back{font-size:13px;margin-bottom:8px}
.learning-shell .lesson-title{margin-bottom:20px;gap:12px}
.learning-shell .lesson-title h2{font-size:26px;letter-spacing:.02em;font-weight:750;margin:0}
.learning-shell .lesson-title .pill{font-size:12px;background:#e0eee5;padding:6px 12px}
.learning-shell .chat-layout{grid-template-columns:minmax(0,1fr) 242px;gap:24px}
.learning-shell .chat-card{overflow:visible;min-width:0;border:1px solid #dce6df;border-radius:24px;background:#fff;box-shadow:0 8px 40px #25493607}
.learning-shell .chat-head{border-radius:24px 24px 0 0;background:#f9fcf9;border-bottom:1px solid #e4ece5;padding:20px 26px;gap:16px}
.learning-shell .chat-head strong{font-size:16px;letter-spacing:.04em}
.learning-shell .chat-head .small{font-size:12px}
.learning-shell .lesson-avatar{width:44px;height:44px;background:#fff;border:1px solid #e1e9df;border-radius:14px;overflow:hidden}
.learning-shell .lesson-avatar img{display:block;width:44px;height:44px;object-fit:contain}
.learning-shell .reader-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.learning-shell .reader-tools button{min-height:44px;font-size:12px;padding:8px 11px;background:#fff}
.learning-shell #reading-size[aria-pressed=true]{background:#e1eee6;border-color:#6c9780;color:#174c39}
.learning-shell .messages{max-height:none;min-height:0;overflow:visible;padding:30px 34px 12px;scroll-behavior:auto}
.learning-shell .message{max-width:100%;margin-bottom:30px;scroll-margin-top:24px}
.learning-shell .message-label{font-size:12px;letter-spacing:.04em;line-height:1.5;margin-bottom:10px;color:#4e6b5e;font-weight:650}
.learning-shell .assistant .message-label:before{content:'✦';margin-right:8px;color:#447e62}
.learning-shell .bubble{font-size:19px;line-height:2;letter-spacing:.015em;padding:0;background:transparent;border-radius:0;color:#203d37}
.learning-shell .assistant .bubble{padding:0 0 6px}
.learning-shell .bubble strong{font-weight:750;color:#164e3a;background:linear-gradient(transparent 72%,#e4eee1 0)}
.learning-shell .student{max-width:88%;margin:0 0 30px auto}
.learning-shell .student .bubble{background:#edf3ef;border:1px solid #e0e9e2;border-radius:18px 18px 4px 18px;padding:14px 20px;font-size:16px;line-height:1.85}
.learning-shell .system .bubble{font-size:14px;background:#faf7ed;border-radius:12px;padding:12px 16px;color:#6a5a38}
.learning-shell .teacher .bubble{padding:18px;border:1px solid #d5dfeb;border-radius:14px;background:#f3f7fb}
.learning-shell .katex{font-size:1.15em}
.learning-shell .katex-display{padding:16px 12px;margin:20px 0;border-radius:12px;background:#f7faf5;border:1px solid #e4ebe1;overflow-x:auto;white-space:normal}
.learning-shell .reading-large .bubble{font-size:23px}
.learning-shell .reading-large .student .bubble{font-size:20px}
.learning-shell .reading-large .system .bubble{font-size:17px}
.learning-shell .composer{padding:24px 28px;border-top:1px solid #dce6df;background:#fbfcfa;border-radius:0 0 24px 24px}
.learning-shell .quick{gap:8px;margin:0 0 22px}
.learning-shell .quick button{border:1px solid #d4e2d6;color:#285c47;border-radius:24px;min-height:44px;padding:9px 14px;font-size:13px;background:#fff;box-shadow:0 2px 3px #234a3010}
.learning-shell .quick button span{color:#6b886a;margin-right:3px}
.learning-shell .quick button:hover{background:#e6f0e6;border-color:#80a18a}
.learning-shell .reply-label{font-size:14px;font-weight:650;color:#2b5142}
.learning-shell .composer textarea{background:#fff;border:1px solid #becfc2;border-radius:16px;min-height:104px;padding:16px;font-size:17px;line-height:1.75;margin-top:10px;box-shadow:0 2px 4px #26473104}
.learning-shell .composer textarea:focus{border-color:#3f7c5b}
.learning-shell .chat-photo-bar{padding:0;border:0;margin:12px 0 16px;gap:8px}
.learning-shell .chat-photo-bar button{display:inline-flex;gap:8px;align-items:center;justify-content:center;border:0;background:transparent;color:#38624e;padding:8px 0;font-size:13px}
.learning-shell .chat-photo-bar svg{width:19px;height:19px}
.learning-shell .composer .actions{gap:10px}
.learning-shell .composer .actions button{min-height:48px;padding:12px 22px;font-size:14px;border-radius:13px}
.learning-shell #message-send{min-width:150px;box-shadow:0 4px 10px #24503b16}
.learning-shell #understood{background:#e9f1e5;border-color:#d9e5d4;color:#31573b}
.learning-shell .reply-privacy{font-size:12px;line-height:1.7;color:#627368;margin:18px 0 6px}
.learning-shell .reply-help{font-size:13px;color:#536c5d;border-top:1px solid #e1e8de;padding-top:4px}
.learning-shell .reply-help>summary{padding:9px 0;font-size:12px;font-weight:500;min-height:44px}
.learning-shell .reply-help .privacy-input-note{line-height:1.8}
.learning-shell .reply-help .math-input-help{margin:10px 0}
.learning-shell .reply-help #safety-report{background:transparent;font-size:12px;margin:14px 0 0;min-height:44px}
.learning-shell .chat-aside{position:sticky;top:24px}
.learning-shell .chat-aside .card{border-radius:18px;padding:20px;background:#fffefb;border-color:#e0e5d8}
.learning-shell .chat-aside summary{font-size:14px;min-height:36px;line-height:1.7}
.learning-shell .chat-aside .question-text{font-size:15px;line-height:1.9}
.learning-shell .chat-aside .advice{background:#e9f0e6;border:0}
.learning-shell .chat-aside .advice h3{font-size:15px;line-height:1.8}
.learning-shell .chat-aside .advice .small{line-height:1.9}
.learning-shell .context-note{margin:16px 22px}
.learning-shell .chat-card>.notice{margin:16px 22px}
.learning-shell #chat-status:not(:empty){padding:14px;background:#e6f0e7;border-radius:12px;margin:16px 0 0;font-size:14px}
.learning-shell #chat-error:not(:empty){padding:14px;background:#fff0ec;border-radius:12px;line-height:1.8}
.learning-shell .messages .message:last-child{animation:lesson-arrive .3s ease-out}
@keyframes lesson-arrive{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1200px){.learning-shell{grid-template-columns:180px minmax(0,1fr)}.learning-shell .main{padding:22px}.learning-shell .chat-layout{gap:18px;grid-template-columns:minmax(0,1fr) 215px}.learning-shell .messages{padding:26px}}
@media(max-width:1180px){.learning-shell .chat-layout{grid-template-columns:minmax(0,1fr)}.learning-shell .chat-aside{order:-1;position:static}.learning-shell .chat-aside .card{padding:14px 20px;margin:0}.learning-shell .chat-aside summary{min-height:32px}.learning-shell .chat-aside .advice{display:none}.learning-shell .messages{max-height:none;min-height:0}}
@media(max-width:700px){
 .learning-shell{display:block;background:linear-gradient(160deg,#f8f0e9 0,#f2f6f1 320px)}
 .learning-shell .main{padding:14px 12px 100px}
 .learning-shell .sidebar{padding:5px 8px calc(5px + env(safe-area-inset-bottom));background:#fffffff5;backdrop-filter:blur(12px)}
 .learning-shell .nav a{min-height:52px;font-size:10px;padding:7px 2px}.learning-shell .nav a.active{box-shadow:none;background:#e3eee6}
 .learning-shell .topbar{margin-bottom:10px;gap:8px}.learning-shell .topbar .brand-logo{width:42px;height:42px}.learning-shell .topbar .brand-name{font-size:14px}.learning-shell .topbar .brand-label small{font-size:9px}.learning-shell .topbar>.pill{font-size:9px;padding:4px 8px;max-width:38%;white-space:normal}
 .learning-shell .session-strip{font-size:11px;gap:8px;margin:0 0 16px;padding-bottom:8px}.learning-shell .session-strip button{font-size:11px;padding:6px 8px;min-height:44px}.learning-shell .session-strip .pill{font-size:10px}
 .learning-shell .lesson-title h2{font-size:22px}.learning-shell .lesson-title{margin-bottom:14px}.learning-shell .back{min-height:36px;display:inline-flex;align-items:center;font-size:12px;margin-bottom:0}
 .learning-shell .chat-layout{gap:12px}.learning-shell .chat-card{border-radius:20px}.learning-shell .chat-head{border-radius:20px 20px 0 0;padding:14px 16px;gap:10px;flex-wrap:wrap}.learning-shell .chat-head .profile{gap:9px}.learning-shell .chat-head strong{font-size:14px}.learning-shell .chat-head .small{font-size:10px}.learning-shell .lesson-avatar,.learning-shell .lesson-avatar img{width:36px;height:36px}.learning-shell .reader-tools{gap:4px;margin-left:auto}.learning-shell .reader-tools button{padding:7px 8px;font-size:11px;min-height:44px}
 .learning-shell .messages{padding:24px 20px 8px;max-height:none;min-height:0;overflow:visible}.learning-shell .message{margin-bottom:26px;scroll-margin-top:16px}.learning-shell .bubble{font-size:18px;line-height:2}.learning-shell .message-label{font-size:11px}.learning-shell .student{max-width:92%;margin-left:auto}.learning-shell .student .bubble{font-size:15px;padding:12px 15px}.learning-shell .reading-large .bubble{font-size:22px}.learning-shell .reading-large .student .bubble{font-size:18px}.learning-shell .reading-large .system .bubble{font-size:16px}
 .learning-shell .composer{border-radius:0 0 20px 20px;padding:20px 16px}.learning-shell .quick{gap:6px;margin-bottom:20px}.learning-shell .quick button{font-size:12px;padding:8px 11px;min-height:44px}.learning-shell .quick button span{display:none}.learning-shell .composer textarea{font-size:16px;min-height:100px;padding:13px}.learning-shell .reply-label{font-size:13px}.learning-shell .chat-photo-bar{display:flex;flex-wrap:wrap}.learning-shell .chat-photo-bar button{width:auto;font-size:12px}.learning-shell .chat-photo-bar .small{font-size:11px;min-width:120px}.learning-shell .composer .actions button{flex:1 1 115px;padding:11px 10px;font-size:13px;min-width:0}.learning-shell #message-send{min-width:0}.learning-shell .reply-privacy{font-size:11px}.learning-shell .reply-help>summary{font-size:11px}.learning-shell .katex-display{padding:14px 8px}.learning-shell .chat-aside .card{padding:12px 16px}.learning-shell .chat-aside summary{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.learning-shell .messages .message:last-child{animation:none}}
/* SAKURA learning identity: quiet paper, deep evergreen, and warm accents. */
.student-shell{--ink:#233f37;--muted:#617167;--green:#205b48;--line:#dce4da;--bg:#f5f6f0;background:radial-gradient(ellipse at 100% 0,#f8eae0,transparent 38%),#f4f6f0}
.student-shell .sidebar{background:#fcfcf8;border-right-color:#dbe4d8}
.student-shell .sidebar .brand{padding:0 0 24px;border-bottom:1px solid #e2e7dc}
.student-shell .sidebar .nav{gap:10px}
.student-shell .nav a{font-weight:600;border-radius:14px;transition:background .2s,transform .2s,color .2s}
.student-shell .nav a.active{background:#205644;color:#fff;box-shadow:0 5px 14px #234c3b18}
.student-shell .nav a:hover{background:#e7eee2;color:#274d3b;text-decoration:none}
.student-shell .nav a.active:hover{background:#194c3b;color:white}
.student-shell .sidebar-bottom{line-height:1.9}
.student-shell .hero{background:linear-gradient(125deg,#1c4b3b,#2d6752);border:0;border-radius:26px;padding:36px;color:#fff;box-shadow:0 12px 36px #163d3015}
.student-shell .hero .eyebrow{color:#b5d1ba}.student-shell .hero p{color:#d8e8d9}.student-shell .hero h1{font-weight:700;letter-spacing:.04em}.student-shell .hero .primary{background:#f2ebda;color:#234735;border-color:#f2ebda;font-weight:700;padding:13px 24px;box-shadow:0 4px 14px #082c211a}.student-shell .hero .primary:hover{background:#fff9ea}
.student-shell .hero .notebook{box-shadow:12px 14px 0 #142f2455}.student-shell .hero .spark{color:#e6c49b}.student-shell .hero .notebook .formula{color:#285b44}
.student-shell .stat{border:1px solid #dfe6da;border-radius:18px;box-shadow:0 3px 12px #203e2803;padding:22px}.student-shell .stat strong{color:#2b6147;font-weight:650}
.student-shell .row{padding:18px;border-radius:17px;transition:border-color .2s,box-shadow .2s}.student-shell .row:hover{border-color:#9bb29b;box-shadow:0 5px 20px #213c2410;text-decoration:none}.student-shell .subject-icon{background:#e7eee0;color:#3a6545;border-radius:14px}
.student-shell .card{border-radius:19px;box-shadow:0 4px 18px #25432204}
.student-shell button{transition:background .18s,box-shadow .18s,transform .18s,border-color .18s}.student-shell button:active:not(:disabled){transform:translateY(1px)}
.student-shell button.primary{font-weight:650;background:#205b48;border-color:#205b48;box-shadow:0 4px 12px #1c4e3717}.student-shell button.primary:hover{background:#174a39;border-color:#174a39}
.learning-shell .reader-tools{background:#eef2eb;border:1px solid #e1e6dc;border-radius:12px;padding:3px;gap:1px}
.learning-shell .reader-tools button{display:flex;align-items:center;gap:5px;border:0;border-radius:9px;background:transparent;color:#435d4f;box-shadow:none}
.learning-shell .reader-tools button:hover{background:white;box-shadow:0 2px 6px #203f2910}
.learning-shell .reader-tools svg{width:20px;height:20px}
.learning-shell .reader-tools #refresh{border-left:1px solid #d8e1d4;border-radius:0 9px 9px 0}
.learning-shell .quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:26px}
.learning-shell .quick button{min-height:128px;position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;border:1px solid transparent;border-radius:18px;padding:16px;text-align:left;box-shadow:none;overflow:hidden}
.learning-shell .quick button:after{content:'↗';position:absolute;top:14px;right:14px;font-size:15px;opacity:.55}
.learning-shell .quick #easy{background:#e7eddf;color:#3e5c3c}
.learning-shell .quick #hint{background:#f5ead7;color:#795826}
.learning-shell .quick #visual{background:#e4edef;color:#365d66}
.learning-shell .quick button:hover{transform:translateY(-2px);border-color:currentColor;box-shadow:0 7px 16px #2544260b}
.learning-shell .quick button:active:not(:disabled){transform:translateY(0)}
.learning-shell .quick button .quick-icon{display:grid;place-items:center;width:36px;height:36px;background:#ffffffaa;border-radius:11px;color:inherit;margin:0 0 4px;box-shadow:0 2px 5px #354b1606}
.learning-shell .quick-icon svg{width:23px;height:23px}
.learning-shell .quick button .quick-label{display:block;font-size:15px;font-weight:750;letter-spacing:.04em;margin:0;color:inherit}
.learning-shell .quick button .quick-caption{display:block;font-size:10px;font-weight:500;letter-spacing:0;margin:0;color:inherit;opacity:.85}
.learning-shell .quick #resume-original{grid-column:1/-1;min-height:44px;display:block;padding:10px 15px;background:#f1f3ed;border-color:#dae3d4;font-size:13px;border-radius:12px;text-align:center}
.learning-shell .quick #resume-original:after{display:none}
.learning-shell .composer{background:linear-gradient(#fbfcf8,#f7f9f3);padding:26px 28px}
.learning-shell .composer textarea{border-color:#c4d3bd;box-shadow:0 3px 12px #31442c05;border-radius:15px;transition:box-shadow .2s,border-color .2s}
.learning-shell .composer textarea:focus{outline:2px solid #37654a;outline-offset:2px;box-shadow:0 0 0 6px #e9efdf}
.learning-shell .composer textarea::placeholder{font-weight:400;color:#81907f}
.learning-shell .composer .actions{display:grid;grid-template-columns:1.2fr 1fr;gap:10px;align-items:stretch}
.learning-shell .composer .actions button{display:flex;justify-content:center;align-items:center;gap:10px;min-height:56px;border-radius:15px;font-weight:650;letter-spacing:.03em}
.learning-shell #message-send{background:linear-gradient(120deg,#215b48,#174334);border:1px solid #174334;box-shadow:0 5px 13px #214a3820;color:#fff}
.learning-shell #message-send:hover{background:#133e2f;box-shadow:0 7px 18px #214a382e}
.learning-shell .send-symbol{display:grid;place-items:center;background:#ffffff20;border:1px solid #ffffff25;width:28px;height:28px;border-radius:50%}
.learning-shell .send-symbol svg{width:17px;height:17px}
.learning-shell #understood{background:#fffef9;border:1px solid #d7dfcc;color:#48613a;box-shadow:0 3px 8px #29471908}
.learning-shell #understood:hover{background:#edf3e3;border-color:#93b17c}
.learning-shell .understood-symbol{width:25px;height:25px;border-radius:50%;background:#e7efda;display:grid;place-items:center;color:#4c6d36}
.learning-shell .understood-symbol svg{width:17px;height:17px}
.learning-shell #understood:disabled{opacity:1;background:#e5eddb;box-shadow:none;cursor:default;border-color:#d4dfc8;color:#536846}
.learning-shell .chat-photo-bar button{padding:7px 10px;border:1px solid #dde5d6;border-radius:10px;background:#f1f5eb;min-height:44px;color:#46603a}
.learning-shell .chat-photo-bar button:hover{background:#e4edd9}
.learning-shell .katex-display{margin:0;padding:12px}
.learning-shell .sakura-visual{border:1px solid #d5e2d3;border-radius:16px;background:#f9fbf5;padding:20px;margin:12px 0;color:#284d39}
.learning-shell .sakura-visual .sv-title{font-size:17px;line-height:1.7}.learning-shell .sakura-visual .sv-drawing{max-width:380px}.learning-shell .sakura-visual .sv-result{font-size:17px}.learning-shell .sakura-visual .sv-alt{font-size:13px;color:#556d59}
@media(max-width:700px){
 .student-shell .sidebar{padding:6px 8px calc(6px + env(safe-area-inset-bottom))}.student-shell .nav a{border-radius:14px;min-height:52px}.student-shell .nav a.active{background:#205644;color:#fff;box-shadow:0 3px 8px #1e452218}
 .student-shell .hero{padding:26px 24px;border-radius:23px}.student-shell .stat{padding:14px 11px}.student-shell .row{padding:14px 12px}
 .learning-shell .quick{gap:8px;margin:0 0 24px}.learning-shell .quick button{padding:12px 10px;min-height:110px;border-radius:15px}.learning-shell .quick button:after{top:10px;right:9px;font-size:12px}.learning-shell .quick button .quick-icon{width:32px;height:32px;display:grid;margin-bottom:3px;border-radius:10px}.learning-shell .quick-icon svg{width:21px;height:21px}.learning-shell .quick button .quick-label{font-size:13px;display:block;letter-spacing:.02em}.learning-shell .quick button .quick-caption{font-size:9px;display:block;letter-spacing:-.01em;line-height:1.4}
 .learning-shell .composer{padding:22px 16px}.learning-shell .composer .actions button{font-size:14px;min-height:56px;padding:10px;gap:7px}.learning-shell .send-symbol{width:25px;height:25px}.learning-shell .reader-tools button{padding:7px;font-size:10px;min-height:44px}.learning-shell .reader-tools svg{width:17px;height:17px}.learning-shell .chat-photo-bar button{font-size:11px}.learning-shell .sakura-visual{padding:16px}
}
@media(prefers-reduced-motion:reduce){.student-shell button,.student-shell .nav a,.student-shell .row{transition:none}.learning-shell .quick button:hover{transform:none}}

/* Tablet navigation must not cover the answer after automatic scrolling. */
@media(min-width:701px) and (max-width:1180px){.learning-shell .sidebar{padding:8px 24px}.learning-shell .message{scroll-margin-top:88px}.learning-shell .chat-layout{grid-template-columns:minmax(0,1fr)}.learning-shell .chat-aside{order:-1;position:static}}

/* Clear, generous learning actions — 2026-11-07 */
.learning-shell .chat-photo-bar{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.learning-shell .chat-photo-bar button{width:100%;box-sizing:border-box;min-height:60px;padding:15px 18px;background:#e2ede8;border:1px solid #a8c3b6;border-radius:16px;color:#254f40;font-size:16px;font-weight:650;gap:10px}
.learning-shell .chat-photo-bar button:hover{background:#d3e5dc;border-color:#789f8c}
.learning-shell .chat-photo-bar svg{width:23px;height:23px}
.learning-shell .composer .actions{grid-template-columns:1fr 1fr;gap:12px}
.learning-shell .composer .actions button{min-height:72px;padding:18px 12px;font-size:18px;gap:8px}
.learning-shell #understood{background:linear-gradient(135deg,#f1ebd7,#e8eddb);border-color:#bfcba3;color:#405833;box-shadow:0 4px 12px #53633c12}
.learning-shell #understood:hover{background:#e4ebd2;border-color:#93aa77;box-shadow:0 5px 14px #53633c20}
.learning-shell .understood-symbol{width:30px;height:30px;flex:none;background:#d5e3c1;color:#466036}
.learning-shell #understood:not(:disabled)>span:last-child,.learning-shell #message-send>span{white-space:nowrap}
.learning-shell #understood:disabled{background:#e7eddf;color:#506246}
@media(max-width:360px){.learning-shell .composer .actions{grid-template-columns:1fr}.learning-shell .composer .actions button{min-height:64px}}
