/* Fixed26: theme, notice/message, learning */
.theme-toggle{white-space:nowrap}.landing-theme-toggle{position:fixed;top:16px;right:18px;z-index:20;border:1px solid #394457;background:#111722;color:#fff;border-radius:999px;padding:10px 14px;font-weight:800;cursor:pointer;box-shadow:0 8px 24px #0005}.notification-button{position:relative}.notification-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;padding:0 5px;border-radius:999px;background:#ff4f58;color:#fff;font-size:11px;font-weight:900}.feature-modal-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-right:36px;margin-bottom:16px}.feature-modal-title h2{margin:0 0 5px}.feature-modal-title p{margin:0;color:var(--muted);font-size:13px}.communication-modal-card,.learning-modal-card{width:min(1040px,calc(100vw - 28px));height:min(780px,calc(100vh - 28px));padding:24px;text-align:left;overflow:hidden;display:flex;flex-direction:column}.message-detail-card{width:min(650px,calc(100vw - 28px));max-height:calc(100vh - 40px);overflow:auto;text-align:left}.feature-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);overflow:auto;flex:0 0 auto}.feature-tab{border:0;background:transparent;color:var(--muted);padding:11px 14px;font-weight:800;cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent}.feature-tab.active{color:var(--text);border-bottom-color:var(--red)}.feature-pane{display:none;min-height:0;overflow:auto;padding:14px 2px;flex:1}.feature-pane.active{display:block}.message-list{display:grid;gap:10px}.message-card{border:1px solid var(--line);border-radius:12px;background:var(--panel2);padding:14px;cursor:pointer;transition:.16s}.message-card:hover{transform:translateY(-1px);border-color:#536078}.message-card.unread{border-left:4px solid var(--red);background:rgba(229,72,77,.06)}.message-card.notice{cursor:default}.message-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.message-card h3{font-size:15px;margin:0 0 5px}.message-card-meta{color:var(--muted);font-size:11px}.message-card p{margin:9px 0 0;white-space:pre-wrap;color:#cbd5e1;line-height:1.55;font-size:13px}.message-tag{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:900;background:#263247;color:#c8d7eb}.message-tag.assignment{background:#422c12;color:#ffd27b}.attachment-link{display:inline-flex;margin-top:10px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;color:#ff9ca0;text-decoration:none;font-size:12px;font-weight:800}.message-actions{display:flex;gap:7px;margin-top:10px}.feature-form{max-width:720px;margin:auto}.feature-form textarea{width:100%;margin-top:8px;padding:12px 14px;border:1px solid #343d4c;border-radius:10px;background:#0d121a;color:#fff;resize:vertical;outline:none}.feature-form textarea:focus{border-color:var(--red);box-shadow:0 0 0 3px #e5484d25}.feature-form small{color:var(--muted);font-weight:500}.attachment-info{color:var(--muted);font-size:12px;margin:6px 0 10px}.message-detail-subject{padding-right:30px}.message-detail-subject h2{margin:0 0 8px}.message-detail-meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px}.message-detail-body{white-space:pre-wrap;line-height:1.7;padding:18px 0;border-top:1px solid var(--line);margin-top:16px}.assignment-box{border:1px solid #725124;background:rgba(238,167,55,.08);border-radius:10px;padding:12px;margin-top:14px}.learning-progress{padding:12px 14px;margin-bottom:12px;border:1px solid var(--line);border-radius:11px;background:var(--panel2)}.learning-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:8px;font-size:13px}.learning-progress-track{height:8px;border-radius:999px;background:#252d3b;overflow:hidden}.learning-progress-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#e5484d,#ff8d68);transition:.25s}.learning-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:12px;min-height:0;flex:1}.learning-chapter-list{border:1px solid var(--line);border-radius:12px;overflow:auto;padding:8px;background:var(--panel2)}.learning-chapter-button{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text);padding:10px;text-align:left;cursor:pointer}.learning-chapter-button:hover,.learning-chapter-button.active{background:#202938;border-color:#3c495c}.learning-chapter-button.completed .learning-check{background:#1d9b66;color:#fff}.learning-check{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#2a3342;color:#8896aa;font-weight:900}.learning-chapter-button strong{display:block;font-size:13px}.learning-chapter-button small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.learning-stars{color:#f1b945;font-size:10px;white-space:nowrap}.learning-detail{border:1px solid var(--line);border-radius:12px;overflow:auto;background:var(--panel2);padding:20px}.learning-empty{display:grid;place-items:center;height:100%;min-height:220px;color:var(--muted)}.learning-detail h2{margin:0 0 8px}.learning-summary{color:#ffb2b5;font-weight:800;margin-bottom:18px}.learning-content{white-space:pre-wrap;line-height:1.85;color:#d6deea}.learning-code-title{margin:20px 0 8px;font-size:13px}.learning-code{margin:0;padding:14px;border-radius:10px;overflow:auto;background:#111;color:#ecf2f8;font:13px/1.65 Consolas,monospace;border:1px solid #303846}.learning-complete-row{display:flex;justify-content:flex-end;margin-top:16px}.empty-state{padding:50px 20px;text-align:center;color:var(--muted)}

/* White theme. The editor receives a dedicated high-contrast light palette. */
html[data-theme="light"]{--bg:#eef2f7;--panel:#ffffff;--panel2:#f6f8fb;--line:#cbd5e1;--text:#172033;--muted:#64748b;--red:#d9363e;--red2:#b82029;--green:#0a9f70;color-scheme:light}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}html[data-theme="light"] .join-view{background:radial-gradient(circle at top,#ffe8e8 0,#eef2f7 46%)}html[data-theme="light"] .landing-theme-toggle{background:#fff;color:#172033;border-color:#cbd5e1;box-shadow:0 8px 24px #33415522}html[data-theme="light"] .landing-hero,html[data-theme="light"] .join-card,html[data-theme="light"] .panel,html[data-theme="light"] .modal-card{background:#fff;color:#172033;border-color:#cbd5e1;box-shadow:0 18px 55px #33415518}html[data-theme="light"] .topbar{background:#fff;border-color:#cbd5e1}html[data-theme="light"] .panel-titlebar,html[data-theme="light"] .editor-view-tabs,html[data-theme="light"] .side-tabs,html[data-theme="light"] .problem-sidebar,html[data-theme="light"] .feature-tabs{background:#f6f8fb;color:#172033}html[data-theme="light"] .ghost,html[data-theme="light"] .mini-btn{background:#eef2f7;color:#172033;border-color:#cbd5e1}html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea,html[data-theme="light"] #stdinInput,html[data-theme="light"] .feature-form textarea{background:#fff;color:#172033;border-color:#b8c3d2}html[data-theme="light"] .mode-tabs{background:#e8edf4}html[data-theme="light"] .mode-tab{color:#526176}html[data-theme="light"] .mode-tab.active{background:#fff1f2;color:#bd2730}html[data-theme="light"] .contact-card{border-color:#cbd5e1;color:#64748b}html[data-theme="light"] .user-progress{background:#fff5f5;border-color:#f0b7ba;color:#8f1f26}html[data-theme="light"] .editor-meta,html[data-theme="light"] .tab,html[data-theme="light"] .side-tab,html[data-theme="light"] .editor-view-tab{color:#5c6b80}html[data-theme="light"] .tab.active,html[data-theme="light"] .side-tab.active,html[data-theme="light"] .editor-view-tab.active{color:#172033}html[data-theme="light"] .code-editor,html[data-theme="light"] .problem-code-wrap{background:#fff}html[data-theme="light"] .line-numbers{background:#edf2f7;color:#6b778a;border-color:#cbd5e1}html[data-theme="light"] .code-area pre{background:#fff;color:#172033}html[data-theme="light"] .code-area textarea{caret-color:#111827}html[data-theme="light"] .tok-keyword{color:#b4232f!important}html[data-theme="light"] .tok-string{color:#985f0d!important}html[data-theme="light"] .tok-number{color:#6f42c1!important}html[data-theme="light"] .tok-comment{color:#2f7d42!important}html[data-theme="light"] .tok-function{color:#075db8!important}html[data-theme="light"] .tok-preprocessor{color:#087a84!important}html[data-theme="light"] #output,html[data-theme="light"] .problem-io pre,html[data-theme="light"] .learning-code{background:#f8fafc;color:#172033}html[data-theme="light"] .problem-item{color:#243147}html[data-theme="light"] .problem-item:hover,html[data-theme="light"] .problem-item.active,html[data-theme="light"] .learning-chapter-button:hover,html[data-theme="light"] .learning-chapter-button.active{background:#e9f0f8;border-color:#b7c5d6}html[data-theme="light"] .message-card,html[data-theme="light"] .learning-progress,html[data-theme="light"] .learning-chapter-list,html[data-theme="light"] .learning-detail{background:#f8fafc}html[data-theme="light"] .message-card p,html[data-theme="light"] .learning-content{color:#334155}html[data-theme="light"] .learning-progress-track{background:#dbe3ed}html[data-theme="light"] .modal{background:#24314788}html[data-theme="light"] .modal-close{color:#172033}html[data-theme="light"] .toast{background:#fff;color:#172033;border-color:#cbd5e1;box-shadow:0 12px 30px #33415533}
@media(max-width:760px){.communication-modal-card,.learning-modal-card{width:100vw;height:100vh;max-width:none;max-height:none;border-radius:0;padding:16px}.learning-layout{grid-template-columns:1fr;overflow:auto}.learning-chapter-list{max-height:240px}.feature-tabs{margin-right:20px}.landing-theme-toggle{top:8px;right:8px;padding:8px 10px;font-size:12px}}
html[data-theme="light"] .joj-list-pane,html[data-theme="light"] .joj-admin-card{background:#fff;color:#172033;border-color:#cbd5e1}html[data-theme="light"] .joj-item{color:#243147}html[data-theme="light"] .joj-item:hover,html[data-theme="light"] .joj-item.active{background:#e9f0f8;border-color:#b7c5d6}html[data-theme="light"] .joj-no,html[data-theme="light"] .joj-state{background:#e4eaf2;color:#526176}html[data-theme="light"] .joj-description{color:#334155}html[data-theme="light"] .joj-spec-grid article,html[data-theme="light"] .joj-sample,html[data-theme="light"] .joj-submit pre,html[data-theme="light"] .joj-case{border-color:#cbd5e1}html[data-theme="light"] .joj-spec-grid strong,html[data-theme="light"] .joj-sample h3{background:#edf2f7;color:#172033}html[data-theme="light"] .joj-sample pre,html[data-theme="light"] .joj-submit pre{background:#f8fafc;color:#172033}html[data-theme="light"] .joj-admin-tabs,html[data-theme="light"] .joj-admin-row,html[data-theme="light"] .joj-form{border-color:#cbd5e1}html[data-theme="light"] .joj-admin-tabs button{color:#64748b}html[data-theme="light"] .joj-admin-tabs button.active{color:#172033}
html[data-theme="light"] .landing-copy{background:rgba(255,255,255,.91);border-color:#cbd5e1;box-shadow:0 18px 42px #3341551f}html[data-theme="light"] .landing-eyebrow{color:#b4232f}html[data-theme="light"] .landing-hero:before{background:radial-gradient(circle at 68% 35%,rgba(70,126,210,.12),transparent 38%),linear-gradient(120deg,rgba(229,72,77,.06),transparent 38%)}html[data-theme="light"] .join-card-title small{color:#64748b}
.admin-landing-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 12px}.admin-landing-tools .engine-status-open{margin:0;width:100%}@media(max-width:520px){.admin-landing-tools{grid-template-columns:1fr}}
