/* 답안 첨삭 화면 (grade.html) — ui.css · essay.css 위에 얹는다 */
.g-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-bottom: 40px; }
.g-main { display: grid; gap: 18px; min-width: 0; }
.g-step, .g-side { padding: 20px 22px; }
.g-step h2, .g-side h2 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-step h2 small, .g-step h3 small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.g-step h3 { font-size: 14.5px; margin: 18px 0 8px; }
.no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--site-ink); color: #fff; font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--ink-2); margin: -4px 0 12px; line-height: 1.5; }
.pick { max-height: 240px; overflow: auto; border: 1.5px solid var(--line); border-radius: 14px; margin: -6px 0 12px; background: var(--paper); }
.pick button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font: inherit; font-size: 14px; }
.pick button:hover { background: var(--cream); }
.chosen { margin: -6px 0 12px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.thumbs figure { margin: 0; width: 84px; text-align: center; font-size: 11px; color: var(--ink-3); }
.thumbs img, .thumbs .pdf { width: 84px; height: 110px; object-fit: cover; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--cream); font-weight: 700; color: var(--ink-2); }
.answer { width: 100%; min-height: 320px; font-size: 15px; line-height: 1.8; resize: vertical; }
.input.small { width: 100%; font-size: 14px; line-height: 1.6; margin-bottom: 8px; resize: vertical; }
.count { font-size: 13px; color: var(--ink-2); margin: 6px 0 12px; }
.count b.bad { color: var(--err); }
.unclear { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.unclear button { border: 1.5px dashed var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.wg { font-size: 13.5px; margin: 0 0 14px; }
.wg li { margin: 3px 0; }
.wg .rm { border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.items { width: 100%; border-collapse: collapse; font-size: 14px; }
.items th, .items td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.items th { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.items input[type=number] { width: 66px; }
.items input.memo { width: 100%; }
.items .v { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--cream); white-space: nowrap; }
.total { margin: 12px 0; font-size: 16px; }
.total b { font-size: 22px; color: var(--err); }
.marks { padding-left: 22px; margin: 0; font-size: 13.5px; }
.marks li { margin: 6px 0; line-height: 1.5; }
.marks li.off { opacity: .45; text-decoration: line-through; }
.marks .k { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--err-bg); color: var(--err); margin-right: 4px; }
.marks .k.good { background: var(--ok-bg); color: var(--ok); }
.marks q { background: var(--cream); padding: 0 3px; border-radius: 4px; }
.marks input.note { width: 100%; margin-top: 3px; font-size: 13px; padding: 5px 8px; }
.marks textarea.why { width: 100%; margin-top: 3px; font-size: 12.5px; padding: 5px 8px; resize: vertical; }
.marks li { border-left: 3px solid #d0312d; padding-left: 8px; }
.marks li.fmt { border-left-color: #1f5fd1; }
.marks .cat { font-size: 11px; font-weight: 700; border: 0; border-radius: 6px; padding: 1px 6px; margin-right: 4px; cursor: pointer; color: #fff; background: #d0312d; }
.marks li.fmt .cat { background: #1f5fd1; }
.flags .note { margin-bottom: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.recent { list-style: none; padding: 0; margin: 0; max-height: 70vh; overflow: auto; }
.recent li { border-bottom: 1px solid var(--line); }
.recent button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 4px; cursor: pointer; font: inherit; }
.recent button:hover, .recent li.on button { background: var(--cream); }
.recent .nm { font-weight: 700; font-size: 14px; }
.recent .lb { font-size: 12.5px; color: var(--ink-2); }
.recent .meta { font-size: 12px; color: var(--ink-3); }
.recent .empty { color: var(--ink-3); font-size: 13px; padding: 10px 0; }
.linkish { margin-left: auto; border: 0; background: none; color: var(--site-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
@media (max-width: 900px) {
  .g-grid { grid-template-columns: 1fr; }
  .g-side { order: -1; }
  .recent { max-height: 220px; }
}
@media (max-width: 560px) {
  .two { grid-template-columns: 1fr; }
  .g-step, .g-side { padding: 16px; }
}

.flabel2 { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.recent li { position: relative; }
.recent .del { position: absolute; right: 2px; top: 8px; width: auto; padding: 2px 6px; border-radius: 8px; font-size: 13px; opacity: .45; z-index: 1; }
.recent .del:hover { opacity: 1; background: var(--err-bg); }
.recent .del.armed, .btn-del.armed { opacity: 1; background: var(--err); color: #fff; border-color: var(--err); }
.recent li > button[data-id] { padding-right: 40px; }
.btn-del { margin-left: auto; color: var(--err); }

.marks li.ok { border-left-color: #1d6b45; }
.marks li.ok .k { background: #e3f2e9; color: #1d6b45; }
.sims { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; }
.sims li { margin: 3px 0; }
.sims li b { display: inline-block; min-width: 40px; color: #1d6b45; }
.sims li.hi b { color: #1f5fd1; }
