body[data-page="ham-sinav"] main { font-size: max(16px,1rem); overflow-wrap: anywhere; }
#exam-setup, #exam-run, #exam-result { scroll-margin-block: 100px 24px; }
#exam-setup :is(input,select,button), #exam-run button, #exam-result button { font: inherit; min-height: 48px; height: auto; line-height: 1.6; max-width: 100%; white-space: normal; }
#exam-setup select, #exam-setup input[type="number"] { width: 100%; min-width: 0; padding: 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
#exam-setup :is(.field,.field-grid), #exam-run .card-body { min-width: 0; }
#exam-setup .field-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,23rem),1fr)); gap: 20px; }
#exam-setup .hint, #exam-run .hint { font-size: max(14px,.95rem); color: var(--muted); line-height: 1.7; }
.exam-class-field { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); margin-bottom: 20px; }
#exam-setup .exam-fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
#exam-setup legend { font-weight: 750; padding-inline: 8px; }
#exam-setup .exam-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--surface); line-height: 1.7; }
#exam-setup .exam-check:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
#exam-setup input:is([type="checkbox"],[type="radio"]) { flex: 0 0 26px; width: 26px; height: 26px; min-height: 26px; margin-top: 3px; accent-color: var(--green); }
#exam-setup .exam-check > span { min-width: 0; }
#exam-setup .exam-topic-desc { display: block; font-size: .95rem; line-height: 1.7; margin-top: 6px; color: var(--muted); }
.exam-config-summary, .exam-session-summary { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); line-height: 1.7; }
#exam-question { font-size: 1.25rem; line-height: 1.75; scroll-margin-block: 100px 24px; }
#exam-run .exam-opt { min-width: 0; display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 2px solid var(--line); border-radius: 12px; text-align: left; color: var(--text); background: var(--surface); }
#exam-run .exam-opt.selected { border-color: var(--green); background: var(--green-soft); }
#exam-run .exam-opt.right { border-color: #287b54; background: #e8f5ed; color: #173c2a; }
#exam-run .exam-opt.wrong { border-color: #a5311b; background: #fff0ec; color: #712519; }
#exam-run .exam-letter { flex: 0 0 2rem; min-width: 0; font-size: 1rem; text-align: center; }
#exam-run .exam-opt-text { min-width: 0; line-height: 1.7; }
#exam-run .exam-map { display: grid; grid-template-columns: repeat(auto-fill,minmax(48px,1fr)); gap: 8px; max-height: 280px; overflow-y: auto; padding: 8px; }
#exam-run .exam-dot { border: 2px solid var(--line); color: var(--text); background: var(--surface); padding: 4px; }
#exam-run .exam-dot.done { background: var(--green-soft); border-color: var(--green); }
#exam-run .exam-dot.current { outline: 3px solid var(--green); outline-offset: 1px; }
#exam-run .exam-dot.flagged { border-style: dashed; font-weight: 800; }
#exam-map-panel summary { cursor: pointer; min-height: 48px; padding-block: 12px; font-weight: 700; }
#exam-run .exam-review-actions { margin-block: 16px; }
#exam-run #exam-flag[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--text); }
#exam-setup :focus-visible, #exam-run :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
#exam-run [hidden], #exam-setup [hidden], #exam-result [hidden] { display: none !important; }
html[data-theme="dark"] #exam-run .exam-opt.right {
  border-color: #405846;
  background: #1b241e;
  color: #d4e5d8;
}
html[data-theme="dark"] #exam-run .exam-opt.wrong {
  border-color: #654142;
  background: #24191a;
  color: #e0b7b7;
}
