/* ===== Variables ===== */
:root {
  --primary: #6366f1; --primary-hover: #4f46e5; --primary-light: #eef2ff;
  --success: #10b981; --danger: #ef4444; --warning: #f59e0b;
  --bg: #f0f2f8; --card: rgba(255,255,255,0.85); --card-solid: #ffffff;
  --text: #1e1b4b; --text-secondary: #6b7280;
  --border: rgba(0,0,0,0.06); --border-hover: rgba(99,102,241,0.3);
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.1);
  --glow: 0 0 20px rgba(99,102,241,0.15);
  --orange: #f97316;
  --glass-blur: 16px;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(at 20% 0%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(16,185,129,0.06) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(245,158,11,0.03) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Layout ===== */
#app {
  width: 100%; max-width: 820px; padding: 20px;
  display: flex; flex-direction: column; min-height: 100vh;
}
.page { display: none; animation: pageIn .35s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Buttons ===== */
.btn {
  padding: 10px 24px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.01em;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--card); color: var(--text);
  border: 1.5px solid var(--border); backdrop-filter: blur(8px);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.25);
}
.btn-danger:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(239,68,68,0.35); }
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669); color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.btn-success:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(16,185,129,0.35); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.25);
}
.btn-warning:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(245,158,11,0.35); }

/* ===== Card ===== */
.card {
  background: var(--card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 16px;
  transition: box-shadow .3s, transform .3s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ===== Inputs ===== */
.input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid rgba(0,0,0,0.08); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; font-family: inherit;
  background: rgba(255,255,255,0.7);
  transition: all .2s;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: #fff;
}
.input.error { border-color: var(--danger); background: #fef2f2; }

select.input { cursor: pointer; }

/* ===== Type Badges ===== */
.q-type {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.q-type.danxuan { background: #dbeafe; color: #1d4ed8; }
.q-type.duoxuan { background: #fce7f3; color: #be185d; }
.q-type.panduan { background: #d1fae5; color: #059669; }
.q-type.tiankong { background: #fef3c7; color: #b45309; }
.q-type.jianda { background: #ede9fe; color: #6d28d9; }
.q-type.tupian { background: #fce7d5; color: #c2410c; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; border-radius: 12px;
  font-size: 11px; font-weight: 700; padding: 0 8px;
}
.badge-primary { background: var(--primary); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-danger { background: var(--danger); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }

/* ===== Utility ===== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== Import Zone ===== */
.import-zone {
  border: 2px dashed rgba(99,102,241,0.25); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: all .25s ease; margin-bottom: 16px;
  background: rgba(99,102,241,0.02);
  position: relative; overflow: hidden;
}
.import-zone::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.04), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.import-zone:hover, .import-zone.dragover {
  border-color: var(--primary); background: var(--primary-light);
  transform: translateY(-2px); box-shadow: var(--glow);
}
.import-zone:hover::before, .import-zone.dragover::before { opacity: 1; }
.import-zone .icon { font-size: 48px; margin-bottom: 12px; }
.import-zone .hint { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

/* ===== Config ===== */
.config-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.config-row:last-child { border-bottom: none; }
.config-row .label { width: 100px; font-weight: 600; flex-shrink: 0; font-size: 14px; }
.config-row .input { width: 80px; text-align: center; }
.config-row .max { font-size: 12px; color: var(--text-secondary); }
.config-row .points-input { width: 60px; text-align: center; }
.config-summary {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(124,58,237,0.04));
  border: 1px solid rgba(99,102,241,0.1);
  border-radius: var(--radius-sm); padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
}

/* ===== Editor ===== */
.editor-sidebar {
  width: 170px; flex-shrink: 0;
  border-right: 1px solid var(--border); padding-right: 16px;
  overflow-y: auto;
}
.editor-main { flex: 1; overflow-y: auto; }
.editor-layout { display: flex; gap: 16px; height: calc(100vh - 200px); }
.editor-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; cursor: pointer; transition: all .2s;
}
.editor-item:hover {
  border-color: var(--border-hover); background: var(--primary-light);
  transform: translateX(2px);
}
.editor-item .q-preview {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 13px;
}
.editor-item .actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card-solid); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 28px;
  max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto;
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { margin-bottom: 16px; font-size: 18px; }
.modal .form-group { margin-bottom: 14px; }
.modal .form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); }
.modal textarea { min-height: 80px; resize: vertical; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ===== Quiz Top Bar ===== */
.top-bar {
  background: var(--card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 20px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 12px; z-index: 10;
}
.progress { font-size: 15px; font-weight: 700; }
.progress .total { color: var(--text-secondary); font-weight: 400; }
.timer {
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(99,102,241,0.06); color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.timer.warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.timer.danger {
  background: rgba(239,68,68,0.1); color: var(--danger);
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ===== Progress Bar ===== */
.progress-bar {
  height: 3px; background: rgba(0,0,0,0.04);
  border-radius: 2px; margin-bottom: 16px; overflow: hidden;
}
.progress-bar .fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  transition: width .4s ease;
}

/* ===== Question Card ===== */
.question-card {
  background: var(--card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; flex: 1; margin-bottom: 12px;
}
.q-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.q-num { font-size: 13px; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; }
.q-text { font-size: 16px; line-height: 1.8; margin-bottom: 20px; color: var(--text); }
.q-image {
  max-width: 100%; border-radius: var(--radius-sm); margin-bottom: 16px;
  cursor: zoom-in; transition: transform .2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.q-image.zoomed {
  cursor: zoom-out; max-width: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 200; max-height: 90vh;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

/* ===== Options ===== */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all .2s ease; user-select: none;
  font-size: 15px; line-height: 1.6;
  background: rgba(255,255,255,0.5);
}
.option:hover {
  border-color: var(--border-hover); background: var(--primary-light);
  transform: translateX(4px);
}
.option.selected {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.option .key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.04); font-size: 13px; font-weight: 700;
  flex-shrink: 0; transition: all .2s; color: var(--text-secondary);
}
.option.selected .key {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.option.multi .key { border-radius: 8px; }

.fill-input, .essay-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid rgba(0,0,0,0.08); border-radius: var(--radius-sm);
  font-size: 15px; outline: none; font-family: inherit;
  background: rgba(255,255,255,0.7); transition: all .2s;
}
.fill-input:focus, .essay-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1); background: #fff;
}
.essay-input { min-height: 120px; resize: vertical; }

/* ===== Mark Button ===== */
.mark-btn {
  background: none; border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 20px; padding: 6px 14px;
  cursor: pointer; font-size: 13px; transition: all .2s;
}
.mark-btn:hover { border-color: var(--warning); background: rgba(245,158,11,0.05); }
.mark-btn.marked {
  border-color: var(--warning); background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

/* ===== Bottom Bar ===== */
.bottom-bar {
  background: var(--card); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 20px; display: flex; gap: 10px; align-items: center;
  position: sticky; bottom: 12px; z-index: 10;
}
.bottom-bar .status {
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; user-select: none; transition: color .2s;
}
.bottom-bar .status:hover { color: var(--primary); }
.bottom-bar .spacer { flex: 1; }

/* ===== Answer Sheet ===== */
.answer-sheet {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  padding: 16px;
}
.answer-sheet .cell {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1.5px solid rgba(0,0,0,0.06); transition: all .2s;
  background: rgba(255,255,255,0.5);
}
.answer-sheet .cell:hover { border-color: var(--primary); transform: scale(1.05); }
.answer-sheet .cell.answered {
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  border-color: #93c5fd; color: #1d4ed8;
}
.answer-sheet .cell.unanswered { background: rgba(255,255,255,0.5); }
.answer-sheet .cell.marked { border-color: var(--warning); box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.answer-sheet .cell.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.answer-sheet .legend { grid-column: 1/-1; display: flex; gap: 16px; font-size: 12px; }

/* ===== Result Page ===== */
.result-page { text-align: center; }
.result-score {
  font-size: 64px; font-weight: 900; margin: 12px 0;
  background: linear-gradient(135deg, var(--success), #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-score.fail {
  background: linear-gradient(135deg, var(--danger), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.result-stats { display: flex; justify-content: center; gap: 32px; margin: 20px 0; flex-wrap: wrap; }
.result-stat { text-align: center; }
.result-stat .val { font-size: 28px; font-weight: 800; }
.result-stat .lbl { font-size: 12px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.type-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.type-bar-row .type-label { width: 48px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.type-bar-row .bar-wrap {
  flex: 1; height: 8px; background: rgba(0,0,0,0.04);
  border-radius: 4px; overflow: hidden;
}
.type-bar-row .bar-fill {
  height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(90deg, var(--primary), #7c3aed);
}

/* ===== Filter Bar ===== */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 16px; border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: 20px; font-size: 13px; cursor: pointer;
  background: rgba(255,255,255,0.7); transition: all .2s; font-weight: 500;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

/* ===== Review Items ===== */
.review-item {
  border: 1px solid rgba(0,0,0,0.04); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden;
  background: rgba(255,255,255,0.6);
  transition: box-shadow .2s;
}
.review-item:hover { box-shadow: var(--shadow); }
.review-item .summary {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; cursor: pointer; transition: background .15s;
}
.review-item .summary:hover { background: rgba(99,102,241,0.02); }
.review-item .summary .icon { font-size: 18px; flex-shrink: 0; }
.review-item .summary .q-title {
  flex: 1; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.review-item .summary .arrow { transition: transform .2s; color: var(--text-secondary); }
.review-item .summary .arrow.open { transform: rotate(180deg); }
.review-detail { padding: 0 16px 16px; display: none; }
.review-detail.open { display: block; }
.review-detail .row { display: flex; gap: 8px; margin-bottom: 6px; font-size: 14px; line-height: 1.6; }
.review-detail .row .label { font-weight: 600; color: var(--text-secondary); min-width: 70px; flex-shrink: 0; }
.review-detail .your-ans { color: var(--danger); }
.review-detail .corr-ans { color: var(--success); }
.review-detail .partial-ans { color: var(--orange); }
.review-detail .analysis-text { color: var(--text-secondary); }
.self-score-select {
  padding: 4px 10px; border-radius: 6px;
  border: 1.5px solid rgba(0,0,0,0.08); font-size: 13px; cursor: pointer;
  transition: border-color .2s;
}
.self-score-select:focus { border-color: var(--primary); outline: none; }

/* ===== History ===== */
.history-item {
  border: 1px solid rgba(0,0,0,0.04); border-radius: var(--radius-sm);
  margin-bottom: 10px; overflow: hidden;
  background: rgba(255,255,255,0.6);
  transition: box-shadow .2s;
}
.history-item:hover { box-shadow: var(--shadow); }
.history-item .summary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; transition: background .15s;
}
.history-item .summary:hover { background: rgba(99,102,241,0.02); }
.history-item .summary .score {
  font-size: 26px; font-weight: 800; flex-shrink: 0;
  width: 56px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.history-item .summary .meta { font-size: 13px; color: var(--text-secondary); }
.history-item .summary .meta .date { font-weight: 600; color: var(--text); }
.history-item .detail { padding: 0 16px 16px; display: none; }
.history-item .detail.open { display: block; }

/* ===== Review Detail Extras ===== */
.review-detail .full-q {
  font-size: 15px; line-height: 1.7; margin-bottom: 10px;
  padding: 12px 16px; background: rgba(0,0,0,0.015);
  border-radius: var(--radius-sm); border-left: 3px solid var(--primary);
}
.review-option {
  padding: 4px 10px; margin: 3px 0; display: block;
  border-radius: 6px; font-size: 14px; transition: background .15s;
}
.review-option.correct-selected { background: #dcfce7; border-left: 3px solid #22c55e; }
.review-option.correct-missed { background: #fef3c7; border-left: 3px solid #f59e0b; }
.review-option.wrong-selected { background: #fee2e2; border-left: 3px solid #ef4444; }
.review-option.neutral { color: var(--text-secondary); }

.ai-config-section { margin-top: 24px; }
.ai-config-section .form-group { margin-bottom: 10px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 300; padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: var(--shadow-md); animation: toastIn .3s ease;
  backdrop-filter: blur(8px); white-space: nowrap;
}
.toast.success { background: rgba(16,185,129,0.92); }
.toast.error { background: rgba(239,68,68,0.92); }
.toast.info { background: rgba(99,102,241,0.92); }
.toast.warning { background: rgba(245,158,11,0.92); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Print ===== */
@media print {
  body { background: #fff !important; }
  .btn, .top-bar, .bottom-bar, .progress-bar,
  #importPage, #configPage, #bankEditorPage, #historyPage, .no-print {
    display: none !important;
  }
  .page { display: block !important; }
  .card { box-shadow: none; border: 1px solid #ddd; backdrop-filter: none; break-inside: avoid; }
  .q-type { border: 1px solid #999; }
  .result-score, .result-stat .val { color: #000 !important; -webkit-text-fill-color: #000 !important; }
  .error-detail, .review-item .detail { display: block !important; }
  .review-item .arrow { display: none; }
  a { color: #000; text-decoration: none; }
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
  #app { padding: 10px; }
  .card { padding: 16px; }
  .btn { padding: 10px 16px; font-size: 13px; }
  .row { flex-wrap: wrap; }
  .result-score { font-size: 48px; }
  .q-text { font-size: 15px; }
  .question-card { padding: 20px; }
  .option { padding: 12px 14px; }
  .editor-layout { flex-direction: column; height: auto; }
  .editor-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; max-height: 200px; }
  .answer-sheet { grid-template-columns: repeat(5, 1fr); gap: 6px; }
}
