.qhw-page{--qhw-purple:#6d28d9;--qhw-blue:#2563eb;--qhw-ink:#172033;--qhw-muted:#64748b;display:grid;gap:14px;max-width:1180px;margin:0 auto;padding-bottom:28px;color:var(--qhw-ink)}
.qhw-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 26px;border:1px solid #ddd6fe;border-radius:22px;background:linear-gradient(125deg,#fff 0%,#f7f3ff 56%,#eef5ff 100%);box-shadow:0 16px 36px rgba(76,29,149,.08)}
.qhw-hero:after{content:"";position:absolute;right:15%;top:-70px;width:190px;height:190px;border-radius:50%;background:rgba(124,58,237,.08);box-shadow:110px 100px 0 rgba(37,99,235,.05)}
.qhw-hero-copy{position:relative;z-index:1}.qhw-hero-copy>span,.qhw-eyebrow{display:inline-flex;align-items:center;gap:7px;color:#6d28d9;font-size:.72rem;font-weight:800;letter-spacing:.09em}.qhw-hero h2{margin:6px 0 3px;font-size:clamp(1.55rem,3vw,2.15rem);line-height:1.08}.qhw-hero p{margin:0;color:var(--qhw-muted)}
#qhwCreate{position:relative;z-index:1;min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:0 20px;border:0;border-radius:14px;color:#fff;background:linear-gradient(135deg,#7c3aed,#2563eb);font:inherit;font-weight:800;box-shadow:0 12px 24px rgba(79,70,229,.23);cursor:pointer;transition:.18s transform,.18s box-shadow}
#qhwCreate:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(79,70,229,.28)}#qhwCreate:disabled{filter:grayscale(1);opacity:.55;cursor:not-allowed;transform:none}
.qhw-how{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.qhw-how article{display:flex;align-items:center;gap:11px;padding:13px 15px;border:1px solid #e5e7eb;border-radius:15px;background:#fff}.qhw-how article>i{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;color:#6d28d9;background:#ede9fe;font-size:.75rem}.qhw-how span{display:grid}.qhw-how strong{font-size:.84rem}.qhw-how small{color:var(--qhw-muted);font-size:.72rem}
.qhw-list-card{min-width:0;border:1px solid #e2e8f0;border-radius:20px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.055);overflow:hidden}.qhw-list-card>header{padding:18px 20px;border-bottom:1px solid #eef2f7}.qhw-list-card h3{margin:0;font-size:1rem}.qhw-list-card header p{margin:3px 0 0;color:var(--qhw-muted);font-size:.78rem}#qhwRecords{display:grid;gap:10px;padding:12px}
.qhw-record{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;padding:14px;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.qhw-record.is-draft{border-color:#f5d98b;background:#fffdf7}.qhw-record-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#15803d;background:#dcfce7}.qhw-record.is-draft .qhw-record-icon{color:#b45309;background:#fef3c7}.qhw-record-body{min-width:0}.qhw-record-top{display:flex;align-items:center;gap:9px;min-width:0}.qhw-record-top small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--qhw-muted);font-weight:600}.qhw-status{flex:0 0 auto;padding:3px 8px;border-radius:999px;color:#047857;background:#d1fae5;font-size:.68rem;font-weight:800}.is-draft .qhw-status{color:#92400e;background:#fef3c7}.qhw-record h3{margin:7px 0 2px;font-size:.94rem}.qhw-record p{display:-webkit-box;overflow:hidden;margin:0;color:#475569;font-size:.8rem;line-height:1.45;white-space:pre-line;-webkit-line-clamp:2;-webkit-box-orient:vertical}.qhw-record footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;color:#64748b;font-size:.71rem}.qhw-record-actions{display:flex;align-items:center;gap:5px}.qhw-record-actions button{min-height:34px;padding:0 10px;border:1px solid #ddd6fe;border-radius:9px;background:#fff;color:#6d28d9;font:inherit;font-weight:800;cursor:pointer}.qhw-record-actions button.danger{padding:0;width:34px;border-color:#fecaca;color:#dc2626}.qhw-file-link{display:inline-flex;max-width:100%;align-items:center;gap:8px;margin-top:9px;padding:7px 9px;border-radius:9px;color:#4338ca;background:#eef2ff;font-size:.73rem;font-weight:700;text-decoration:none}.qhw-file-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qhw-state{display:grid;justify-items:center;text-align:center;padding:34px 18px}.qhw-state>span{width:46px;height:46px;display:grid;place-items:center;margin-bottom:10px;border-radius:15px;color:#6d28d9;background:#ede9fe}.qhw-state h3{margin:0;font-size:.98rem}.qhw-state p{max-width:520px;margin:5px 0 14px;color:var(--qhw-muted);font-size:.78rem;line-height:1.5}
body.qhw-open{overflow:hidden}.qhw-layer{position:fixed;z-index:10050;inset:0;display:grid;place-items:center;padding:18px;visibility:hidden}.qhw-layer.open{visibility:visible}.qhw-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.54);backdrop-filter:blur(3px);opacity:0;transition:opacity .18s}.qhw-layer.open .qhw-backdrop{opacity:1}.qhw-modal{position:relative;width:min(620px,100%);max-height:min(780px,calc(100dvh - 36px));display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.75);border-radius:24px;background:#fff;box-shadow:0 28px 80px rgba(15,23,42,.28);transform:translateY(18px) scale(.985);opacity:0;transition:.2s transform,.18s opacity}.qhw-layer.open .qhw-modal{transform:none;opacity:1}.qhw-modal>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:20px 22px 15px;border-bottom:1px solid #eef2f7;background:linear-gradient(135deg,#faf7ff,#f4f8ff)}.qhw-modal h2{margin:4px 0 2px;font-size:1.35rem}.qhw-modal header p{margin:0;color:#64748b;font-size:.77rem}.qhw-close{width:42px;height:42px;flex:0 0 auto;border:1px solid #e2e8f0;border-radius:13px;background:#fff;color:#475569;cursor:pointer}
#qhwForm{min-height:0;display:flex;flex-direction:column;overflow:auto;padding:18px 22px 0}.qhw-field{display:grid;gap:7px;margin-bottom:15px}.qhw-field>span{font-size:.78rem;font-weight:800;color:#334155}.qhw-select-wrap{position:relative;display:flex;align-items:center}.qhw-select-wrap>i:first-child{position:absolute;left:14px;color:#7c3aed}.qhw-select-wrap>i:last-child{position:absolute;right:14px;color:#64748b;font-size:.7rem;pointer-events:none}.qhw-select-wrap select{width:100%;height:50px;padding:0 38px 0 42px;border:1px solid #d8e0ec;border-radius:13px;outline:0;appearance:none;background:#f8fafc;color:#172033;font:inherit;font-size:.86rem;font-weight:700}.qhw-select-wrap select:focus,.qhw-work textarea:focus{border-color:#7c3aed;box-shadow:0 0 0 3px rgba(124,58,237,.11);background:#fff}.qhw-work textarea{width:100%;min-height:170px;resize:vertical;padding:14px;border:1px solid #d8e0ec;border-radius:14px;outline:0;background:#fbfdff;color:#172033;font:inherit;font-size:.89rem;line-height:1.55;box-sizing:border-box}.qhw-work small{justify-self:end;color:#94a3b8;font-size:.68rem}
.qhw-upload{display:grid;grid-template-columns:42px minmax(0,1fr) 30px;align-items:center;gap:10px;min-height:66px;padding:10px 12px;margin-bottom:10px;border:1px dashed #b9c5d6;border-radius:14px;background:#f8fafc;cursor:pointer}.qhw-upload input{position:absolute;width:1px;height:1px;opacity:0}.qhw-upload-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:#2563eb;background:#dbeafe}.qhw-upload>span:nth-of-type(2){min-width:0;display:grid}.qhw-upload strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem}.qhw-upload small{color:#64748b;font-size:.68rem}.qhw-upload>i{color:#7c3aed}.qhw-file-picked{display:flex;align-items:center;gap:9px;margin:-3px 0 12px;padding:8px 10px;border-radius:10px;color:#047857;background:#ecfdf5}.qhw-file-picked>span{min-width:0;display:grid}.qhw-file-picked strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.73rem}.qhw-file-picked small{font-size:.64rem;color:#64748b}
#qhwForm>footer{position:sticky;bottom:0;display:grid;grid-template-columns:minmax(120px,.72fr) minmax(190px,1.28fr);gap:10px;margin:4px -22px 0;padding:13px 22px 16px;border-top:1px solid #eef2f7;background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}#qhwForm>footer button{min-height:48px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:13px;font:inherit;font-size:.82rem;font-weight:800;cursor:pointer}.qhw-draft{border:1px solid #cbd5e1;background:#fff;color:#334155}.qhw-share{border:0;background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;box-shadow:0 10px 20px rgba(79,70,229,.19)}#qhwForm>footer button:disabled{opacity:.62;cursor:wait}.qhw-share.is-saving i,.qhw-draft.is-saving i{animation:qhw-spin .8s linear infinite}.qhw-share.is-saving i:before,.qhw-draft.is-saving i:before{content:"\f110"}@keyframes qhw-spin{to{transform:rotate(360deg)}}
[data-theme="dark"] .qhw-hero,[data-theme="dark"] .qhw-list-card,[data-theme="dark"] .qhw-record,[data-theme="dark"] .qhw-modal,[data-theme="dark"] .qhw-close,[data-theme="dark"] .qhw-record-actions button,[data-theme="dark"] #qhwForm>footer{background:#111827;color:#e5e7eb;border-color:#334155}[data-theme="dark"] .qhw-hero{background:linear-gradient(125deg,#111827,#1e1b4b)}[data-theme="dark"] .qhw-how article,[data-theme="dark"] .qhw-modal>header{background:#172033;border-color:#334155}[data-theme="dark"] .qhw-select-wrap select,[data-theme="dark"] .qhw-work textarea,[data-theme="dark"] .qhw-upload{background:#0f172a;color:#e5e7eb;border-color:#475569}
@media(max-width:599px){.qhw-page{gap:10px;padding:0 0 16px}.qhw-hero{padding:18px 16px;border-radius:17px}.qhw-hero p{max-width:240px;font-size:.75rem}.qhw-hero h2{font-size:1.42rem}#qhwCreate{width:48px;height:48px;padding:0;border-radius:14px}#qhwCreate span{display:none}.qhw-how{gap:6px}.qhw-how article{display:grid;justify-items:center;text-align:center;gap:5px;padding:9px 4px}.qhw-how article>i{width:28px;height:28px}.qhw-how small{font-size:.59rem}.qhw-list-card{border-radius:17px}.qhw-list-card>header{padding:14px 15px}#qhwRecords{padding:8px}.qhw-record{grid-template-columns:36px minmax(0,1fr);gap:9px;padding:11px;border-radius:14px}.qhw-record-icon{width:36px;height:36px;border-radius:11px}.qhw-record footer{align-items:flex-start;flex-direction:column}.qhw-record-actions{align-self:flex-end}.qhw-layer{align-items:end;padding:0}.qhw-modal{width:100%;max-height:94dvh;border-radius:22px 22px 0 0;transform:translateY(100%);transition:.25s transform}.qhw-layer.open .qhw-modal{transform:none}.qhw-modal>header{padding:17px 16px 13px}.qhw-modal h2{font-size:1.22rem}.qhw-close{width:44px;height:44px}#qhwForm{padding:15px 16px 0}.qhw-select-wrap select{height:50px;font-size:.8rem}.qhw-work textarea{min-height:175px}.qhw-upload{min-height:64px}#qhwForm>footer{grid-template-columns:.8fr 1.2fr;margin:4px -16px 0;padding:11px 16px calc(12px + env(safe-area-inset-bottom))}#qhwForm>footer button{min-height:50px}.qhw-draft span{font-size:.75rem}.qhw-share span{font-size:.78rem}}
@media(min-width:600px) and (max-width:1024px){.qhw-page{max-width:850px}.qhw-modal{width:min(650px,calc(100% - 32px))}}
@media(prefers-reduced-motion:reduce){.qhw-backdrop,.qhw-modal,#qhwCreate{transition:none!important}}


/* v254 locked Homework verification workflow */
.qhw-record.is-pending{border-color:#bfdbfe;background:#f8fbff}.qhw-record.is-pending .qhw-record-icon{color:#1d4ed8;background:#dbeafe}.qhw-record.is-pending .qhw-status{color:#1e40af;background:#dbeafe}
.qhw-record.is-returned{border-color:#fed7aa;background:#fffaf5}.qhw-record.is-returned .qhw-record-icon{color:#c2410c;background:#ffedd5}.qhw-record.is-returned .qhw-status{color:#9a3412;background:#ffedd5}
.qhw-record.is-withdrawn{border-color:#e2e8f0;background:#f8fafc;opacity:.82}.qhw-record.is-withdrawn .qhw-record-icon{color:#64748b;background:#e2e8f0}.qhw-record.is-withdrawn .qhw-status{color:#475569;background:#e2e8f0}
.qhw-workflow-note,.qhw-return-reason{display:flex;align-items:flex-start;gap:7px;margin-top:9px;padding:8px 10px;border-radius:10px;font-size:.72rem;line-height:1.4}.qhw-workflow-note{color:#1e40af;background:#eff6ff}.qhw-return-reason{color:#9a3412;background:#fff7ed}.qhw-return-reason strong{flex:0 0 auto}
.qhw-record-actions button.approve{border-color:#bbf7d0;color:#15803d;background:#f0fdf4}.qhw-record-actions button:disabled{opacity:.55;cursor:wait}
.qhw-date{width:100%;height:48px;padding:0 13px;border:1px solid #d8e0ec;border-radius:13px;outline:0;background:#f8fafc;color:#172033;font:inherit;box-sizing:border-box}.qhw-date:focus{border-color:#7c3aed;box-shadow:0 0 0 3px rgba(124,58,237,.11);background:#fff}.qhw-field>small{color:#64748b;font-size:.68rem}
#qhwForm>footer:has(.qhw-share:only-child){grid-template-columns:1fr}
[data-theme="dark"] .qhw-record.is-pending,[data-theme="dark"] .qhw-record.is-returned,[data-theme="dark"] .qhw-record.is-withdrawn,[data-theme="dark"] .qhw-date{background:#0f172a;color:#e5e7eb;border-color:#475569}
@media(max-width:599px){.qhw-record-actions{width:100%;flex-wrap:wrap;justify-content:flex-end}.qhw-record-actions button{min-height:38px}.qhw-workflow-note,.qhw-return-reason{font-size:.7rem}}
