.app-shell{min-height:100vh}.app-shell--dashboard{background:#eef2f7}.app-main--dashboard{max-width:none;padding:0}.dashboard-layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh;min-height:100dvh}.dashboard-sidebar{background:linear-gradient(180deg,#1e4d6b,#163a52);color:#e8f4fc;padding:20px 14px;display:flex;flex-direction:column;gap:24px;position:sticky;top:0;height:100vh;height:100dvh}.dashboard-sidebar-brand{display:flex;align-items:center;gap:12px;padding:8px 10px 16px;border-bottom:1px solid rgba(255,255,255,.12)}.dashboard-sidebar-brand i{font-size:32px;color:#69b1ff}.dashboard-sidebar-brand strong{display:block;font-size:17px;color:#fff}.dashboard-sidebar-brand span{font-size:12px;opacity:.75}.dashboard-nav{display:flex;flex-direction:column;gap:6px}.dashboard-nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;color:#ffffffd9;transition:background .15s,color .15s;position:relative}.dashboard-nav-item i{font-size:22px;width:24px;text-align:center;flex-shrink:0}.dashboard-nav-item:hover{background:#ffffff14;color:#fff}.dashboard-nav-item--active{background:#ffffff24;color:#fff;box-shadow:inset 0 0 0 1px #ffffff1a}.dashboard-nav-text{display:flex;flex-direction:column;gap:1px;min-width:0}.dashboard-nav-label{font-size:14px;font-weight:600;line-height:1.3}.dashboard-nav-sub{font-size:11px;opacity:.7}.dashboard-nav-badge{margin-left:auto;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#fa8c16;color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}.dashboard-content{padding:24px;max-width:1400px;width:100%}.dashboard-page-head{margin-bottom:16px}.dashboard-page-head h1{margin:0 0 4px;font-size:24px}.dashboard-page-head p{margin:0;color:var(--muted);font-size:14px}.saved-empty{text-align:center;padding:48px 24px}.saved-empty i{font-size:48px;color:#ffd666;margin-bottom:12px;display:block}.saved-empty h2{margin:0 0 8px}.saved-empty p{margin:0 auto;color:var(--muted);max-width:420px;line-height:1.6}.saved-grid--page{margin-top:8px}.app-header{background:linear-gradient(135deg,#0b3d91,#1677ff);color:#fff;padding:20px 24px;box-shadow:var(--shadow)}.brand{display:flex;align-items:center;gap:14px}.brand i{font-size:36px}.brand h1{margin:0;font-size:24px}.brand p{margin:4px 0 0;opacity:.9}.app-main{padding:24px;max-width:1400px;margin:0 auto}.panel{background:var(--card);border-radius:16px;padding:24px;box-shadow:var(--shadow)}.error-panel pre{background:#111827;color:#f9fafb;padding:12px;border-radius:8px;overflow:auto}.exam-page,.test-page{display:flex;flex-direction:column;gap:20px}.toolbar{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:12px;width:100%}.toolbar-filters{display:contents}.search-input,.toolbar select,.template-stats{box-sizing:border-box;min-height:48px;border:1px solid var(--border);border-radius:12px;background:var(--card);font-size:14px}.search-input,.toolbar select{width:100%;height:48px;padding:0 16px;line-height:1.4}.toolbar select{padding-right:36px;cursor:pointer;appearance:none;background-color:var(--card);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}.search-input{min-width:0}.template-stats{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;padding:0 16px}.template-stats-ok strong{font-size:18px;color:var(--primary);margin-right:4px}.template-stats-missing{color:#d48806;font-size:13px}.template-stats-hint{display:block;margin-top:4px;font-size:12px;color:var(--muted);font-family:ui-monospace,monospace}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.template-card{display:flex;gap:14px;background:var(--card);border-radius:16px;padding:18px;box-shadow:var(--shadow)}.template-number{width:42px;height:42px;border-radius:12px;background:#e6f4ff;color:var(--primary);display:grid;place-items:center;font-weight:700;flex-shrink:0}.template-body h3{margin:0 0 8px;font-size:18px}.template-body p{margin:0 0 6px;color:var(--muted);font-size:14px}.btn-primary,.btn-ghost{border:none;border-radius:10px;padding:10px 16px;cursor:pointer;display:inline-flex;align-items:center;gap:8px}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.btn-ghost{background:#eef2ff;color:var(--text)}.app-main--exam{max-width:none;padding:0}.app-shell--exam{background:#eef2f7}.exam-room{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:linear-gradient(180deg,#e8eef6,#f4f7fb 120px);overflow-x:hidden;max-width:100%}.exam-header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;padding:14px 24px;background:#fff;border-bottom:1px solid var(--border);box-shadow:0 2px 8px #0f172a0a}.exam-exit{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:10px;color:var(--muted);font-size:14px;transition:background .15s,color .15s}.exam-exit:hover{background:#f3f4f6;color:var(--text)}.exam-header-center{text-align:center}.exam-header-center h1{margin:0;font-size:18px;font-weight:700}.exam-meta{display:flex;justify-content:center;gap:10px;margin-top:4px;font-size:13px;color:var(--muted)}.mode-pill{background:#e6f4ff;color:var(--primary);padding:2px 10px;border-radius:999px;font-weight:600;font-size:12px}.exam-counter{font-size:20px;font-weight:800;color:var(--primary);font-variant-numeric:tabular-nums}.exam-progress-track{height:4px;background:#dde3ec;margin:0}.exam-progress-fill{height:100%;background:linear-gradient(90deg,var(--primary),#69b1ff);transition:width .35s ease}.exam-progress-label{margin:0;padding:6px 24px 0;font-size:12px;color:var(--muted);text-align:center}.exam-body{flex:1;display:grid;grid-template-columns:200px 1fr;gap:20px;padding:20px 24px;max-width:1200px;width:100%;margin:0 auto;align-items:start;min-width:0}.exam-sidebar{background:#fff;border-radius:16px;padding:16px;box-shadow:var(--shadow);position:sticky;top:16px}.sidebar-title{margin:0 0 12px;font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.question-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.q-cell{aspect-ratio:1;border:1px solid var(--border);border-radius:8px;background:#fafbfc;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}.q-cell:hover:not(.active){border-color:var(--primary);color:var(--primary)}.q-cell.active{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:0 2px 8px #1677ff59}.q-cell.answered:not(.active){background:#f0fdf4;border-color:#86efac;color:#166534}.q-cell.correct:not(.active){background:#f6ffed;border-color:var(--success);color:var(--success)}.q-cell.wrong:not(.active){background:#fff1f0;border-color:var(--danger);color:var(--danger)}.sidebar-legend{margin-top:14px;padding-top:12px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--muted)}.sidebar-legend span{display:flex;align-items:center;gap:6px}.dot{width:10px;height:10px;border-radius:3px;display:inline-block}.dot.answered{background:#86efac}.dot.correct{background:var(--success)}.dot.wrong{background:var(--danger)}.exam-main{background:#fff;border-radius:16px;padding:24px 28px;box-shadow:var(--shadow);min-height:400px;min-width:0}.exam-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 24px;background:#fff;border-top:1px solid var(--border);box-shadow:0 -4px 16px #0f172a0a}.exam-footer-hint{flex:1;text-align:center;font-size:14px;color:var(--muted)}.exam-footer-hint--auto{color:var(--primary);font-weight:500}.exam-footer-auto-spacer{width:120px;flex-shrink:0}.exam-footer-right{display:flex;gap:10px;align-items:center}.btn-nav{display:inline-flex;align-items:center;gap:6px;padding:10px 18px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);cursor:pointer;font-weight:500;transition:all .15s}.btn-nav:hover:not(:disabled){border-color:var(--primary);color:var(--primary)}.btn-nav:disabled{opacity:.4;cursor:not-allowed}.btn-nav-primary{display:inline-flex;align-items:center;gap:8px;padding:10px 22px}.btn-finish{padding:10px 20px}.exam-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px;color:var(--muted)}.exam-loader{width:40px;height:40px;border:3px solid #e5e7eb;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.exam-result-screen{min-height:100vh;display:grid;place-items:start center;padding:24px;background:linear-gradient(135deg,#e8eef6,#f4f7fb)}.exam-result-card{background:#fff;border-radius:24px;padding:48px 40px;text-align:center;box-shadow:var(--shadow);max-width:400px;width:100%}.exam-result-card--wide{max-width:720px;margin-top:12px;text-align:left}.exam-result-card--wide .exam-result-icon,.exam-result-card--wide h2,.exam-result-card--wide .exam-result-score,.exam-result-card--wide .exam-result-pct{text-align:center}.exam-result-icon{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;font-size:36px;font-weight:700;margin:0 auto 20px}.exam-result-icon.pass{background:#f6ffed;color:var(--success);border:2px solid #b7eb8f}.exam-result-icon.fail{background:#fff7e6;color:#d48806;border:2px solid #ffd591}.exam-result-card h2{margin:0 0 8px}.exam-result-score{font-size:48px;font-weight:800;margin:16px 0 4px;color:var(--primary)}.exam-result-pct{color:var(--muted);margin:0 0 20px;text-align:center}.exam-result-stats{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:24px}.exam-result-stat{padding:8px 14px;border-radius:999px;font-size:13px;background:#f8fafc;border:1px solid var(--border)}.exam-result-stat strong{font-size:16px;margin-right:4px}.exam-result-stat--correct{color:var(--success);border-color:#b7eb8f;background:#f6ffed}.exam-result-stat--wrong{color:var(--danger);border-color:#ffccc7;background:#fff1f0}.exam-result-stat--unanswered{color:#d48806;border-color:#ffd591;background:#fff7e6}.exam-result-breakdown{margin-bottom:20px;padding:16px;border:1px solid var(--border);border-radius:14px;background:#fafbfc}.exam-result-breakdown-title{margin:0 0 12px;font-size:14px;font-weight:600}.exam-result-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(42px,1fr));gap:8px}.result-q-cell{cursor:pointer}.result-q-cell.unanswered{background:#fff7e6;border-color:#ffd591;color:#d48806}.exam-result-breakdown-hint{margin:10px 0 0;font-size:12px;color:var(--muted);text-align:center}.exam-result-wrong-list{margin-bottom:24px;padding:16px;border:1px solid #ffccc7;border-radius:14px;background:snow}.exam-result-wrong-title{margin:0 0 10px;font-size:14px;font-weight:600;color:var(--danger)}.exam-result-wrong-list ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.exam-result-wrong-item{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:left;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s}.exam-result-wrong-item:hover{border-color:var(--danger);background:#fff5f5}.exam-result-wrong-num{flex-shrink:0;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-weight:700;font-size:13px;background:#fff1f0;color:var(--danger)}.exam-result-wrong-text{font-size:13px;line-height:1.45;color:#334155;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.exam-result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.mode-pill--retry{background:#fff7e6;color:#d48806;border-color:#ffd591}.mode-pill--review{background:#f0f5ff;color:#2f54eb;border-color:#adc6ff}.mode-pill--random{background:#f9f0ff;color:#722ed1}.exam-header-right{display:flex;align-items:center;gap:10px}.exam-save-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--muted);cursor:pointer;font-size:13px;font-weight:500;transition:all .15s}.exam-save-btn:hover{border-color:#ffd666;color:#d48806;background:#fffbe6}.exam-save-btn--active{border-color:#ffd666;background:#fffbe6;color:#d48806}.exam-save-btn--active i{color:#fa8c16}.exam-save-toast{position:fixed;top:72px;left:50%;transform:translate(-50%);z-index:50;display:inline-flex;align-items:center;gap:8px;padding:10px 16px;background:#162a1f;color:#fff;border-radius:999px;font-size:13px;box-shadow:0 8px 24px #0003;animation:toast-in .25s ease}.exam-save-toast i{color:#95de64}@keyframes toast-in{0%{opacity:0;transform:translate(-50%) translateY(-8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.saved-section{background:linear-gradient(135deg,#fffbe6,#fff);border:1px solid #ffe58f;border-radius:16px;padding:18px}.saved-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.saved-section-head h2{margin:0;font-size:18px;display:flex;align-items:center;gap:8px;color:#d48806}.saved-section-count{font-size:13px;color:var(--muted);background:#fff;padding:4px 10px;border-radius:999px;border:1px solid #ffe58f}.saved-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.saved-card{background:#fff;border:1px solid #ffe58f;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px}.saved-card-top{display:flex;gap:12px;align-items:flex-start}.saved-card-icon{width:40px;height:40px;border-radius:10px;background:#fff7e6;color:#fa8c16;display:grid;place-items:center;font-size:20px;flex-shrink:0}.saved-card h3{margin:0 0 4px;font-size:16px}.saved-card p{margin:0;font-size:13px;color:var(--muted)}.saved-card-date{margin-top:4px!important;font-size:12px!important}.saved-card-result{font-size:13px;font-weight:600;margin:0}.saved-card-result.pass{color:var(--success)}.saved-card-result.fail{color:var(--danger)}.saved-card-actions{display:flex;gap:8px;flex-wrap:wrap}.saved-card-actions .btn-primary{flex:1;justify-content:center}.template-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.template-title-row h3{margin:0 0 8px}.template-bookmark-badge{color:#fa8c16;font-size:18px;flex-shrink:0}.template-card--saved{box-shadow:0 0 0 1px #ffe58f inset}.template-card--pass{border:1px solid #b7eb8f}.template-card--fail{border:1px solid #ffccc7}.template-result{margin:10px 0;padding:10px 12px;background:#f8fafc;border-radius:10px;border:1px solid var(--border);display:flex;flex-direction:column;gap:8px}.template-result-score{font-weight:700;font-size:16px}.template-result-score.pass{color:var(--success)}.template-result-score.fail{color:var(--danger)}.template-result-meta,.template-result-date{display:block;font-size:12px;color:var(--muted)}.btn-clear-result{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--muted);cursor:pointer;font-size:12px;align-self:flex-start;transition:color .15s,border-color .15s}.btn-clear-result:hover{color:var(--danger);border-color:#ffccc7}.modal-overlay{position:fixed;inset:0;z-index:100;background:#0f172a73;display:grid;place-items:center;padding:16px}.modal-card{background:#fff;border-radius:20px;padding:28px 24px;max-width:440px;width:100%;box-shadow:0 24px 48px #0f172a2e}.modal-card h2{margin:0 0 6px;font-size:20px}.modal-subtitle{margin:0 0 20px;color:var(--muted);font-size:14px}.modal-actions{display:flex;flex-direction:column;gap:10px}.modal-option{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px;border:2px solid var(--border);border-radius:14px;background:#fff;cursor:pointer;text-align:left;transition:border-color .15s,background .15s}.modal-option i{font-size:24px;color:var(--primary);margin-bottom:4px}.modal-option:hover{border-color:#91caff;background:#f0f7ff}.modal-option--primary{border-color:#d3adf7;background:#f9f0ff}.modal-option--primary i{color:#722ed1}.modal-option--primary:hover{border-color:#b37feb;background:#efdbff}.modal-option-title{font-weight:700;font-size:15px}.modal-option-desc{font-size:13px;color:var(--muted);line-height:1.4}.modal-cancel{width:100%;justify-content:center;margin-top:14px}.question-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.question-hint{font-size:12px;color:var(--muted);background:#f9fafb;padding:4px 10px;border-radius:6px}.answer-item{transition:border-color .15s,background .15s,transform .1s}.answer-item:not(:disabled):hover{border-color:#91caff;transform:translateY(-1px)}.answer-item.correct .answer-label{background:var(--success);color:#fff}.answer-item.wrong .answer-label{background:var(--danger);color:#fff}.answer-item.selected .answer-label{background:var(--primary);color:#fff}.question-grid{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}.question-grid::-webkit-scrollbar{height:4px}.question-grid::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}.question-media-wrap{display:flex;justify-content:center;align-items:center;min-height:120px}.question-preview img,.question-preview video,.question-media,.answer-media{width:auto;max-width:100%;height:auto;max-height:min(560px,65vh);object-fit:contain;border-radius:12px;margin:12px auto 0;display:block;background:#f8fafc;image-rendering:auto}.question-view{display:flex;flex-direction:column;gap:16px}.question-badge{display:inline-block;background:#e6f4ff;color:var(--primary);padding:6px 10px;border-radius:999px;font-size:13px;font-weight:600}.question-text{font-size:18px;line-height:1.6;font-weight:600;overflow-wrap:anywhere;word-break:break-word}.question-text img,.question-text table,.question-text video,.question-text iframe{max-width:100%!important;height:auto!important}.answers-list{display:flex;flex-direction:column;gap:10px}.answer-item{display:flex;gap:12px;align-items:flex-start;text-align:left;border:1px solid var(--border);background:#fff;border-radius:12px;padding:12px;cursor:pointer;position:relative}.answer-item:disabled{cursor:default}.answer-item.selected{border-color:var(--primary);background:#e6f4ff}.answer-item.correct{border-color:var(--success);background:#f6ffed}.answer-item.wrong{border-color:var(--danger);background:#fff1f0}.answer-label{width:28px;height:28px;border-radius:50%;background:#f3f4f6;display:grid;place-items:center;font-weight:700;flex-shrink:0}.answer-content{display:flex;flex-direction:column;gap:8px;width:100%}.answer-content img,.answer-content video,.answer-media{max-width:100%;border-radius:8px}.answer-mark{margin-left:auto;font-size:20px;font-weight:700;flex-shrink:0}.correct-mark{color:var(--success)}.wrong-mark{color:var(--danger)}.answer-explanation{margin-top:8px;padding:14px 16px;background:#f0f7ff;border-radius:12px;border:1px solid #bae0ff}.answer-explanation h4{margin:0 0 8px;color:var(--primary);display:flex;align-items:center;gap:6px;font-size:14px}.answer-explanation p{margin:0;line-height:1.65;font-size:14px}.mode-select{min-width:0}.template-card{transition:transform .15s,box-shadow .15s}.template-card:hover{transform:translateY(-2px);box-shadow:0 12px 32px #0f172a1a}.template-body .btn-primary{margin-top:10px;width:100%;justify-content:center}@media(max-width:1024px){.app-main{padding:16px}.exam-body{grid-template-columns:180px 1fr;padding:16px;gap:16px}.exam-main{padding:20px}.question-text{font-size:17px}}@media(max-width:768px){.dashboard-layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}.dashboard-sidebar{position:static;height:auto;padding:12px;gap:12px}.dashboard-sidebar-brand{padding:4px 6px 10px}.dashboard-sidebar-brand span{display:none}.dashboard-nav{flex-direction:row;overflow-x:auto;gap:8px;padding-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}.dashboard-nav::-webkit-scrollbar{display:none}.dashboard-nav-item{flex:1;min-width:140px;flex-direction:column;text-align:center;padding:10px 8px;gap:6px}.dashboard-nav-text{align-items:center}.dashboard-nav-label{font-size:12px}.dashboard-nav-sub{display:none}.dashboard-nav-badge{position:absolute;top:6px;right:6px;margin:0;min-width:18px;height:18px;font-size:10px}.dashboard-content{padding:12px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-bottom:max(12px,env(safe-area-inset-bottom))}.dashboard-page-head h1{font-size:20px}.exam-page,.test-page{gap:12px}.saved-empty{padding:32px 16px}.saved-grid{grid-template-columns:1fr}.app-header{padding:14px 16px}.brand i{font-size:28px}.brand h1{font-size:20px}.brand p{font-size:13px}.app-main{padding:12px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.app-main.app-main--exam{padding:0;max-width:none;margin:0}.app-shell--exam{overflow-x:hidden}.panel{padding:16px;border-radius:14px}.toolbar{grid-template-columns:1fr;gap:10px}.search-input,.toolbar select{font-size:16px}.template-stats{height:auto;min-height:48px;padding:12px 16px;flex-direction:column;align-items:flex-start;gap:8px;font-size:13px}.template-stats-hint{word-break:break-all;font-size:11px}.template-grid{grid-template-columns:1fr;gap:12px}.template-card{padding:14px}.template-title-row{flex-wrap:wrap}.modal-overlay{padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.modal-card{max-height:min(90dvh,560px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding:24px 18px}.exam-header{grid-template-columns:auto 1fr auto;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));gap:8px}.exam-save-btn{min-width:44px;min-height:44px;justify-content:center;padding:10px}.exam-save-btn .btn-text{display:none}.exam-save-toast{top:auto;bottom:calc(88px + env(safe-area-inset-bottom));max-width:calc(100% - 24px);text-align:center}.exam-exit{padding:10px;min-width:44px;min-height:44px;justify-content:center}.exam-exit .btn-text{display:none}.exam-header-center{min-width:0}.exam-header-center h1{font-size:17px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.exam-meta{flex-wrap:wrap;gap:6px;font-size:12px}.mode-pill{font-size:11px;padding:2px 8px}.exam-counter{font-size:18px}.exam-progress-label{padding:4px 12px 0;font-size:12px}.exam-body{grid-template-columns:1fr;padding:10px 12px 0;gap:10px;max-width:none;width:100%;min-width:0}.exam-sidebar{position:sticky;top:0;z-index:5;order:-1;padding:10px 12px;border-radius:12px;box-shadow:var(--shadow);border-bottom:none;min-width:0;max-width:100%;overflow:hidden}.sidebar-title{margin-bottom:8px;font-size:11px}.sidebar-legend{display:none}.question-grid{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:6px;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;padding-bottom:2px;grid-template-columns:unset;max-width:100%}.q-cell{flex:0 0 42px;width:42px;height:42px;min-width:42px;aspect-ratio:unset;scroll-snap-align:center;font-size:14px}.exam-main{order:0;padding:16px;min-height:0;min-width:0;max-width:100%;overflow-x:hidden;border-radius:14px;box-shadow:var(--shadow)}.exam-room{padding-bottom:calc(76px + env(safe-area-inset-bottom))}.question-view{gap:14px;min-width:0;max-width:100%}.question-text{font-size:17px;line-height:1.55;overflow-wrap:anywhere;word-break:break-word}.question-text p,.question-text div{margin:0}.question-media-wrap{min-height:0;max-width:100%;overflow:hidden}.question-preview img,.question-preview video,.question-media,.answer-media{width:auto;max-width:100%;height:auto;max-height:min(340px,42vh);object-fit:contain;object-position:center;border-radius:10px;margin:8px auto 0;display:block;image-rendering:auto;-webkit-backface-visibility:hidden}.answers-list{gap:10px}.exam-footer{position:fixed;left:0;right:0;bottom:0;z-index:30;flex-wrap:nowrap;gap:8px;padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.exam-footer-hint{flex:1;min-width:0;font-size:11px;line-height:1.35;text-align:center;order:0;width:auto;margin-bottom:0}.exam-footer-auto-spacer{width:44px}.exam-footer-right{gap:6px;flex-shrink:0}.btn-nav,.btn-nav-primary,.btn-primary,.btn-finish{min-height:44px;padding:10px 14px}.btn-nav .btn-text,.btn-nav-primary .btn-text,.btn-finish .btn-text{display:none}.btn-nav,.btn-nav-primary{padding:10px 12px}.question-top{gap:8px}.question-hint{display:none}.question-badge{font-size:13px;padding:5px 10px}.answer-item{padding:14px 12px;min-height:48px;gap:10px}.answer-item:not(:disabled):hover{transform:none}.answer-item:not(:disabled):active{transform:scale(.99)}.answer-label{width:32px;height:32px;font-size:14px}.answer-explanation{padding:12px}.exam-result-screen{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.exam-result-card,.exam-result-card--wide{padding:24px 18px;border-radius:18px;margin-top:0}.exam-result-score{font-size:40px}.exam-result-grid{grid-template-columns:repeat(auto-fill,minmax(40px,1fr));gap:6px}.exam-result-actions{flex-direction:column;align-items:stretch}.exam-result-actions .btn-primary,.exam-result-actions .btn-ghost,.exam-result-actions .btn-nav{width:100%;justify-content:center;min-height:48px}.exam-state{min-height:50vh;padding:24px}}@media(max-width:400px){.exam-header-center h1{font-size:15px}.exam-main{padding:14px}.question-preview img,.question-preview video,.question-media,.answer-media{max-height:min(42vh,320px)}.exam-meta .mode-pill--review,.exam-meta .mode-pill--retry{display:none}.q-cell{flex:0 0 38px;width:38px;height:38px;min-width:38px;font-size:13px}.exam-footer-hint{font-size:10px}.question-text{font-size:16px}.template-number{width:36px;height:36px;font-size:14px}.saved-card-actions{flex-direction:column}.saved-card-actions .btn-primary{width:100%}.template-title-row h3,.template-body h3{font-size:16px}.modal-card{padding:20px 16px}}@media(max-width:1024px){.test-layout{grid-template-columns:1fr}}:root{--bg: #f4f7fb;--card: #ffffff;--primary: #1677ff;--primary-dark: #0958d9;--text: #1f2937;--muted: #6b7280;--border: #e5e7eb;--success: #389e0d;--danger: #cf1322;--shadow: 0 8px 24px rgba(15, 23, 42, .08);font-family:Inter,Segoe UI,system-ui,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;min-height:100vh;overflow-x:hidden}button,input,select{font:inherit;touch-action:manipulation}a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}#root{min-height:100vh;min-height:100dvh}
