
    :root{--bg:#f7f8f5;--paper:#fff;--ink:#233c34;--muted:#67776f;--line:#e4eae3;--green:#286249;--green-dark:#1d4c38;--sage:#edf4ed;--amber:#825319;--amber-bg:#fff4df;--red:#a04435;--red-bg:#fcf0ec;--radius:18px;--shadow:0 18px 60px #1c3e2c12;--font:-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Malgun Gothic',sans-serif}
    *{box-sizing:border-box}body{margin:0;background:var(--bg);font:15px/1.6 var(--font);color:var(--ink)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button,input,textarea,select{outline-offset:4px}*:focus-visible{outline:3px solid #9a6b2e}button{border:0;background:none;color:inherit}h1,h2,h3,p{margin:0}svg{width:20px;height:20px;vertical-align:middle;flex-shrink:0}button svg{pointer-events:none}a{color:var(--green)}[hidden]{display:none!important}.sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.muted{color:var(--muted)}.tiny{font-size:12px}.small{font-size:13px}.flex{display:flex;align-items:center;gap:10px}.spread{justify-content:space-between}.stack{display:grid;gap:14px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border-radius:11px;font-weight:600;white-space:nowrap;transition:background .15s}.btn:hover{background:#e8eee7}.btn.primary{background:var(--green);color:#fff}.btn.primary:hover{background:var(--green-dark)}.btn.outline{border:1px solid var(--line);background:#fff}.btn.outline:hover{background:var(--sage)}.btn.soft{background:var(--sage);color:var(--green)}.iconbtn{width:44px;height:44px;display:inline-grid;place-items:center;border-radius:12px}.iconbtn:hover{background:var(--sage)}.badge{display:inline-block;border-radius:7px;padding:3px 8px;font-size:11px;line-height:1.6;font-weight:650;white-space:nowrap;background:var(--sage);color:var(--green)}.badge.amber{background:var(--amber-bg);color:var(--amber)}.badge.red{background:var(--red-bg);color:var(--red)}
    .demo-bar{padding:9px 32px;background:#eaf0e8;border-bottom:1px solid #dce5d9;display:flex;gap:16px;align-items:center;justify-content:space-between;font-size:12px;color:#4c6254}.demo-label{display:flex;align-items:center;gap:8px}.demo-dot{width:6px;height:6px;border-radius:100%;background:#6c895e}.demo-controls{display:flex;align-items:center;gap:12px}.role-switch{display:flex;background:#dfe8dc;padding:3px;border-radius:9px}.role-switch button{min-height:32px;padding:4px 13px;border-radius:7px;font-size:12px}.role-switch button[aria-pressed=true]{background:white;box-shadow:0 1px 4px #29432610;font-weight:700}.demo-select{border:1px solid #ccd9c8;border-radius:7px;padding:5px 8px;background:#fff;color:var(--ink);max-width:160px}.demo-reset{color:#4c6254;text-decoration:underline;text-underline-offset:3px;min-height:32px}
    .app-header{height:98px;padding:0 36px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:43px;height:43px;display:grid;place-items:center;border-radius:13px;background:var(--green);color:white}.brand-mark svg{width:26px;height:26px}.brand-name{font-size:20px;letter-spacing:-.8px;font-weight:800}.brand-sub{font-size:12px;color:var(--muted);margin-top:1px}.profile{border-left:1px solid var(--line);padding-left:20px;margin-left:8px;gap:10px}.avatar{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;border-radius:50%;background:#edf0e3;color:#4c694c;font-weight:700;font-size:14px}.avatar.teacher{background:#e8eee8;color:var(--green)}.notification-btn{position:relative}.notification-count{position:absolute;top:0;right:0;min-width:16px;height:16px;line-height:16px;border-radius:100%;background:#a34d39;color:#fff;font-size:10px}.workspace{max-width:1512px;margin:auto;display:grid;grid-template-columns:260px minmax(0,1fr);min-height:calc(100dvh - 151px)}
    .sidebar{padding:32px 20px;border-right:1px solid var(--line);background:#fbfcf9}.sidebar h2{font-size:14px;font-weight:700}.sidebar-top{padding:0 8px 23px}.sidebar-count{font-size:12px;background:#e8eee3;color:#55714f;border-radius:6px;padding:1px 7px}.students{display:grid;gap:7px}.student{display:flex;align-items:flex-start;text-align:left;gap:11px;padding:15px 13px;border:1px solid transparent;border-radius:13px;min-width:0}.student:hover{background:#eef3eb}.student.selected{background:#eaf1e7;border-color:#d9e5d4}.student .avatar{height:36px;width:36px;font-size:12px}.student-name{font-size:14px;font-weight:650}.student-preview{font-size:12px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:148px}.student-meta{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:8px}.private-note{margin:28px 8px 0;padding:16px 0;border-top:1px solid var(--line);display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--muted)}.private-note svg{width:15px;height:15px;margin-top:3px}.side-quote{padding:18px 9px;font-size:13px;line-height:1.9;color:#6b7e68}.side-quote span{font-family:Georgia,serif;font-size:32px;display:block;height:30px;color:#91aa84}.student-mode .workspace{grid-template-columns:1fr;max-width:1220px}.student-mode .sidebar{display:none}
    .main{padding:29px 32px 30px;min-width:0}.page-heading{margin-bottom:25px;align-items:flex-start}.eyebrow{font-size:11px;font-weight:650;color:#73846f;letter-spacing:1.2px;margin-bottom:5px}.page-heading h1{font-size:26px;line-height:1.4;letter-spacing:-1px;font-weight:750}.page-heading p{font-size:13px;color:var(--muted);margin-top:6px}.date-chip{font-size:12px;color:var(--muted);padding-top:17px}.room-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}.conversation{border:1px solid var(--line);border-radius:var(--radius);background:#fff;overflow:hidden;min-width:0;box-shadow:0 4px 20px #223c3303}.room-header{padding:19px 23px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px}.room-name{font-size:15px;font-weight:700}.room-lock{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:5px}.room-lock svg{width:13px;height:13px}.thread{padding:22px;min-height:365px;max-height:490px;overflow-y:auto;scrollbar-width:thin;scroll-behavior:smooth}.day-divider{display:flex;align-items:center;gap:12px;margin:0 0 24px;color:#869184;font-size:11px}.day-divider:before,.day-divider:after{content:'';height:1px;background:#eef1eb;flex:1}.message{margin-bottom:22px;display:flex;gap:9px;align-items:flex-start}.message>.avatar{width:29px;height:29px;font-size:10px;margin-top:22px}.message-content{max-width:min(88%,440px);min-width:0}.message-author{font-size:11px;color:var(--muted);margin-bottom:5px}.message.self{justify-content:flex-end}.message.self>.avatar{display:none}.message.self .message-author{text-align:right}.bubble{padding:13px 16px;background:#f2f5ef;border-radius:0 14px 14px 14px;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.self .bubble{background:#e9f1e7;border-radius:14px 0 14px 14px}.message-time{font-size:10px;color:#74816f;margin-top:5px}.self .message-time{text-align:right}.image-message{margin-top:8px;display:block;width:100%;padding:0;overflow:hidden;border-radius:10px;border:1px solid #dce4d7;background:#fff}.image-message img{display:block;max-width:100%;width:240px;max-height:220px;object-fit:cover}.image-hint{display:flex;gap:5px;align-items:center;justify-content:center;font-size:10px;color:var(--muted);padding:5px}.image-hint svg{width:12px;height:12px}.feedback-bubble{background:#f1f5ed!important;border:1px solid #dae7d0}.feedback-label{display:inline-flex;align-items:center;gap:5px;color:#396232;font-size:11px;font-weight:750;margin-bottom:5px}.feedback-label svg{width:14px;height:14px}.system-message{font-size:11px;text-align:center;color:var(--muted);padding:8px 12px;background:#f8faf6;border-radius:8px;margin-bottom:20px}.composer{border-top:1px solid var(--line);padding:15px 18px;background:#fff}.composer-input{width:100%;border:0;resize:vertical;min-height:52px;max-height:140px;padding:5px 2px;font-size:14px;line-height:1.7;background:transparent;color:var(--ink)}textarea::placeholder,input::placeholder{color:#8b9687}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:3px;gap:8px}.composer-help{font-size:10px;color:#7a8776}.composer .btn{font-size:12px;min-height:36px;padding:7px 12px}.attachment-preview{display:flex;align-items:center;gap:10px;background:#f5f7f2;border-radius:10px;padding:8px;margin-bottom:8px}.attachment-preview img{width:52px;height:52px;object-fit:cover;border-radius:7px}.attachment-preview p{font-size:12px;flex:1;overflow-wrap:anywhere}
    .right-column{display:grid;gap:16px}.task-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.task-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:18px 20px;border-bottom:1px solid var(--line)}.task-top h2{font-size:14px}.task-body{padding:20px}.task-icon{width:40px;height:40px;background:#edf2e8;display:grid;place-items:center;border-radius:11px;color:var(--green);margin-bottom:14px}.task-body h3{font-size:18px;letter-spacing:-.4px;line-height:1.5;margin-bottom:7px;overflow-wrap:anywhere}.task-desc{font-size:12px;line-height:1.9;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}.deadline{margin-top:18px;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.deadline label{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}.deadline strong{font-size:12px;font-weight:600}.deadline svg{width:14px;height:14px;margin-right:4px}.progress{list-style:none;margin:20px 0;padding:0}.progress li{display:flex;gap:10px;align-items:center;font-size:12px;color:#7b8776;position:relative;padding-bottom:15px}.progress li:last-child{padding-bottom:0}.progress li:not(:last-child):after{content:'';width:1px;height:15px;position:absolute;background:#e3e9df;top:22px;left:9px}.step{display:grid;place-items:center;width:19px;height:19px;font-size:10px;border-radius:50%;background:#f0f3ec;flex-shrink:0}.progress li.done{color:var(--green)}.progress li.done .step{background:#dcebd4}.progress li.current{font-weight:650;color:var(--ink)}.progress li.current .step{background:var(--green);color:#fff}.task-body>.btn{width:100%;font-size:13px}.task-foot{font-size:11px;color:var(--muted);text-align:center;margin-top:9px}.tips{border-radius:15px;background:#edf2e8;padding:18px 19px;font-size:12px;color:#53674d}.tips h3{font-size:12px;margin-bottom:7px;display:flex;gap:7px;align-items:center}.tips h3 svg{width:16px;height:16px}.tips p{line-height:1.9;color:#68785f}.demo-actions{display:grid;gap:8px;padding:15px 2px}.demo-actions .btn{font-size:11px;border:1px dashed #ced8c8;color:#68775e;min-height:36px;padding:7px}.preview-foot{padding-top:19px;color:#7c8975;font-size:11px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.task-select{margin-bottom:12px;width:100%;font-size:12px;padding:8px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff}
    dialog{border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:0;width:min(490px,calc(100% - 32px));max-height:90dvh;color:var(--ink);background:#fff}dialog::backdrop{background:#152a2160;backdrop-filter:blur(3px)}.modal-head{padding:20px 24px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:18px;letter-spacing:-.5px}.modal-body{padding:22px 24px}.modal-body label.field-label{display:block;font-size:12px;font-weight:650;margin-bottom:6px}.field{border:1px solid #dbe3d5;border-radius:10px;width:100%;padding:11px 12px;color:var(--ink);background:white;font-size:14px}.modal-body textarea{min-height:125px;resize:vertical}.field-group{margin-bottom:16px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;padding-top:8px}.modal-caption{font-size:12px;color:var(--muted);margin-bottom:20px}.photo-picker{border:1px dashed #cbd9c4;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:90px;width:100%;background:#fafcf8;color:var(--green);font-size:13px}.image-dialog{width:min(860px,calc(100% - 24px));background:#f8faf5}.image-dialog .modal-body{padding:16px;text-align:center}.image-dialog img{max-width:100%;max-height:70dvh;object-fit:contain}.notifications{width:min(480px,calc(100% - 32px))}.notice-item{padding:16px 0;border-bottom:1px solid var(--line);font-size:13px;display:flex;gap:12px}.notice-item:last-child{border-bottom:0}.notice-icon{background:var(--sage);border-radius:10px;width:34px;height:34px;display:grid;place-items:center;flex-shrink:0;color:var(--green)}.notice-item small{font-size:11px;color:var(--muted);display:block;margin-top:4px}.empty{text-align:center;padding:28px 10px;color:var(--muted);font-size:13px}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);border-radius:12px;background:#234631;color:#fff;padding:12px 20px;box-shadow:var(--shadow);z-index:20;font-size:13px;max-width:calc(100% - 32px);width:max-content;pointer-events:none}.form-error{font-size:12px;color:var(--red);min-height:20px;margin-top:8px}
    @media(min-width:1550px){.main{padding:38px 40px}.page-heading{margin-bottom:30px}.thread{max-height:560px;min-height:420px}.room-grid{grid-template-columns:minmax(0,1fr) 320px}}
    @media(max-width:1160px){.workspace{grid-template-columns:220px minmax(0,1fr)}.sidebar{padding:28px 12px}.main{padding:26px 22px}.room-grid{grid-template-columns:minmax(0,1fr) 265px;gap:16px}.task-body{padding:17px}.room-lock{font-size:0}.room-lock svg{width:15px;height:15px}.composer-help{display:none}.student-preview{max-width:126px}}
    @media(max-width:950px){.room-grid{grid-template-columns:minmax(0,1fr)}.right-column{grid-row:1}.task-card{border-radius:14px}.task-top{padding:12px 18px}.task-body{padding:14px 18px}.task-icon,.progress,.task-desc,.task-foot,.tips,.demo-actions{display:none}.task-body h3{font-size:16px;margin:0 0 8px}.deadline{margin:0 0 12px;border:0;padding:0;display:flex;gap:10px;align-items:center}.deadline label{margin:0}.task-body>.btn{width:auto;min-height:36px;padding:7px 13px;font-size:12px}.right-column{gap:0}.thread{min-height:280px;max-height:430px}.task-body{position:relative}.room-grid{gap:16px}.page-heading h1{font-size:24px}.task-select{margin-bottom:8px}}
    @media(max-width:650px){body{font-size:14px}.demo-bar{padding:9px 14px;display:block}.demo-label{font-size:10px;margin-bottom:8px}.demo-controls{justify-content:space-between;gap:6px;flex-wrap:wrap}.demo-reset{font-size:10px}.role-switch button{padding:4px 10px;font-size:11px}.demo-select{font-size:11px;max-width:135px;min-height:32px}.app-header{height:79px;padding:0 18px}.brand-mark{width:35px;height:35px;border-radius:11px}.brand-mark svg{width:23px;height:23px}.brand{gap:10px}.brand-name{font-size:18px}.brand-sub{font-size:10px}.profile{border:0;padding:0;margin:0}.profile .profile-text{display:none}.profile>.avatar{width:32px;height:32px;font-size:11px}.app-header>.flex{gap:5px}.workspace{display:block;min-height:auto}.sidebar{padding:14px 16px;border-right:0;border-bottom:1px solid var(--line);background:#fbfcf9}.sidebar-top,.private-note,.side-quote{display:none}.students{display:flex;gap:7px;overflow-x:auto;padding:2px}.student{padding:8px 11px;flex-shrink:0;gap:7px;border-radius:10px;align-items:center}.student .avatar{width:28px;height:28px;font-size:10px}.student-name{font-size:12px}.student-preview,.student-meta{display:none}.main{padding:23px 16px}.page-heading{margin-bottom:20px}.page-heading h1{font-size:23px;letter-spacing:-1px}.page-heading p{font-size:11px}.eyebrow{font-size:10px}.date-chip{display:none}.room-header{padding:15px 17px}.room-name{font-size:14px}.room-lock{font-size:10px}.room-lock svg{width:12px;height:12px}.thread{padding:19px 14px;min-height:260px;max-height:440px}.bubble{font-size:13px;padding:12px 13px}.message-content{max-width:88%}.composer{padding:12px 14px}.composer .btn{padding:7px 9px;font-size:11px}.composer-input{font-size:13px}.task-top{font-size:12px}.task-top .btn{font-size:11px;min-height:32px;padding:3px 5px}.deadline strong{font-size:11px}.preview-foot{font-size:10px;gap:5px}.modal-head{padding:16px 18px}.modal-body{padding:19px 18px}.task-desc{display:block;font-size:11px;margin-bottom:10px}.demo-actions.mobile-show{display:grid;grid-template-columns:1fr 1fr;padding:0 0 14px;gap:8px}.right-column{gap:12px}.demo-actions.mobile-show .btn{font-size:10px;min-height:34px;padding:5px}.student-mode .sidebar{display:none}.image-message img{max-width:100%;width:210px}.toast{font-size:12px;bottom:14px}.demo-help-short{display:none}}
    .app-nav{display:flex;gap:8px;padding:10px 36px;background:var(--paper);border-bottom:1px solid var(--line)}.app-nav a{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;min-height:44px;border-radius:10px;color:var(--muted);text-decoration:none;font-size:13px;font-weight:650}.app-nav a:hover{background:var(--bg)}.app-nav a[aria-current=page]{background:var(--sage);color:var(--green)}
    .library{max-width:1120px;margin:0 auto;padding:32px 36px 48px;min-height:calc(100dvh - 220px)}.library-path{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:36px;margin-bottom:23px;font-size:12px;color:var(--muted)}.library-path a{display:inline-flex;align-items:center;min-height:36px;padding:4px 7px;border-radius:7px;text-decoration:none;color:var(--muted)}.library-path a:hover{background:var(--sage);color:var(--green)}.library-path [aria-current=page]{padding:4px 7px;color:var(--green);font-weight:650}.library-path svg{width:13px;height:13px}.library-heading{margin-bottom:28px}.library-heading h1{font-size:29px;letter-spacing:-1.1px;line-height:1.4}.library-heading h1:focus{outline:none}.library-heading p{margin-top:9px;color:var(--muted);font-size:14px;line-height:1.8}.library-intro{display:flex;align-items:center;gap:10px;padding:14px 17px;margin-bottom:24px;background:var(--sage);border-radius:12px;font-size:12px;color:var(--green)}.library-intro svg{width:17px;height:17px}.course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.course-card{position:relative;display:flex;align-items:center;gap:20px;min-height:170px;padding:26px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);text-decoration:none;color:var(--ink);transition:border-color .15s,background .15s;min-width:0}.course-card:hover{border-color:#9bb695;background:#fcfdf9}.course-number{display:grid;place-items:center;flex-shrink:0;width:70px;height:80px;border-radius:15px;background:#edf2e6;color:#50704a;font-size:32px;font-weight:650;letter-spacing:-1px}.course-card[data-grade=e6] .course-number{background:#f6efdf;color:#846c38}.course-copy{min-width:0;flex:1}.course-copy h2{font-size:20px;letter-spacing:-.6px;line-height:1.5}.course-copy>p{font-size:12px;color:var(--muted);margin:5px 0 12px}.course-meta{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}.course-meta span+span:before{content:'·';margin-right:8px}.course-arrow{color:#7c9276;display:grid;place-items:center;width:26px;flex-shrink:0}.semester-card{display:block;min-height:215px;padding:28px}.semester-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px;color:var(--green);font-size:12px}.semester-card h2{font-size:25px;letter-spacing:-.7px}.semester-card p{font-size:13px;color:var(--muted);margin-top:6px}.semester-card .semester-go{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--green);margin-top:23px;font-weight:650}.chapter-panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);overflow:hidden}.chapter-panel-top{padding:17px 23px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.chapter-panel-top h2{font-size:14px}.chapter-list{list-style:none;margin:0;padding:0}.chapter-row{display:flex;align-items:center;gap:17px;min-height:96px;padding:19px 23px}.chapter-row+.chapter-row{border-top:1px solid #edf0e9}.chapter-number{width:38px;height:38px;display:grid;place-items:center;flex-shrink:0;border-radius:10px;background:var(--sage);color:var(--green);font-size:13px;font-weight:650}.chapter-copy{flex:1;min-width:0}.chapter-copy h3{font-size:16px;font-weight:650;overflow-wrap:anywhere;letter-spacing:-.3px}.chapter-copy p{font-size:12px;color:var(--muted);margin-top:4px}.chapter-status{font-size:11px;color:#6a7962;background:#f1f4ed;padding:5px 9px;border-radius:7px;white-space:nowrap}.library-back{margin-top:22px;text-decoration:none;font-size:13px}.library-bottom{margin-top:30px;padding-top:20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.workspace{min-height:calc(100dvh - 220px)}
    @media(max-width:650px){.app-nav{padding:8px 16px;gap:6px}.app-nav a{font-size:12px;padding:8px 12px}.library{padding:21px 16px 32px}.library-path{font-size:11px;gap:3px;margin-bottom:19px}.library-path a,.library-path [aria-current=page]{padding:4px 5px}.library-heading{margin-bottom:21px}.library-heading h1{font-size:25px}.library-heading p{font-size:12px;margin-top:7px}.library-intro{font-size:11px;align-items:flex-start;padding:12px 14px;line-height:1.8;margin-bottom:19px}.library-intro svg{margin-top:2px}.course-grid{grid-template-columns:1fr;gap:12px}.course-card{min-height:132px;padding:20px;gap:16px}.course-number{width:54px;height:65px;font-size:26px;border-radius:12px}.course-copy h2{font-size:18px}.course-copy>p{font-size:11px;margin:3px 0 8px}.course-meta{font-size:10px}.semester-card{padding:22px;min-height:185px}.semester-label{margin-bottom:12px}.semester-card h2{font-size:23px}.semester-card p{font-size:12px}.semester-card .semester-go{margin-top:16px}.chapter-panel-top{padding:15px 16px;font-size:11px}.chapter-panel-top h2{font-size:13px}.chapter-row{padding:17px 15px;gap:12px;flex-wrap:wrap;min-height:90px}.chapter-number{width:32px;height:32px;font-size:11px}.chapter-copy h3{font-size:14px}.chapter-copy p{font-size:11px}.chapter-status{font-size:10px;padding:4px 7px}.library-bottom{font-size:10px;gap:5px}.library-back{font-size:12px}}
    @media(max-width:370px){.chapter-status{margin-left:44px;margin-top:-7px}.chapter-copy{flex-basis:calc(100% - 44px)}}
    .chapter-row{display:block}.chapter-top{display:flex;align-items:center;gap:17px;flex-wrap:wrap}.chapter-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.chapter-actions .btn{font-size:11px;min-height:38px;padding:7px 10px}.video-list{list-style:none;margin:14px 0 0 55px;padding:0;display:grid;gap:9px}.video-item{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:11px;background:#fafcf8;padding:12px 14px}.video-link{display:flex;gap:11px;align-items:center;flex:1;min-width:0;text-decoration:none;color:var(--ink);border-radius:5px;min-height:44px}.video-link>svg{width:30px;height:30px;color:var(--green)}.video-link strong{display:block;font-size:13px;font-weight:650;overflow-wrap:anywhere}.video-link small{display:block;font-size:11px;color:var(--green);margin-top:3px}.video-link:hover strong{text-decoration:underline;text-underline-offset:3px}.video-tools{display:flex;gap:2px;flex-shrink:0}.video-tools .btn{font-size:11px;min-height:36px;padding:7px 9px}.video-tools .remove-video{color:var(--red)}.video-storage-note{font-size:11px;line-height:1.8;color:var(--muted);margin:16px 0 0}.video-storage-note.problem{color:var(--red)}.video-form-help{font-size:11px;line-height:1.8;color:var(--muted);margin-top:6px}.video-title-preview{font-weight:650;overflow-wrap:anywhere}.library-bottom [data-library-storage]{max-width:100%}
    @media(max-width:650px){.chapter-top{gap:12px}.chapter-top .chapter-copy{flex-basis:calc(100% - 44px)}.chapter-actions{margin-left:44px;flex-wrap:wrap}.chapter-top .chapter-status{margin:0}.video-list{margin:13px 0 0}.video-item{padding:10px 12px;flex-wrap:wrap;gap:3px}.video-link{flex-basis:100%}.video-tools{margin-left:39px}.video-link strong{font-size:12px}.chapter-actions .btn{min-height:40px;font-size:11px}.video-storage-note{font-size:10px}}
    .brand-logo{display:block;position:relative;width:320px;aspect-ratio:4.3;overflow:hidden;flex-shrink:0}.brand-logo img{position:absolute;width:125%;height:auto;max-width:none;left:50%;top:50%;transform:translate(-50%,-50%)}.brand{min-width:0;flex-shrink:1}
    @media(max-width:650px){.brand-logo{width:220px;max-width:100%}.app-header{gap:8px}.app-header>.flex{flex-shrink:0}}
    @media(max-width:360px){.brand-logo{width:190px}.app-header{padding:0 14px}}
    .app-nav{align-items:center}.app-nav .manage-students{margin-left:auto;font-size:12px;min-height:42px;padding:8px 13px}.roster-form{padding:0 0 18px;border-bottom:1px solid var(--line)}.roster-add-row{display:flex;align-items:start;gap:9px}.roster-add-row .field{min-width:0;flex:1}.roster-add-row .btn{flex-shrink:0;font-size:12px}.roster-switch{display:flex;gap:6px;padding:18px 0 6px}.roster-switch button{min-height:40px;font-size:12px;padding:8px 13px;border-radius:9px;color:var(--muted)}.roster-switch button[aria-pressed=true]{background:var(--sage);color:var(--green);font-weight:650}.roster-list{list-style:none;margin:0;padding:0;max-height:310px;overflow:auto}.roster-row{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}.roster-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:650}.roster-row .avatar{width:33px;height:33px;font-size:12px}.roster-row .btn{font-size:11px;min-height:40px;padding:7px 10px;flex-shrink:0}.roster-remove{color:var(--red)}.roster-note{font-size:11px;color:var(--muted);line-height:1.8;margin-top:17px}.classroom-empty{border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:55px 24px;text-align:center}.classroom-empty .task-icon{margin:0 auto 16px}.classroom-empty h2{font-size:20px;margin-bottom:9px}.classroom-empty p{font-size:13px;color:var(--muted);margin-bottom:21px}.thread-empty{padding:45px 14px;text-align:center;font-size:13px;color:var(--muted);line-height:1.9}.thread-empty strong{display:block;color:var(--ink);margin-bottom:8px}.task-empty{padding:20px 0;text-align:center;font-size:12px;line-height:1.9;color:var(--muted)}.sidebar-empty{font-size:12px;line-height:1.9;color:var(--muted);padding:18px 10px}.room-name{overflow-wrap:anywhere}.room-header>.flex{min-width:0}.sidebar-count{flex-shrink:0}
    @media(max-width:650px){.app-nav{gap:3px}.app-nav a{padding:8px 9px;font-size:11px}.app-nav .manage-students{font-size:11px;padding:8px 9px}.roster-add-row{flex-wrap:wrap}.roster-add-row .field{flex-basis:100%}.roster-add-row .btn{width:100%}.roster-row{gap:8px}.roster-row .btn{font-size:10px;padding:7px 8px}.roster-name{font-size:12px}.classroom-empty{padding:36px 18px}.classroom-empty h2{font-size:18px}.sidebar-empty{padding:4px 0}.roster-list{max-height:260px}}
    .student-room-tabs{display:flex;align-items:center;gap:6px;margin-bottom:20px;border-bottom:1px solid var(--line);padding-bottom:8px}.student-room-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border-radius:10px;padding:9px 16px;color:var(--muted);font-size:13px;font-weight:650}.student-room-tabs button[aria-selected=true]{background:var(--sage);color:var(--green)}.student-room-tabs svg{width:15px;height:15px}.teacher-notes-panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.teacher-notes-head{padding:22px 25px;border-bottom:1px solid var(--line)}.teacher-notes-head h2{font-size:19px;letter-spacing:-.5px;overflow-wrap:anywhere}.teacher-notes-head p{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.9}.teacher-only-label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--green);margin-bottom:7px}.teacher-only-label svg{width:13px;height:13px}.teacher-notes-form{padding:24px}.notes-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 24px}.notes-field{min-width:0}.notes-field label{display:block;font-size:13px;font-weight:650;margin-bottom:8px}.notes-field textarea{resize:vertical;min-height:112px;line-height:1.8}.notes-field-wide{grid-column:1/-1}.notes-completion-row{display:flex;align-items:center;gap:9px;margin-bottom:10px}.notes-completion-row input{max-width:110px}.notes-completion-row span{font-size:13px;color:var(--muted)}.notes-field .notes-caption{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.8}.notes-save-bar{border-top:1px solid var(--line);margin-top:23px;padding-top:19px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.notes-save-state{font-size:12px;color:var(--muted)}.notes-updated{font-size:11px;color:var(--muted);margin-top:4px}.notes-save-actions{display:flex;gap:8px;flex-wrap:wrap}.notes-save-actions .btn{font-size:12px}.notes-reload-hint{font-size:12px;color:var(--amber);margin-top:12px;line-height:1.8}.teacher-notes-form .form-error{margin-top:12px}
    @media(max-width:650px){.student-room-tabs{margin-bottom:16px;gap:4px}.student-room-tabs button{font-size:12px;padding:8px 12px}.teacher-notes-head{padding:18px}.teacher-notes-head h2{font-size:17px}.teacher-notes-head p{font-size:11px}.teacher-notes-form{padding:18px}.notes-fields{grid-template-columns:1fr;gap:20px}.notes-field-wide{grid-column:auto}.notes-field label{font-size:12px}.notes-field textarea{font-size:13px;min-height:105px}.notes-save-bar{display:block}.notes-save-actions{margin-top:14px}.notes-save-actions .btn{flex:1}.notes-save-state{font-size:11px}.notes-updated{font-size:10px}}
    .task-files-draft,.task-files{display:grid;gap:8px;margin-top:10px}.task-file-draft{display:flex;align-items:center;gap:9px;padding:9px 11px;background:var(--sage);border-radius:9px;min-width:0}.task-file-info{flex:1;min-width:0}.task-file-info strong{font-size:12px;display:block;overflow-wrap:anywhere}.task-file-info small{font-size:10px;color:var(--muted)}.task-file-draft .iconbtn{width:34px;height:34px;flex-shrink:0}.task-file-link{display:flex;align-items:center;gap:9px;padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:#f8faf5;color:var(--ink);text-decoration:none;min-width:0;text-align:left}.task-file-link strong{display:block;font-size:12px;overflow-wrap:anywhere}.task-file-link small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.task-file-link:hover{border-color:#91ab85;background:var(--sage)}.task-files-title{font-size:11px;color:var(--muted);margin-top:17px}.deadline-controls{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.deadline-controls .btn{min-height:34px;padding:5px 9px;font-size:11px}.deadline-hint{font-size:10px;color:var(--muted);margin-top:9px;line-height:1.8}.deadline-message-actions{display:flex;justify-content:center;gap:6px;margin-top:7px;flex-wrap:wrap}.deadline-message-actions .btn{font-size:10px;padding:4px 9px;min-height:32px}.system-message .task-files{max-width:360px;margin:9px auto 0}.task-document-help{font-size:11px;color:var(--muted);line-height:1.8;margin-top:7px}.deadline-source{font-size:10px;color:var(--green);margin-top:5px}.deadline-select-help{font-size:11px;color:var(--muted);margin:0 0 14px;line-height:1.8}
    @media(max-width:650px){.task-file-link strong{font-size:11px}.task-body .task-files{margin-top:8px}.task-files-title{margin-top:12px}.deadline-controls .btn{font-size:10px}.deadline-hint{font-size:10px}.system-message .task-files{max-width:100%}}
    .system-message{white-space:pre-line;overflow-wrap:anywhere}.deadline strong{display:block;white-space:normal}.task-body .deadline{display:block}
    @media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.login-panel{max-width:440px;margin:12vh auto;padding:32px;background:var(--surface,#fff);border-radius:20px;border:1px solid var(--line,#e0e5da)}.login-panel label,.editor label{display:block;margin:16px 0 6px}.login-panel input,.editor input,.editor textarea,.editor select{width:100%;padding:12px;border:1px solid #cdd7c5;border-radius:9px;font:inherit;background:white}.login-panel button{margin-top:18px}.login-panel h1{font-size:23px}.app-error{padding:12px 20px;background:#fff1ec;color:#853f2c;white-space:pre-wrap}.brand-logo{width:150px;height:54px;object-fit:contain}.room-layout{display:grid;grid-template-columns:225px minmax(0,1fr);gap:20px}.classroom-main{min-width:0}.room-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px}.chat-panel{min-width:0}.thread{height:440px;overflow:auto}.bubble{white-space:pre-wrap;overflow-wrap:anywhere}.file-links{display:grid;gap:8px;margin-top:10px}.file-link{color:inherit;display:block;overflow-wrap:anywhere}.file-link img{max-width:100%;max-height:260px;border-radius:10px}.editor{max-height:85vh;overflow:auto;width:min(560px,calc(100% - 24px));padding:24px;border-radius:16px;border:1px solid #d8dfd0}.editor::backdrop{background:#182b2055}.editor h2{margin:0}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}.room-list{display:grid;gap:8px}.notes-grid{display:grid;gap:16px}.notes-grid textarea{min-height:100px;width:100%}.notes-grid input{width:100%}.storage-copy{font-size:12px;color:#66785b;margin-top:12px}.pending-files{font-size:13px;padding:8px;overflow-wrap:anywhere}.task-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.task-body{overflow-wrap:anywhere}.course-grid button{text-align:left}.course-grid{margin-top:24px}.video-link strong{display:block}.notice-item button{margin-left:auto}.student-mode .room-layout{display:block}.student-mode #student-sidebar{display:none}.room-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.room-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid #e5eadf}.compose{padding:16px;border-top:1px solid #e5eadf}.compose textarea{width:100%;resize:vertical;min-height:80px;padding:12px;border:1px solid #d3ddcb;border-radius:10px;font:inherit}.compose-actions{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.course-card{color:inherit;text-decoration:none}.teacher-notes{background:white;padding:24px;border-radius:16px;border:1px solid #e1e7da}.empty{padding:24px;color:#6b795f}.topbar-inner{max-width:1280px;margin:auto;padding:12px 24px;display:flex;justify-content:space-between;align-items:center;gap:12px}.app-nav{padding:12px 24px;max-width:1280px;margin:auto;display:flex;gap:10px;flex-wrap:wrap}.page-wrap{max-width:1280px;padding:20px 24px;margin:auto}.course-card h2{font-size:24px}.task-panel{align-self:start}.task-body{padding:20px}#task-list{margin-bottom:15px;width:100%;padding:8px}button,a,input,textarea,select{max-width:100%}dialog:not([open]){display:none}[hidden]{display:none!important}.btn:disabled{opacity:.55;cursor:default}.message{margin:18px}.message-content{min-width:0}.message-time{margin-top:5px}.alert-line{white-space:pre-wrap;font-size:13px;color:#6b795f}.progress{margin:20px 0}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:1000;max-width:90vw;padding:14px 20px;background:#30482d;color:white;border-radius:12px}.notes-grid label{display:grid;gap:6px}.teacher-notes .btn{margin-top:18px}.room-select{display:none}.hint{font-size:12px;color:#6b795f;margin-top:8px}.error-copy{color:#9b3f35;white-space:pre-wrap}@media(max-width:950px){.room-grid{grid-template-columns:minmax(0,1fr)}.room-layout{grid-template-columns:190px minmax(0,1fr)}}@media(max-width:650px){.room-layout{display:block}.room-select{display:block;width:100%;padding:12px;margin-bottom:16px}#student-sidebar .room-list{display:none}#student-sidebar{margin-bottom:16px}.topbar-inner,.app-nav,.page-wrap{padding-left:14px;padding-right:14px}.thread{height:380px}.page-intro h1{font-size:27px}.brand-logo{width:120px}.profile{gap:8px}.teacher-notes{padding:18px}.room-toolbar .btn{font-size:12px;padding:9px}.room-heading{padding:14px}.message{margin:14px 10px}.app-nav .btn{font-size:13px}.course-grid{grid-template-columns:1fr}}
.page-intro{margin-bottom:26px}.page-intro p{margin-top:10px}.room-layout{align-items:start}#student-sidebar h2{font-size:16px;margin:0 0 14px}.room-toolbar{margin-bottom:16px}.chat-panel,.task-panel{background:#fff;border:1px solid #e0e7db;border-radius:18px;overflow:hidden;box-shadow:0 4px 18px #25432404}.task-head{padding:18px 20px;border-bottom:1px solid #e5eadf}.task-head h2{font-size:18px;margin:0}.room-heading{min-height:70px}.task-body h3{margin:14px 0 10px;font-size:19px}.system-message{margin:18px auto;max-width:88%;padding:12px 16px;border-radius:12px;background:#f6f8f3;color:#6b795f;line-height:1.7}.thread{padding:4px}.compose{background:#fff}.compose-actions{align-items:center}.compose-actions label.btn{margin:0;cursor:pointer}.file-link{background:#fff}.room-toolbar .btn[aria-pressed=true]{background:#e9f0e4;color:#2d5d45}.task-desc{white-space:pre-wrap}.notes-grid>div>label{display:block;margin-bottom:8px}.storage-copy{line-height:1.7}.course-card{border:1px solid #e0e7db;background:white}.chapter-top h2{font-size:19px}.chapter-row{background:white;border:1px solid #e0e7db;border-radius:16px;margin-top:16px;padding:22px}.chapter-top{flex-wrap:wrap}.chapter-list{list-style:none;padding:0}.page-wrap{padding-bottom:40px}@media(max-width:650px){.app-nav{flex-wrap:nowrap;gap:2px;padding-top:8px;padding-bottom:8px}.app-nav .btn{font-size:12px;white-space:nowrap;padding:9px 5px;flex:1;justify-content:center}.page-intro{margin-bottom:24px}.room-heading{min-height:65px}.task-panel{margin-top:4px}.room-grid{gap:20px}.page-wrap{padding-top:24px}.room-toolbar .btn{padding:9px 10px}.system-message{max-width:94%;margin:14px auto}.task-body{padding:18px}.chapter-row{padding:18px}.login-panel{margin:8vh 14px}}
.thread{scroll-behavior:auto}.file-link img{display:block;width:100%;height:220px;object-fit:contain;background:#f7f8f3}

.login-panel .remember-username{display:flex;align-items:center;gap:9px;min-height:44px;width:fit-content;margin:12px 0 0;cursor:pointer;font-size:14px}.login-panel .remember-username input{width:18px;height:18px;margin:0;padding:0;accent-color:var(--green);flex-shrink:0}

.invite-notice{margin-top:18px;padding:14px 16px;border-radius:10px;background:#f6f3e9;color:#65532d;font-size:14px;line-height:1.8}.invite-copy{width:100%;margin-top:20px}.editor .invite-text{resize:vertical;min-height:190px;line-height:1.7;overflow-wrap:anywhere}

.attachment-picker{padding:14px;margin:12px 0;border:1px dashed #bdcdb5;border-radius:12px;background:#fafcf8;min-width:0}.attachment-picker.dragging{border:2px solid var(--green);background:#edf5e9}.attachment-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.attachment-count{font-size:13px;color:var(--muted);margin-left:auto}.attachment-list{display:grid;gap:8px;margin-top:8px}.attachment-item{display:flex;align-items:center;gap:9px;min-width:0;border:1px solid var(--line);border-radius:9px;background:white;padding:5px 6px}.attachment-item img{width:44px;height:44px;object-fit:cover;border-radius:6px;flex-shrink:0}.attachment-name{min-width:0;flex:1;overflow-wrap:anywhere;font-size:13px}.attachment-item .btn{flex-shrink:0;font-size:12px;padding:8px}.attachment-actions .btn{font-size:13px}.compose .compose-actions{justify-content:flex-end}.editor .attachment-picker input{max-width:100%}@media(hover:hover) and (pointer:fine){.camera-button{display:none}}@media(hover:none){.desktop-attachment-hint{display:none}}

.editor{overflow:hidden}#editor-form{display:flex;flex-direction:column;max-height:calc(85vh - 50px)}#editor-content{overflow-y:auto;min-height:0;padding-right:3px}#editor-title,#editor-error,.editor .dialog-actions{flex-shrink:0}.editor .dialog-actions{padding-top:12px;background:#fff;margin-top:12px}

/* Shared header typography keeps links and buttons visually consistent. */
.topbar-inner{flex-wrap:wrap}.brand-home{display:block;position:relative;width:300px;height:86px;max-width:100%;overflow:hidden;flex-shrink:0;border-radius:6px;line-height:0}.brand-home>.brand-logo{position:absolute;left:50%;top:50%;width:125%;height:auto;max-width:none;aspect-ratio:auto;transform:translate(-50%,-50%)}.topbar-inner>.flex{min-width:0;max-width:100%}#profile-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#logout{flex-shrink:0}.app-nav .btn{font:750 18px/1.4 var(--font);color:var(--ink);text-decoration:none;padding:12px 18px}.app-nav a[aria-current]{background:var(--sage);color:var(--green)}.login-panel>.brand-logo{width:260px;height:auto;max-width:100%;aspect-ratio:auto}
@media(max-width:650px){.brand-home{width:220px;height:64px}.topbar-inner>.flex{margin-left:auto}.app-nav{flex-wrap:wrap;gap:4px}.app-nav .btn{font-size:16px;padding:10px 8px;flex:1 1 auto}}

.notes-view-tabs{display:flex;gap:8px;margin:18px 0}.notes-view-tabs .btn[aria-pressed=true]{background:var(--sage);color:var(--green)}.notes-history-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.notes-history-tools h3{font-size:18px}.notes-history-tools select{max-width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:white}.notes-history-day{margin-top:24px}.notes-history-day h4{font-size:16px;margin:0 0 10px}.notes-history-record{border:1px solid var(--line);border-radius:12px;background:#fff;margin-top:8px;overflow:hidden}.notes-history-record summary{display:flex;align-items:center;gap:12px;min-height:52px;padding:14px 16px;cursor:pointer;list-style:none}.notes-history-record summary::before{content:'▸';color:var(--green)}.notes-history-record[open] summary::before{content:'▾'}.notes-history-record time{flex-shrink:0;font-weight:700;color:var(--green)}.notes-history-record summary span{min-width:0;overflow-wrap:anywhere;font-size:14px}.notes-history-record dl{margin:0;padding:0 16px 16px}.notes-history-record dl>div{padding-top:12px}.notes-history-record dt{font-size:12px;font-weight:700;color:var(--muted)}.notes-history-record dd{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.notes-history-record>.hint{padding:0 16px 16px}#notes-history-more{margin-top:18px}
