/* ─────────────────────────── 채점표 ─────────────────────────── */

.number {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.claim {
  line-height: 1.7;
}
.panel .claim + .claim {
  margin-top: 8px;
}
.scoretable {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-ui);
  font-variant-numeric: tabular-nums;
}
.scoretable th {
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule); /* 표 머리는 회색 띠 대신 잉크 괘선 (작품 표와 같다) */
  color: var(--text-3);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-align: left;
}
.scoretable td {
  padding: 12px 8px;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
}
.scoretable td:first-child {
  width: 22%;
}
.scoretable td.number {
  width: 18%;
  white-space: nowrap;
}
.scoretable tr.total td {
  border-top: 2px solid var(--line);
  color: var(--text-2);
}
/* 1차 심사 채점표 */
.scoretable.sheet td:first-child { width: auto; }
.scoretable.sheet td:first-child > b { display: block; color: var(--text); font-family: var(--font-heading); font-size: var(--fs-section); }
.scoretable.sheet td:first-child small, .guide { display: block; max-width: 72ch; margin-top: 6px; color: var(--text-2); font-size: var(--fs-body); line-height: 1.7; }
.guide summary { cursor: pointer; }
/* 채점표: 항목마다 판단에 쓰는 요약을 함께 둔다(요약 탭을 오가지 않고 읽고 매긴다) */
.from-summary { max-width: 72ch; margin: 10px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px dashed var(--line); }
.from-summary li + li { margin-top: 8px; }
.from-summary b { display: block; margin-bottom: 2px; color: var(--text-3); font-size: var(--fs-meta); font-weight: 600; }
.from-summary .claim { color: var(--text); font-size: var(--fs-body); line-height: 1.75; }
.guide[open] summary { margin-bottom: 4px; color: var(--text-2); }
/* AI 사실·논리 점검: 접어 둔 한 줄 */
.ai-report { margin-bottom: 16px; }
.ai-report > summary { padding: 10px 0; color: var(--text-2); font-size: var(--fs-ui); font-weight: 600; cursor: pointer; }
.ai-report[open] > summary { margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.scoretable.sheet td.number { width: 170px; font-variant-numeric: tabular-nums; }
/* 점수 칸은 시험지 답란: 잉크 테두리 네모 칸에, 적은 점수는 오렌지 색연필 글씨(명조 굵게) */
.scoretable.sheet td.number input { width: 76px; margin-right: 4px; padding: 6px 10px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: var(--paper); box-shadow: none; color: var(--accent-text); font-size: var(--fs-lead); font-weight: 700; text-align: right; }
.scoretable.sheet td.number small { display: block; margin-top: 4px; color: var(--text-3); }
.scoretable.sheet output { font-size: var(--fs-pane); font-weight: 700; color: var(--accent-text); }
.choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choices legend { width: 100%; margin-bottom: 8px; padding: 0; color: var(--text-2); font-size: var(--fs-ui); font-weight: 600; }
.choices legend small { margin-left: 10px; color: var(--text-3); font-size: var(--fs-meta); font-weight: 400; }
/* 고르는 칸: 종이에 인쇄된 네모 칸. 고르면 색연필로 칠한 것처럼 옅은 오렌지 면 */
.choices label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-ui); cursor: pointer; transition: background var(--fast), box-shadow var(--fast); }
.choices label:hover { background: var(--fill); box-shadow: inset 0 0 0 1px var(--field); }
.choices label:has(input:checked) { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.choices input { margin: 0; accent-color: var(--accent); }
.sheet-direction { display: grid; grid-template-columns: auto auto minmax(180px, 1fr); gap: 16px 32px; align-items: start; }
.sheet-result { display: grid; gap: 8px; margin: 16px 0; font-size: var(--fs-ui); }
.sheet-result div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.sheet-result dt { color: var(--text-3); }
.sheet-result dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.works-table td .badges + small { margin-top: 4px; color: var(--text-3); font-size: var(--fs-label); }
.works-table td .summary-actions { margin-top: 6px; }
/* 줄마다의 '요약' 버튼은 마우스를 올리거나 키보드로 들어갔을 때만 보인다(목록을 훑을 때는 상태만 읽히게). */
@media (hover: hover) {
  .workrow:not(:hover):not(:focus-within) .summary-actions { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
}
.confirmed {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* 확정 점수는 도장 옆에 오렌지 색연필 글씨로 (채점표 답란과 같은 말씨) */
.confirmed b {
  color: var(--accent-text);
  font-size: var(--fs-title);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 항목별 점수: 시험지 채점란. 칸마다 항목 이름(위)과 점수 / 배점(아래) */
.score-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); margin: 16px 0 0; padding: 0 1.5px 1.5px 0; }
.score-cells div { margin: 0 -1.5px -1.5px 0; border: 1px solid var(--rule); text-align: center; }
.score-cells dt { padding: 5px 8px; border-bottom: 1px solid var(--rule); background: var(--fill); color: var(--text-2); font-size: var(--fs-meta); font-weight: 600; }
.score-cells dd { margin: 0; padding: 8px; color: var(--text-3); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.score-cells dd b { color: var(--accent-text); font-size: var(--fs-lead); }
/* 심사 확정 도장. 방금 확정했을 때만 찍히는 움직임을 한 번 보여 준다. */
.stamp {
  align-self: center;
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: 700;
}
.stamp.fresh {
  animation: stamp 520ms var(--ease-out) both;
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.4); }
  60% { opacity: 1; transform: scale(0.96); }
}
.openitems {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
}
.openitems li + li {
  margin-top: 4px;
}
/* 채점 기준 편집: 항목마다 괘선으로 나눈 한 줄. 판단 기준 칸은 글 길이만큼 늘어난다. */
#criteria { margin-top: 16px; border-bottom: 1px solid var(--line-soft); }
.rubedit {
  display: grid;
  grid-template-columns: 1fr 88px 2.4fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.rubedit input[data-k="name"] { font-weight: 600; }
.rubedit input[data-k="weight"] { text-align: right; }
.rubedit textarea {
  min-height: 72px;
  max-height: 240px;
  field-sizing: content;
  font-size: var(--fs-ui);
}
.rubedit button { background: transparent; color: var(--text-3); }
.rubedit button:hover { background: var(--red-soft); color: var(--red-text); }

/* 채점표 끝에 접어 둔 채점 기준 고치기 */
.rubric-fold { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.rubric-fold > summary { width: fit-content; color: var(--text-2); font-size: var(--fs-ui); font-weight: 600; cursor: pointer; }
.rubric-fold > summary:hover { color: var(--text); }
.rubric-fold[open] > summary { margin-bottom: 12px; }

/* ─────────────────────────── 채점 막대 ───────────────────────────
   점수를 넣으면 항목 막대와 합계 막대가 그만큼 차오른다(배점 대비). */
.meter {
  display: block;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fill-2);
}
.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
  transition: transform var(--slow) var(--ease-out);
}
.meter.total {
  height: 6px;
  margin-top: 10px;
}
