*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f4f7fb;color:#1e293b}button,input,select{font:inherit}.app-shell{max-width:1250px;margin:0 auto;padding:24px}.topbar,.test-header,.teacher-head,.result-hero{display:flex;justify-content:space-between;align-items:center;gap:16px}.topbar{margin-bottom:22px}h1,h2,h3,p{margin-top:0}h1{margin-bottom:4px}.subtitle{color:#64748b;margin:0}.card{background:#fff;border:1px solid #dbe3ee;border-radius:20px;padding:28px;box-shadow:0 10px 25px rgba(15,23,42,.05)}.hidden{display:none!important}.hero{text-align:center;padding:40px 28px}.skill-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:26px 0}.skill-card{border:1px solid #dbe3ee;border-radius:16px;padding:18px;text-align:left;display:flex;flex-direction:column;gap:7px}.skill-card span{font-weight:800;color:#1d4ed8}.skill-card small{color:#64748b;line-height:1.4}.btn{border:0;border-radius:10px;padding:10px 16px;font-weight:700;cursor:pointer}.primary{background:#2563eb;color:#fff}.secondary{background:#eaf0ff;color:#1e40af}.ghost{background:#fff;border:1px solid #dbe3ee;color:#64748b}.danger{background:#fee2e2;color:#b91c1c}.actions,.top-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.center{justify-content:center}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0 24px}label{font-weight:700;font-size:14px}input,select{width:100%;margin-top:7px;padding:12px;border:1px solid #dbe3ee;border-radius:10px}.eyebrow{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#64748b}.progress-text{color:#64748b;margin-top:4px}.level-pill{background:#eef2ff;color:#3730a3;padding:10px 14px;border-radius:999px}.progress-track{height:10px;background:#e2e8f0;border-radius:99px;margin:18px 0 28px;overflow:hidden}.progress-bar{height:100%;background:#2563eb;width:0}.instruction{color:#64748b;margin-bottom:12px}.question-prompt{font-size:34px;font-weight:800;min-height:90px;display:flex;align-items:center;justify-content:center;text-align:center}.karen-large{font-size:76px}.choices{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:20px 0}.choice{border:1px solid #dbe3ee;background:#fff;border-radius:14px;padding:18px;font-size:20px;cursor:pointer;min-height:70px}.choice.karen{font-size:40px}.choice.selected{border-color:#2563eb;background:#eff6ff}.score-badge{background:#ecfdf5;border-radius:18px;padding:18px;min-width:140px;text-align:center}.score-badge span{display:block;font-size:34px;font-weight:900;color:#15803d}.stats-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:24px 0}.stat{border:1px solid #dbe3ee;border-radius:14px;padding:14px}.stat-label{display:block;font-size:13px;color:#64748b;margin-bottom:6px}.stat strong{font-size:20px}.summary-box{border:1px solid #dbe3ee;background:#f8fafc;border-radius:14px;padding:18px;line-height:1.7;margin-bottom:20px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid #dbe3ee;white-space:nowrap;text-align:left}th{font-size:12px;color:#64748b;text-transform:uppercase}@media(max-width:950px){.skill-grid,.stats-grid,.form-grid{grid-template-columns:1fr}.choices{grid-template-columns:1fr}.topbar,.test-header,.teacher-head,.result-hero{flex-direction:column;align-items:flex-start}}
.adaptive-note{max-width:760px;margin:10px auto 24px;color:#64748b;line-height:1.6}

.diag-level{padding:12px 0;border-bottom:1px solid #dbe3ee}
.diag-level:last-child{border-bottom:0}
.diag-row{display:flex;justify-content:space-between;gap:20px;padding:6px 0;color:#475569}

.roster-panel{margin-bottom:28px}
.roster-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px}
.roster-head p{margin:4px 0 0;color:#64748b}
.student-form-wrap{border:1px solid #dbe3ee;background:#f8fafc;border-radius:16px;padding:18px;margin-bottom:18px}
.roster-form-grid{grid-template-columns:1fr 2fr 1fr}
.roster-table-wrap{margin-top:12px}
.row-actions{display:flex;gap:8px}
.btn.mini{padding:6px 10px;font-size:13px}
.empty-row{text-align:center;color:#94a3b8;padding:24px}
.section-divider{border:0;border-top:1px solid #e2e8f0;margin:28px 0}
.session-error{margin-top:10px;color:#b91c1c;font-weight:700}
@media(max-width:850px){
  .roster-form-grid{grid-template-columns:1fr}
  .roster-head{align-items:flex-start;flex-direction:column}
}

#rosterStudentId[readonly]{
  background:#f1f5f9;
  color:#475569;
}

.session-panel{margin-bottom:28px}
.inline-input-action{display:flex;gap:8px;align-items:center}
.inline-input-action input{flex:1}
.session-student-select{margin:18px 0}
.roster-head.compact{margin-bottom:10px}
.roster-head.compact h3{margin-bottom:4px}
.student-checklist{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;max-height:320px;overflow:auto;border:1px solid #dbe3ee;border-radius:14px;padding:12px;background:#fff}
.student-check-item{display:flex;gap:10px;align-items:flex-start;border:1px solid #e2e8f0;border-radius:10px;padding:10px;font-weight:400}
.student-check-item input{width:auto;margin:4px 0 0}
.student-check-item span{display:flex;flex-direction:column;gap:2px}
.student-check-item small{color:#64748b}
.session-password{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700}
.status-pill{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800}
.status-draft{background:#f1f5f9;color:#475569}
.status-active{background:#dcfce7;color:#166534}
.status-ended{background:#fee2e2;color:#991b1b}
@media(max-width:850px){.student-checklist{grid-template-columns:1fr}}

.waiting-box{margin:18px 0;padding:18px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:14px}
.waiting-box p{margin:6px 0 0;color:#64748b}

.live-monitor{margin-top:22px;border:1px solid #bfdbfe;background:#f8fbff;border-radius:16px;padding:18px}
.monitor-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:16px 0}
.monitor-stat{background:#fff;border:1px solid #dbe3ee;border-radius:12px;padding:12px}
.monitor-stat span{display:block;color:#64748b;font-size:12px;margin-bottom:4px}
.monitor-stat strong{font-size:22px}
.status-not-joined{background:#f1f5f9;color:#475569}
.status-waiting{background:#fef3c7;color:#92400e}
.status-approved{background:#dbeafe;color:#1d4ed8}
.status-testing{background:#ede9fe;color:#6d28d9}
.status-finished{background:#dcfce7;color:#166534}
.muted{color:#64748b;font-size:13px}
@media(max-width:850px){.monitor-stats{grid-template-columns:repeat(2,1fr)}}

.grade-roster-grid{display:grid;gap:22px}
.grade-roster-section{border:1px solid #dbe3ee;border-radius:16px;background:#fff;overflow:hidden}
.grade-roster-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.grade-roster-title h3{margin:0}
.grade-count{font-size:13px;color:#64748b}
.session-grade-group{border:1px solid #dbe3ee;border-radius:12px;overflow:hidden;margin-bottom:12px}
.session-grade-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.session-grade-header span{color:#64748b;font-size:12px}
.student-check-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #f1f5f9}
.student-check-row:last-child{border-bottom:none}
.student-check-row span{display:flex;flex-direction:column;gap:2px}
.student-check-row small{color:#64748b}
.empty-grade-note{padding:12px;color:#94a3b8;font-size:13px}

.grade-results-grid{display:grid;gap:22px}
.grade-results-section{border:1px solid #dbe3ee;border-radius:16px;background:#fff;overflow:hidden}
.grade-results-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.grade-results-title h3{margin:0}

.auth-card{max-width:680px;margin:0 auto}
.auth-message{margin:16px 0;padding:14px;border:1px solid #fbbf24;background:#fffbeb;border-radius:12px;color:#78350f}
.uid-box{margin:16px 0;padding:16px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:12px}
.uid-box p{margin:8px 0}
.uid-box code{word-break:break-all}
.teacher-account-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;margin-bottom:18px;border:1px solid #dbe3ee;border-radius:14px;background:#f8fafc}
.teacher-account-bar div{display:flex;flex-direction:column;gap:2px}
.teacher-account-bar small{color:#64748b}
