:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:#1f2937;background:#f7f8fa;font-synthesis:none;text-rendering:optimizeLegibility;--blue: #2563eb;--blue-soft: #eff6ff;--line: #e5e7eb;--muted: #6b7280;--green: #16a34a;--amber: #d97706;--red: #dc2626}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}body{background:#f7f8fa;overscroll-behavior-y:none}button,input,select,textarea{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.5;cursor:not-allowed}.app-shell{width:75vw;min-width:320px;margin:0 auto;min-height:100dvh;padding-bottom:calc(76px + env(safe-area-inset-bottom));background:#f7f8fa}.app-header{background:#fff;border-bottom:1px solid var(--line);padding:calc(12px + env(safe-area-inset-top)) 16px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px}.brand{display:flex;align-items:center;gap:10px}.brand-icon{width:38px;height:38px;border-radius:11px;object-fit:contain;flex-shrink:0}.brand h1{font-size:17px;margin:0;font-weight:700}.brand p{margin:2px 0 0;font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40vw}.account-area{display:flex;align-items:center;gap:8px;flex-shrink:0}.account-name{font-size:12px;font-weight:600;color:#374151;max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-exit{min-height:32px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:12px}.header-right{display:flex;align-items:center;gap:8px;flex-shrink:0}.header-student{max-width:108px;min-height:34px;border:1px solid var(--line);border-radius:8px;background:#fff;padding:0 6px;font-size:12px;font-weight:600;color:#111827}.profile-btn{min-width:36px;height:36px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:17px}.drawer-backdrop{position:fixed;inset:0;background:#11182766;z-index:50}.profile-drawer{position:absolute;top:0;right:0;height:100dvh;width:min(360px,100vw);background:#fff;box-shadow:-12px 0 40px #0000002e;display:flex;flex-direction:column;animation:drawerIn .22s ease-out}@keyframes drawerIn{0%{transform:translate(100%)}to{transform:translate(0)}}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}.drawer-head h2{margin:0;font-size:17px}.drawer-close{min-width:32px;height:32px;border:none;background:#f3f4f6;border-radius:8px;color:var(--muted);font-size:14px}.drawer-body{padding:16px 20px calc(24px + env(safe-area-inset-bottom));overflow-y:auto;display:flex;flex-direction:column;gap:20px}.profile-section h3{margin:0 0 10px;font-size:13px;color:#374151}.profile-page{display:flex;flex-direction:column;gap:14px}.profile-page-title{margin:0;font-size:18px;font-weight:700}.profile-page-body{display:flex;flex-direction:column;gap:14px}.profile-page .profile-section{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}.profile-add-row{display:flex;gap:8px;margin-bottom:12px}.profile-add-row input{flex:1;min-width:0;min-height:40px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font-size:13px}.profile-students{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.profile-students li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:13px}.profile-students li.muted{border:none;padding-left:0}.student-edit-input{flex:1;min-width:0;min-height:34px;border:1px solid var(--line);border-radius:7px;padding:0 8px;font-size:13px}.student-edit-actions{display:flex;gap:6px;flex-shrink:0}.student-edit-actions .btn.small{min-height:32px;padding:0 10px}.student-bar{display:flex;gap:10px;align-items:flex-end;padding:12px 16px 4px}.student-select{flex:1;display:flex;flex-direction:column;gap:4px}.student-label{font-size:11px;color:var(--muted)}.student-select select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 12px;color:#111827;font-weight:600}.icon-btn{min-width:44px;height:44px;border:none;border-radius:10px;background:var(--blue);color:#fff;font-size:24px;line-height:1}.app-main{padding:10px 16px 20px}.page{display:flex;flex-direction:column;gap:14px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 4px;text-align:center}.stat b{display:block;font-size:20px;line-height:1.2}.stat span{font-size:11px;color:var(--muted)}.stat.warn b{color:var(--amber)}.stat.good b{color:var(--green)}.stat.bad b{color:var(--red)}.question-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:16px;min-height:340px;padding:10px;display:flex;align-items:center;justify-content:center;overflow:hidden}.question-card img{max-width:100%;max-height:58dvh;object-fit:contain;border-radius:8px}.empty-photo{text-align:center;color:var(--muted);padding:30px 10px}.empty-icon{font-size:46px;margin-bottom:8px}.empty-photo p{margin:0 0 6px;font-size:15px;font-weight:600;color:#374151}.empty-photo span{font-size:12px}.due-chip,.result-badge{position:absolute;left:10px;bottom:10px;right:10px;font-size:12px;padding:8px 10px;border-radius:9px;text-align:center}.due-chip{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.result-badge{font-weight:600}.result-badge.correct{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.result-badge.partial{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.result-badge.wrong{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.btn{min-height:44px;border-radius:10px;border:1px solid transparent;padding:0 16px;font-weight:600;font-size:14px}.btn.primary{background:var(--blue);color:#fff}.btn.ghost{background:#fff;color:#374151;border-color:var(--line)}.btn.danger{background:#fff;color:var(--red);border-color:#fecaca}.btn.block{width:100%}.btn.small{min-height:32px;padding:0 10px;font-size:12px}.btn.big{min-height:52px;font-size:16px}.btn-row{display:flex;gap:10px}.btn-row .btn{flex:1}.rating-float{position:relative;z-index:5;margin:4px 0 10px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 22px #1118271a}.rating-title{text-align:center;font-size:13px;color:var(--muted);margin:0 0 6px}.rating-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.rating{min-height:62px;background:#fff;border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:13px}.rating b{font-size:20px;line-height:1}.rating.correct{color:var(--green);border-color:#bbf7d0;background:#f0fdf4}.rating.partial{color:var(--amber);border-color:#fde68a;background:#fffbeb}.rating.wrong{color:var(--red);border-color:#fecaca;background:#fef2f2}.hint{font-size:11px;color:var(--muted);line-height:1.6;margin:-2px 2px 0}.section-head{display:flex;align-items:flex-end;justify-content:space-between}.section-head h2{font-size:16px;margin:0}.section-head p{font-size:12px;color:var(--muted);margin:3px 0 0}.upload-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dropzone{border:2px dashed #bfdbfe;border-radius:14px;background:#f8fbff;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:16px;text-align:center;cursor:pointer;transition:background .15s,border-color .15s}.dropzone.dragging{border-color:var(--blue);background:#eff6ff}.dropzone b{font-size:14px;color:#111827}.dropzone span{font-size:11px;color:var(--muted)}.choice-btn{width:100%;min-height:52px;margin-bottom:10px;border:1px solid var(--line);border-radius:10px;background:#f9fafb;font-size:15px;font-weight:600;color:#111827}.empty-state{text-align:center;padding:60px 20px;color:var(--muted);border:1px dashed var(--line);border-radius:14px;background:#fff}.empty-state p{font-size:15px;font-weight:600;color:#374151;margin:0 0 8px}.empty-state span{font-size:12px;line-height:1.6}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.thumb{position:relative;border:1px solid var(--line);border-radius:10px;background:#fff;padding:0;overflow:hidden;aspect-ratio:3 / 4}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.thumb-loading{width:100%;height:100%;background:#f3f4f6}.thumb-meta{position:absolute;left:0;right:0;bottom:0;padding:4px 5px;background:#ffffffeb;font-size:10px;color:#374151;display:flex;align-items:center;gap:4px}.thumb-meta em{font-style:normal;margin-left:auto;color:var(--amber)}.dot{width:7px;height:7px;border-radius:50%;background:#9ca3af}.dot.weak{background:var(--red)}.dot.mid{background:var(--amber)}.dot.strong{background:var(--green)}.record-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.record-list li{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 10px}.record-thumb{width:44px;height:52px;flex:none;border-radius:6px;overflow:hidden;background:#f3f4f6;display:grid;place-items:center;color:#9ca3af;font-size:13px}.record-thumb img{width:100%;height:100%;object-fit:cover}.record-info{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}.record-info b{font-size:13px}.record-info span{font-size:11px;color:var(--muted)}.record-rating{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700}.record-rating.correct{background:#dcfce7;color:var(--green)}.record-rating.partial{background:#fef3c7;color:var(--amber)}.record-rating.wrong{background:#fee2e2;color:var(--red)}.record-rating.none{background:#f3f4f6;color:var(--muted)}.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}.card h2{font-size:15px;margin:0 0 8px}.muted{color:var(--muted);font-size:12px;line-height:1.6;margin:0 0 12px}.notice{background:#fffbeb;color:#92400e;border:1px solid #fde68a;border-radius:8px;padding:8px 10px;font-size:12px}.field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#374151;margin-bottom:10px}.field input,.field textarea{min-height:44px;border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:#fff;color:#111827;font-size:14px;width:100%;resize:vertical}.field input:disabled,.field textarea:disabled{background:#f3f4f6;color:var(--muted)}.rules{margin:0;padding-left:18px;font-size:12px;color:#4b5563;line-height:1.9}.danger-zone{border-color:#fecaca}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:20;width:75vw;min-width:320px;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabbar button{min-height:60px;border:none;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px}.tabbar button span{font-size:20px}.tabbar button.active{color:var(--blue);font-weight:700}.modal-backdrop{position:fixed;inset:0;background:#11182766;z-index:40;display:grid;place-items:center;padding:20px}.modal{width:100%;max-width:440px;background:#fff;border-radius:16px;padding:20px;box-shadow:0 20px 60px #00000029;max-height:calc(100dvh - 40px);overflow-y:auto}.modal h2{margin:0 0 6px;font-size:17px}.modal-note{margin-bottom:14px}.preview-modal img{width:100%;max-height:60dvh;object-fit:contain;border-radius:8px;background:#f9fafb}.toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translate(-50%);z-index:120;max-width:90vw;background:#111827;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;box-shadow:0 8px 24px #0003;text-align:center}.toast.inline{position:static;transform:none;max-width:100%;margin-top:12px}.busy-mask{position:fixed;inset:0;z-index:30;pointer-events:none}.center-screen,.auth-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px}.center-screen p{color:var(--muted);font-size:13px}.spinner{width:34px;height:34px;border:3px solid #dbeafe;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.auth-card{width:100%;max-width:400px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px}.auth-logo{width:64px;height:64px;border-radius:16px;object-fit:contain;display:block;margin-bottom:12px}.auth-card h1{margin:0 0 4px;font-size:21px}.segmented{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#f3f4f6;padding:4px;border-radius:10px;margin:18px 0 14px}.segmented button{min-height:38px;border:none;background:transparent;border-radius:7px;color:var(--muted);font-weight:600}.segmented button.active{background:#fff;color:var(--blue);box-shadow:0 1px 3px #00000014}.link-btn{width:100%;min-height:44px;margin-top:8px;border:none;background:transparent;color:var(--blue);font-size:13px}.link-btn.register-entry{margin-top:14px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:10px;font-weight:600}.link-btn:disabled{opacity:.6}@media(min-width:640px){.app-shell{padding-left:20px;padding-right:20px}.question-card{min-height:420px}.grid{grid-template-columns:repeat(4,1fr)}}.app-shell.native-app{width:100%;min-width:0}.tabbar.native-tabbar{width:100%;min-width:0;grid-template-columns:repeat(4,1fr)}.native-viewer{position:fixed;inset:0;z-index:100;background:#eef2f7;display:flex;flex-direction:column;padding:calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left))}.native-head{flex:0 0 auto;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px 10px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px}.native-title{flex:1 1 auto;text-align:center;font-size:12px;font-weight:700;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.native-exit{min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:11px;flex-shrink:0}.native-next{min-height:28px;padding:0 12px;font-size:11px;flex-shrink:0}.native-viewer .rating-title{margin:0 0 4px;font-size:11px}.native-rating{gap:8px}.native-rating .rating{min-height:44px;flex-direction:row;gap:6px;font-size:13px}.native-rating .rating b{font-size:17px}.native-viewer .result-badge{position:static;margin:6px 0 0;font-size:11px;padding:5px 8px}.native-photo{flex:1 1 auto;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;margin:8px 0}.native-photo img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;background:#fff}.native-photo .due-chip{position:absolute;left:50%;bottom:2px;transform:translate(-50%);width:max-content;max-width:92%;font-size:11px;padding:5px 8px}.native-bottom{flex:0 0 auto;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px 10px 8px}@media(max-height:460px){.native-viewer .rating-title{display:none}.native-rating .rating{min-height:34px}.native-viewer .result-badge{font-size:10px;padding:3px 6px}.native-head{padding:4px 8px;min-height:34px}.native-bottom{padding:4px 8px 6px}.native-photo{margin:6px 0}}
