#examAnswerForm {
  width: 100%;
  max-width: 1260px;
  box-sizing: border-box;
}

#examAnswerForm .exam-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  align-items: start;
  gap: 24px;
}

#examAnswerForm .exam-paper-column { min-width: 0; }

#examAnswerForm .exam-answer-sheet {
  position: sticky;
  top: 96px;
  z-index: 2;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  overflow: hidden;
}

.exam-answer-sheet > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 17px;
  list-style: none;
  cursor: pointer;
  font-size: .98rem;
  font-weight: 700;
}
.exam-answer-sheet > summary::-webkit-details-marker { display: none; }
.exam-answer-sheet > summary:focus-visible,
.exam-answer-sheet__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.exam-answer-sheet__count { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.exam-answer-sheet__chevron { width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
.exam-answer-sheet[open] .exam-answer-sheet__chevron { transform: rotate(225deg); }
.exam-answer-sheet__body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.exam-answer-sheet__legend { display: flex; flex-wrap: wrap; gap: 6px 13px; padding: 13px 0 9px; color: var(--muted); font-size: .7rem; }
.exam-answer-sheet__legend span { display: inline-flex; align-items: center; gap: 5px; }
.exam-answer-sheet__legend span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-bright, #63818d); }
.exam-answer-sheet__legend span:first-child::before { background: var(--accent); }
.exam-answer-sheet__legend span:nth-child(2)::before { background: var(--green, #3ba986); }
.exam-answer-sheet__sections { max-height: min(66vh, 700px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-bright, #557987) transparent; }
.exam-answer-sheet__sections section + section { margin-top: 17px; }
.exam-answer-sheet__sections h3 { margin: 3px 0 9px; color: var(--muted); font-size: .76rem; font-weight: 700; line-height: 1.4; }
.exam-answer-sheet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.exam-answer-sheet__item { position: relative; display: grid; place-items: center; min-width: 0; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-family: inherit; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.exam-answer-sheet__item:hover { transform: translateY(-2px); border-color: var(--accent); }
.exam-answer-sheet__item.is-answered { border-color: var(--green, #3ba986); background: color-mix(in srgb, var(--green, #3ba986) 14%, var(--surface)); color: var(--ink); }
.exam-answer-sheet__item.is-current { outline: 2px solid var(--accent); outline-offset: 1px; color: var(--accent); }
.exam-answer-sheet__item small { position: absolute; right: 3px; bottom: 2px; color: var(--green, #3ba986); font-size: .57rem; font-weight: 800; line-height: 1; }
.exam-answer-sheet__note { margin: 13px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }

html[data-theme="day"] #examAnswerForm .exam-answer-sheet { box-shadow: 0 12px 32px rgba(23, 76, 96, .1); }

@media (max-width: 960px) {
  body:has(#mockView.active #examRunner:not([hidden])) { min-width: 0; }
  #examAnswerForm .exam-workspace { display: flex; flex-direction: column; gap: 14px; }
  #examAnswerForm .exam-answer-sheet { position: static; order: -1; width: 100%; box-sizing: border-box; }
  #examAnswerForm .exam-paper-column { width: 100%; }
  .exam-answer-sheet__grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .exam-answer-sheet__sections { max-height: 48vh; }
}

@media (prefers-reduced-motion: reduce) {
  .exam-answer-sheet__chevron, .exam-answer-sheet__item { transition: none; }
}
