:root { font-family: "Microsoft YaHei", system-ui, sans-serif; color: #172033; background: #f4f7fb; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea, .lock-button { font: inherit; }
.lock-screen { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: #172033; }
.lock-screen[hidden] { display: none; }
.lock-card, .card { border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgb(23 32 51 / 10%); }
.lock-card { width: min(100%, 400px); padding: 32px; text-align: center; }
.lock-card h1 { margin: 0 0 10px; font-size: 24px; }
.lock-card p { color: #667085; line-height: 1.6; }
.lock-card form { display: grid; gap: 12px; margin-top: 22px; }
input[type="password"], input[type="date"], select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #d7deea; border-radius: 8px; color: inherit; background: #fff; }
button { border: 0; border-radius: 8px; padding: 10px 14px; cursor: pointer; color: #fff; background: #2563eb; }
button:hover { background: #1d4ed8; }
.error { min-height: 20px; margin: 0; color: #c62828; font-size: 14px; }
.app { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 64px; }
header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(25px, 4vw, 36px); }
header p { margin: 10px 0 0; color: #667085; }
.lock-button { display: inline-block; white-space: nowrap; text-decoration: none; color: #fff; background: #2563eb; }
.lock-button, .signout-button, #save-button, .save-status { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 1; text-decoration: none; }
.lock-button.account-signed-in, .signout-button, .save-status { color: #0f5132; background: #dcfce7; }
.lock-button.account-signed-in:hover, .signout-button:hover { background: #bbf7d0; }
.account-actions { display: grid; justify-items: end; gap: 9px; }
.account-line, .save-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.save-status { white-space: nowrap; }
.signout-button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
.lock-button:hover { background: #344054; }
.overview { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 24px; margin-bottom: 24px; }
.stat-number { margin: 0; font-size: 34px; font-weight: 800; color: #2563eb; }
.stat-label { margin: 5px 0 0; color: #667085; }
.progress-track { overflow: hidden; height: 22px; border-radius: 99px; background: #e7edf7; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #64a3ff); transition: width .2s; }
.progress-copy { margin: 13px 0 0; color: #475467; }
.notice { margin: 0 0 24px; padding: 12px 15px; border-radius: 10px; color: #0f4d32; background: #eaf8ef; }
.chapter { margin: 18px 0; overflow: hidden; }
.chapter-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 24px; color: #fff; background: #263b67; }
.chapter-head h2 { margin: 0; font-size: 19px; }
.chapter-summary { margin: 0; font-size: 14px; opacity: .9; white-space: nowrap; }
.lesson-list { padding: 0 24px; }
.lesson { padding: 20px 0; border-bottom: 1px solid #e8edf5; }
.lesson:last-child { border-bottom: 0; }
.lesson-top { display: flex; align-items: center; gap: 12px; }
.lesson-title { flex: 1; font-weight: 700; line-height: 1.45; }
.lesson-number { display: inline-grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; color: #1d4ed8; background: #e9f1ff; font-size: 13px; }
.lesson-details { display: grid; grid-template-columns: 150px 165px 1fr; gap: 12px; margin: 15px 0 0 40px; }
.practice { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.note-toolbar { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.format-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.format-tools[hidden] { display: none; }
.format-button, .note-toggle { padding: 6px 10px; color: #2563eb; background: #eef4ff; font-size: 13px; }
.note-toggle { margin-left: auto; }
.format-button:hover, .note-toggle:hover { background: #dbeafe; }
.color-picker { width: 32px; height: 30px; padding: 2px; cursor: pointer; border: 1px solid #c8d5eb; border-radius: 6px; background: #fff; }
.rich-note { grid-column: 1 / -1; min-height: 70px; max-height: 150px; padding: 10px; overflow: auto; border: 1px solid #d7deea; border-radius: 8px; background: #f8fafc; line-height: 1.6; outline: none; }
.rich-note:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgb(37 99 235 / 12%); }
.rich-note.expanded { min-height: 300px; max-height: none; }
.rich-note img { max-width: 100%; height: auto; }
.rich-note hr { border: 0; border-top: 1px solid #cbd5e1; margin: 16px 0; }
.note-toolbar { display: flex; }
.format-tools { display: none !important; }
.note-toggle { display: inline-block; }
.rich-note { padding: 0; overflow: visible; }
.rich-note:not(.expanded) { display: none; }
.lesson:has(.rich-note:not(.expanded)) .ql-toolbar { display: none; }
.lesson-details > .ql-toolbar.ql-snow { display: flex; grid-column: 1 / -1; width: 100%; flex-wrap: nowrap; gap: 0; overflow-x: auto; border: 0; border-bottom: 1px solid #d7deea; background: #fff; border-radius: 8px 8px 0 0; }
.lesson-details > .ql-toolbar.ql-snow .ql-formats { flex: 0 0 auto; }
.rich-note .ql-container.ql-snow { min-height: 120px; border: 0; font: inherit; }
.rich-note .ql-editor { min-height: 120px; padding: 12px; line-height: 1.7; background: #f8fafc; }
.rich-note.expanded .ql-container.ql-snow, .rich-note.expanded .ql-editor { min-height: 300px; }
.chapter-nav { position: fixed; left: 0; top: 38px; z-index: 5; transform: translateX(calc(-100% + 10px)); transition: transform .2s; width: 180px; border-radius: 0 10px 10px 0; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgb(23 32 51 / 18%); }
.chapter-nav:hover, .chapter-nav.open { transform: translateX(0); }
#chapter-nav-toggle { width: 10px; height: 58px; border-radius: 0; padding: 0; font-size: 0; text-align: right; background: #2563eb; }
#chapter-nav-toggle span { display: none; }
.chapter-nav-title { padding: 12px 12px 8px; color: #fff; background: #2563eb; font-size: 15px; font-weight: 700; }
.chapter-nav-list { padding: 8px; display: grid; gap: 4px; }
.chapter-nav-list a { padding: 8px 10px; border-radius: 6px; color: #334155; text-decoration: none; font-size: 14px; }
.chapter-nav-list a:hover { color: #fff; background: #2563eb; }
.image-input { display: none; }
.footer-note { margin: 26px 0 0; color: #667085; font-size: 14px; line-height: 1.6; }
@media (max-width: 720px) { .app { width: min(100% - 20px, 1160px); padding-top: 22px; } header { display: block; } .account-actions { justify-items: start; margin-top: 16px; } .account-line, .save-line { justify-content: flex-start; } .overview { grid-template-columns: 1fr; } .lesson-list { padding: 0 16px; } .chapter-head { padding: 17px; } .chapter-head h2 { font-size: 17px; } .lesson-details { grid-template-columns: 1fr; margin-left: 0; } }
