.profile-card{cursor:pointer;transition:background .18s ease,transform .18s ease,box-shadow .18s ease}
.profile-card:hover{background:#deeee3;transform:translateY(-1px);box-shadow:0 8px 20px rgba(44,91,65,.08)}
.profile-card:focus-within{outline:2px solid #79c39a;outline-offset:2px}
.top-avatar{border:0;padding:0;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.top-avatar:hover{transform:translateY(-1px);box-shadow:0 0 0 4px #dff1e5}
.lesson-card:hover{transform:translateY(-2px);box-shadow:0 24px 62px rgba(31,41,40,.1)}
.ai-card{position:relative;overflow:hidden}.ai-card::after{content:"";position:absolute;width:170px;height:170px;right:-95px;top:-105px;border-radius:50%;background:rgba(216,242,226,.42);pointer-events:none}
.editor-actions{display:flex;align-items:center;gap:8px}.review-button{background:#354b44;color:#d6eee0;font-size:10px;font-weight:800;padding:8px 11px;border-radius:6px}.review-button:hover{background:#426056}
.output-body{min-height:229px}.output-result{min-height:100%;box-sizing:border-box}
.notes-heading,.profile-view,.progress-view{animation:fadeSlide .28s ease}
.note-editor{box-shadow:0 12px 34px rgba(31,41,40,.04)}
.note-save-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.note-hint{flex:1}
@media(max-width:760px){.editor-actions{gap:5px}.review-button,.run-button{padding:8px 9px;font-size:9px}.top-avatar:hover{transform:none}.profile-card:hover{transform:none}.note-save-row{align-items:flex-end;flex-direction:column}.note-actions{width:100%}.note-actions button{flex:1}}
.topbar-left{display:flex;align-items:center;min-width:0}.sidebar-toggle{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:14px;border:1px solid #dbe4de;border-radius:7px;background:#fff;color:#628071;font-size:21px;line-height:1;transition:background .18s ease,color .18s ease,transform .18s ease}.sidebar-toggle:hover{background:#e8f4eb;color:#397353;transform:translateX(-1px)}.sidebar{transition:width .24s ease,padding .24s ease,border-color .18s ease}.sidebar>*{transition:opacity .12s ease}.sidebar-collapsed .sidebar{width:0;padding-right:0;padding-left:0;border-right-color:transparent;overflow:hidden}.sidebar-collapsed .sidebar>*{opacity:0;pointer-events:none}.editor-toolbar-actions{display:flex;align-items:center;gap:8px}.editor-view-button{padding:5px 7px;border:1px solid #3c4d47;border-radius:5px;color:#b8c8c0;font-size:9px;font-weight:700;white-space:nowrap;transition:background .18s ease,color .18s ease,border-color .18s ease}.editor-view-button:hover{background:#33433e;border-color:#52675e;color:#edf6f0}.editor-view-button[aria-pressed="true"]{background:#dff2e6;border-color:#dff2e6;color:#246346}.editor-focus-mode{overflow:hidden}.editor-focus-mode .topbar,.editor-focus-mode .sidebar,.editor-focus-mode #learnView>.hero-row,.editor-focus-mode #learnView>.lesson-grid,.editor-focus-mode #learnView>.next-section,.editor-focus-mode .workspace-section>.section-heading{display:none}.editor-focus-mode .workspace-section{position:fixed;z-index:30;inset:0;margin:0;padding:18px;background:#17211f}.editor-focus-mode .code-lab{height:100%;grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);border-radius:11px}.editor-focus-mode .editor-pane,.editor-focus-mode .output-pane{display:flex;flex-direction:column;min-height:0}.editor-focus-mode .code-editor,.editor-focus-mode .output-body{height:auto;flex:1;min-height:0}.editor-focus-mode .output-body{display:flex;align-items:stretch;justify-content:stretch;overflow:auto}.editor-focus-mode .output-placeholder{margin:auto}.editor-focus-mode .output-pane{border-left:1px solid #34413d}.editor-focus-mode .editor-toolbar{height:48px}.editor-focus-mode .editor-footer,.editor-focus-mode .output-tip{height:48px}.editor-focus-mode .stdin-control{flex:none}.editor-focus-mode .editor-view-button{font-size:10px;padding:7px 10px}.editor-focus-mode .toast{z-index:40}
@media(max-width:760px){.topbar-left{flex:1}.sidebar-toggle{display:none}.editor-toolbar{height:auto;min-height:42px;padding:8px 12px}.editor-toolbar-actions{gap:5px}.editor-status{display:none}.editor-view-button{padding:5px 6px;font-size:8px}.editor-focus-mode .workspace-section{padding:8px}.editor-focus-mode .code-lab{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(205px,.62fr);overflow:auto}.editor-focus-mode .output-pane{border-left:0;border-top:1px solid #34413d}.editor-focus-mode .editor-toolbar-actions{margin-left:auto}.editor-focus-mode .editor-view-button{font-size:9px;padding:6px}.editor-focus-mode .editor-view-button#nativeFullscreen{display:none}}

.editor-focus-mode .workspace-section:fullscreen{width:100%;height:100%;border:0}

/* ---- 课程讲解区 ---- */
.lesson-content-section{margin-top:54px}
.lesson-content-layout{display:block}
.lesson-content-main{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:27px 30px}
.lesson-content-body{font-size:13px;line-height:1.9;color:#4f6257}
.lesson-content-body p{margin:0 0 14px}
.lesson-content-body ul{margin:0 0 14px;padding-left:22px}
.lesson-content-body li{margin:6px 0}
.lesson-content-body strong{color:#2f5341}
.lesson-content-body em{color:#5d8a6f;font-style:normal;font-weight:700}
.lesson-content-body code{padding:2px 6px;border-radius:5px;background:#eef4ef;color:#3f7a5a;font:11px "DM Mono",monospace}
.course-callout{margin:18px 0;padding:14px 16px;border-left:3px solid #72b68a;border-radius:0 10px 10px 0;background:#f2faf4;color:#567064}.course-callout b{display:block;color:#397657;font-size:11px}.course-callout p{margin:6px 0 0!important;font-size:11px;line-height:1.75}.teaching-map{margin:24px 0 4px;padding:19px;border:1px solid #d9e8dc;border-radius:13px;background:linear-gradient(135deg,#f5fbf6,#fff)}.teaching-map-head span{color:#609977;font-size:9px;font-weight:800;letter-spacing:.1em}.teaching-map-head h3{margin:5px 0;color:#315842;font-size:16px}.teaching-map-head p{margin:0!important;color:#7c8d83;font-size:10px;line-height:1.7}.mastery-tags{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0}.mastery-tags span{padding:5px 7px;border-radius:6px;background:#e7f3e9;color:#44785a;font-size:9px;font-weight:700}.teaching-map-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.teaching-map-grid article{padding:11px;border:1px solid #e0ebe3;border-radius:9px;background:#fff}.teaching-map-grid b{color:#4b8b65;font-size:10px}.teaching-map-grid p{margin:6px 0 0!important;color:#697a70;font-size:10px;line-height:1.75}
.lesson-start-actions{display:flex;align-items:center;gap:10px}.lesson-page-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 13px;border:1px solid #b9d8c3;border-radius:8px;background:#f5fbf6;color:#397653;font-size:10px;font-weight:800;transition:background .18s ease,border-color .18s ease,transform .18s ease}.lesson-page-button:hover{border-color:#6faf84;background:#e6f4e9;transform:translateY(-1px)}.lesson-page-button span{font-size:13px;color:#67a77c}@media(max-width:520px){.lesson-start-actions{align-items:stretch;flex-direction:column}.lesson-start-actions .primary-button,.lesson-page-button{width:100%}}
.deep-lesson-block{max-width:750px}.deep-lesson-block>p{margin:0 0 16px}.deep-code-step{overflow:hidden;border:1px solid #334c40;border-radius:12px;background:#1d2c26;box-shadow:0 12px 27px rgba(27,53,38,.16)}.deep-code-step pre{margin:0;padding:11px 0;overflow:auto;background:linear-gradient(90deg,#17241f,#20332b);font:12px/2 "DM Mono","Cascadia Code",Consolas,monospace}.deep-code-step code{display:block;min-width:max-content;color:#e5f0e8}.deep-code-step code span{display:flex;min-height:25px;padding-right:18px}.deep-code-step code span:nth-child(even){background:rgba(255,255,255,.025)}.deep-code-step code i{width:49px;flex:none;margin-right:15px;padding-right:13px;border-right:1px solid #3a5247;color:#91a99c;font:9px/25px "DM Mono",monospace;text-align:right}.deep-code-step>p{margin:0;padding:14px 16px;border-top:1px solid #3b5448;background:#253a30;color:#d9e9df;font-size:13px;line-height:1.85}.deep-format-reminder{padding:14px 15px;border-left:3px solid #e7a979;border-radius:0 10px 10px 0;background:#fff7ef;color:#825f47;font-size:13px;line-height:1.85}.deep-format-reminder code{background:#f8e8dc;color:#975f3c}.deep-recap{padding:20px 22px;border:1px solid #cce3d3;border-radius:14px;background:linear-gradient(135deg,#eff9f1,#fff)}.deep-recap ul{margin:14px 0;padding-left:21px}.deep-recap li{margin:9px 0;color:#4b6756;font-size:13px;line-height:1.85}@media(max-width:760px){.deep-code-step pre{font-size:10px}.deep-code-step code i{width:40px;margin-right:11px;padding-right:10px}.deep-code-step>p{padding:12px 13px;font-size:12px}}
.standalone-lesson-page .lesson-slide-content{width:min(880px,100%);padding:42px 50px}.standalone-lesson-page .deep-lesson-block{max-width:820px}.standalone-lesson-page .deep-code-step{max-width:820px}
.workspace-section{display:none}.practice-float-trigger{position:fixed;z-index:12;right:96px;bottom:25px;display:grid;grid-template-columns:30px auto;column-gap:8px;align-items:center;padding:10px 14px 10px 10px;border:1px solid #bfddc8;border-radius:13px;background:#fff;box-shadow:0 12px 30px rgba(31,65,43,.16);text-align:left}.practice-float-trigger span{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#e2f3e7;color:#3f845b;font:15px "DM Mono",monospace}.practice-float-trigger strong{color:#3d5948;font-size:10px}.practice-float-trigger small{margin-top:2px;color:#789084;font-size:9px}.practice-float-trigger:hover{border-color:#79b98c;transform:translateY(-1px)}.practice-dock-open .practice-float-trigger{display:none}.practice-dock-open .workspace-section{position:fixed;z-index:40;top:22px;right:24px;bottom:auto;display:block;width:min(760px,calc(100vw - 48px));margin:0;padding:16px;border:1px solid #b9d8c3;border-radius:16px;background:#f7fbf8;box-shadow:0 24px 64px rgba(24,49,34,.28)}.practice-dock-open .ai-fab,.practice-dock-open .ai-float{display:none}.practice-dock-open .workspace-section .section-heading{margin-bottom:11px}.practice-window-handle{cursor:grab;user-select:none;touch-action:none}.practice-window-handle:active{cursor:grabbing}.practice-window-handle small{display:block;margin-top:3px;color:#8aa095;font-size:9px}.workspace-actions{display:flex;gap:7px}.workspace-actions button{cursor:pointer}.practice-dock-open .code-lab{max-height:min(620px,calc(100vh - 170px))}.practice-dock-open .code-editor,.practice-dock-open .output-body{height:270px}.practice-dock-open .editor-toolbar-actions{gap:5px}
.review-page-heading{padding:48px 0 18px}.review-page-heading h1{margin:14px 0 8px;font-size:30px;letter-spacing:-1px}.review-page-heading p{max-width:660px;margin:0;color:#77877e;font-size:12px;line-height:1.8}.review-summary{display:flex;align-items:center;gap:10px;padding:13px 15px;border:1px solid #d7e8dc;border-radius:11px;background:#f2faf4;color:#527160}.review-summary strong{font-size:13px}.review-summary span{font-size:10px}.review-filters{display:flex;gap:7px;flex-wrap:wrap;margin:20px 0 16px}.review-filter{padding:7px 11px;border:1px solid #dbe7de;border-radius:18px;color:#77887e;font-size:10px;font-weight:700}.review-filter:hover{border-color:#9bcaab;color:#407954}.review-filter.active{border-color:#4e9a6b;background:#4e9a6b;color:#fff}.review-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.review-card{padding:19px 20px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 9px 25px rgba(31,41,40,.045)}.review-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#8a9b91;font-size:9px;font-weight:800}.review-card-top button{color:#4c9368;font-size:10px;font-weight:800}.review-card h2{margin:10px 0 14px;color:#3d5146;font-size:15px;line-height:1.45}.review-card section{padding:10px 0;border-top:1px dashed #e1e9e3}.review-card section:last-child{padding-bottom:0}.review-card b{display:block;color:#5a9770;font-size:9px;letter-spacing:.04em}.review-card p,.review-card li{color:#65766c;font-size:10px;line-height:1.75}.review-card p{margin:5px 0 0}.review-card ul{margin:5px 0 0;padding-left:17px}.review-card small{display:block;margin-top:7px;padding:7px 8px;border-radius:6px;background:#fff7e9;color:#9b7948;font:9px/1.6 "DM Mono",monospace;white-space:pre-wrap}
.format-library{margin-top:18px;padding:19px 20px;border:1px solid #d6e7db;border-radius:14px;background:linear-gradient(135deg,#f6fbf7,#fff)}.format-library-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:14px}.format-library-head span{color:#5b9670;font-size:9px;font-weight:800;letter-spacing:.09em}.format-library-head h2{margin:4px 0 0;color:#315842;font-size:16px}.format-library-head p{max-width:340px;margin:0;color:#788980;font-size:10px;line-height:1.7;text-align:right}.format-library-head code{padding:1px 4px;border-radius:4px;background:#e7f3ea;color:#357252;font:9px "DM Mono",monospace}.format-library-tools{display:flex;align-items:center;gap:10px;margin:2px 0 13px}.format-search{display:flex;align-items:center;gap:7px;flex:1;max-width:430px;padding:8px 9px;border:1px solid #d9e7dc;border-radius:8px;background:#fff;color:#83a18d}.format-search:focus-within{border-color:#8bc8a0;box-shadow:0 0 0 3px #e8f5eb}.format-search .ui-icon{width:14px;height:14px;flex:none}.format-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#42564a;font-size:10px}.format-search input::placeholder{color:#a1afa5}.format-search button{width:18px;height:18px;border-radius:5px;color:#9aa99f;font-size:15px;line-height:1}.format-search button:hover{background:#edf5ef;color:#4b805f}.format-library-count{color:#8b9b91;font-size:9px;white-space:nowrap}.format-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.format-card{border:1px solid #e0ebe3;border-radius:9px;background:#fff;overflow:hidden}.format-card summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;cursor:pointer;list-style:none}.format-card summary::-webkit-details-marker{display:none}.format-card summary>span{display:grid;gap:4px}.format-card summary small{color:#8ca398;font-size:8px;font-weight:700;letter-spacing:.04em}.format-card summary strong{color:#4b805f;font-size:11px}.format-card summary i{color:#84a28e;font-style:normal;font-size:14px;transition:transform .18s ease}.format-card[open] summary{border-bottom:1px solid #edf2ee;background:#fbfefb}.format-card[open] summary i{transform:rotate(180deg)}.format-card-body{padding:0 12px 12px}.format-card p{margin:10px 0 9px;color:#687970;font-size:10px;line-height:1.7}.format-card pre{margin:0;padding:9px 10px;overflow:auto;border-radius:7px;background:#1f2d28;color:#d3e9da;font:9px/1.65 "DM Mono",monospace;white-space:pre}.format-empty{grid-column:1/-1;padding:24px;text-align:center;border:1px dashed #dbe8de;border-radius:9px;color:#8a9a90;font-size:10px}
.example-analysis{margin:22px 0;padding:18px;border:1px solid #d8e7dc;border-radius:13px;background:#f8fcf8}.example-analysis-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:13px}.example-analysis-head span{color:#5d9772;font-size:9px;font-weight:800;letter-spacing:.09em}.example-analysis-head h3{margin:4px 0 0;color:#315842;font-size:15px}.example-analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.example-analysis-grid article{padding:11px 12px;border:1px solid #e0ebe3;border-radius:9px;background:#fff}.example-analysis-grid b{display:block;color:#4a8a65;font-size:10px}.example-analysis-grid p{margin:6px 0 0;color:#66776d;font-size:10px;line-height:1.75}
.lesson-example{position:relative;margin-top:24px;border:1px solid #30423b;border-radius:14px;overflow:hidden;background:#202b2a;box-shadow:0 16px 34px rgba(22,37,31,.16)}
.lesson-example::before{content:"";position:absolute;inset:0 0 auto;height:2px;background:linear-gradient(90deg,#7fd0a0,#f1cc8a,#80bdd5);pointer-events:none;z-index:1}
.lesson-example-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;background:linear-gradient(100deg,#263934,#202d2a);color:#c8d9d0;font-size:10px;font-weight:700}

@media(max-width:760px){.teaching-map-grid{grid-template-columns:1fr}.practice-float-trigger{right:82px;bottom:16px}.practice-dock-open .workspace-section{inset:10px;right:auto;bottom:auto;width:auto;padding:12px;overflow:auto}.practice-dock-open .workspace-section .section-heading{align-items:center}.practice-dock-open .workspace-section h2{font-size:15px}.practice-dock-open .code-lab{max-height:none}.practice-dock-open .code-editor,.practice-dock-open .output-body{height:220px}.workspace-actions .ghost-button{padding:6px 8px;font-size:9px}.practice-dock-open .editor-view-button{display:none}}
.lesson-example-title{display:flex;align-items:center;gap:8px;min-width:0}.lesson-example-title-icon{display:grid;place-items:center;width:23px;height:20px;border-radius:5px;background:#315b48;color:#bce8cf;font:9px "DM Mono",monospace}.lesson-example-title small{padding:3px 6px;border:1px solid #3c5048;border-radius:10px;color:#8ca59a;font:9px "DM Mono",monospace;white-space:nowrap}
.lesson-example-head .text-button{padding:5px 7px;border:1px solid transparent;border-radius:6px;color:#a8e0bd;font-size:10px;font-weight:700}.lesson-example-head .text-button:not(:disabled):hover{border-color:#426052;background:#30453d;color:#e8f8ed}.lesson-example-head .text-button:disabled{color:#64786e;cursor:not-allowed}
.lesson-example-code{margin:0;padding:9px 0;color:#dce9e0;font:12px/1.9 "DM Mono",monospace;overflow:auto;max-height:400px;scrollbar-color:#4b6258 #202b2a;scrollbar-width:thin}
.lesson-example-actions{display:flex;align-items:center;gap:7px}
.lesson-example-code .ex-line{display:flex;min-height:25px;line-height:25px;transition:background .16s ease,box-shadow .16s ease}
.lesson-example-code .ex-line-num{flex:none;width:42px;text-align:right;padding-right:13px;color:#64776e;user-select:none;background:#22302c;border-right:1px solid #2d3d37;font-size:10px;transition:color .16s ease}
.lesson-example-code .ex-line-code{min-width:max-content;padding:0 22px 0 15px;white-space:pre;tab-size:4}
.lesson-example-notes{border-top:1px solid #34473f;background:linear-gradient(135deg,#1c2824,#1a2421);padding:14px 16px}
.lesson-example-code .ex-line{cursor:pointer}
.lesson-example-code .ex-line:hover{background:#293c35}
.lesson-example-code .ex-line:hover .ex-line-num{color:#9ec8ae}
.lesson-example-code .ex-line.is-current{background:linear-gradient(90deg,#2f5142,#294139);box-shadow:inset 3px 0 0 #8fd3ae}
.lesson-example-code .ex-line.is-current .ex-line-num{color:#b8e7cd}
.lesson-example-code .ex-line.is-current .ex-line-code{color:#eaf8ef}
.guide-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
.guide-head>span:first-child{color:#8fd3ae;font-size:9px;font-weight:800;letter-spacing:.06em}
.guide-progress{color:#8fd3ae;font:10px "DM Mono",monospace}
.guide-body{min-height:60px;color:#b9c9c1;font-size:11px;line-height:1.75;padding:12px 13px;border:1px solid #34473f;border-radius:9px;background:#18231f}
.guide-step-label{color:#f1cc8a;font:10px "DM Mono",monospace;font-weight:600;margin-bottom:4px}
.guide-step-note{color:#dce9e0;font-size:11px}
.guide-actions{display:flex;gap:9px;margin-top:11px}
.guide-btn{flex:1;padding:10px 12px;border-radius:8px;border:1px solid #33453e;color:#9fb0a7;font-size:11px;font-weight:800}
.guide-btn:disabled{opacity:.4;cursor:default}
.guide-btn:not(:disabled):hover{background:#263630}
.guide-btn-primary{background:#2f6b4f;border-color:#2f6b4f;color:#eaf8ef}
.guide-btn-primary:not(:disabled):hover{background:#3a8261;color:#fff}
.lesson-challenge{border:1px solid #e8dcc9;border-radius:16px;background:linear-gradient(150deg,#fffaf1,#fff);box-shadow:0 14px 34px rgba(128,98,55,.08);padding:23px 22px}
.challenge-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.challenge-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#f7e4cb;color:#c08a4a;font-size:15px}
.challenge-head strong{display:block;font-size:12px;color:#5f4a2e}
.challenge-head span{display:block;margin-top:3px;color:#a08c6d;font-size:9px}
.lesson-challenge>p{margin:0;font-size:11px;line-height:1.85;color:#7a6748}
.challenge-expected{margin-top:17px;padding:12px 14px;border-radius:9px;background:#fbf1de}
.challenge-expected>span{display:block;margin-bottom:7px;color:#b08a55;font-size:9px;font-weight:800}
.challenge-expected pre{margin:0;color:#8a6a3a;font:11px/1.8 "DM Mono",monospace;white-space:pre-wrap}
.challenge-actions{margin-top:14px}
.challenge-open{display:inline-flex;align-items:center;justify-content:center;width:100%;padding:11px 12px;border-radius:9px;background:#24332f;color:#d9f2e5;font-size:11px;font-weight:800}
.challenge-open:hover{background:#345048;color:#fff}
.lesson-progress-actions{display:flex;align-items:center;gap:8px}.complete-button{border-color:#d6e5da;color:#5c9b75}.relearn-button{border-color:#ead5c8;color:#b56f4e}.relearn-button:hover{border-color:#dba98e;background:#fff6f0;color:#a85b39}.relearn-course-button{margin:0 0 22px;border-color:#d6e5da;color:#5c9b75}
.complete-button.is-done{background:#e3f5e9;border-color:#bfe3cc;color:#2f7a4e}
.lesson-link.is-done{color:#9faea5;text-decoration:line-through}

/* ---- 扩展练习 ---- */
.lesson-exercises{margin-top:20px;padding-top:18px;border-top:1px dashed #ecdcc0}
.exercise-head{font-size:10px;font-weight:800;letter-spacing:.06em;color:#b0885a;margin-bottom:11px}
.exercise-item{padding:11px 12px;border:1px solid #f0e2ce;border-radius:9px;background:#fffdf7;margin-bottom:9px}
.exercise-question{font-size:11px;line-height:1.75;color:#6b5638}
.exercise-question b{display:inline-grid;place-items:center;min-width:26px;height:20px;margin-right:7px;border-radius:5px;background:#f3e3c6;color:#a9703c;font-size:10px}
.exercise-hint{margin-top:8px}
.exercise-hint summary{cursor:pointer;color:#b0885a;font-size:10px;font-weight:700}
.exercise-hint div{margin-top:6px;color:#9a7b4e;font-size:10px;line-height:1.7}
.exercise-expected{margin-top:8px;color:#8a6a3a;font-size:10px}
.exercise-expected span{color:#b08a55;font-weight:800;margin-right:6px}
.exercise-expected code{padding:2px 6px;border-radius:5px;background:#fbf1de;font:10px "DM Mono",monospace}
.exercise-open{display:inline-block;margin-top:9px;color:#b0763c;font-size:10px;font-weight:800}
.exercise-open:hover{color:#d08a3f;text-decoration:underline}

/* ---- 进度页 ---- */
.progress-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:26px 0 30px}
.progress-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:19px 20px;min-width:0}
.progress-panel h3{margin:0 0 13px;font-size:12px;color:#54665b}
.progress-list{display:grid;gap:9px;max-height:300px;overflow:auto}
.progress-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;background:#f6f9f6}
.progress-item-icon{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:7px;background:#eef4ef;color:#8aa694;font-size:11px}
.progress-item-icon.done{background:#e3f5e9;color:#3d9a63}
.progress-item-icon.fail{background:#fdebe4;color:#cf6542}
.progress-item div{flex:1;min-width:0}
.progress-item strong{display:block;font-size:10px;color:#4d5f55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.progress-item span{display:block;margin-top:3px;color:#9aa69f;font-size:9px}
.progress-empty{padding:22px 12px;text-align:center;color:#a5b0aa;font-size:10px;border:1px dashed #dde6e0;border-radius:9px}

/* ---- 个人中心改昵称 ---- */
.profile-identity{flex:1;min-width:0}
.profile-name-row{display:flex;align-items:center;gap:9px}
.profile-name-row strong{display:block;font-size:16px}
.profile-edit{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#eef5f0;color:#6a9a7f;font-size:11px}
.profile-edit:hover{background:#e0efe5;color:#3e7c58}
.profile-name-row input{width:min(210px,100%);padding:7px 10px;border:1px solid #cfe0d4;border-radius:8px;outline:0;background:#fff;color:#35473e;font-size:12px}
.profile-name-row input:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}
.name-save,.name-cancel{padding:7px 10px;border-radius:7px;font-size:10px;font-weight:800}
.name-save{background:#3e7c58;color:#fff}
.name-save:disabled{opacity:.6}
.name-cancel{color:#8b9890;border:1px solid #dce4df}

@media(max-width:900px){.progress-detail-grid{grid-template-columns:1fr}.lesson-practice-grid{grid-template-columns:1fr}}
@media(max-width:760px){.lesson-content-main{padding:21px 19px}.lesson-content-body{font-size:12px}.lesson-example-code{font-size:11px}}
@media(max-width:760px){.review-page-heading{padding-top:32px}.review-cards,.format-library-grid{grid-template-columns:1fr}.review-summary{align-items:flex-start;flex-direction:column;gap:4px}.format-library-head{display:block}.format-library-head p{max-width:none;margin-top:7px;text-align:left}}
@media(max-width:560px){.example-analysis-grid{grid-template-columns:1fr}}
.editor-focus-mode #learnView>.lesson-content-section{display:none}

/* ---- 全站代码展示统一视觉 ---- */
:root{--code-ink:#dcebe2;--code-panel:#17231f;--code-panel-deep:#101915;--code-line:#294138;--code-accent:#86d5a7;--code-muted:#789187}
.lesson-content-body pre,.ai-code,.exercise-reference pre,.projects-reference pre,.exercise-expected-box pre,.projects-expected pre{position:relative;margin:18px 0;padding:22px 20px 18px;border:1px solid #2b4439;border-radius:12px;background:linear-gradient(135deg,#1d3028 0%,#14221e 100%);box-shadow:0 12px 26px rgba(27,55,42,.12),inset 0 1px rgba(255,255,255,.04);color:var(--code-ink);font:12px/1.85 "DM Mono","Cascadia Code",Consolas,monospace;white-space:pre;tab-size:4;overflow:auto;scrollbar-color:#4c705d #17251f;scrollbar-width:thin}
.lesson-content-body pre::before,.ai-code::before,.exercise-reference pre::before,.projects-reference pre::before{content:"C SOURCE";position:absolute;top:7px;right:12px;color:#78b994;font:700 8px/1 "DM Mono",monospace;letter-spacing:.12em;opacity:.8}
.lesson-content-body pre code,.ai-code code{display:block;padding:0;background:transparent;color:inherit;font:inherit;white-space:inherit}
.lesson-content-body pre:hover,.ai-code:hover,.exercise-reference pre:hover,.projects-reference pre:hover{border-color:#47775f;box-shadow:0 15px 32px rgba(27,55,42,.17),inset 0 1px rgba(255,255,255,.05)}
.lesson-content-body>p code,.lesson-content-body li code,.review-card code,.exercise-panel p code{padding:3px 6px;border:1px solid #d9e9de;border-radius:5px;background:#f0f7f1;color:#377b57;font:10px/1.4 "DM Mono",monospace;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.format-card pre{box-shadow:inset 0 1px rgba(255,255,255,.04)}
.output-result pre,.exercise-output pre,.projects-output pre{position:relative;border:1px solid #dce9df;border-radius:10px;background:linear-gradient(135deg,#f4f8f4,#edf4ee);box-shadow:none;color:#4d6357;font:11px/1.8 "DM Mono",monospace;white-space:pre-wrap;overflow:auto}
.output-result pre::before,.exercise-output pre::before,.projects-output pre::before{content:"OUTPUT";display:block;margin-bottom:8px;color:#83a08e;font:700 8px/1 "DM Mono",monospace;letter-spacing:.12em}
.exercise-expected-box pre,.projects-expected pre,.challenge-expected pre{border-color:#ead7b8;background:linear-gradient(135deg,#fffaf0,#fff4df);box-shadow:none;color:#80643b;white-space:pre-wrap}
.exercise-expected-box pre::before,.projects-expected pre::before,.challenge-expected pre::before{content:"EXPECTED";display:block;margin-bottom:8px;color:#b08855;font:700 8px/1 "DM Mono",monospace;letter-spacing:.12em}
.lesson-example-code{border-top:1px solid #31493f;border-bottom:1px solid #31493f;scrollbar-color:#4b705c #1a2722}
.lesson-example-code .ex-line-code{letter-spacing:.01em}
.lesson-example-code .ex-line-num{font-variant-numeric:tabular-nums}
.exercise-reference,.projects-reference{box-shadow:0 14px 30px rgba(18,39,29,.14)}
.exercise-reference pre,.projects-reference pre{margin:0;border:0;border-radius:0;box-shadow:none}
.code-review pre{margin:10px 0;padding:12px 14px;border-radius:9px;background:#f2f7f3;color:#536a5c;font:10px/1.75 "DM Mono",monospace;white-space:pre-wrap;overflow:auto}
@media(max-width:760px){.lesson-content-body pre,.ai-code,.exercise-reference pre,.projects-reference pre{padding:20px 13px 14px;font-size:11px;line-height:1.75}.lesson-content-body pre::before,.ai-code::before,.exercise-reference pre::before,.projects-reference pre::before{right:9px;font-size:7px}}

/* 统一使用 SVG 线条图标，避免依赖字体符号造成形状不一致。 */
.ui-icon{display:block;width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-icon{display:grid;place-items:center;width:16px;height:16px;font-size:16px}.nav-icon .ui-icon{width:16px;height:16px}.icon-button{display:grid;place-items:center;width:28px;height:28px}.icon-button .ui-icon{width:17px;height:17px}.mobile-menu .ui-icon{width:20px;height:20px}.sidebar-toggle{font-size:0}.sidebar-toggle .ui-icon{width:17px;height:17px}.search-button>.ui-icon{width:17px;height:17px;flex:none;color:#62736b}.notification{display:grid;place-items:center;width:28px;height:28px;transform:none}.notification .ui-icon{width:19px;height:19px}.bookmark{display:grid;place-items:center;width:28px;height:28px}.bookmark .ui-icon{width:19px;height:19px}.bookmark.is-saved .ui-icon{fill:currentColor}
.top-actions{position:relative}.notification{position:relative;isolation:isolate;border-radius:8px}.notification:hover,.notification[aria-expanded="true"]{background:#eaf4ed;color:#3f7857}.notification-dot{display:none!important}.notification-count{position:absolute;z-index:1;top:-5px;right:-7px;display:grid;place-items:center;min-width:15px;height:15px;padding:0 4px;border:2px solid #f8faf7;border-radius:9px;background:#e77c52;color:#fff;font:8px/1 "DM Mono",monospace;font-style:normal}.notification-center{position:absolute;z-index:65;top:43px;right:27px;width:min(350px,calc(100vw - 28px));overflow:hidden;border:1px solid #d7e6db;border-radius:13px;background:#fff;box-shadow:0 18px 46px rgba(26,57,39,.17)}.notification-center-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px 12px;border-bottom:1px solid #e7eee9;background:#f7fbf8}.notification-center-head span{display:block;color:#385746;font-size:12px;font-weight:800}.notification-center-head small{display:block;margin-top:3px;color:#89a095;font-size:9px}.notification-center-head button{padding:5px 7px;border-radius:6px;color:#4d9369;font-size:9px;font-weight:800}.notification-center-head button:hover{background:#e5f3e8}.notification-list{max-height:330px;overflow:auto;padding:6px}.notification-item{position:relative;display:flex;width:100%;gap:10px;padding:11px 10px;border-radius:9px;text-align:left}.notification-item:hover{background:#f1f8f3}.notification-item-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:8px;background:#e8f4ea;color:#448160;font:13px "DM Mono",monospace}.notification-item strong{display:block;color:#44594d;font-size:10px}.notification-item small{display:block;margin-top:4px;color:#83938a;font-size:9px;line-height:1.55}.notification-item.is-unread{background:#f8fcf8}.notification-item.is-unread strong{color:#316348}.notification-item>i{position:absolute;top:14px;right:8px;width:6px;height:6px;border-radius:50%;background:#e77c52}.notification-center.hidden{display:none!important}@media(max-width:760px){.notification-center{position:fixed;top:58px;right:12px;width:min(350px,calc(100vw - 24px))}.notification-count{right:-5px}.top-actions{position:static}}
.fire{display:grid;place-items:center;width:22px;height:22px}.fire .ui-icon{width:19px;height:19px}.ai-spark .ui-icon{width:17px;height:17px}.example-gate-mark .ui-icon,.challenge-mark .ui-icon{width:17px;height:17px}.review-button,.run-button{display:inline-flex;align-items:center;gap:6px}.review-button .ui-icon,.run-button .ui-icon{width:13px;height:13px}.output-placeholder>span{display:grid;place-items:center;width:24px;height:24px;margin:0 auto 8px}.output-placeholder>span .ui-icon{width:22px;height:22px}.output-tip>span{display:grid;place-items:center;width:14px;height:14px}.output-tip>span .ui-icon{width:13px;height:13px}
.output-loading{font:20px/1 "DM Mono",monospace;color:#bed1c4;animation:iconSpin 1s linear infinite}@keyframes iconSpin{to{transform:rotate(360deg)}}
.membership-summary-mark .ui-icon,.membership-status-icon .ui-icon{width:21px;height:21px}.membership-summary-mark,.membership-status-icon{display:grid;place-items:center}

/* 学习空间的课程目录作为侧栏子菜单，避免与功能导航并列。 */
.learn-nav-group{display:grid;gap:4px}.course-submenu{margin:0 0 13px 15px;padding:7px 0 3px;border-left:1px solid #d8e4dc}.course-submenu .course-label{padding-left:12px}.course-submenu .course-list{max-height:410px}
.course-menu-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:3px 11px 6px 12px;color:#95a39b;font-size:10px;font-weight:800;letter-spacing:.08em;text-align:left}.course-menu-toggle b{margin-left:5px;color:#aab4af;font-size:9px;font-weight:500;letter-spacing:0}.course-menu-toggle .ui-icon{width:14px;height:14px;transition:transform .18s ease}.course-submenu .course-list{display:none}.course-menu-open .course-submenu .course-list{display:block}.course-menu-open .course-menu-toggle .ui-icon{transform:rotate(180deg)}.course-menu-toggle:hover{color:#5d8870}

/* 日常学习时优先保证代码编辑宽度；结果区保留足够的阅读空间。 */
@media(min-width:761px){.code-lab{grid-template-columns:minmax(0,1.55fr) minmax(245px,.45fr)}}

/* ---- 笔记关联章节 ---- */
.note-field-label{display:block}
.note-field-label span{display:block;margin-bottom:6px;color:#687970;font-size:10px;font-weight:700}
#noteLesson{width:100%;padding:10px 12px;border:1px solid #dfe8e1;border-radius:8px;outline:0;background:#fff;color:#35473e;font-size:11px}
#noteLesson:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}
.note-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}
.note-filter{padding:6px 12px;border:1px solid #dfe8e1;border-radius:20px;color:#7d8d83;font-size:10px;font-weight:700}
.note-filter:hover{border-color:#bfd9c8;color:#3e7c58}
.note-filter.active{background:#3e7c58;border-color:#3e7c58;color:#fff}

/* ---- AI 助教回答美化 ---- */
.ai-message p{font-size:11px;line-height:1.85}
.ai-message p code{padding:1px 5px;border-radius:4px;background:#e4efe8;color:#3f7a5a;font:10px "DM Mono",monospace}
.ai-message p strong{color:#2f5341}
.ai-message p em{color:#5d8a6f;font-style:normal;font-weight:700}
.ai-message .ai-heading{font-weight:800;color:#2f5341;margin:8px 0 4px}
.ai-message .ai-h1{font-size:12px}
.ai-message .ai-h2{font-size:11.5px}
.ai-message .ai-h3{font-size:11px}
.ai-message .ai-list{margin:6px 0;padding-left:18px}
.ai-message .ai-list li{margin:3px 0}
.ai-message-content{min-width:0;padding:9px 11px;border-radius:10px;background:#f0f7f2;color:#64736c;font-size:11px;line-height:1.65}.ai-message-content>p{margin:0}.ai-message-content>p+p,.ai-message-content>.ai-heading,.ai-message-content>.ai-list,.ai-message-content>.ai-code{margin-top:8px}.ai-message.user .ai-message-content{background:#e9f4ff;color:#3f5870}.ai-message .ai-code{display:block;margin:8px 0 0;padding:10px 12px;border-radius:8px;background:#202b2a;color:#dce9e0;font:10px/1.7 "DM Mono",monospace;white-space:pre-wrap;overflow:auto}

/* ---- 思考门：示例代码先隐藏，分步提示 ---- */
.lesson-example-gate{background:radial-gradient(circle at 50% -20%,#365f4c,#1d2725 58%);padding:29px 22px;text-align:center}
.example-gate-mark{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 13px;border:1px solid #4d7b66;border-radius:14px;background:#2f6b4f;color:#d0f2dc;font-size:21px;box-shadow:0 8px 20px rgba(0,0,0,.16)}
.lesson-example-gate p{color:#c5d4cc;font-size:11px;line-height:1.85;margin:0 auto 18px;max-width:480px}
.example-gate-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.gate-btn{padding:10px 18px;border-radius:9px;border:1px solid #3f554b;color:#c3d0ca;font-size:11px;font-weight:800;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.gate-btn:hover{background:#33433e}
.gate-btn-primary{background:#2f6b4f;border-color:#2f6b4f;color:#eaf8ef}
.gate-btn-primary:hover{background:#3a8261;color:#fff}
.example-gate-hints{margin-top:16px;display:grid;gap:8px;text-align:left}
.example-gate-hint{display:flex;gap:10px;padding:10px 12px;border:1px solid #2e3d37;border-radius:8px;background:#1a2321}
.example-gate-hint b{flex:none;color:#f1cc8a;font:10px "DM Mono",monospace}
.example-gate-hint span{color:#c7d4cd;font-size:10px;line-height:1.7}
.challenge-toggle{width:100%;margin-top:13px;padding:9px 12px;border:1px dashed #e6d5b8;border-radius:8px;color:#b0885a;font-size:10px;font-weight:800}
.challenge-toggle:hover{background:#fdf6e8;color:#8a6a3a}

/* ---- 学习计划 ---- */
.plan-view{padding:50px 10px;max-width:760px}
.plan-view h1{font-size:29px;margin:15px 0 9px}
.plan-view>p{font-size:13px;color:#7d8983;margin-bottom:25px}
.plan-dashboard{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px 24px;margin-bottom:20px;box-shadow:var(--shadow)}
.plan-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.plan-card{background:#f4f8f4;border:1px solid #e4ece6;border-radius:10px;padding:14px 12px;text-align:center}
.plan-card b{display:block;color:#4a9b6c;font-size:22px;letter-spacing:-.5px}
.plan-card span{font-size:10px;color:#8a9690}
.plan-progress-row{display:flex;justify-content:space-between;margin:13px 0 6px;color:#74857b;font-size:10px}
.plan-progress-row b{color:#4c9c6c}
.plan-progress{height:8px;border-radius:8px;background:#e6f0e8;overflow:hidden}
.plan-progress span{display:block;height:100%;background:#73c59a;border-radius:8px}
.plan-status{margin:16px 0 0;padding:10px 12px;border-radius:8px;background:#eef7f1;color:#3e7c58;font-size:11px;line-height:1.7}
.plan-meta{margin:10px 0 0;color:#9aa69f;font-size:10px}
.plan-setup{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px 24px;box-shadow:var(--shadow)}
.plan-setup-head{font-size:13px;font-weight:800;margin-bottom:16px}
.plan-form{display:grid;gap:15px;max-width:480px}
.plan-form label>span{display:block;margin-bottom:6px;color:#687970;font-size:10px;font-weight:700}
.plan-form input[type="number"],.plan-form input[type="date"]{width:100%;padding:10px 12px;border:1px solid #dfe8e1;border-radius:8px;outline:0;color:#35473e;font-size:11px;box-sizing:border-box}
.plan-form input:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}
.plan-days>span{display:block;margin-bottom:8px;color:#687970;font-size:10px;font-weight:700}
.plan-day-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.plan-day{position:relative;text-align:center}
.plan-day input{position:absolute;opacity:0;inset:0;cursor:pointer;margin:0}
.plan-day span{display:block;padding:9px 4px;border:1px solid #dfe8e1;border-radius:8px;color:#7d8d83;font-size:10px;font-weight:700}
.plan-day.active span{background:#3e7c58;border-color:#3e7c58;color:#fff}
.plan-form-actions{display:flex;gap:10px;margin-top:4px}
.plan-clear{margin-left:auto}
.plan-hint{min-height:16px;margin:0;color:#d57454;font-size:10px}
.plan-chapter-range>span{display:block;margin-bottom:8px;color:#687970;font-size:10px;font-weight:700}.plan-chapter-range>div{display:flex;align-items:center;gap:8px}.plan-chapter-range label{flex:1}.plan-chapter-range select{width:100%;padding:10px 9px;border:1px solid #dfe8e1;border-radius:8px;outline:0;background:#fff;color:#35473e;font-size:10px}.plan-chapter-range select:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}.plan-chapter-range i{font-style:normal;color:#9aa69f;font-size:10px}.plan-chapter-range small{display:block;margin-top:7px;color:#9aa69f;font-size:9px}
.plan-empty{padding:42px 18px;text-align:center;color:#9aa69e;font-size:11px;background:#fff;border:1px dashed #d8e3dc;border-radius:12px}
@media(max-width:760px){.plan-cards{grid-template-columns:repeat(2,1fr)}.plan-day-grid{grid-template-columns:repeat(4,1fr)}}

/* ---- 会员兑换码 ---- */
.cdk-box{margin-top:20px;padding:18px 20px;border:1px solid #e7dcc8;border-radius:14px;background:linear-gradient(150deg,#fffaf1,#fff)}
.cdk-box-head{display:flex;align-items:center;gap:11px;margin-bottom:13px}
.cdk-box-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f7e4cb;color:#c08a4a;font-size:15px}
.cdk-box-head strong{display:block;font-size:12px;color:#5f4a2e}
.cdk-box-head div>span{display:block;margin-top:3px;color:#a08c6d;font-size:9px}
.cdk-row{display:flex;gap:9px}
.cdk-row input{flex:1;min-width:0;padding:11px 13px;border:1px solid #e4d7bd;border-radius:9px;outline:0;color:#5f4a2e;font-size:12px;background:#fff}
.cdk-row input:focus{border-color:#d9b878;box-shadow:0 0 0 3px #fbf0dd}
.cdk-row button{padding:11px 22px;border-radius:9px;background:#c08a4a;color:#fff;font-size:12px;font-weight:800}
.cdk-row button:hover{background:#cf9a58}
.cdk-status{display:block;min-height:16px;margin-top:9px;color:#d57454;font-size:10px}
.permanent-banner{margin:6px 0;padding:26px 18px;text-align:center;color:#b0763c;background:#fffaf1;border:1px dashed #ecd9b2;border-radius:12px;font-size:13px;font-weight:800}
.cdk-modal-overlay{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:18px;background:rgba(24,36,32,.35);backdrop-filter:blur(5px)}
.cdk-modal{width:min(340px,100%);text-align:center;background:#fff;border:1px solid #e7dcc8;border-radius:18px;padding:30px 26px;box-shadow:0 26px 80px rgba(25,45,35,.22)}
.cdk-modal-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 14px;border-radius:50%;background:#fff3e0;font-size:30px}
.cdk-modal h3{margin:0 0 9px;font-size:19px;letter-spacing:-.5px;color:#5f4a2e}
.cdk-modal p{margin:0 0 20px;color:#a08c6d;font-size:13px;line-height:1.8}
.cdk-modal button{width:100%;padding:11px;border-radius:9px;background:#c08a4a;color:#fff;font-size:12px;font-weight:800}
.cdk-modal button:hover{background:#cf9a58}

/* ---- AI 助教 浮窗 / 全屏 ---- */
.ai-view-btn{padding:4px 8px;border:1px solid #d5e4da;border-radius:6px;color:#5c9b75;font-size:9px;font-weight:800;margin-left:6px}
.ai-view-btn:hover{background:#e3f5e9;color:#2f7a4e}
.ai-fab{position:fixed;right:24px;bottom:24px;z-index:40;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#273b34;color:#b7ebc9;font-size:22px;box-shadow:0 14px 34px rgba(31,41,40,.28)}
.ai-fab:hover{background:#345048;color:#fff}
.ai-float{position:fixed;right:26px;bottom:92px;z-index:45;width:min(370px,calc(100vw - 28px));max-height:560px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #dbe7de;border-radius:16px;background:#fbfdfb;box-shadow:0 26px 80px rgba(25,45,35,.24)}
.ai-float-head{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;background:#24332f;color:#d9f2e5;font-size:12px;font-weight:800;cursor:grab;user-select:none}
.ai-view-close{color:#9fb0a7;font-size:18px;line-height:1;padding:2px 6px}
.ai-view-close:hover{color:#fff}
.ai-float-messages{flex:1;min-height:220px;max-height:360px;overflow:auto;padding:14px 15px}
.ai-float .ai-input{margin:0 12px 12px}
.ai-fullscreen{position:fixed;inset:0;z-index:55;display:flex;flex-direction:column;background:#f6faf7}
.ai-full-head{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:#24332f;color:#d9f2e5;font-size:14px;font-weight:800}
.ai-full-messages{flex:1;overflow:auto;padding:26px 28px;max-width:900px;width:100%;margin:0 auto;box-sizing:border-box}
.ai-full-input{max-width:900px;width:100%;margin:0 auto;padding:0 28px 26px;box-sizing:border-box}

/* ---- 好友中心 ---- */
.fixed-login{position:static;z-index:auto;padding:8px 13px;border-radius:18px;background:#273b34;color:#b7ebc9;font-size:10px;font-weight:800;line-height:1;white-space:nowrap;box-shadow:0 6px 16px rgba(31,41,40,.16);transition:background .18s ease,transform .18s ease,box-shadow .18s ease}
.fixed-login:hover{background:#345048;color:#fff}
@media(max-width:760px){.fixed-login{padding:7px 9px;font-size:9px}.fixed-login:hover{transform:none}}
.friends-view{padding-top:43px}
.friends-view h1{margin:7px 0 8px;font-size:30px;letter-spacing:-1px}
.friends-view>p{margin:0;color:#84918a;font-size:12px;line-height:1.7}
.friends-tabs{display:flex;gap:7px;margin-top:20px}.friends-tab{min-width:74px;padding:8px 14px;border:1px solid #d9e7dd;border-radius:999px;background:#fff;color:#789084;font-size:11px;font-weight:800}.friends-tab:hover{border-color:#9bc9aa;color:#39724e}.friends-tab.active{border-color:#4f9367;background:#e4f4e9;color:#286c43}
.friends-layout{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,1fr);gap:18px;margin-top:26px;align-items:start}
.friends-side{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:var(--shadow)}
.friends-add{display:flex;gap:8px;margin-bottom:14px}
.friends-add input{flex:1;min-width:0;padding:10px 12px;border:1px solid #dfe8e1;border-radius:8px;outline:0;color:#35473e;font-size:11px}
.friends-add input:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}
.friends-add button{padding:10px 14px;border-radius:8px;background:#273b34;color:#fff;font-size:11px;font-weight:800}
.friends-add button:hover{background:#345048}
.friends-requests-head,.friends-list-head{font-size:10px;font-weight:800;letter-spacing:.06em;color:#9aa69f;margin:14px 0 9px}
.nav-count.request-dot{width:7px;height:7px;min-width:7px;padding:0;border-radius:50%;background:#e86f4a;box-shadow:0 0 0 3px #fde9e2;font-size:0}
.friends-list-head span{color:#4c9c6c}
.friends-requests{display:grid;gap:8px;margin-bottom:8px}
.friend-request{display:flex;align-items:center;gap:10px;padding:10px 11px;border:1px solid #f0e2ce;border-radius:10px;background:#fffaf1}
.friend-avatar{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:#f1ba91;color:#604333;font-size:13px;font-weight:800}.friend-avatar.has-avatar{color:transparent;background-position:center;background-size:cover;background-repeat:no-repeat}
.friend-request-info{flex:1;min-width:0}
.friend-request-info strong{display:block;font-size:11px;color:#4d5f55}
.friend-request-info span{display:block;margin-top:3px;color:#9aa69f;font-size:9px}
.friend-request-actions{display:flex;gap:6px}
.friend-request-actions button{padding:6px 10px;border-radius:6px;font-size:10px;font-weight:800}
.friend-accept{background:#e3f5e9;color:#2f7a4e}
.friend-decline{background:#fdebe4;color:#cf6542}
.friends-list{display:grid;gap:8px;max-height:380px;overflow:auto}
.friend-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px 11px;border:1px solid #e1e9e3;border-radius:10px;background:#fff;text-align:left}
.friend-item:hover{border-color:#bfd9c8;background:#f7fbf8}
.friend-item.active{border-color:#6fb38e;background:#e7f4ec}
.friend-item-info{flex:1;min-width:0}
.friend-item-info strong{display:block;font-size:11px;color:#4d5f55}
.friend-item-info small{display:block;margin-top:3px;color:#9aa69f;font:9px "DM Mono",monospace}
.friend-unread{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e86f4a;color:#fff;font-size:10px;font-weight:800}
.friends-chat{display:flex;flex-direction:column;min-height:480px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}
.friends-chat-empty{display:grid;place-items:center;flex:1;color:#9aa69f;font-size:12px;padding:40px}
.friends-chat-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line);background:#f8fbf8}
.friend-chat-name{font-size:13px;font-weight:800;color:#35473e}
.friend-chat-uid{color:#9aa69f;font:9px "DM Mono",monospace}
.friend-chat-remove{margin-left:auto;padding:6px 10px;border:1px solid #f0d3c8;border-radius:6px;color:#d37454;font-size:10px;font-weight:800}
.friends-messages{flex:1;overflow:auto;padding:18px 18px 10px;display:flex;flex-direction:column;gap:10px;max-height:420px}
.friend-msg{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.friend-msg.mine{align-items:flex-end}
.friend-msg-bubble{max-width:78%;padding:9px 12px;border-radius:11px;background:#f0f5f1;color:#4f6257;font-size:11px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}
.friend-msg.mine .friend-msg-bubble{background:#e3f5e9;color:#2f5341}
.friend-msg time{color:#b0bab4;font-size:9px}
.friends-input{display:flex;gap:8px;padding:13px 15px;border-top:1px solid var(--line);background:#f8fbf8}
.friends-input input{flex:1;min-width:0;padding:11px 13px;border:1px solid #dfe8e1;border-radius:9px;outline:0;color:#35473e;font-size:11px}
.friends-input input:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}
.friends-input button{padding:11px 18px;border-radius:9px;background:#273b34;color:#fff;font-size:11px;font-weight:800}
.friends-input button:hover{background:#345048}
.friends-empty{padding:26px 16px;text-align:center;color:#9aa69f;font-size:11px;line-height:1.8}
.group-create-button{display:block;width:100%;padding:11px 13px;border:1px solid #4a8c61;border-radius:9px;background:#3e7d56;color:#fff;font-size:11px;font-weight:800;text-align:left}.group-create-button:hover{background:#326e49}.group-member-count{margin-left:3px;color:#90a097;font:9px "DM Mono",monospace}.group-role{display:inline-flex;margin-left:6px;padding:2px 5px;border-radius:4px;background:#edf5ef;color:#4b8260;font-size:8px;font-style:normal;font-weight:800}.group-chat-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.group-invite-button{padding:7px 10px;border:1px solid #bddbc6;border-radius:7px;background:#fff;color:#39724e;font-size:10px;font-weight:800}.group-invite-button:hover{border-color:#71ae84;background:#eef8f1}.group-members-summary{max-width:180px;overflow:hidden;color:#87988e;font-size:9px;white-space:nowrap;text-overflow:ellipsis}.group-msg{display:flex;align-items:flex-start;gap:8px}.group-msg.mine{flex-direction:row-reverse}.group-msg .friend-avatar{width:27px;height:27px;font-size:10px}.group-msg-content{display:flex;flex-direction:column;gap:3px;min-width:0}.group-msg.mine .group-msg-content{align-items:flex-end}.group-msg-sender{color:#799084;font-size:9px;font-weight:800}.group-msg.mine .group-msg-sender{color:#5a916b}.group-msg .friend-msg-bubble{max-width:min(500px,72vw)}
.group-invite-dialog{position:fixed;z-index:95;inset:0;display:grid;place-items:center;padding:20px;background:rgba(20,38,29,.42);backdrop-filter:blur(4px)}.group-invite-panel{width:min(470px,100%);max-height:min(620px,calc(100vh - 40px));overflow:auto;padding:20px;border:1px solid #cfe2d5;border-radius:16px;background:#fbfdfb;box-shadow:0 24px 68px rgba(24,49,34,.28)}.group-invite-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.group-invite-head span{color:#6ca17d;font-size:9px;font-weight:800;letter-spacing:.11em}.group-invite-head h2{margin:5px 0 0;color:#315842;font-size:17px}.group-invite-head button{display:grid;place-items:center;width:28px;height:28px;border:1px solid #d8e7dc;border-radius:7px;color:#6d8879;font-size:19px}.group-invite-head button:hover{border-color:#8bbd99;background:#e9f6ec;color:#336c49}.group-invite-panel>p{margin:13px 0;color:#74877b;font-size:11px;line-height:1.75}.group-invite-list{display:grid;gap:8px}.group-invite-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #dfeae2;border-radius:10px;background:#fff}.group-invite-item .friend-avatar{width:34px;height:34px}.group-invite-item-info{min-width:0;flex:1}.group-invite-item-info strong{display:block;color:#445a4d;font-size:11px}.group-invite-item-info small{display:block;margin-top:3px;color:#93a199;font:9px "DM Mono",monospace}.group-invite-item button{padding:7px 10px;border:1px solid #b9d8c3;border-radius:7px;background:#edf8f0;color:#3d7955;font-size:10px;font-weight:800}.group-invite-item button:hover:not(:disabled){border-color:#70ad83;background:#dff3e5}.group-invite-item button:disabled{opacity:.62;cursor:wait}.group-invite-empty{padding:20px 12px;border:1px dashed #d5e4d9;border-radius:9px;color:#8b9b91;font-size:11px;line-height:1.75;text-align:center}
.group-create-dialog{position:fixed;z-index:95;inset:0;display:grid;place-items:center;padding:20px;background:rgba(20,38,29,.42);backdrop-filter:blur(4px)}.group-create-panel{width:min(460px,100%);padding:24px;border:1px solid #cfe2d5;border-radius:16px;background:#fbfdfb;box-shadow:0 24px 68px rgba(24,49,34,.28)}.group-create-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.group-create-head span{color:#6ca17d;font-size:9px;font-weight:800;letter-spacing:.11em}.group-create-head h2{margin:5px 0 0;color:#315842;font-size:18px}.group-create-head button{display:grid;place-items:center;width:30px;height:30px;border:1px solid #d8e7dc;border-radius:7px;color:#6d8879;font-size:20px}.group-create-head button:hover{border-color:#8bbd99;background:#e9f6ec;color:#336c49}.group-create-panel>p{margin:15px 0 18px;color:#74877b;font-size:11px;line-height:1.75}.group-create-field{display:grid;gap:7px}.group-create-field>span{color:#4d6657;font-size:11px;font-weight:800}.group-create-field input{width:100%;padding:12px 13px;border:1px solid #d6e5da;border-radius:9px;background:#fff;color:#35473e;font-size:12px;outline:0}.group-create-field input:focus{border-color:#85c6a0;box-shadow:0 0 0 3px #e5f4e9}.group-create-field small{color:#95a49b;font-size:9px}.group-create-error{margin:12px 0 0!important;padding:9px 10px;border:1px solid #f0cdc0;border-radius:8px;background:#fff6f2;color:#b75b45;font-size:10px!important}.group-create-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.group-create-actions .ghost-button,.group-create-confirm{min-height:36px;padding:0 13px;border-radius:8px;font-size:10px;font-weight:800}.group-create-confirm{background:#3e7d56;color:#fff}.group-create-confirm:hover{background:#326e49}.group-create-confirm:disabled{opacity:.62;cursor:wait}@media(max-width:520px){.group-create-dialog{padding:16px}.group-create-panel{padding:20px}.group-create-actions button{flex:1}}
@media(max-width:900px){.friends-layout{grid-template-columns:1fr}}

/* ---- 本节练习：页面底部 ---- */
.lesson-practice-section{margin-top:54px}
.lesson-practice-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.lesson-practice-grid .lesson-challenge{min-height:0}
.lesson-practice-grid .lesson-exercises{margin:0;padding:22px 22px 12px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.lesson-practice-grid .lesson-exercises .exercise-head{margin-bottom:12px}

/* ---- 动手写一写：加大面积 ---- */
.code-editor,.output-body{height:340px}

.brand{color:var(--ink);text-decoration:none;border-radius:10px;transition:background .18s ease,transform .18s ease}.brand:hover{background:#e4f0e7;transform:translateY(-1px)}.brand:focus-visible{outline:2px solid #70c69d;outline-offset:2px}

/* ---- 参考代码可读性 ---- */
.lesson-example{border-color:#385047;box-shadow:0 18px 38px rgba(22,37,31,.2)}
.lesson-example-head{min-height:50px;padding:14px 18px;background:linear-gradient(100deg,#2a4038,#1d2926)}
.lesson-example-title{gap:10px}.lesson-example-title-icon{width:27px;height:23px;border-radius:6px;background:#3b7359;color:#d8f4e2;font-size:10px}.lesson-example-title>span:nth-child(2){font-size:11px;letter-spacing:.02em}.lesson-example-title small{padding:4px 8px;color:#a8c2b5}
.lesson-example-code{padding:12px 0 14px;background:linear-gradient(90deg,#1c2824 0,#202e2a 28%,#202e2a 100%);font:13px/2.12 "DM Mono","SFMono-Regular",Consolas,monospace;letter-spacing:.01em;max-height:460px}
.lesson-example-code .ex-line{min-height:28px;line-height:28px}.lesson-example-code .ex-line:nth-child(even){background:rgba(255,255,255,.018)}.lesson-example-code .ex-line-num{width:50px;padding-right:15px;color:#7e9389;background:rgba(22,34,30,.58);border-right-color:#375046;font:10px/28px "DM Mono",monospace}.lesson-example-code .ex-line-code{padding:0 25px 0 18px;color:#e6f0e9}
.lesson-example-code .ex-line:hover{background:#2b4038}.lesson-example-code .ex-line:hover .ex-line-num{color:#c1e1ce;background:#243b32}.lesson-example-code .ex-line.is-current{background:linear-gradient(90deg,#315c49,#2a493c);box-shadow:inset 4px 0 0 #98dfb5}.lesson-example-code .ex-line.is-current .ex-line-num{color:#e3f8ea;background:#284b3b}.lesson-example-code .syntax-purple{color:#d9aaf3;font-weight:600}.lesson-example-code .syntax-blue{color:#94d7ef}.lesson-example-code .syntax-yellow{color:#f4d48e}.lesson-example-code .syntax-green{color:#b6e5ad}.lesson-example-code .syntax-comment{color:#91a69b;font-style:italic}
.lesson-example-notes{padding:16px 18px;background:linear-gradient(135deg,#17231f,#1a2924)}.guide-body{min-height:68px;padding:14px 15px;border-color:#3d564b;background:#101a17;color:#d2e1d8;font-size:12px}.guide-step-note{font-size:12px;line-height:1.75}.guide-btn{padding:11px 13px}
@media(max-width:760px){.lesson-example-head{align-items:flex-start;flex-wrap:wrap;padding:12px 14px}.lesson-example-actions{margin-left:auto}.lesson-example-code{font-size:11px;line-height:2.05}.lesson-example-code .ex-line{min-height:25px;line-height:25px}.lesson-example-code .ex-line-num{width:42px;padding-right:11px;font-size:9px;line-height:25px}.lesson-example-code .ex-line-code{padding-left:13px;padding-right:18px}.lesson-example-notes{padding:13px 14px}}
.review-note{margin:0 0 16px;padding:12px 15px;border:1px dashed #e6cfc0;border-radius:10px;background:#fff8f2;color:#b07a54;font-size:11px;line-height:1.7}
.lesson-link.is-locked{opacity:.62;cursor:not-allowed}
.fixed-login{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 12px;border:1px solid #b9d9c4;border-radius:8px;background:#eff8f2;color:#337252;font-size:10px;font-weight:800;white-space:nowrap;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}.fixed-login:hover{border-color:#77b68d;background:#dff2e6;color:#245b40;transform:translateY(-1px)}.fixed-login:focus-visible{outline:2px solid #70c69d;outline-offset:2px}@media(max-width:760px){.fixed-login{min-height:29px;padding:0 9px;font-size:9px}}
.lesson-link.is-locked:hover{background:transparent;color:inherit}
.review-filter.is-locked{opacity:.55;cursor:not-allowed;border-style:dashed}
.review-filter.is-locked:hover{border-color:#dbe7de;color:#77887e}
.toast{top:18px;right:auto;bottom:auto;left:50%;z-index:70;max-width:min(440px,calc(100vw - 32px));text-align:center;transform:translate(-50%,-12px)}.toast.show{transform:translate(-50%,0)}@media(max-width:760px){.toast{top:12px;max-width:calc(100vw - 24px)}}

/* ---- 好友操作菜单 ---- */
.friend-item-info strong{display:flex;align-items:center;gap:5px}.friend-muted-mark{font-style:normal;padding:2px 4px;border-radius:4px;background:#edf2ee;color:#8a9990;font-size:8px;font-weight:700}.friend-chat-head{position:relative;display:flex;align-items:center;gap:9px}.friend-chat-identity{display:flex;align-items:baseline;gap:8px;min-width:0;flex:1}.friend-chat-name{font-weight:800}.friend-chat-uid{color:#93a199;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-chat-menu-button{width:30px;height:30px;border-radius:7px;color:#84948a;font-size:14px;font-weight:800;letter-spacing:2px}.friend-chat-menu-button:hover,.friend-chat-menu-button[aria-expanded="true"]{background:#edf5ef;color:#43825b}.friend-chat-menu{position:absolute;z-index:8;top:42px;right:0;min-width:144px;padding:5px;border:1px solid #dce8df;border-radius:10px;background:#fff;box-shadow:0 14px 30px rgba(31,65,43,.15)}.friend-chat-menu button{display:block;width:100%;padding:9px 10px;border-radius:6px;color:#587266;text-align:left;font-size:10px}.friend-chat-menu button:hover{background:#eef8f1;color:#34724c}.friend-chat-menu button.danger{color:#c16f56}.friend-chat-menu button.danger:hover{background:#fff2ed;color:#b4563b}.friend-chat-menu.hidden{display:none!important}

/* ---- 独立课程：逐页学习 ---- */
.lesson-slide-deck{max-width:1040px;min-height:calc(100vh - 154px);margin:0 auto;padding:28px 0 24px;display:flex;flex-direction:column}.lesson-slide-topbar{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.lesson-slide-topbar .section-kicker{color:#5b9670}.lesson-slide-topbar p{margin:5px 0 0;color:#74867b;font-size:11px}.lesson-slide-progress{display:flex;align-items:center;gap:10px;color:#537661;font:10px "DM Mono",monospace;white-space:nowrap}.lesson-slide-progress i{display:block;width:120px;height:5px;border-radius:6px;background:#dceae0;overflow:hidden}.lesson-slide-progress b{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#68b886,#9cd3ae);transition:width .25s ease}.lesson-slide-stage{position:relative;display:flex;flex:1;min-height:550px;overflow:hidden;border:1px solid #d5e5da;border-radius:24px;background:radial-gradient(circle at 89% 9%,#e3f4e8 0,rgba(227,244,232,0) 31%),linear-gradient(140deg,#f9fcf9 0%,#fff 64%,#f3f9f4 100%);box-shadow:0 22px 55px rgba(31,65,43,.10)}.lesson-slide-stage::after{content:"";position:absolute;right:-85px;bottom:-120px;width:260px;height:260px;border:1px solid #cfe8d6;border-radius:50%;box-shadow:0 0 0 28px rgba(224,243,230,.46),0 0 0 56px rgba(231,246,235,.52);pointer-events:none}.lesson-slide-content{position:relative;z-index:1;width:min(790px,100%);margin:auto;padding:52px 68px}.lesson-slide-label{display:inline-flex;padding:6px 9px;border:1px solid #c8e2cf;border-radius:999px;background:#eef8f0;color:#4d8b63;font-size:9px;font-weight:800;letter-spacing:.09em}.lesson-slide-content h1{max-width:760px;margin:17px 0 25px;color:#294d3a;font-size:clamp(28px,4vw,47px);letter-spacing:-.055em;line-height:1.15}.lesson-slide-body{color:#53695d;font-size:14px;line-height:1.95}.lesson-slide-stage.is-entering .lesson-slide-content{animation:lessonSlideIn .32s ease both}@keyframes lessonSlideIn{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}.slide-cover>span{color:#59876a;font-size:12px;font-weight:800}.slide-cover>p{max-width:610px;margin:14px 0 28px;font-size:16px;line-height:1.85}.slide-point-list{display:grid;gap:9px;max-width:570px}.slide-point-list div{display:flex;align-items:center;gap:13px;padding:12px 14px;border:1px solid #dbeae0;border-radius:10px;background:rgba(255,255,255,.74)}.slide-point-list b{color:#62a67b;font:11px "DM Mono",monospace}.slide-point-list span{color:#486351;font-size:13px;font-weight:700}.slide-cover footer{display:flex;gap:20px;margin-top:27px;color:#82958a;font-size:11px}.slide-notes{max-width:720px;font-size:15px;line-height:2}.slide-notes p{margin:0 0 18px}.slide-notes ul{padding-left:20px}.lesson-slide-deck .teaching-map{max-width:760px;margin:0}.lesson-slide-deck .example-analysis{max-width:760px;margin:0}.slide-code-panel{max-width:780px;overflow:hidden;border:1px solid #2d463b;border-radius:14px;background:#17251f;box-shadow:0 18px 35px rgba(24,49,34,.2)}.slide-code-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;border-bottom:1px solid #324b40;background:#22362e;color:#cbe7d3;font-size:11px;font-weight:800}.slide-code-panel-head small{color:#90a89b;font:9px "DM Mono",monospace}.slide-code-panel pre{max-height:310px;margin:0;padding:10px 0;overflow:auto;color:#e3f0e7;font:12px/2 "DM Mono","Cascadia Code",Consolas,monospace;white-space:pre}.slide-code-panel .ex-line{display:flex;min-height:25px}.slide-code-panel .ex-line:nth-child(even){background:rgba(255,255,255,.018)}.slide-code-panel .ex-line-num{width:48px;flex:none;padding-right:14px;border-right:1px solid #32483e;color:#7f988b;text-align:right;font-size:9px}.slide-code-panel .ex-line-code{padding-left:17px}.slide-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.slide-action{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border:1px solid #bbd9c4;border-radius:8px;background:#fff;color:#3f7452;font-size:11px;font-weight:800;text-decoration:none;cursor:pointer;transition:transform .18s ease,background .18s ease}.slide-action:hover{background:#eff8f1;transform:translateY(-1px)}.slide-action-primary{border-color:#3f8258;background:#3f8258;color:#fff}.slide-action-primary:hover{background:#326e49;color:#fff}.slide-practice{max-width:700px;padding:22px 24px;border:1px solid #d6e8da;border-radius:14px;background:#f5fbf6}.slide-practice p{margin:0;color:#425f4d;font-size:15px;line-height:1.9}.slide-practice details{margin-top:17px}.slide-practice summary{color:#49805c;font-size:11px;font-weight:800;cursor:pointer}.slide-practice pre{margin:10px 0 0;padding:12px;border-radius:8px;background:#183027;color:#d6eddd;font:11px/1.7 "DM Mono",monospace;white-space:pre-wrap}.lesson-slide-empty{padding:30px;border:1px dashed #c9dfcf;border-radius:12px;color:#759082}.lesson-slide-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:19px}.slide-nav-button{min-width:104px;padding:10px 13px;border:1px solid #c9ddce;border-radius:8px;background:#fff;color:#527660;font-size:11px;font-weight:800}.slide-nav-button:hover:not(:disabled){border-color:#79b98c;background:#eef8f1}.slide-nav-button:disabled{opacity:.42;cursor:not-allowed}.slide-nav-button-primary{border-color:#3e8158;background:#3e8158;color:#fff}.slide-nav-button-primary:hover:not(:disabled){background:#326d49;color:#fff}.lesson-slide-dots{display:flex;justify-content:center;gap:6px}.lesson-slide-dots button{width:7px;height:7px;padding:0;border-radius:50%;background:#cbded0;transition:width .18s ease,background .18s ease}.lesson-slide-dots button.active{width:21px;border-radius:8px;background:#5cad77}.lesson-slide-hint{margin:12px 0 0;color:#91a398;font-size:10px;text-align:center}
.standalone-lesson-page #learnView>.hero-row,.standalone-lesson-page #learnView>.lesson-grid,.standalone-lesson-page #learnView>.lesson-content-section,.standalone-lesson-page #learnView>.lesson-practice-section{display:none}.standalone-lesson-page .main-content{min-height:100vh}.standalone-lesson-page .content-wrap{max-width:none;padding-top:12px}.standalone-lesson-page .practice-float-trigger{right:28px;bottom:22px}.standalone-lesson-page .ai-fab{bottom:24px}
.lesson-slide-topbar-actions,.lesson-view-actions{display:flex;align-items:center;gap:9px}.lesson-view-button{display:inline-flex;align-items:center;justify-content:center;min-height:31px;padding:0 10px;border:1px solid #c7ddce;border-radius:7px;background:#fff;color:#4d775b;font-size:10px;font-weight:800;white-space:nowrap;transition:background .18s ease,border-color .18s ease,color .18s ease}.lesson-view-button:hover,.lesson-view-button.is-active{border-color:#75b98b;background:#eaf7ed;color:#2f6d46}.lesson-view-button.relearn-button{border-color:#ead5c8;color:#b56f4e}.lesson-view-button.relearn-button:hover{border-color:#dba98e;background:#fff6f0;color:#a85b39}.lesson-focus-mode{overflow:hidden}.lesson-focus-mode .topbar,.lesson-focus-mode .sidebar,.lesson-focus-mode .practice-float-trigger,.lesson-focus-mode .ai-fab,.lesson-focus-mode .ai-float{display:none}.lesson-focus-mode .main-content,.lesson-focus-mode .content-wrap{padding:0;max-width:none}.lesson-focus-mode .lesson-slide-deck{position:fixed;z-index:80;inset:0;max-width:none;min-height:100vh;margin:0;padding:24px 36px;background:#f8fcf8}.lesson-focus-mode .lesson-slide-stage{min-height:calc(100vh - 166px)}.lesson-slide-deck:fullscreen{width:100%;height:100%;max-width:none;min-height:100vh;margin:0;padding:24px 36px;background:#f8fcf8}.lesson-slide-deck:fullscreen .lesson-slide-stage{min-height:calc(100vh - 166px)}
@media(max-width:760px){.lesson-slide-topbar-actions{width:100%;align-items:flex-start;flex-direction:column}.lesson-view-actions{width:100%}.lesson-view-button{flex:1}.lesson-focus-mode .lesson-slide-deck,.lesson-slide-deck:fullscreen{padding:16px}.lesson-focus-mode .lesson-slide-stage,.lesson-slide-deck:fullscreen .lesson-slide-stage{min-height:calc(100vh - 202px)}}
@media(max-width:760px){.lesson-slide-deck{min-height:calc(100vh - 105px);padding:17px 0}.lesson-slide-topbar{align-items:flex-start;flex-direction:column;gap:10px}.lesson-slide-stage{min-height:calc(100vh - 242px);border-radius:17px}.lesson-slide-content{padding:32px 23px}.lesson-slide-content h1{margin:14px 0 20px;font-size:30px}.lesson-slide-body,.slide-notes,.slide-practice p{font-size:13px;line-height:1.85}.slide-cover>p{font-size:14px}.lesson-slide-deck .teaching-map{padding:15px}.lesson-slide-deck .example-analysis-grid{grid-template-columns:1fr}.slide-code-panel pre{max-height:280px;font-size:10px}.lesson-slide-footer{gap:8px}.slide-nav-button{min-width:84px;padding:9px 8px;font-size:10px}.lesson-slide-dots{gap:4px}.lesson-slide-hint{display:none}.standalone-lesson-page .practice-float-trigger{right:74px;bottom:14px}}

/* ---- 逐页课程：减少留白，让讲义成为视野主体 ---- */
.standalone-lesson-page .lesson-slide-deck{min-height:0;padding:16px 0 12px}.standalone-lesson-page .lesson-slide-topbar{margin-bottom:10px}.standalone-lesson-page .lesson-slide-stage{display:block;flex:none;min-height:0}.standalone-lesson-page .lesson-slide-content{width:min(960px,100%);margin:0;padding:30px 56px 32px}.standalone-lesson-page .lesson-slide-content h1{margin:13px 0 19px;font-size:clamp(30px,3.4vw,44px)}.standalone-lesson-page .lesson-slide-body,.standalone-lesson-page .slide-notes{max-width:880px;font-size:16px;line-height:2}.standalone-lesson-page .deep-lesson-block{max-width:880px}.standalone-lesson-page .deep-code-step{max-width:880px}.standalone-lesson-page .deep-code-step pre{font-size:13px}.standalone-lesson-page .slide-code-panel{max-width:880px}.standalone-lesson-page .lesson-slide-footer{margin-top:12px}.standalone-lesson-page .lesson-slide-hint{margin-top:7px}
@media(max-width:760px){.standalone-lesson-page .lesson-slide-deck{min-height:0;padding:10px 0}.standalone-lesson-page .lesson-slide-stage{min-height:0}.standalone-lesson-page .lesson-slide-content{padding:23px 20px 25px}.standalone-lesson-page .lesson-slide-content h1{font-size:30px}.standalone-lesson-page .lesson-slide-body,.standalone-lesson-page .slide-notes{font-size:14px;line-height:1.9}.standalone-lesson-page .deep-code-step pre{font-size:11px}}

/* ---- 逐页课程：进一步放大主内容 ---- */
@media(min-width:761px){.standalone-lesson-page .lesson-slide-deck{max-width:1160px}.standalone-lesson-page .lesson-slide-content{width:min(1040px,100%);padding:34px 42px 36px}.standalone-lesson-page .lesson-slide-content h1{font-size:clamp(34px,3.8vw,50px)}.standalone-lesson-page .lesson-slide-body,.standalone-lesson-page .slide-notes{max-width:960px;font-size:18px;line-height:2.02}.standalone-lesson-page .deep-lesson-block,.standalone-lesson-page .deep-code-step,.standalone-lesson-page .slide-code-panel{max-width:960px}.standalone-lesson-page .deep-code-step pre{font-size:14px}.standalone-lesson-page .deep-code-step>p{font-size:14px}.standalone-lesson-page .deep-format-reminder,.standalone-lesson-page .deep-recap li{font-size:14px}}
.standalone-lesson-page .practice-float-trigger{right:96px}
.lesson-focus-mode .lesson-slide-deck,.lesson-slide-deck:fullscreen{box-sizing:border-box;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;align-content:stretch;justify-items:center;position:fixed;z-index:80;inset:0;width:100%;height:100%;max-width:none;min-height:100vh;margin:0;padding:24px 36px;background:#f8fcf8}.lesson-focus-mode .lesson-slide-topbar,.lesson-slide-deck:fullscreen .lesson-slide-topbar,.lesson-focus-mode .lesson-slide-stage,.lesson-slide-deck:fullscreen .lesson-slide-stage,.lesson-focus-mode .lesson-slide-footer,.lesson-slide-deck:fullscreen .lesson-slide-footer,.lesson-focus-mode .lesson-slide-hint,.lesson-slide-deck:fullscreen .lesson-slide-hint{width:min(1180px,100%)}.lesson-focus-mode .lesson-slide-stage,.lesson-slide-deck:fullscreen .lesson-slide-stage{min-height:0}.lesson-focus-mode .lesson-slide-content,.lesson-slide-deck:fullscreen .lesson-slide-content{margin:auto}
.lesson-focus-mode .lesson-slide-stage,.lesson-slide-deck:fullscreen .lesson-slide-stage{overflow:auto;align-items:center;align-items:safe center}.lesson-focus-mode .lesson-slide-content,.lesson-slide-deck:fullscreen .lesson-slide-content{margin:0 auto}
@media(max-width:760px){.standalone-lesson-page .practice-float-trigger{right:88px}}

.standalone-lesson-page .lesson-slide-stage,.lesson-focus-mode .lesson-slide-stage,.lesson-slide-deck:fullscreen .lesson-slide-stage{border:0;border-radius:0;background:transparent;box-shadow:none}
.standalone-lesson-page .lesson-slide-stage::after,.lesson-focus-mode .lesson-slide-stage::after,.lesson-slide-deck:fullscreen .lesson-slide-stage::after{display:none}
@media(min-width:761px){.standalone-lesson-page .lesson-slide-content{width:min(1160px,100%)}.lesson-focus-mode .lesson-slide-content,.lesson-slide-deck:fullscreen .lesson-slide-content{width:min(1180px,100%)}}

/* ---- 折叠侧边栏：消息快捷查看 ---- */
.chat-quick{position:fixed;z-index:56;top:90px;left:16px;display:none}.sidebar-collapsed .chat-quick.is-eligible{display:block}.chat-quick-trigger{position:relative;display:grid;place-items:center;width:42px;height:42px;border:1px solid #cbded0;border-radius:9px;background:#fff;color:#4e7860;box-shadow:0 10px 24px rgba(31,65,43,.12);transition:background .18s ease,border-color .18s ease,transform .18s ease}.chat-quick-trigger:hover,.chat-quick.is-open .chat-quick-trigger{border-color:#76b78b;background:#ebf7ee;color:#33724c;transform:translateY(-1px)}.chat-quick-trigger .ui-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.75}.chat-quick-badge{position:absolute;top:-6px;right:-7px;min-width:17px;height:17px;padding:0 4px;border:2px solid #fff;border-radius:99px;background:#d76954;color:#fff;font:800 9px/13px "DM Mono",monospace;text-align:center}.chat-quick-badge.hidden{display:none}.chat-quick-panel{position:absolute;top:0;left:52px;width:300px;overflow:hidden;border:1px solid #d4e4d8;border-radius:13px;background:#fff;box-shadow:0 20px 50px rgba(28,53,39,.18);opacity:0;pointer-events:none;transform:translateX(-8px);transition:opacity .16s ease,transform .16s ease}.chat-quick.is-open .chat-quick-panel{opacity:1;pointer-events:auto;transform:none}.chat-quick-head{display:flex;align-items:center;justify-content:space-between;padding:13px 14px 11px;border-bottom:1px solid #e4eee6}.chat-quick-head strong{color:#3f594a;font-size:11px}.chat-quick-head span{color:#98a79d;font-size:9px}.chat-quick-list{max-height:430px;overflow:auto}.chat-quick-item{position:relative;display:flex;align-items:center;width:100%;gap:9px;padding:11px 13px;border-bottom:1px solid #edf3ee;color:#50685a;text-align:left;transition:background .15s ease}.chat-quick-item:last-child{border-bottom:0}.chat-quick-item:hover{background:#f2f9f3}.chat-quick-item.has-unread{background:#f8fcf8}.chat-quick-avatar{display:grid;place-items:center;width:32px;height:32px;flex:none;overflow:hidden;border-radius:50%;background:#dff0e3 center/cover no-repeat;color:#4e8c63;font-size:11px;font-weight:800}.chat-quick-avatar.has-avatar{background-color:#edf5ef}.chat-quick-copy{min-width:0;flex:1}.chat-quick-copy strong,.chat-quick-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-quick-copy strong{color:#3f594a;font-size:11px}.chat-quick-copy small{margin-top:3px;color:#87988d;font-size:9px}.chat-quick-item time{align-self:flex-start;color:#a0aea5;font:8px "DM Mono",monospace}.chat-quick-item i{position:absolute;right:13px;bottom:10px;min-width:15px;height:15px;padding:0 3px;border-radius:99px;background:#d76c55;color:#fff;font:800 8px/15px "DM Mono",monospace;text-align:center}.chat-quick-empty{padding:22px 15px;color:#94a197;font-size:10px;line-height:1.7;text-align:center}.quick-chat-window{position:fixed;z-index:85;inset:0;display:grid;place-items:center;padding:22px;background:rgba(22,38,30,.34);backdrop-filter:blur(5px)}.quick-chat-window.hidden{display:none}.quick-chat-dialog{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(620px,calc(100vw - 44px));height:min(680px,calc(100vh - 44px));overflow:hidden;border:1px solid #d3e4d7;border-radius:18px;background:#fff;box-shadow:0 26px 80px rgba(20,43,29,.25)}.quick-chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 19px;border-bottom:1px solid #e2ece4}.quick-chat-head span{color:#6f9c7e;font:800 9px "DM Mono",monospace;letter-spacing:.1em}.quick-chat-head h2{margin:5px 0 0;color:#344e3e;font-size:18px}.quick-chat-head>div:last-child{display:flex;align-items:center;gap:8px}.quick-chat-head button{border-radius:7px;color:#71877a}.quick-chat-head button:first-child{padding:7px 9px;border:1px solid #cde1d2;background:#f3faf4;font-size:9px;font-weight:800}.quick-chat-head button:first-child:hover{border-color:#85be96;background:#e7f5e9;color:#38744e}.quick-chat-head button:last-child{width:30px;height:30px;font-size:21px;line-height:1}.quick-chat-messages{min-height:0;padding:18px;overflow:auto;background:#f8fbf8}.quick-chat-message{max-width:76%;margin:0 0 12px}.quick-chat-message.mine{margin-right:0;margin-left:auto;text-align:right}.quick-chat-message strong{display:block;margin:0 0 4px;color:#698275;font-size:9px}.quick-chat-message p{display:inline-block;margin:0;padding:9px 11px;border:1px solid #dce9df;border-radius:10px 10px 10px 2px;background:#fff;color:#4f6658;font-size:11px;line-height:1.65;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}.quick-chat-message.mine p{border-color:#84bd96;border-radius:10px 10px 2px 10px;background:#e5f4e8;color:#346648}.quick-chat-message time{display:block;margin-top:3px;color:#a1ada5;font:8px "DM Mono",monospace}.quick-chat-empty{padding:32px 14px;color:#93a197;font-size:11px;text-align:center}.quick-chat-input{display:flex;gap:9px;padding:13px 15px;border-top:1px solid #e3ece5;background:#fff}.quick-chat-input input{min-width:0;flex:1;padding:10px 11px;border:1px solid #d3e3d7;border-radius:8px;color:#405847;font:11px inherit;outline:0}.quick-chat-input input:focus{border-color:#77b68b;box-shadow:0 0 0 3px #e6f4e9}.quick-chat-input button{padding:0 14px;border-radius:8px;background:#43835a;color:#fff;font-size:10px;font-weight:800}.quick-chat-input button:hover{background:#357046}.quick-chat-window.is-floating{inset:auto;right:24px;bottom:24px;display:block;padding:0;background:transparent;backdrop-filter:none}.quick-chat-window.is-floating .quick-chat-dialog{width:420px;min-width:320px;max-width:calc(100vw - 24px);height:560px;min-height:400px;max-height:calc(100vh - 24px);resize:both}.lesson-focus-mode .chat-quick{display:none!important}@media(max-width:760px){.chat-quick{top:72px;left:10px}.chat-quick-panel{left:0;top:50px;width:min(300px,calc(100vw - 20px))}.quick-chat-window{padding:10px}.quick-chat-dialog{width:100%;height:calc(100vh - 20px);border-radius:13px}.quick-chat-head{padding:14px}.quick-chat-window.is-floating{right:10px;bottom:10px;left:10px}.quick-chat-window.is-floating .quick-chat-dialog{width:100%;height:calc(100vh - 20px);resize:none}}
.mobile-bottom-nav{display:none}
@media(max-width:760px){
  :root{--mobile-nav-height:calc(64px + env(safe-area-inset-bottom))}
  html,body{min-height:100%;overflow-x:clip}
  body{padding-bottom:var(--mobile-nav-height)}
  .app-shell{min-height:100dvh;overflow-x:clip}
  .sidebar,.sidebar-collapsed .sidebar{width:282px;padding:20px 18px 18px;border-right:1px solid var(--line);left:-290px;overflow-y:auto}
  .sidebar.open,.sidebar-collapsed .sidebar.open{left:0}
  .sidebar.open + .main-content .mobile-menu{position:fixed;z-index:8;top:calc(env(safe-area-inset-top) + 6px);left:8px;display:grid;place-items:center;width:44px;height:44px;margin:0;border-radius:9px;background:#fff;box-shadow:0 8px 22px rgba(31,65,43,.14)}
  .sidebar-collapsed .sidebar>*{opacity:1;pointer-events:auto}
  .main-content{min-width:0;padding-bottom:var(--mobile-nav-height)}
  .topbar{height:56px;padding:0 16px;padding-top:env(safe-area-inset-top)}
  .breadcrumb{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breadcrumb b{display:none}
  .top-actions{gap:8px}.top-actions .search-button{display:none}
  .content-wrap{padding:24px 16px calc(20px + var(--mobile-nav-height))}
  .mobile-bottom-nav{position:fixed;z-index:70;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:var(--mobile-nav-height);padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-top:1px solid #dce9df;background:rgba(255,255,255,.96);box-shadow:0 -8px 24px rgba(31,65,43,.08);backdrop-filter:blur(14px)}
  .mobile-bottom-item{position:relative;display:grid;place-items:center;align-content:center;gap:3px;min-width:44px;min-height:44px;border-radius:9px;color:#7a8d82;font-size:10px;font-weight:700;line-height:1;text-decoration:none}.mobile-bottom-item .ui-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.mobile-bottom-item.active{background:#e7f4ea;color:#397653}.mobile-bottom-item>span:first-child:not(:last-child){font-size:19px;line-height:16px}
  .mobile-bottom-icon{position:relative;display:grid;place-items:center}.mobile-bottom-icon i{position:absolute;top:-8px;right:-10px;min-width:16px;height:16px;padding:0 4px;border:2px solid #fff;border-radius:99px;background:#d76c55;color:#fff;font:800 8px/12px "DM Mono",monospace;text-align:center}.mobile-bottom-icon i.hidden{display:none}
  .chat-quick{display:none!important}.ai-fab{right:16px;bottom:calc(var(--mobile-nav-height) + 12px);width:50px;height:50px}.ai-float{right:12px;bottom:calc(var(--mobile-nav-height) + 70px);left:12px;width:auto;max-height:calc(100dvh - var(--mobile-nav-height) - 86px)}.ai-float-messages{max-height:none}
  .practice-float-trigger,.standalone-lesson-page .practice-float-trigger{right:76px;bottom:calc(var(--mobile-nav-height) + 12px)}.practice-dock-open .workspace-section{position:fixed;z-index:75;inset:0 0 var(--mobile-nav-height);width:auto;height:auto;max-height:none;margin:0;padding:12px 16px;overflow:auto;border-radius:0}.practice-dock-open .code-lab{min-height:calc(100dvh - var(--mobile-nav-height) - 86px)}.practice-dock-open .code-editor,.practice-dock-open .output-body{height:auto;min-height:210px}
  .standalone-lesson-page .main-content{min-height:calc(100dvh - var(--mobile-nav-height))}.standalone-lesson-page .content-wrap{padding:10px 16px calc(16px + var(--mobile-nav-height))}.standalone-lesson-page .ai-fab{bottom:calc(var(--mobile-nav-height) + 12px)}.standalone-lesson-page .lesson-slide-content{padding:20px 0 24px}.standalone-lesson-page .lesson-slide-body,.standalone-lesson-page .slide-notes{font-size:14px}
  .lesson-slide-topbar{gap:8px;margin-bottom:8px}.lesson-slide-topbar-actions{gap:7px}.lesson-view-actions{flex-wrap:wrap}.lesson-view-button{min-height:36px}.lesson-slide-footer{position:sticky;bottom:calc(var(--mobile-nav-height) - 1px);z-index:4;margin:12px -16px 0;padding:9px 16px;background:rgba(248,252,248,.96);border-top:1px solid #e1ece3}.slide-code-panel pre,.deep-code-step pre,.format-card pre{overflow-x:auto}
  .quick-chat-window{z-index:90;inset:0;padding:0;background:#fff;backdrop-filter:none}.quick-chat-dialog,.quick-chat-window.is-floating .quick-chat-dialog{width:100%;height:100dvh;max-height:none;min-height:0;border:0;border-radius:0;resize:none;box-shadow:none}.quick-chat-window.is-floating{inset:0;right:auto;bottom:auto;left:auto;padding:0;background:#fff}.quick-chat-head{min-height:64px;padding:calc(12px + env(safe-area-inset-top)) 16px 12px}.quick-chat-head h2{font-size:17px}.quick-chat-head>div:last-child{gap:4px}#quickChatFloatToggle{display:none}.quick-chat-head button:first-child{min-height:36px}.quick-chat-head button:last-child{width:36px;height:36px}.quick-chat-messages{padding:16px}.quick-chat-input{padding:10px 16px calc(10px + env(safe-area-inset-bottom))}.quick-chat-input input,.quick-chat-input button{min-height:44px}.quick-chat-window.is-inbox .quick-chat-dialog{grid-template-rows:auto minmax(0,1fr)}.quick-chat-window.is-inbox .quick-chat-messages,.quick-chat-window.is-inbox .quick-chat-input{display:none}.quick-chat-inbox{min-height:0;overflow:auto;background:#f8fbf8}.quick-chat-inbox .chat-quick-item{min-height:64px;padding:13px 16px}.quick-chat-inbox .chat-quick-empty{padding:42px 20px}
}
