/* 여러 화면이 함께 쓰는 조각: 해설, 채점 펜 표시, 진행 표시(점·원·막대), 통계, 결과 목록, 개념 칩, 경고 상자 */

/* ---------- 해설 상자 ---------- */
.exp { margin-top: 18px; border-radius: var(--r); background: var(--sheet-2); border: 1px solid var(--rule-2); font-size: 14.5px; line-height: 1.75; overflow: hidden; }
.exp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); }
.exp-head .num { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.exp-body { padding: 12px 16px 14px; }
.exp-body b { font-weight: 600; }
.exp.is-ok .exp-head { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.exp.is-ng .exp-head { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.exp .concept-chips { margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--rule-2); }

/* ---------- 채점 펜(한국식: 정답 동그라미, 오답 빗금) ---------- */
.pen-o { position: relative; }
.pen-o::after { content: ""; position: absolute; inset: -5px -7px; border: 2px solid var(--ok); border-radius: 50%; transform: rotate(-10deg); pointer-events: none; }
.pen-x { position: relative; }
.pen-x::after { content: ""; position: absolute; left: -5px; right: -5px; top: 50%; height: 2px; background: var(--bad); transform: rotate(-38deg); pointer-events: none; border-radius: 2px; }

/* ---------- 진행 표시 ---------- */
.pips { display: flex; gap: 4px; margin-bottom: 16px; }
.pips i { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); transition: background var(--dur); }
.pips i.ok { background: var(--ok); } .pips i.ng { background: var(--bad); } .pips i.cur { background: var(--ink); }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-bg { stroke: var(--rule-2); }
.ring-fg { stroke: url(#g-ring); stroke-linecap: round; transition: stroke-dashoffset 600ms var(--ease); }
#view.enter .ring-fg { animation: ring-in 900ms 100ms var(--ease) backwards; }
@keyframes ring-in { from { stroke-dashoffset: var(--c, 400); } }
.ring-in { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 34%; gap: 1px; }
.ring-in b { font-size: 26px; font-weight: 500; line-height: 1; }
.ring-in small { font-size: 12px; color: var(--ink-3); font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: var(--rule-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; }
.acc-row { display: grid; grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 84px; gap: 12px; align-items: center; font-size: 14px; }
.acc-row > .num { text-align: right; font-size: 13px; }
.b-verbal { background: linear-gradient(90deg, var(--verbal), color-mix(in srgb, var(--verbal) 70%, var(--sheet))); }
.b-reasoning { background: linear-gradient(90deg, var(--reason), color-mix(in srgb, var(--reason) 70%, var(--sheet))); }
.b-essay { background: linear-gradient(90deg, var(--essay), color-mix(in srgb, var(--essay) 70%, var(--sheet))); }
.b-other { background: var(--other); }
.f-verbal { fill: url(#g-verbal); } .f-reasoning { fill: url(#g-reasoning); } .f-essay { fill: url(#g-essay); } .f-other { fill: url(#g-other); }

/* ---------- 통계 숫자 ---------- */
.stats { display: flex; gap: 12px 32px; flex-wrap: wrap; }
.stats.center { justify-content: center; margin-top: 14px; }
.stats dt { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stats dd { font-size: 24px; font-weight: 500; line-height: 1.25; }
.stats dd small { font-size: 13px; color: var(--ink-3); }
.score { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.score .big { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 46px; line-height: 1; font-weight: 500; }
.score .big small { font-size: 18px; color: var(--ink-3); }

/* ---------- 결과 목록 ---------- */
.res-legend { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; padding: 0 6px 8px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.res-legend span:nth-child(3) { text-align: right; } .res-legend span:nth-child(4) { min-width: 120px; text-align: right; }
.res-list { display: flex; flex-direction: column; }
.res-item { border-top: 1px solid var(--rule-2); }
.res-item:first-child { border-top: 0; }
.res-item summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 60px; gap: 14px; align-items: center; padding: 12px 6px; cursor: pointer; list-style: none; border-radius: 8px; transition: background var(--dur); }
.res-item summary:hover { background: var(--sheet-2); }
.res-item summary::-webkit-details-marker { display: none; }
.res-item .qn { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 15px; justify-self: center; width: 26px; text-align: center; }
.res-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.res-stem { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.res-item .tm { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); text-align: right; }
.res-item .tm.over { color: var(--warn); font-weight: 500; }
.res-item .ans { font-size: 13px; color: var(--ink-2); white-space: nowrap; font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.res-body { padding: 4px 6px 20px 64px; }
@media (max-width: 560px) {
  .res-item summary, .res-legend { grid-template-columns: 34px minmax(0, 1fr) 52px; }
  .res-item .ans, .res-legend span:nth-child(3) { display: none; }
  .res-legend span:nth-child(4) { min-width: 0; }
  .res-body { padding-left: 6px; }
  .res-main .tag { display: none; }
}

/* ---------- 관련 개념 칩 ---------- */
.concept-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.concept-chips .lbl { font-size: 12.5px; color: var(--ink-3); margin-right: 2px; }
.cchip { display: inline-flex; align-items: center; height: 26px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 0 11px; font-size: 13px; color: var(--accent-2); font-weight: 500; transition: all var(--dur); }
.cchip:hover { border-color: var(--accent); background: var(--accent-soft); }
.cause-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cause-sum .faint { margin-right: 4px; }

/* ---------- 경고 상자 ---------- */
.callout { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 14px; border-radius: var(--r); font-size: 14.5px; line-height: 1.7; }
.callout.warn { background: var(--warn-soft); }
.callout-ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--warn); color: var(--sheet); font: 700 12px/1 var(--f-ui); }

/* ---------- 채점 도장(결과 화면) ---------- */
.stamp {
  position: absolute; left: 58px; top: -24px; width: 66px; height: 66px; border-radius: 50%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  color: var(--omr); border: 2.5px solid var(--omr); box-shadow: inset 0 0 0 3px var(--sheet), inset 0 0 0 4.2px var(--omr);
  font-family: var(--f-serif); transform: rotate(-12deg); background: color-mix(in srgb, var(--sheet) 70%, transparent);
  pointer-events: none; mix-blend-mode: multiply;
}
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; } }
.stamp b { font-size: 16px; font-weight: 700; letter-spacing: .06em; line-height: 1.1; }
.stamp small { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 9.5px; font-weight: 500; letter-spacing: .04em; }
#view.enter .stamp { animation: stamp 520ms 300ms var(--spring) backwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-24deg) scale(1.8); } 60% { opacity: 1; } }

/* ---------- 한자 워터마크(세트·개념·논술 카드) ---------- */
.glyph { position: absolute; right: 12px; top: 6px; font-family: var(--f-serif); font-weight: 700; font-size: 84px; line-height: 1; color: var(--ink); opacity: .045; pointer-events: none; user-select: none; transition: opacity 220ms, transform 300ms var(--ease); }
.card-hover:hover .glyph { opacity: .08; transform: translateY(-4px) rotate(-3deg); }
.glyph.verbal { color: var(--verbal); opacity: .08; } .glyph.reasoning { color: var(--reason); opacity: .08; } .glyph.essay { color: var(--essay); opacity: .09; } .glyph.mix { color: var(--hi-2); opacity: .16; }

/* 형광펜 밑줄(글자 뒤) */
.hl { background: linear-gradient(transparent 60%, var(--hi-soft) 60%, var(--hi-soft) 94%, transparent 94%); padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* 숫자 표기: 갱신·비교되는 숫자(시계, 표, 점수 목록)는 고정폭, 혼자 크게 놓인 숫자는 비례폭 */
.ring-in b, .stats dd, .score .big { font-variant-numeric: proportional-nums; letter-spacing: -.02em; }
