/* ==========================================================================
   exam.css — /exam 응시자 화면. Academy 재질/타이포 시스템 사용.
   ========================================================================== */

html, body { background: var(--void); min-height: 100vh; }
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(154,62,114,0.20), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(58,29,77,0.30), transparent 50%),
    var(--void);
}

.view { display: none; }
.view.active { display: block; }

.exam-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 18px 80px;
}

/* ---- 공용 카드(종이) ---- */
.paper-card {
  padding: 30px 28px;
}
.paper-card.center { text-align: center; }

.eyebrow-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--muted-magenta);
}
.title-serif { font-family: var(--font-serif); font-weight: 900; color: var(--ink); }
.hand-note { font-family: var(--font-hand); color: var(--stamp-red); }

/* ---- 시작 화면 ---- */
.start-crest { width: 64px; margin: 0 auto 8px; display: block; }
.start-title { font-size: 30px; margin: 6px 0 2px; }
.start-tagline { font-family: var(--font-serif); font-size: 15px; color: var(--muted-magenta); margin-bottom: 14px; }
.start-meta { display: flex; justify-content: center; gap: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin: 14px 0; }

.btn-academy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.1s ease;
}
.btn-academy:hover { transform: translateY(-1px); }
.btn-academy:active { transform: translateY(0); }
.btn-academy.ghost { background: transparent; color: var(--ink); }
.btn-academy.on-dark { background: var(--aimes-pink-deep); border-color: var(--aimes-pink-deep); color: #fff; }
.btn-academy.ghost-dark { background: transparent; border-color: rgba(255,255,255,0.3); color: var(--paper); }
.btn-academy:disabled { opacity: 0.4; cursor: not-allowed; }

input[type="text"].field-academy {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-on-paper);
  background: rgba(255,255,255,0.5);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
}
input[type="text"].field-academy:focus { outline: 2px solid var(--aimes-pink-deep); }

/* ---- 수험표 ---- */
.ticket-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--line-on-paper); }
.ticket-row:last-child { border-bottom: none; }
.ticket-row .k { color: var(--ink-soft); font-family: var(--font-mono); font-size: 11px; }
.ticket-row .v { font-family: var(--font-mono); font-weight: 700; }

/* ---- 교시 전환(BELL) 화면 : 어두운 배경 ---- */
.bell-screen {
  text-align: center;
  color: var(--paper);
  padding: 60px 20px;
}
.bell-screen .bell-label { font-family: var(--font-mono); letter-spacing: 0.4em; color: var(--gold); font-size: 13px; }
.bell-screen .rule-star { max-width: 260px; margin: 18px auto; }
.bell-screen .period { font-family: var(--font-mono); color: var(--paper-aged); font-size: 13px; margin-top: 4px; }
.bell-screen .subject-name { font-family: var(--font-serif); font-size: 36px; font-weight: 900; color: var(--aimes-pink); margin: 6px 0; }
.bell-screen .subject-en { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--cyan-accent); }
.bell-screen .qcount { font-family: var(--font-mono); font-size: 13px; color: var(--paper-aged); margin-top: 10px; }
.bell-screen .closing { font-family: var(--font-hand); font-size: 16px; color: var(--paper); margin: 22px 0; white-space: pre-line; }

/* ---- 특별실기 인터스티셜 ---- */
.practical-screen { text-align: center; color: var(--paper); padding: 50px 20px; }
.practical-screen .countdown { font-family: var(--font-mono); font-size: 13px; color: var(--stamp-red); margin-bottom: 14px; }
.practical-screen h2 { font-family: var(--font-serif); font-size: 32px; color: var(--gold-bright); margin: 8px 0; }
.practical-screen .score-lines { font-family: var(--font-mono); font-size: 13px; color: var(--crt-green); line-height: 1.9; margin: 16px 0; }

/* ---- 문제 카드 ---- */
.q-top-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.q-num { font-family: var(--font-mono); font-weight: 700; }
.q-num .big { font-size: 22px; }
.q-score-badge { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--muted-magenta); color: var(--muted-magenta); padding: 2px 8px; }
.q-subject-title { text-align: center; font-family: var(--font-serif); font-size: 24px; font-weight: 900; margin: 4px 0 2px; }
.q-subject-kicker { text-align: center; font-family: var(--font-serif); font-size: 13px; color: var(--muted-magenta); margin-bottom: 10px; }
.q-question-text { text-align: center; font-size: 18px; font-weight: 600; line-height: 1.6; margin: 12px 0 18px; }

.q-asset {
  border: 1px dashed var(--line-on-paper);
  min-height: 56px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 14px;
}
.q-asset.active { display: flex; }
.q-asset img { max-width: 100%; }
.q-asset audio, .q-asset video { width: 100%; }

.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .answer-grid { grid-template-columns: 1fr; } }

.answer-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line-on-paper);
  padding: 13px 16px;
  box-shadow: 1px 2px 0 rgba(42,23,48,0.08);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease;
}
.answer-strip .letter {
  width: 22px; height: 22px; flex: none;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.answer-strip:hover { background: rgba(255,255,255,0.75); }
.answer-strip.selected { background: rgba(255,79,160,0.16); border-color: var(--aimes-pink-deep); }
.answer-strip.selected .letter { background: var(--aimes-pink-deep); }
.answer-strip.correct { background: rgba(63,158,111,0.16); border-color: #3E9E6F; }
.answer-strip.correct .letter { background: #2E7D50; }
.answer-strip.incorrect { background: rgba(178,58,58,0.12); border-color: var(--stamp-red); }

.q-tip { text-align: center; font-family: var(--font-serif); font-size: 12px; color: var(--muted-magenta); margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line-on-paper); }

.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line-on-paper);
}
.order-item .idx { font-family: var(--font-mono); font-weight: 900; color: var(--aimes-pink-deep); width: 20px; }
.order-item .ctrls { margin-left: auto; display: flex; gap: 4px; }
.order-item .ctrls button {
  width: 26px; height: 26px; border: 1px solid var(--line-on-paper); background: transparent; font-size: 12px;
}

/* ---- 채점 스탬프 ---- */
.grade-feedback { text-align: center; margin-top: 16px; }
.grade-feedback .stamp { width: 84px; height: 84px; font-size: 22px; margin: 0 auto 8px; }
.grade-feedback .delta { font-family: var(--font-mono); font-weight: 700; font-size: 16px; }
.grade-feedback .comment { font-family: var(--font-hand); font-size: 15px; margin-top: 4px; }
.grade-feedback .answer-line { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

/* ---- 과목 종료 요약 ---- */
.summary-fraction { font-family: var(--font-mono); font-size: 40px; font-weight: 900; color: var(--aimes-pink-deep); }
.summary-comment { font-family: var(--font-hand); font-size: 17px; color: var(--stamp-red); margin: 10px 0; }

/* ---- 결과 화면 (스토리텔링형) ---- */
.result-flow { color: var(--paper); text-align: center; }
.result-hero { padding: 8px 0 18px; }
.result-hero .score-big { font-family: var(--font-mono); font-size: 46px; font-weight: 900; color: var(--aimes-pink); }
.result-hero .score-big small { font-size: 20px; color: var(--paper-aged); }
.result-hero .grade-line { font-family: var(--font-serif); font-size: 20px; margin-top: 6px; }
.result-hero .type-name { font-family: var(--font-serif); font-size: 26px; color: var(--gold-bright); margin-top: 10px; }

.result-divider { border: none; border-top: 1px dashed rgba(232,200,120,0.35); margin: 22px 0; }

.result-block .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--gold); }
.result-block .age-value { font-family: var(--font-mono); font-size: 34px; color: var(--crt-green); margin-top: 6px; }
.result-block .disclaimer { font-size: 11px; color: var(--paper-aged); margin-top: 6px; }

.result-type-desc { font-size: 15px; line-height: 1.6; color: var(--paper-aged); max-width: 480px; margin: 8px auto 0; }

.result-hashtags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.result-hashtags span { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--gold); color: var(--gold-bright); padding: 4px 10px; }

.result-professor { font-family: var(--font-hand); font-size: 17px; color: var(--paper); max-width: 480px; margin: 8px auto 0; line-height: 1.6; }

.report-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.report-table th, .report-table td { padding: 7px 4px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.report-table th { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.08em; }
.report-table td.grade-letter { text-align: right; font-family: var(--font-mono); font-weight: 700; color: var(--paper); }

/* ---- 결과카드 (SNS 저장용, 1080x1350) ---- */
.result-card {
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1080 / 1350;
  padding: 32px 30px;
  overflow-y: auto;
  position: relative;
}
.result-card .rc-header { text-align: center; }
.result-card .rc-crest { width: 34px; margin: 0 auto 6px; display: block; }
.result-card .rc-school { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted-magenta); }
.result-card .rc-title { font-family: var(--font-serif); font-weight: 900; font-size: 20px; margin: 4px 0; }
.result-card .rc-doc-no { font-family: var(--font-mono); font-size: 9px; color: var(--ink-soft); }

.result-card .rc-score { text-align: center; margin: 14px 0; }
.result-card .rc-score .big { font-family: var(--font-mono); font-size: 42px; font-weight: 900; color: var(--aimes-pink-deep); }
.result-card .rc-score .grade { font-family: var(--font-serif); font-size: 16px; margin-top: 2px; }

.result-card .rc-type { text-align: center; font-family: var(--font-serif); font-size: 19px; color: var(--muted-magenta); margin: 10px 0 4px; }
.result-card .rc-age { text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }

.result-card .rc-table-title { font-family: var(--font-mono); font-size: 10px; color: var(--muted-magenta); letter-spacing: 0.08em; margin: 12px 0 4px; text-align: center; }

.result-card .rc-hashtags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.result-card .rc-hashtags span { font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--muted-magenta); color: var(--muted-magenta); padding: 2px 7px; }

.result-card .rc-footer { text-align: center; font-family: var(--font-mono); font-size: 9px; color: var(--ink-soft); margin-top: 14px; }

@media (max-width: 480px) { .result-card { aspect-ratio: auto; } }

/* ---- 리뷰(오답노트) ---- */
.review-item { padding: 16px; margin-bottom: 10px; }
.review-item .rh { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.review-item .rt { font-weight: 700; margin: 6px 0 2px; }
.review-item .rq { font-size: 13px; color: var(--ink-soft); }
.review-item .re { font-size: 12px; color: var(--muted-magenta); margin-top: 6px; }
.badge-correct { color: #2E7D50; }
.badge-incorrect { color: var(--stamp-red); }

/* ==========================================================================
   DISPLAY-LIKE EXAM PAPER
   /display의 중앙 시험지를 응시자용 상호작용 화면으로 확장한다.
   ========================================================================== */

.exam-container {
  width: 100%;
  max-width: 1600px;
}

.exam-container > .view:not(#view-exam):not(#view-result) {
  width: min(100%, clamp(720px, 42vw, 920px));
  margin-inline: auto;
}

body.exam-running {
  min-height: 100svh;
  background-color: #080815;
  background-image:
    radial-gradient(circle at 50% 34%, rgba(116, 83, 159, 0.08), transparent 42%),
    linear-gradient(rgba(8, 8, 22, 0.03), rgba(8, 7, 22, 0.28)),
    url("/assets/sites/exam-fantasy-bg.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

body.exam-running .exam-container {
  max-width: none;
  padding: clamp(20px, 2.4vw, 40px);
}

#view-exam {
  width: 100%;
}

.exam-stage {
  min-height: calc(100svh - clamp(40px, 4.8vw, 80px));
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.exam-paper-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 1560px);
  min-height: min(940px, calc(100svh - 48px));
  padding: clamp(62px, 4.8vw, 88px) clamp(82px, 7vw, 124px) clamp(64px, 5.4vw, 96px);
  display: flex;
  filter: drop-shadow(0 24px 28px rgba(5, 2, 8, 0.66));
}

.exam-parchment {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

#exam-paper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 650px;
  padding: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-nanum-myeongjo);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

#exam-paper .q-top-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 20px;
  margin: 0 0 4px;
}

#exam-paper .q-num {
  width: 194px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #2b1535;
  font-family: var(--font-nanum-myeongjo);
}

.q-num-label {
  color: rgba(159, 53, 108, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
}

.q-num-divider {
  position: relative;
  width: 194px;
  height: 2px;
  opacity: 0.58;
  background:
    radial-gradient(circle at 0 50%, rgba(93, 42, 76, 0.72) 0 1.3px, transparent 1.8px),
    radial-gradient(circle at 100% 50%, rgba(93, 42, 76, 0.72) 0 1.3px, transparent 1.8px),
    linear-gradient(90deg, rgba(93,42,76,0.2), rgba(93,42,76,0.72) 46%, transparent 46% 54%, rgba(93,42,76,0.72) 54%, rgba(93,42,76,0.2));
}

.q-num-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: rgba(72, 28, 66, 0.88);
  transform: translate(-50%, -50%) rotate(45deg);
}

.q-num-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  font-size: clamp(28px, 2.1vw, 38px);
  line-height: 1;
}

#exam-paper .q-num .big {
  font-size: inherit;
}

.q-num-value .separator {
  font-weight: 400;
}

.q-period-pill {
  align-self: start;
  justify-self: center;
  min-width: 112px;
  padding: 9px 25px 8px;
  background: #3a123d;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%);
  color: #f2dfd0;
  font-family: var(--font-nanum-myeongjo);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 3px 9px rgba(0,0,0,0.28);
}

.q-document-meta {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.q-doc-label {
  padding: 7px 13px 6px;
  border: 1px solid rgba(174, 67, 119, 0.52);
  color: rgba(158, 52, 107, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.07em;
  text-align: center;
  transform: rotate(1deg);
  mix-blend-mode: multiply;
}

#exam-paper .q-score-badge {
  display: none;
  padding: 3px 9px;
  border-color: rgba(154, 62, 114, 0.48);
  background: rgba(255,255,255,0.16);
  font-family: var(--font-nanum-myeongjo);
  font-size: 12px;
  font-weight: 700;
}

#exam-paper .q-subject-title {
  position: relative;
  margin: -4px 0 0;
  color: #28112f;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(38px, 3.3vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

#exam-paper .q-subject-title::after {
  content: "";
  display: block;
  width: min(510px, 58%);
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, rgba(190,65,124,0.55), transparent);
}

#exam-paper .q-subject-kicker {
  margin: 10px 0 16px;
  color: #a13a77;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 700;
  letter-spacing: 0.09em;
}

#exam-paper .q-question-text {
  max-width: 1080px;
  margin: 0 auto clamp(22px, 2vw, 32px);
  padding-inline: 16px;
  color: #26152d;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(20px, 1.65vw, 27px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-wrap: balance;
  white-space: pre-line;
}

#exam-paper .q-asset {
  width: min(100%, 900px);
  max-height: 310px;
  min-height: 76px;
  margin: -8px auto 24px;
  padding: 14px;
  overflow: hidden;
  border: 1px dashed rgba(99, 51, 78, 0.28);
  background: rgba(255,255,255,0.16);
  border-radius: 2px;
}

#exam-paper .q-asset img,
#exam-paper .q-asset video {
  width: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

#exam-paper .q-asset audio {
  max-width: 720px;
}

#exam-paper .q-asset.has-video {
  width: min(100%, 620px);
  max-height: 260px;
  padding: 0;
  border-style: solid;
  background: #160d19;
}

#exam-paper .q-asset.has-video iframe {
  display: block;
  width: 100%;
  height: clamp(180px, 18vw, 248px);
  border: 0;
}

#exam-paper .q-asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  width: min(100%, 940px);
}

#exam-paper .q-asset-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(99, 51, 78, 0.2);
  background: rgba(255, 249, 239, 0.52);
  box-shadow: 0 4px 9px rgba(57, 28, 36, 0.12);
}

#exam-paper .q-asset-card.featured {
  grid-column: 1 / -1;
}

#exam-paper .q-asset-card img {
  display: block;
  width: 100%;
  height: 82px;
  max-height: none;
  object-fit: contain;
}

#exam-paper .q-asset-card.featured img {
  height: 112px;
}

#exam-paper .q-asset-card figcaption {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 3px 7px;
  background: rgba(46, 22, 51, 0.82);
  color: #fff8e9;
  font-size: 11px;
  font-weight: 800;
}

#exam-paper .q-media-player {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(118px, auto);
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: min(100%, 720px);
}

#exam-paper .q-media-player iframe {
  width: 100%;
  height: 148px;
  border: 1px solid rgba(99, 51, 78, 0.3);
  background: #160d19;
}

#exam-paper .q-media-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#exam-paper .q-media-select {
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid rgba(91, 42, 76, 0.36);
  background: rgba(255, 249, 239, 0.5);
  color: #3c1d3e;
  font: 800 12px/1.2 var(--font-nanum-myeongjo);
  cursor: pointer;
}

#exam-paper .q-media-select.active {
  border-color: #8d2f68;
  background: #4b1749;
  color: #fff8e9;
}

.q-answer-area {
  width: 100%;
}

#exam-paper .answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.5vw, 24px);
}

#exam-paper .answer-strip {
  width: 100%;
  min-width: 0;
  min-height: clamp(106px, 8.4vw, 144px);
  padding: clamp(18px, 1.8vw, 28px) clamp(20px, 2.1vw, 34px);
  border: 0;
  appearance: none;
  background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat;
  color: #2c1833;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(18px, 1.5vw, 25px);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  filter: drop-shadow(0 8px 8px rgba(47, 21, 29, 0.23));
  box-shadow: none;
  transition: filter 0.16s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

#exam-paper .answer-strip:nth-child(odd) { transform: rotate(-0.12deg); }
#exam-paper .answer-strip:nth-child(even) { transform: rotate(0.1deg); }
#exam-paper .answer-strip:hover { background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 9px 9px rgba(47,21,29,0.25)) brightness(1.025); }
#exam-paper .answer-strip:focus-visible { outline: 3px solid rgba(154, 62, 114, 0.62); outline-offset: 3px; }
#exam-paper .answer-strip.selected { background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 8px rgba(47,21,29,0.2)) drop-shadow(0 0 6px rgba(194,55,132,0.72)); }
#exam-paper .answer-strip.correct { background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 8px rgba(47,21,29,0.2)) drop-shadow(0 0 7px rgba(46,125,80,0.72)); }
#exam-paper .answer-strip.incorrect { background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 8px rgba(47,21,29,0.2)) drop-shadow(0 0 7px rgba(178,58,58,0.7)); }

#exam-paper .answer-strip .letter {
  width: clamp(40px, 3.5vw, 54px);
  height: clamp(40px, 3.5vw, 54px);
  font-size: clamp(18px, 1.45vw, 24px);
  box-shadow: 2px 3px 0 rgba(0,0,0,0.16);
}

#exam-paper .answer-strip > span:not(.letter):not(.q-answer-image-content) {
  flex: 1 1 auto;
  min-width: 0;
  white-space: pre-line;
  line-height: 1.42;
}

#exam-paper .answer-strip.selected .letter { background: var(--aimes-pink-deep); }
#exam-paper .answer-strip.correct .letter { background: #2E7D50; }
#exam-paper .answer-strip.incorrect .letter { background: var(--stamp-red); }

#exam-paper .answer-strip.correct-answer-reveal {
  color: #9f2836;
  filter: drop-shadow(0 8px 8px rgba(47,21,29,0.2)) drop-shadow(0 0 9px rgba(177,48,62,0.82));
}

#exam-paper .answer-strip.correct-answer-reveal .letter {
  background: #a52f3e;
  color: #fff4e9;
}

#exam-paper .answer-strip.wrong-selection {
  filter: grayscale(0.35) brightness(0.9) drop-shadow(0 7px 7px rgba(47,21,29,0.18));
  opacity: 0.72;
}

#exam-paper .answer-grid[data-choice-count="5"] .answer-strip {
  min-height: 96px;
}

#exam-paper .answer-grid[data-choice-count="5"] .answer-strip:last-child {
  grid-column: 1 / -1;
}

#exam-paper .order-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#exam-paper .order-item {
  min-height: 82px;
  border: 0;
  background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat;
  font-family: var(--font-nanum-myeongjo);
  font-size: 18px;
  font-weight: 700;
  filter: drop-shadow(0 6px 6px rgba(47,21,29,0.18));
}

#exam-paper input.field-academy {
  min-height: 60px;
  border: 1px solid rgba(96,50,72,0.28);
  background: rgba(255,255,255,0.42);
  font-family: var(--font-nanum-myeongjo);
  font-size: 18px;
}

#exam-paper .grade-feedback {
  width: min(100%, 1080px);
  min-height: 164px;
  margin: 24px auto 4px;
  padding: 25px 34px;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  text-align: left;
  background: transparent url("/assets/sites/answer-paper.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 9px 9px rgba(47,21,29,0.2));
}

.feedback-verdict {
  text-align: center;
}

#exam-paper .grade-feedback .stamp {
  width: 96px;
  height: 96px;
  margin: 0 auto 5px;
  border-width: 3px 2px 4px 3px;
  border-color: rgba(169,43,58,0.72);
  border-radius: 52% 48% 51% 47% / 48% 53% 46% 52%;
  color: rgba(169,43,58,0.88);
  font-size: 27px;
  text-shadow: 0.7px 0 rgba(169,43,58,0.38);
  box-shadow: inset 0 0 2px rgba(169,43,58,0.28), 0 0 2px rgba(169,43,58,0.22);
  transform: rotate(7deg);
}

#exam-paper .grade-feedback .delta {
  color: var(--aimes-pink-deep);
  text-align: center;
}

.feedback-copy {
  min-width: 0;
}

.feedback-eyebrow {
  color: rgba(137, 55, 98, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

#exam-paper .grade-feedback .comment {
  margin: 3px 0 8px;
  color: #a82f43;
  font-size: clamp(18px, 1.35vw, 23px);
  font-weight: 700;
}

.feedback-answer {
  margin-bottom: 8px;
  color: #44243e;
  font-size: 14px;
  font-weight: 700;
}

.feedback-answer span,
.feedback-label {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  background: #4a1d4a;
  color: #f5e8da;
  font-family: var(--font-nanum-myeongjo);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.feedback-explanation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  color: #4d3548;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.55;
}

.feedback-explanation p {
  margin: 0;
}

#exam-paper .q-tip {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed rgba(96,50,72,0.28);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.4;
}

.exam-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.exam-actions .btn-academy {
  min-width: 180px;
  min-height: 50px;
  background: #321334;
  border-color: #321334;
  font-family: var(--font-nanum-myeongjo);
  font-size: 16px;
}

.exam-actions .btn-academy.ghost {
  background: rgba(255,255,255,0.24);
  color: #321334;
}

@media (min-width: 2000px) {
  body.exam-running .exam-container {
    padding-block: 38px;
  }

  .exam-paper-shell {
    width: min(76vw, 1780px);
    min-height: min(1040px, calc(100svh - 76px));
    padding: 96px 148px 100px;
  }

  #exam-paper {
    min-height: 730px;
  }

  #exam-paper .answer-strip {
    min-height: 150px;
  }
}

@media (max-width: 980px) {
  body.exam-running .exam-container {
    padding: 18px;
  }

  .exam-paper-shell {
    min-height: calc(100svh - 36px);
    padding: 58px 58px 62px;
  }

  #exam-paper .q-top-row {
    gap: 12px;
  }

  #exam-paper .q-num,
  .q-num-divider {
    width: 154px;
  }

  #exam-paper .answer-strip {
    min-height: 104px;
  }
}

@media (max-width: 767px) {
  body.exam-running {
    background-position: 42% top;
    background-attachment: scroll;
  }

  body.exam-running .exam-container {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .exam-stage {
    min-height: calc(100svh - 24px);
  }

  .exam-paper-shell {
    width: 100%;
    min-height: calc(100svh - 24px);
    padding: 42px 28px 32px;
    background: transparent;
    border: 0;
    box-shadow: none;
    filter: drop-shadow(0 12px 18px rgba(5,2,8,0.55));
  }

  .exam-parchment {
    display: block;
  }

  #exam-paper {
    min-height: calc(100svh - 74px);
  }

  #exam-paper .q-top-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "number period"
      "document document";
    align-items: center;
    row-gap: 12px;
    margin-bottom: 8px;
  }

  #exam-paper .q-num {
    grid-area: number;
    width: 118px;
    align-items: flex-start;
    gap: 4px;
  }

  .q-num-label {
    padding-left: 4px;
    font-size: 9px;
  }

  .q-num-divider {
    width: 118px;
  }

  .q-num-value {
    padding-left: 4px;
    font-size: 27px;
  }

  .q-period-pill {
    grid-area: period;
    min-width: 88px;
    padding: 8px 18px 7px;
    font-size: 15px;
  }

  .q-document-meta {
    grid-area: document;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .q-doc-label {
    padding: 4px 7px;
    font-size: 8px;
    line-height: 1.2;
    text-align: left;
  }

  #exam-paper .q-score-badge {
    font-size: 10px;
  }

  #exam-paper .q-subject-title {
    margin-top: 2px;
    font-size: clamp(30px, 10vw, 40px);
  }

  #exam-paper .q-subject-title::after {
    width: 76%;
    margin-top: 11px;
  }

  #exam-paper .q-subject-kicker {
    margin: 8px 0 13px;
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  #exam-paper .q-question-text {
    margin-bottom: 20px;
    padding-inline: 2px;
    font-size: clamp(18px, 5.4vw, 22px);
    line-height: 1.48;
  }

  #exam-paper .q-asset {
    max-height: 250px;
    margin-bottom: 18px;
  }

  #exam-paper .q-asset img,
  #exam-paper .q-asset video {
    max-height: 220px;
  }

  #exam-paper .q-asset.has-gallery,
  #exam-paper .q-asset.has-media {
    max-height: none;
    overflow: visible;
  }

  #exam-paper .q-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #exam-paper .q-asset-card.featured {
    grid-column: 1 / -1;
  }

  #exam-paper .q-media-player {
    grid-template-columns: 1fr;
  }

  #exam-paper .q-media-player iframe {
    height: 180px;
  }

  #exam-paper .q-media-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #exam-paper .answer-grid,
  #exam-paper .order-list {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  #exam-paper .answer-grid[data-choice-count="5"] .answer-strip:last-child {
    grid-column: auto;
  }

  #exam-paper .answer-strip,
  #exam-paper .answer-grid[data-choice-count="5"] .answer-strip {
    min-height: 82px;
    padding: 16px 18px;
    gap: 12px;
    font-size: clamp(17px, 4.8vw, 20px);
  }

  #exam-paper .answer-strip .letter {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  #exam-paper .order-item {
    min-height: 72px;
    font-size: 16px;
  }

  #exam-paper .grade-feedback {
    min-height: 132px;
    margin-top: 18px;
    padding: 18px 18px;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
  }

  #exam-paper .grade-feedback .stamp {
    width: 74px;
    height: 74px;
    font-size: 21px;
  }

  #exam-paper .grade-feedback .delta {
    font-size: 13px;
  }

  #exam-paper .grade-feedback .comment {
    font-size: 17px;
    line-height: 1.25;
  }

  .feedback-eyebrow {
    font-size: 8px;
  }

  .feedback-answer {
    font-size: 12px;
  }

  .feedback-explanation {
    display: block;
    font-size: 13px;
  }

  .feedback-label {
    margin: 0 6px 4px 0;
  }

  .feedback-explanation p {
    display: inline;
  }

  #exam-paper .q-tip {
    margin-top: 18px;
    padding-top: 12px;
    font-size: 12px;
  }

  .exam-actions {
    width: 100%;
    margin-top: 14px;
  }

  .exam-actions .btn-academy {
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }
}

/* 시험지 안 즉시 채점: 별도 해설창 없이 우상단 도장과 정답만 공개한다. */
#exam-paper .q-inline-grade {
  position: absolute;
  top: clamp(70px, 6.4vw, 98px);
  right: clamp(28px, 4.6vw, 72px);
  z-index: 24;
  display: none;
  color: rgba(169, 43, 58, 0.9);
  text-align: center;
  transform: rotate(8deg);
  transform-origin: center;
  pointer-events: none;
  mix-blend-mode: multiply;
}

#exam-paper .q-inline-grade .stamp {
  position: relative;
  isolation: isolate;
  width: clamp(74px, 6.8vw, 104px);
  height: clamp(74px, 6.8vw, 104px);
  border: 0;
  border-radius: 50%;
  color: rgba(169, 43, 58, 0.9);
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 900;
  text-shadow: 0.7px 0 rgba(169,43,58,0.42), -0.4px 0.5px rgba(169,43,58,0.24);
  transform: none;
}

#exam-paper .q-inline-grade .stamp::before,
#exam-paper .q-inline-grade .stamp::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

#exam-paper .q-inline-grade .stamp::before {
  inset: 1px;
  border-width: 3px 2px 4px 3px;
  border-style: solid;
  border-color: rgba(169, 43, 58, 0.74);
  border-radius: 52% 48% 51% 47% / 48% 53% 46% 52%;
  box-shadow: 0 0 1px rgba(169,43,58,0.62), inset 0 0 2px rgba(169,43,58,0.32);
  transform: rotate(-2deg) scaleX(0.985);
}

#exam-paper .q-inline-grade .stamp::after {
  inset: 7px 6px 6px 8px;
  border: 1px solid rgba(169, 43, 58, 0.38);
  border-radius: 47% 53% 48% 52% / 53% 47% 52% 48%;
  background:
    radial-gradient(circle at 15% 22%, rgba(169,43,58,0.35) 0 1px, transparent 1.8px),
    radial-gradient(circle at 85% 18%, rgba(169,43,58,0.28) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 92% 70%, rgba(169,43,58,0.3) 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 88%, rgba(169,43,58,0.24) 0 0.9px, transparent 1.7px);
  transform: rotate(3deg);
}

#exam-paper.is-graded .answer-strip,
#exam-paper.is-graded .q-media-select,
#exam-paper.is-graded .exam-ordering-input {
  cursor: default;
}

#exam-paper .q-correct-answer-line {
  width: fit-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 8px 18px;
  border-bottom: 2px solid rgba(165, 47, 62, 0.56);
  color: #9f2836;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.45;
  text-align: center;
  transform: rotate(-0.35deg);
}

#exam-paper .q-correct-answer-line span {
  margin-right: 10px;
  font-weight: 900;
}

#exam-paper .q-correct-answer-line strong {
  font-weight: 800;
}

#exam-paper #btn-submit.is-next {
  min-width: 210px;
  border-color: #ba8a50;
  box-shadow: inset 0 0 0 1px rgba(247,219,160,0.35), 0 6px 15px rgba(43,15,43,0.22);
}

@media (max-width: 767px) {
  #exam-paper .q-inline-grade {
    top: 75px;
    right: 25px;
  }

  #exam-paper .q-inline-grade .stamp {
    width: 62px;
    height: 62px;
    font-size: 19px;
  }

  #exam-paper .q-correct-answer-line {
    margin-top: 9px;
    padding: 6px 10px;
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .exam-paper-shell {
    padding-inline: 24px;
  }

  #exam-paper .grade-feedback {
    grid-template-columns: 72px minmax(0, 1fr);
    padding-inline: 14px;
    gap: 10px;
  }

  #exam-paper .grade-feedback .stamp {
    width: 66px;
    height: 66px;
    font-size: 19px;
  }
}

/* ==========================================================================
   EXAM-WIDE FANTASY THEME
   시험지와 내부 문제 UI는 그대로 두고, 바깥 무대와 상태 화면만 통일한다.
   ========================================================================== */

html,
body {
  min-height: 100svh;
  background-color: #080815;
}

html,
body,
body.exam-running {
  background-image:
    radial-gradient(circle at 50% 34%, rgba(116, 83, 159, 0.08), transparent 42%),
    linear-gradient(rgba(8, 8, 22, 0.04), rgba(8, 7, 22, 0.30)),
    url("/assets/sites/exam-fantasy-bg.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.exam-container > :is(#view-start, #view-nickname, #view-ticket, #view-bell, #view-interstitial, #view-subject-summary).active {
  min-height: calc(100svh - 112px);
  display: grid;
  align-items: center;
}

.view:not(#view-exam) .paper-card {
  min-height: clamp(440px, 32vw, 560px);
  padding: clamp(70px, 6vw, 104px) clamp(68px, 7vw, 118px);
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.view:not(#view-exam) .paper-stack::before,
.view:not(#view-exam) .paper-stack::after,
.view:not(#view-exam) .fold-corner::after {
  display: none;
}

.view-parchment {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 24px 28px rgba(3, 2, 12, 0.58));
}

:is(.paper-card, .bell-screen, .practical-screen, .result-card, .review-item):has(> .view-parchment) {
  position: relative;
  isolation: isolate;
  border: 0;
  background: transparent;
  box-shadow: none;
}

:is(.paper-card, .bell-screen, .practical-screen, .result-card, .review-item):has(> .view-parchment) > :not(.view-parchment) {
  position: relative;
  z-index: 1;
}

.start-crest {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 7px 14px rgba(38,16,62,0.36));
}

.start-title {
  color: #2e1739;
  text-shadow: 0 1px 0 rgba(255,255,255,0.44);
}

.btn-academy {
  border-color: #39163f;
  background: linear-gradient(135deg, #321237, #4a1d55);
  box-shadow: 0 8px 20px rgba(30, 10, 44, 0.18);
}

.btn-academy.ghost {
  background: rgba(255,255,255,0.18);
}

.bell-screen,
.practical-screen {
  position: relative;
  min-height: clamp(440px, 32vw, 560px);
  padding: clamp(42px, 6vw, 72px) 28px;
  color: #28112f;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.bell-screen .bell-label,
.practical-screen .eyebrow-mono,
.practical-screen .countdown {
  color: #a13a77;
}

.bell-screen .period,
.bell-screen .closing,
.practical-screen #interstitial-body,
.practical-screen .score-lines {
  color: #53384f !important;
}

.bell-screen .subject-name,
.practical-screen h2 {
  color: #28112f;
}

.bell-screen .subject-en {
  color: #8d3e70;
}

#view-result .result-flow {
  color: #28112f;
  background: transparent !important;
  border: 0 !important;
}

#view-result .result-flow :is(.result-divider) {
  border-color: rgba(96, 50, 72, 0.28);
}

#view-result .result-flow :is(.result-hero .score-big, .result-block .age-value, .result-block .label, .result-hashtags span) {
  color: #7f2f65;
}

#view-result .result-flow :is(.result-type-desc, .result-block .disclaimer, .result-professor) {
  color: #53384f;
}

#view-result,
#view-review {
  padding-block: 28px 64px;
}

.result-card .rc-crest {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

/* ---- 시험지 바깥의 정답/해설 판넬 ---- */
body.feedback-open {
  overflow: hidden;
}

.exam-feedback-panel {
  position: fixed;
  top: 50%;
  right: clamp(20px, 2.5vw, 48px);
  z-index: 80;
  width: min(430px, calc(100vw - 40px));
  max-height: calc(100svh - 48px);
  margin: 0;
  padding: 28px;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  color: #f3e9f5;
  text-align: left;
  transform: translateY(-50%);
  border: 1px solid rgba(207, 163, 229, 0.58);
  background:
    radial-gradient(circle at 14% 8%, rgba(185,111,209,0.18), transparent 38%),
    radial-gradient(circle at 86% 90%, rgba(83,113,185,0.14), transparent 42%),
    linear-gradient(145deg, rgba(25,16,48,0.97), rgba(51,23,65,0.97));
  box-shadow:
    0 26px 70px rgba(2,2,12,0.72),
    0 0 42px rgba(145,90,192,0.24),
    inset 0 0 30px rgba(181,122,207,0.06);
  backdrop-filter: blur(18px);
}

.exam-feedback-panel::before,
.exam-feedback-panel::after {
  content: "✦";
  position: absolute;
  color: rgba(225,190,236,0.58);
  font-size: 16px;
  line-height: 1;
}

.exam-feedback-panel::before { top: 12px; left: 14px; }
.exam-feedback-panel::after { right: 14px; bottom: 12px; }

.feedback-content {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.exam-feedback-panel .feedback-verdict {
  align-self: start;
}

.exam-feedback-panel .stamp {
  width: 98px;
  height: 98px;
  margin: 0 auto 7px;
  border-width: 3px 2px 4px 3px;
  border-color: rgba(231,112,158,0.76);
  border-radius: 52% 48% 51% 47% / 48% 53% 46% 52%;
  color: #eb80ab;
  font-size: 27px;
  text-shadow: 0.7px 0 rgba(235,128,171,0.44);
  box-shadow: inset 0 0 2px rgba(231,112,158,0.28), 0 0 8px rgba(231,112,158,0.12);
  transform: rotate(7deg);
}

.exam-feedback-panel .delta {
  color: #f09ac1;
  text-align: center;
}

.exam-feedback-panel .feedback-eyebrow {
  color: #bda2d0;
}

.exam-feedback-panel .comment {
  margin: 4px 0 10px;
  color: #f0a2c4;
  font-size: 22px;
  font-weight: 700;
}

.exam-feedback-panel .feedback-answer {
  color: #eadff0;
}

.exam-feedback-panel .feedback-answer span,
.exam-feedback-panel .feedback-label {
  background: rgba(187, 118, 208, 0.22);
  color: #f3e9f5;
  border: 1px solid rgba(204, 157, 220, 0.28);
}

.exam-feedback-panel .feedback-explanation {
  color: #ddd0e4;
}

.exam-feedback-panel #btn-next {
  width: 100%;
  min-height: 52px;
  flex: none;
  background: linear-gradient(135deg, #6f387d, #8f477f);
  border-color: rgba(225,185,231,0.42);
}

@media (max-width: 1399px) {
  .exam-feedback-panel {
    top: auto;
    right: auto;
    left: 50%;
    bottom: 18px;
    width: min(720px, calc(100vw - 28px));
    transform: translateX(-50%);
    box-shadow:
      0 22px 62px rgba(2,2,12,0.76),
      0 0 0 100vmax rgba(5,4,15,0.44),
      inset 0 0 30px rgba(181,122,207,0.06);
  }
}

@media (max-width: 767px) {
  body,
  body.exam-running {
    background-position: center top;
    background-attachment: scroll;
  }

  .exam-container > :is(#view-start, #view-nickname, #view-ticket, #view-bell, #view-interstitial, #view-subject-summary).active {
    min-height: calc(100svh - 64px);
  }

  .view:not(#view-exam) .paper-card {
    min-height: 480px;
    padding: 58px 42px 52px;
  }

  .bell-screen,
  .practical-screen {
    min-height: 480px;
    padding: 58px 42px 52px;
  }

  .start-crest {
    width: 72px;
    height: 72px;
  }

  .start-title {
    font-size: clamp(25px, 8vw, 30px);
  }

  .start-meta {
    gap: 10px;
    flex-wrap: wrap;
  }

  .exam-feedback-panel {
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: min(74svh, 620px);
    padding: 24px 18px max(20px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    transform: none;
  }

  .feedback-content {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .exam-feedback-panel .stamp {
    width: 74px;
    height: 74px;
    font-size: 21px;
  }

  .exam-feedback-panel .comment {
    font-size: 18px;
  }

  .exam-feedback-panel .feedback-explanation {
    display: block;
    font-size: 13px;
  }

  .exam-feedback-panel .feedback-explanation p {
    display: inline;
  }
}

@media (max-width: 380px) {
  .feedback-content {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .exam-feedback-panel .stamp {
    width: 62px;
    height: 62px;
    font-size: 18px;
  }
}

/* ==========================================================================
   PARCHMENT SCREEN COMPOSITION
   모든 단계는 같은 시험지 이미지를 쓰고, 내용만 화면 성격에 맞게 배치한다.
   ========================================================================== */

#view-start .paper-card,
#view-nickname .paper-card,
#view-ticket .paper-card,
#view-subject-summary .paper-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#view-start .paper-card,
#view-nickname .paper-card,
#view-subject-summary .paper-card {
  align-items: center;
  text-align: center;
}

#view-nickname .paper-card > :not(.view-parchment),
#view-ticket .paper-card > :not(.view-parchment) {
  width: min(100%, 680px);
  margin-inline: auto;
}

#view-nickname .field-academy {
  min-height: 54px;
  margin-top: 8px;
  border-color: rgba(109, 55, 85, 0.34);
  background: rgba(255, 252, 247, 0.58);
  box-shadow: inset 0 1px 8px rgba(86, 42, 68, 0.06);
}

#view-ticket .eyebrow-mono {
  text-align: center;
}

#view-ticket .ticket-watermark {
  position: absolute !important;
  top: 52%;
  left: 50%;
  z-index: 1 !important;
  width: min(31%, 360px) !important;
  height: auto;
  margin: 0 !important;
  opacity: 0.055;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: grayscale(0.35) sepia(0.45) saturate(0.72);
  pointer-events: none;
  user-select: none;
}

#view-ticket .paper-card > :not(.view-parchment):not(.ticket-watermark) {
  z-index: 2;
}

#view-ticket .rule-star {
  width: min(100%, 680px);
}

#view-ticket .ticket-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 10px 8px;
}

#view-ticket .ticket-row .k {
  font-size: 12px;
  letter-spacing: 0.08em;
}

#view-ticket .ticket-row .v {
  justify-self: end;
  text-align: right;
}

#view-ticket .ticket-row .stamp {
  width: 62px !important;
  height: 62px !important;
  background: rgba(255, 249, 243, 0.16);
}

.bell-screen,
.practical-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bell-screen .rule-star,
.practical-screen .rule-star {
  width: min(100%, 360px);
}

.bell-screen .qcount {
  color: #714661;
  font-weight: 700;
}

/* ==========================================================================
   STATUS-FRAME FEEDBACK MODAL
   정답/해설은 시험지 레이아웃과 완전히 분리된 게임 UI 모달로 표시한다.
   ========================================================================== */

body.feedback-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  background:
    radial-gradient(circle at 50% 46%, rgba(109, 56, 139, 0.18), transparent 44%),
    rgba(4, 4, 16, 0.66);
  backdrop-filter: blur(3px);
}

.exam-feedback-panel {
  position: fixed;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 80;
  width: min(920px, calc(100vw - 48px));
  height: min(380px, 82svh);
  min-height: 0;
  max-height: min(82svh, 620px);
  margin: 0;
  padding: 64px 84px 58px;
  overflow: visible;
  color: #f5e8ed;
  text-align: left;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.exam-feedback-panel::before,
.exam-feedback-panel::after {
  display: none;
}

.feedback-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 26px 54px rgba(1, 1, 10, 0.76))
    drop-shadow(0 0 22px rgba(170, 96, 185, 0.20));
}

.feedback-modal-body {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: calc(min(82svh, 620px) - 122px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.feedback-modal-body .feedback-content {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 30px;
}

.exam-feedback-panel .stamp {
  width: 112px;
  height: 112px;
  color: #f08bad;
  border-color: rgba(240, 139, 173, 0.76);
  font-size: 31px;
}

.exam-feedback-panel .feedback-eyebrow {
  color: #c9abc9;
  font-size: 11px;
}

.exam-feedback-panel .comment {
  margin: 5px 0 12px;
  color: #ff9fc1;
  font-size: 24px;
}

.exam-feedback-panel .feedback-answer,
.exam-feedback-panel .feedback-explanation {
  color: #f0e1e9;
}

.exam-feedback-panel #btn-next {
  width: min(100%, 360px);
  min-height: 54px;
  align-self: center;
  border-color: rgba(245, 187, 211, 0.38);
  background: linear-gradient(135deg, #77326b, #a0467d);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}

@media (max-width: 767px) {
  #view-start .paper-card,
  #view-nickname .paper-card,
  #view-ticket .paper-card,
  #view-subject-summary .paper-card,
  .bell-screen,
  .practical-screen {
    min-height: 560px;
    padding: 62px 38px 54px;
  }

  #view-ticket .ticket-row {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 46px;
    padding-inline: 2px;
  }

  .exam-feedback-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: calc(100vw - 16px);
    height: min(330px, 86svh);
    min-height: 0;
    max-height: min(86svh, 560px);
    padding: 52px 34px 40px;
    transform: translate(-50%, -50%);
  }

  .feedback-modal-body {
    max-height: calc(min(86svh, 560px) - 110px);
    justify-content: center;
    gap: 18px;
  }

  .feedback-modal-body .feedback-content {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
  }

  .exam-feedback-panel .stamp {
    width: 76px;
    height: 76px;
    font-size: 21px;
  }

  .exam-feedback-panel .comment {
    font-size: 18px;
  }

  .exam-feedback-panel #btn-next {
    width: 100%;
  }
}

@media (max-width: 400px) {
  #view-start .paper-card,
  #view-nickname .paper-card,
  #view-ticket .paper-card,
  #view-subject-summary .paper-card,
  .bell-screen,
  .practical-screen {
    padding-inline: 30px;
  }

  .exam-feedback-panel {
    height: min(340px, 86svh);
    min-height: 0;
    padding-inline: 28px;
  }

  .feedback-modal-body .feedback-content {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .exam-feedback-panel .stamp {
    width: 64px;
    height: 64px;
    font-size: 18px;
  }
}

/* ==========================================================================
   DISPLAY PAPER PARITY — FINAL OVERRIDES
   준비 화면의 종이 크기와 문제지 내부 비율을 /display 중앙 시험지에 맞춘다.
   ========================================================================== */

body:not(.exam-running) .exam-container {
  width: 100%;
  max-width: none;
  padding: clamp(20px, 2.4vw, 40px);
}

.exam-container > .view:not(#view-exam):not(#view-result) {
  width: 100%;
}

@media (min-width: 768px) {
  .exam-container > :is(#view-start, #view-nickname, #view-ticket, #view-bell, #view-interstitial, #view-subject-summary).active {
    min-height: calc(100svh - clamp(40px, 4.8vw, 80px));
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card,
  #view-subject-summary.view .paper-card,
  .bell-screen,
  .practical-screen {
    width: min(100%, 1560px);
    min-height: min(940px, calc(100svh - 48px));
    margin-inline: auto;
    padding: clamp(76px, 5vw, 96px) clamp(108px, 9vw, 168px);
  }

  #view-start .paper-card,
  #view-nickname .paper-card,
  #view-ticket .paper-card,
  #view-subject-summary .paper-card {
    font-family: var(--font-nanum-myeongjo);
  }

  #view-start .start-crest {
    width: 108px;
    height: 108px;
    margin-bottom: 12px;
  }

  #view-start .start-title {
    font-size: clamp(36px, 2.5vw, 48px);
  }

  #view-start .title-serif[style] {
    font-size: clamp(25px, 1.65vw, 32px) !important;
  }

  #view-start .start-tagline {
    font-size: clamp(17px, 1.15vw, 21px);
  }

  #view-start .start-meta {
    gap: 26px;
    font-size: 15px;
  }

  #view-nickname .paper-card > :not(.view-parchment),
  #view-ticket .paper-card > :not(.view-parchment) {
    width: min(100%, 920px);
  }

  #view-nickname h2.title-serif[style] {
    font-size: 34px !important;
    margin-block: 10px !important;
  }

  #view-nickname p {
    font-size: 17px !important;
    line-height: 1.65;
  }

  #view-nickname .field-academy {
    min-height: 64px;
    font-family: var(--font-nanum-myeongjo);
    font-size: 18px;
  }

  #view-ticket .ticket-row {
    min-height: 64px;
    padding: 13px 12px;
  }

  #view-ticket .ticket-row .k {
    font-family: var(--font-nanum-myeongjo);
    font-size: 15px;
  }

  #view-ticket .ticket-row .v {
    font-family: var(--font-nanum-myeongjo);
    font-size: 19px;
  }

  #view-ticket .ticket-row .stamp {
    width: 76px !important;
    height: 76px !important;
    font-size: 15px !important;
  }

  .bell-screen .bell-label {
    font-family: var(--font-nanum-myeongjo);
    font-size: 16px;
  }

  .bell-screen .period {
    font-family: var(--font-nanum-myeongjo);
    font-size: 17px;
  }

  .bell-screen .subject-name {
    font-family: var(--font-nanum-myeongjo);
    font-size: 52px;
  }

  .bell-screen .subject-en,
  .bell-screen .qcount {
    font-family: var(--font-nanum-myeongjo);
    font-size: 15px;
  }

  .bell-screen .closing {
    font-family: var(--font-nanum-myeongjo);
    font-size: 19px;
    line-height: 1.7;
  }

  /* /display의 중앙 시험지 비율 */
  .exam-paper-shell {
    padding: clamp(68px, 4.5vw, 86px) clamp(84px, 8.4vw, 160px) clamp(68px, 4.5vw, 86px);
  }

  #exam-paper {
    min-height: 760px;
    gap: 0;
  }

  #exam-paper .q-top-row {
    position: relative;
    margin-bottom: 2px;
  }

  #exam-paper .q-top-row::before,
  #exam-paper .q-top-row::after {
    content: "";
    position: absolute;
    top: 20px;
    width: clamp(118px, 11vw, 210px);
    height: 2px;
    opacity: 0.5;
    pointer-events: none;
  }

  #exam-paper .q-top-row::before {
    right: calc(50% + 86px);
    background:
      radial-gradient(circle at 100% 50%, rgba(178,56,111,0.8) 0 1.5px, transparent 2px),
      linear-gradient(90deg, transparent, rgba(190,65,124,0.7));
  }

  #exam-paper .q-top-row::after {
    left: calc(50% + 86px);
    background:
      radial-gradient(circle at 0 50%, rgba(178,56,111,0.8) 0 1.5px, transparent 2px),
      linear-gradient(90deg, rgba(190,65,124,0.7), transparent);
  }

  #exam-paper .q-num,
  #exam-paper .q-num-divider {
    width: clamp(192px, 12.5vw, 240px);
  }

  #exam-paper .q-num-label {
    font-size: clamp(11px, 0.72vw, 14px);
  }

  #exam-paper .q-num-value {
    font-size: clamp(32px, 2.1vw, 40px);
  }

  #exam-paper .q-period-pill {
    min-width: 126px;
    padding: 10px 28px 9px;
    font-size: clamp(18px, 1.1vw, 21px);
  }

  #exam-paper .q-doc-label {
    position: relative;
    margin-top: 3px;
    margin-right: 12px;
    padding: 7px 14px 6px;
    font-size: clamp(11px, 0.72vw, 14px);
    line-height: 1.4;
  }

  #exam-paper .q-doc-label::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(171,65,117,0.15);
  }

  #exam-paper .q-subject-title {
    width: fit-content;
    margin: -5px auto 0;
    font-size: clamp(48px, 3.15vw, 60px);
    letter-spacing: 0.02em;
  }

  #exam-paper .q-subject-title::after {
    width: min(638px, 62vw);
    height: 3px;
    margin-top: 13px;
  }

  #exam-paper .q-subject-kicker {
    margin: 16px 0 14px;
    font-size: clamp(20px, 1.3vw, 25px);
    letter-spacing: 0.1em;
  }

  #exam-paper .q-question-text {
    max-width: 1120px;
    margin-bottom: clamp(20px, 1.7vw, 30px);
    font-size: clamp(24px, 1.62vw, 31px);
    line-height: 1.45;
  }

  #exam-paper .answer-grid {
    gap: clamp(18px, 1.45vw, 27px) clamp(20px, 1.55vw, 30px);
    padding-inline: clamp(4px, 0.55vw, 10px);
  }

  #exam-paper .answer-strip {
    min-height: clamp(132px, 8.6vw, 165px);
    padding: clamp(22px, 1.45vw, 28px) clamp(24px, 1.7vw, 33px);
    gap: 16px;
    font-size: clamp(24px, 1.56vw, 30px);
  }

  #exam-paper .answer-strip .letter {
    width: clamp(48px, 3.1vw, 60px);
    height: clamp(48px, 3.1vw, 60px);
    font-size: clamp(23px, 1.5vw, 29px);
  }

  #exam-paper .q-tip {
    padding-top: 10px;
    font-family: var(--font-nanum-myeongjo);
    font-size: clamp(15px, 1vw, 19px);
  }

  .exam-actions {
    margin-top: 14px;
  }
}

/* Q30: 세로 Shorts 영상 + 오른쪽 4지선다 */
@media (min-width: 768px) {
  #exam-paper.layout-side-asset.layout-side-video-vertical {
    grid-template-columns: minmax(280px, 0.72fr) minmax(500px, 1.28fr);
    grid-template-rows: auto auto 0 minmax(440px, 1fr) auto;
    column-gap: 22px;
  }

  #exam-paper.layout-side-video-vertical .q-question-text:empty {
    display: none;
  }

  #exam-paper.layout-side-asset.layout-side-video-vertical .q-asset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: none;
    padding: 0;
  }

  #exam-paper.layout-side-asset.layout-side-video-vertical .q-asset.has-video {
    background: transparent;
  }

  #exam-paper.layout-side-asset.layout-side-video-vertical .q-asset.has-video iframe {
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 9 / 16;
  }
}

@media (max-width: 767px) {
  #exam-paper.layout-side-video-vertical .q-question-text:empty {
    display: none;
  }

  #exam-paper.layout-side-video-vertical .q-asset.has-video {
    width: 100%;
    height: min(118vw, 560px);
    max-height: none;
    margin: 0 auto 16px;
    background: transparent;
  }

  #exam-paper.layout-side-video-vertical .q-asset.has-video iframe {
    width: auto;
    height: 100%;
    max-width: 100%;
    margin: auto;
    aspect-ratio: 9 / 16;
    background: #000;
  }
}

@media (min-width: 2000px) {
  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card,
  #view-subject-summary.view .paper-card,
  .bell-screen,
  .practical-screen {
    width: min(76vw, 1780px);
    min-height: min(1040px, calc(100svh - 76px));
    padding: 96px 148px 100px;
  }
}

/* 정답 모달은 display 문제지와 같은 명조를 쓰고 도장은 오른쪽에 둔다. */
.exam-feedback-panel,
.exam-feedback-panel .feedback-modal-body,
.exam-feedback-panel .feedback-content,
.exam-feedback-panel .feedback-copy,
.exam-feedback-panel .feedback-verdict,
.exam-feedback-panel #btn-next {
  font-family: var(--font-nanum-myeongjo);
}

.feedback-modal-body .feedback-content {
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 34px;
}

.exam-feedback-panel .feedback-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.exam-feedback-panel .feedback-verdict {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.exam-feedback-panel .feedback-eyebrow {
  font-family: var(--font-nanum-myeongjo);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.exam-feedback-panel .comment.redpen {
  display: block;
  font-family: var(--font-nanum-myeongjo);
  font-weight: 800;
  line-height: 1.45;
  transform: none;
}

.exam-feedback-panel .feedback-answer,
.exam-feedback-panel .feedback-explanation,
.exam-feedback-panel .feedback-label,
.exam-feedback-panel .delta {
  font-family: var(--font-nanum-myeongjo);
}

@media (max-width: 767px) {
  body:not(.exam-running) .exam-container {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card,
  #view-subject-summary.view .paper-card,
  .bell-screen,
  .practical-screen {
    width: 100%;
    min-height: calc(100svh - 24px);
    padding: 58px 30px 52px;
  }

  .feedback-modal-body .feedback-content {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 14px;
  }

  .exam-feedback-panel .feedback-copy {
    grid-column: 1;
  }

  .exam-feedback-panel .feedback-verdict {
    grid-column: 2;
  }
}

/* 준비 화면의 종이는 BELL/문제지와 동일한 실제 높이를 강제한다. */
@media (min-width: 768px) {
  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card {
    height: min(940px, calc(100svh - 48px));
  }
}

@media (min-width: 2000px) {
  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card {
    height: min(1040px, calc(100svh - 76px));
  }
}

@media (max-width: 767px) {
  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card {
    height: calc(100svh - 24px);
  }
}

/* 이미지·재생 자료가 있는 교체 문항은 고정 높이 문제지 안에서 균형 있게 압축한다. */
#exam-paper.has-question-asset .q-asset {
  flex: 0 0 auto;
}

#exam-paper.has-question-asset .q-subject-title {
  font-size: clamp(34px, 3vw, 46px);
}

#exam-paper.has-question-asset .q-subject-kicker {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: clamp(16px, 1.2vw, 20px);
}

#exam-paper.has-question-asset .q-question-text {
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: clamp(18px, 1.35vw, 23px);
  line-height: 1.36;
}

#exam-paper.has-question-asset .answer-grid {
  gap: 11px 18px;
}

#exam-paper.has-question-asset .answer-strip,
#exam-paper.has-question-asset .answer-grid[data-choice-count="5"] .answer-strip {
  min-height: 82px;
  padding: 13px 20px;
  gap: 13px;
  font-size: clamp(17px, 1.18vw, 21px);
}

#exam-paper.has-question-asset .answer-strip .letter {
  width: 42px;
  height: 42px;
  font-size: 19px;
}

#exam-paper.has-question-asset .exam-bottom-row {
  padding-top: 9px;
}

/* 문제명 → 과목명 → 문제 본문 순서. 긴 Q 제목도 종이 안에서 자연스럽게 줄바꿈한다. */
#exam-paper .q-subject-title {
  max-width: min(100%, 1060px);
  padding-inline: 18px;
  text-wrap: balance;
}

#exam-paper .q-subject-kicker {
  text-wrap: balance;
}

#exam-paper .q-subject-kicker:empty {
  display: none;
}

/* 교시 시작 전 노션의 과목 소개 문구를 독립 안내 페이지로 보여준다. */
.bell-screen .closing {
  max-width: 720px;
  min-height: 3.4em;
  text-wrap: balance;
}

@media (max-width: 767px) {
  #exam-paper.has-question-asset .q-subject-title {
    font-size: clamp(28px, 9vw, 36px);
  }

  #exam-paper.has-question-asset .q-question-text {
    font-size: clamp(17px, 5vw, 20px);
  }

  #exam-paper.has-question-asset .answer-strip,
  #exam-paper.has-question-asset .answer-grid[data-choice-count="5"] .answer-strip {
    min-height: 76px;
    padding: 13px 15px;
    font-size: clamp(16px, 4.5vw, 19px);
  }
}

/* 문제 요소가 종이 가장자리에 붙지 않도록 display와 같은 안쪽 안전 여백을 둔다. */
@media (min-width: 981px) {
  .exam-paper-shell {
    height: min(940px, calc(100svh - 48px));
    padding-right: clamp(150px, 11.5vw, 220px);
    padding-bottom: clamp(92px, 5.6vw, 112px);
    padding-left: clamp(150px, 11.5vw, 220px);
  }

  #exam-paper {
    min-height: 0;
  }
}

@media (min-width: 2000px) {
  .exam-paper-shell {
    height: min(1040px, calc(100svh - 76px));
  }
}

/* 상태창 하단을 채우는 골드 라인형 게임 UI 버튼 */
.exam-feedback-panel #btn-next {
  width: 100%;
  min-height: 58px;
  margin-top: auto;
  border: 1.5px solid rgba(229, 174, 116, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 224, 183, 0.055), rgba(255, 224, 183, 0.015)),
    rgba(39, 9, 25, 0.42);
  color: #f3d9bf;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 224, 183, 0.10),
    inset 0 10px 24px rgba(255, 204, 153, 0.025),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

.exam-feedback-panel #btn-next:hover {
  border-color: #f0c38d;
  background:
    linear-gradient(180deg, rgba(255, 224, 183, 0.10), rgba(255, 224, 183, 0.035)),
    rgba(48, 11, 30, 0.56);
  color: #fff0de;
  box-shadow:
    inset 0 0 0 1px rgba(255, 224, 183, 0.16),
    0 0 18px rgba(225, 164, 106, 0.13),
    0 9px 22px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   FINAL POLISH — 준비 화면 간격, 폼/버튼 테마, 문제지 하단 정렬
   ========================================================================== */

/* 종이 위 버튼은 짙은 자주색 바탕과 얇은 앤티크 골드 라인으로 통일한다. */
.paper-card .btn-academy,
.bell-screen .btn-academy,
.practical-screen .btn-academy,
#exam-paper .btn-academy {
  min-height: 52px;
  padding: 13px 34px;
  border: 1.5px solid rgba(190, 139, 91, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 230, 194, 0.07), transparent 48%),
    linear-gradient(135deg, #2b0e32, #4a184b 58%, #35103b);
  color: #f7e4d0;
  font-family: var(--font-nanum-myeongjo);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 231, 199, 0.09),
    0 8px 18px rgba(52, 19, 51, 0.20);
}

.paper-card .btn-academy:hover,
.bell-screen .btn-academy:hover,
.practical-screen .btn-academy:hover,
#exam-paper .btn-academy:hover {
  border-color: #d6a46f;
  color: #fff1de;
  filter: brightness(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 231, 199, 0.14),
    0 0 16px rgba(170, 102, 102, 0.12),
    0 9px 20px rgba(52, 19, 51, 0.24);
}

.paper-card .btn-academy.ghost {
  border-color: rgba(118, 66, 83, 0.62);
  background: rgba(82, 30, 65, 0.07);
  color: #39183f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* 입력창도 종이 위에 얹은 문서 필드처럼 보이도록 정리한다. */
#view-nickname input.field-academy {
  border: 1.5px solid rgba(127, 71, 88, 0.60);
  background:
    linear-gradient(90deg, rgba(85, 31, 64, 0.055), rgba(255, 252, 246, 0.22)),
    rgba(246, 226, 211, 0.34);
  color: #2d1734;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.20),
    inset 0 8px 22px rgba(112, 61, 78, 0.025),
    0 5px 14px rgba(75, 39, 56, 0.07);
}

#view-nickname input.field-academy::placeholder {
  color: rgba(65, 37, 53, 0.56);
}

#view-nickname input.field-academy:focus {
  outline: 2px solid rgba(188, 130, 82, 0.55);
  outline-offset: 2px;
  border-color: rgba(130, 66, 91, 0.82);
}

/* 접수 단계는 시작 시험지 한 장 안에서 바로 끝낸다. */
#view-start .start-nickname-form {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 18px;
}

#view-start input.field-academy {
  min-width: 0;
  min-height: 58px;
  border: 1.5px solid rgba(127, 71, 88, 0.60);
  background:
    linear-gradient(90deg, rgba(85, 31, 64, 0.055), rgba(255, 252, 246, 0.22)),
    rgba(246, 226, 211, 0.42);
  color: #2d1734;
  font-family: var(--font-nanum-myeongjo);
  font-size: 17px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.20),
    inset 0 8px 22px rgba(112, 61, 78, 0.025),
    0 5px 14px rgba(75, 39, 56, 0.07);
}

#view-start input.field-academy::placeholder {
  color: rgba(65, 37, 53, 0.56);
}

#view-start input.field-academy:focus {
  outline: 2px solid rgba(188, 130, 82, 0.55);
  outline-offset: 2px;
  border-color: rgba(130, 66, 91, 0.82);
}

#view-start #btn-issue-ticket {
  width: 100%;
  min-width: 184px;
  min-height: 58px;
}

#view-start #resume-banner {
  margin-top: 32px !important;
}

/* 하단 구분선은 한 번만 쓰고, 제출 버튼은 중앙·안내 문구는 오른쪽 끝에 둔다. */
.exam-bottom-row {
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(96, 50, 72, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

#exam-paper .exam-bottom-row .q-tip {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(11px, 0.75vw, 14px);
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.exam-bottom-row .exam-actions {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  margin: 0;
}

.exam-bottom-row .exam-actions .btn-academy {
  min-width: 190px;
}

@media (min-width: 768px) {
  /* 시작 화면은 큰 종이 안에서 한 덩어리로 뭉치지 않도록 호흡을 넓힌다. */
  #view-start.view .paper-card {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  #view-start .paper-card > :not(.view-parchment) {
    top: -30px;
  }

  #view-start .start-crest {
    width: 124px;
    height: 124px;
    margin: 0 auto -12px;
    transform: none;
  }

  #view-start #start-eyebrow {
    margin: 0 0 18px;
    font-size: 13px;
  }

  #view-start .start-title {
    margin: 0 0 10px;
    font-size: clamp(40px, 2.7vw, 52px);
  }

  #view-start .title-serif[style] {
    font-size: clamp(32px, 2vw, 40px) !important;
    margin-bottom: 22px;
  }

  #view-start .start-tagline {
    margin: 0 0 24px;
    font-size: clamp(18px, 1.18vw, 22px);
  }

  #view-start .start-meta {
    margin: 0 0 24px;
  }

  /* 수험표 정보는 큰 시험지에 맞게 한 단계 키운다. */
  #view-ticket .eyebrow-mono {
    font-size: 13px;
  }

  #view-ticket .ticket-row {
    min-height: 72px;
  }

  #view-ticket .ticket-row .k {
    font-size: 17px;
  }

  #view-ticket .ticket-row .v {
    font-size: 21px;
  }

  #view-ticket .ticket-row .stamp {
    width: 82px !important;
    height: 82px !important;
    font-size: 16px !important;
  }

  #view-ticket #btn-enter-exam,
  #view-bell #btn-bell-start {
    min-width: 166px;
  }

  /* 제출 버튼 추가로 위로 붙어 보이던 문제 영역만 아래로 살짝 이동한다. */
  .exam-paper-shell #exam-paper {
    padding-top: 18px;
  }
}

@media (max-width: 767px) {
  /* 실제 종이의 앞장 경계 안쪽으로 폼과 표를 넣는다. */
  #view-start.view .paper-card,
  #view-nickname.view .paper-card,
  #view-ticket.view .paper-card,
  #view-subject-summary.view .paper-card,
  .bell-screen,
  .practical-screen {
    padding-right: 44px;
    padding-left: 44px;
  }

  #view-nickname .paper-card > :not(.view-parchment),
  #view-ticket .paper-card > :not(.view-parchment) {
    max-width: 100%;
    min-width: 0;
  }

  .exam-paper-shell {
    padding-right: 40px;
    padding-left: 40px;
  }

  .exam-bottom-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding-top: 10px;
  }

  #exam-paper .exam-bottom-row .q-tip {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    font-size: 11px;
    text-align: center;
    white-space: normal;
  }

  .exam-bottom-row .exam-actions {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .exam-bottom-row .exam-actions .btn-academy {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }

  #view-start .start-nickname-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #view-start input.field-academy,
  #view-start #btn-issue-ticket {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }

  #view-start .start-crest {
    margin-bottom: -4px;
    transform: none;
  }

  #view-start .paper-card > :not(.view-parchment) {
    top: -12px;
  }

  #view-start .title-serif[style] {
    font-size: 25px !important;
  }
}

/* FHD/QHD에서 접수 화면과 수험표의 문서 글씨를 넉넉하게 읽히도록 확장한다. */
@media (min-width: 768px) {
  #view-start .start-title {
    font-size: clamp(50px, 3.1vw, 60px);
  }

  #view-start #start-eyebrow {
    font-size: 15px;
  }

  #view-start .title-serif[style] {
    font-size: clamp(38px, 2.35vw, 46px) !important;
  }

  #view-start .start-tagline {
    font-size: clamp(22px, 1.4vw, 27px);
  }

  #view-start .start-meta {
    font-size: 17px;
  }

  #view-start input.field-academy {
    min-height: 64px;
    font-size: 19px;
  }

  #view-start #btn-issue-ticket {
    min-height: 64px;
    font-size: 18px;
  }

  #view-start #resume-banner {
    font-size: 16px !important;
  }

  #view-start #resume-banner .btn-academy {
    font-size: 14px !important;
  }

  #view-ticket .eyebrow-mono {
    font-size: 22px;
  }

  #view-ticket .ticket-row {
    min-height: 92px;
  }

  #view-ticket .ticket-row .k {
    font-size: 24px;
  }

  #view-ticket .ticket-row .v {
    font-size: 30px;
  }

  #view-ticket .ticket-row .stamp {
    width: 106px !important;
    height: 106px !important;
    font-size: 22px !important;
  }

  #view-ticket #btn-enter-exam {
    min-width: 210px;
    min-height: 64px;
    font-size: 20px;
  }
}

/* ==========================================================================
   SINGLE VERTICAL RESULT TRANSCRIPT
   화면에 보이는 한 장의 성적표를 그대로 이미지로 저장한다.
   ========================================================================== */

#view-result {
  width: min(100%, 880px);
  margin-inline: auto;
  padding: clamp(18px, 3vw, 42px) 0 70px;
}

#view-result.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#view-result .result-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 740px);
  max-width: 740px;
  aspect-ratio: 828 / 1240;
  margin: 0 auto;
  padding: 8.8% 9.5%;
  overflow: hidden;
  color: #3a2532;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#view-result .result-card > .rc-paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(0 25px 32px rgba(4, 2, 15, 0.64));
}

#view-result .result-card > .rc-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 58%;
  height: auto;
  opacity: 0.045;
  transform: translate(-50%, -50%) rotate(-5deg);
  filter: grayscale(1) sepia(0.25);
  pointer-events: none;
}

#view-result .rc-document {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(3px, 0.5vw, 7px);
  height: 100%;
  min-width: 0;
}

#view-result .rc-document > * {
  flex-shrink: 0;
}

#view-result .rc-header {
  text-align: center;
}

#view-result .result-card .rc-crest {
  width: clamp(38px, 5.4vw, 72px);
  height: clamp(38px, 5.4vw, 72px);
  margin: 0 auto clamp(3px, 0.55vw, 8px);
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(70, 34, 60, 0.22));
}

#view-result .result-card .rc-school {
  color: #8e3567;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.9vw, 14px);
  font-weight: 700;
  letter-spacing: 0.24em;
}

#view-result .result-card .rc-title {
  margin: clamp(3px, 0.45vw, 7px) 0 2px;
  color: #321a36;
  font-family: var(--font-nanum-myeongjo);
  font-size: clamp(18px, 2vw, 32px);
  font-weight: 900;
  line-height: 1.2;
}

#view-result .result-card .rc-subtitle {
  color: #9c6a7c;
  font-family: var(--font-mono);
  font-size: clamp(7px, 0.65vw, 10px);
  letter-spacing: 0.13em;
}

#view-result .rc-serial-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(8px, 1vw, 15px);
  padding: 0 2px clamp(5px, 0.7vw, 10px);
  border-bottom: 1px solid rgba(115, 69, 78, 0.26);
  color: #785766;
  font-family: var(--font-pen);
  font-size: clamp(9px, 0.95vw, 15px);
}

#view-result .rc-identity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1vw, 16px);
  padding: clamp(7px, 0.9vw, 13px) 0;
  border-bottom: 1px solid rgba(115, 69, 78, 0.22);
}

#view-result .rc-field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#view-result .rc-label {
  color: #9a4b72;
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.78vw, 12px);
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

#view-result .rc-field strong {
  overflow: hidden;
  color: #3c2935;
  font-family: var(--font-pen);
  font-size: clamp(13px, 1.5vw, 23px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-result .rc-verdict {
  position: relative;
  display: grid;
  grid-template-columns: minmax(112px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(12px, 1.5vw, 22px);
  align-items: center;
  padding: clamp(8px, 1.05vw, 16px) clamp(2px, 0.25vw, 4px);
  border-bottom: 1px solid rgba(115, 69, 78, 0.22);
}

#view-result .result-card .rc-score {
  margin: 0;
  padding-right: clamp(8px, 1vw, 16px);
  text-align: center;
  border-right: 1px solid rgba(115, 69, 78, 0.22);
}

#view-result .result-card .rc-score .big {
  margin-top: -2px;
  color: #7e2c68;
  font-family: var(--font-pen);
  font-size: clamp(34px, 4.8vw, 68px);
  font-weight: 700;
  line-height: 0.95;
}

#view-result .result-card .rc-score .big small {
  color: #8f7180;
  font-size: 0.34em;
  font-weight: 600;
}

#view-result .rc-grade-result {
  min-width: 0;
  text-align: center;
}

#view-result .rc-grade-result .grade {
  margin-top: clamp(4px, 0.55vw, 9px);
  color: #3d2638;
  font-family: var(--font-pen);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 700;
  line-height: 1.2;
}

#view-result .rc-final-copy {
  min-width: 0;
  padding-right: clamp(44px, 5.2vw, 76px);
}

#view-result .result-card .rc-type {
  margin: 2px 0 1px;
  color: #7e2c68;
  font-family: var(--font-pen);
  font-size: clamp(16px, 1.8vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
}

#view-result .rc-type-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #5b404e;
  font-family: var(--font-pen);
  font-size: clamp(10px, 1.05vw, 16px);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#view-result .rc-confirmed-stamp {
  position: absolute;
  right: clamp(4px, 0.5vw, 8px);
  top: 50%;
  display: grid;
  place-items: center;
  width: clamp(42px, 5vw, 74px);
  height: clamp(42px, 5vw, 74px);
  color: rgba(174, 55, 74, 0.78);
  font-family: var(--font-pen);
  font-size: clamp(11px, 1.12vw, 17px);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  border: 2px solid rgba(174, 55, 74, 0.62);
  border-radius: 48% 52% 47% 53% / 52% 47% 53% 48%;
  transform: translateY(-50%) rotate(7deg);
}

#view-result .rc-professor-note {
  padding: clamp(7px, 0.85vw, 13px) clamp(4px, 0.5vw, 8px);
  border-bottom: 1px solid rgba(115, 69, 78, 0.22);
}

#view-result .rc-professor-note p {
  margin: 2px 0 0;
  color: #3f2a37;
  font-family: var(--font-pen);
  font-size: clamp(12px, 1.25vw, 19px);
  line-height: 1.35;
  text-align: center;
}

#view-result .rc-table-block {
  min-height: 0;
  padding-top: clamp(6px, 0.75vw, 11px);
}

#view-result .result-card .rc-table-title {
  margin: 0 0 clamp(2px, 0.35vw, 5px);
  color: #8e3567;
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.8vw, 12px);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-align: center;
}

#view-result .result-card .report-table {
  width: 100%;
  margin: 0;
  color: #3f2e38;
  border-collapse: collapse;
  table-layout: fixed;
}

#view-result .result-card .report-table th,
#view-result .result-card .report-table td {
  padding: clamp(2px, 0.27vw, 4px) clamp(3px, 0.35vw, 5px);
  border-bottom: 1px dotted rgba(111, 72, 82, 0.27);
  text-align: left;
}

#view-result .result-card .report-table th {
  color: #98607b;
  font-family: var(--font-mono);
  font-size: clamp(7px, 0.68vw, 10px);
  font-weight: 700;
  letter-spacing: 0.06em;
}

#view-result .result-card .report-table td {
  font-family: var(--font-pen);
  font-size: clamp(10px, 1vw, 15px);
  line-height: 1.25;
}

#view-result .result-card .report-table :is(th, td):nth-child(2) {
  width: 25%;
  text-align: center;
}

#view-result .result-card .report-table :is(th, td):last-child {
  width: 18%;
  text-align: right;
}

#view-result .result-card .report-table td.grade-letter {
  color: #7f2f65;
  font-family: var(--font-pen);
  font-weight: 700;
}

#view-result .rc-final-verdict {
  position: relative;
  margin-top: clamp(7px, 0.85vw, 13px);
  padding: clamp(8px, 0.95vw, 14px) clamp(4px, 0.5vw, 8px);
  border-top: 1px solid rgba(115, 69, 78, 0.24);
  border-bottom: 1px solid rgba(115, 69, 78, 0.22);
}

#view-result .result-card .rc-hashtags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(3px, 0.4vw, 6px);
  margin-top: clamp(5px, 0.65vw, 10px);
}

#view-result .result-card .rc-hashtags span {
  padding: 1px clamp(4px, 0.48vw, 7px);
  color: #8b3b69;
  font-family: var(--font-pen);
  font-size: clamp(9px, 0.84vw, 13px);
  border: 1px solid rgba(142, 53, 103, 0.42);
  border-radius: 999px;
}

#view-result .result-card .rc-footer {
  margin-top: auto;
  padding-top: clamp(6px, 0.75vw, 11px);
  color: #2a1730;
  font-family: var(--font-pen);
  font-size: clamp(8px, 0.76vw, 12px);
  text-align: center;
  border-top: 1px solid rgba(115, 69, 78, 0.24);
}

#view-result .result-card .rc-footer strong {
  color: #2a1730;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.04em;
}

#view-result .rc-signature {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

#view-result .rc-signature span {
  font-size: 0.9em;
}

#view-result .rc-signature strong {
  color: #61354f;
  font-family: var(--font-nanum-myeongjo);
  font-size: 1.15em;
  letter-spacing: 0.08em;
}

#view-result .result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(100%, 740px);
  margin-top: 22px;
}

#view-result .result-actions .btn-academy {
  min-height: 46px;
}

@media (max-width: 767px) {
  #view-result {
    width: 100%;
    padding: 10px 8px 40px;
  }

  #view-result .result-card {
    width: min(100%, 460px);
    aspect-ratio: 828 / 1390;
    padding: 8.8% 9.2%;
  }

  #view-result .rc-verdict {
    grid-template-columns: minmax(84px, 0.72fr) minmax(0, 1.28fr);
    padding-block: 6px;
  }

  #view-result .rc-serial-line {
    margin-top: 6px;
    padding-bottom: 4px;
  }

  #view-result .rc-identity {
    padding-block: 5px;
  }

  #view-result .rc-professor-note {
    padding-block: 5px;
  }

  #view-result .rc-professor-note p {
    font-size: 10px;
  }

  #view-result .rc-table-block {
    padding-top: 4px;
  }

  #view-result .result-card .report-table th,
  #view-result .result-card .report-table td {
    padding-block: 1px;
  }

  #view-result .rc-final-verdict {
    margin-top: 5px;
    padding-block: 6px;
  }

  #view-result .result-card .rc-hashtags {
    margin-top: 3px;
  }

  #view-result .result-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 460px);
    margin-top: 14px;
  }
}

@media (max-width: 380px) {
  #view-result .result-card {
    padding-right: 8.7%;
    padding-left: 8.7%;
  }

  #view-result .rc-type-desc {
    -webkit-line-clamp: 2;
  }
}

/* 모바일 성적표의 촘촘한 비율을 데스크톱에서도 동일하게 확대한다. */
@media (min-width: 768px) {
  #view-result {
    width: min(740px, calc(100vw - 48px), calc((100svh - 140px) * 828 / 1240));
    padding: 0 0 32px;
  }

  #view-result .result-card {
    width: 100%;
    container-type: inline-size;
  }

  #view-result .rc-document {
    justify-content: space-between;
    gap: 0;
  }

  #view-result .result-card .rc-crest {
    width: 13cqw;
    height: 13cqw;
    margin-bottom: 1.17cqw;
  }

  #view-result .result-card .rc-school { font-size: 2.84cqw; }
  #view-result .result-card .rc-title { margin-top: 1.17cqw; font-size: 6cqw; white-space: nowrap; }
  #view-result .rc-serial-line { margin-top: 2.5cqw; padding-bottom: 1.67cqw; font-size: 2.84cqw; }
  #view-result .rc-identity { gap: 2.67cqw; padding-block: 2.17cqw; }
  #view-result .rc-label { font-size: 2.5cqw; }
  #view-result .rc-field strong { font-size: 4.5cqw; }
  #view-result .rc-verdict { gap: 3.34cqw; padding-block: 2.34cqw; }
  #view-result .result-card .rc-score { padding-right: 2.67cqw; }
  #view-result .result-card .rc-score .big { font-size: 12cqw; }
  #view-result .rc-grade-result .grade { margin-top: 1.34cqw; font-size: 5.67cqw; }
  #view-result .rc-professor-note { padding: 2cqw 1.34cqw; }
  #view-result .rc-professor-note p { font-size: 3.34cqw; }
  #view-result .rc-table-block { padding-top: 1.67cqw; }
  #view-result .result-card .rc-table-title { margin-bottom: 0.84cqw; font-size: 2cqw; }
  #view-result .result-card .report-table th { font-size: 2cqw; }
  #view-result .result-card .report-table td { padding-block: 0.5cqw; font-size: 3cqw; }
  #view-result .rc-final-verdict { margin-top: 1.84cqw; padding: 2cqw 1.34cqw; }
  #view-result .rc-final-copy { padding-right: 13.35cqw; }
  #view-result .result-card .rc-type { font-size: 5.17cqw; }
  #view-result .rc-type-desc { font-size: 3cqw; }
  #view-result .rc-confirmed-stamp { width: 13.5cqw; height: 13.5cqw; font-size: 2.84cqw; }
  #view-result .result-card .rc-hashtags { gap: 1cqw; margin-top: 1.67cqw; }
  #view-result .result-card .rc-hashtags span { padding: 0.34cqw 1.34cqw; font-size: 2.5cqw; }
  #view-result .result-card .rc-footer { padding-top: 1.67cqw; font-size: 2.34cqw; }

  #view-result .result-actions {
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 16px;
  }

  #view-result .result-actions .btn-academy {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
  }
}

/* 저장 이미지는 기기 화면 폭과 무관하게 동일한 740px 원본을 렌더링한다. */
#view-result .result-card.is-exporting {
  position: fixed !important;
  top: 0 !important;
  left: -10000px !important;
  width: 740px !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 828 / 1240 !important;
  margin: 0 !important;
  padding: 65px 70px !important;
  pointer-events: none !important;
}

#view-result .result-card.is-exporting .rc-document {
  justify-content: space-between !important;
  gap: 0 !important;
}

#view-result .result-card.is-exporting .rc-crest {
  width: 78px !important;
  height: 78px !important;
  margin-bottom: 7px !important;
}

#view-result .result-card.is-exporting .rc-school { font-size: 17px !important; }
#view-result .result-card.is-exporting .rc-title { margin: 7px 0 2px !important; font-size: 36px !important; white-space: nowrap !important; }
#view-result .result-card.is-exporting .rc-serial-line { margin-top: 15px !important; padding-bottom: 10px !important; font-size: 17px !important; }
#view-result .result-card.is-exporting .rc-identity { gap: 16px !important; padding: 13px 0 !important; }
#view-result .result-card.is-exporting .rc-label { font-size: 15px !important; }
#view-result .result-card.is-exporting .rc-field strong { font-size: 27px !important; }
#view-result .result-card.is-exporting .rc-verdict { grid-template-columns: 220px minmax(0, 1fr) !important; gap: 20px !important; padding: 14px 4px !important; }
#view-result .result-card.is-exporting .rc-score { padding-right: 16px !important; }
#view-result .result-card.is-exporting .rc-score .big { font-size: 72px !important; }
#view-result .result-card.is-exporting .rc-grade-result .grade { margin-top: 8px !important; font-size: 34px !important; }
#view-result .result-card.is-exporting .rc-professor-note { padding: 12px 8px !important; }
#view-result .result-card.is-exporting .rc-professor-note p { font-size: 20px !important; }
#view-result .result-card.is-exporting .rc-table-block { padding-top: 10px !important; }
#view-result .result-card.is-exporting .rc-table-title { margin-bottom: 5px !important; font-size: 12px !important; }
#view-result .result-card.is-exporting .report-table th,
#view-result .result-card.is-exporting .report-table td { padding: 3px 5px !important; }
#view-result .result-card.is-exporting .report-table th { font-size: 12px !important; }
#view-result .result-card.is-exporting .report-table td { font-size: 18px !important; }
#view-result .result-card.is-exporting .rc-final-verdict { margin-top: 11px !important; padding: 12px 8px !important; }
#view-result .result-card.is-exporting .rc-final-copy { padding-right: 80px !important; }
#view-result .result-card.is-exporting .rc-type { font-size: 31px !important; }
#view-result .result-card.is-exporting .rc-type-desc { font-size: 18px !important; -webkit-line-clamp: 3 !important; }
#view-result .result-card.is-exporting .rc-confirmed-stamp { right: 8px !important; width: 81px !important; height: 81px !important; font-size: 17px !important; }
#view-result .result-card.is-exporting .rc-hashtags { gap: 6px !important; margin-top: 10px !important; }
#view-result .result-card.is-exporting .rc-hashtags span { padding: 2px 8px !important; font-size: 15px !important; }
#view-result .result-card.is-exporting .rc-footer { padding-top: 10px !important; font-size: 14px !important; }

/* 문제 속 원문·문자열·목록을 실제 시험지의 <보기> 상자로 분리한다. */
#exam-paper .q-question-passage {
  position: relative;
  display: none;
  width: min(100% - 120px, 780px);
  margin: 3px auto 8px;
  padding: 17px 24px 14px;
  border: 1px solid rgba(93, 48, 76, 0.50);
  background: rgba(255, 247, 239, 0.30);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 4px 9px rgba(52, 24, 38, 0.09);
  color: #2c1833;
  font-family: var(--font-nanum-myeongjo);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.46;
  text-align: center;
  white-space: pre-line;
  text-wrap: balance;
}

#exam-paper .q-question-passage.active {
  display: block;
}

#exam-paper .q-question-passage::before {
  content: "〈보기〉";
  position: absolute;
  top: 0;
  left: 50%;
  padding: 0 12px;
  background: #ecd8d1;
  color: #4b2947;
  font-size: 15px;
  line-height: 1;
  transform: translate(-50%, -55%);
}

#exam-paper .q-passage-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border: 1px solid rgba(113, 63, 91, 0.52);
  background: rgba(255, 247, 239, 0.42);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  color: #4a2147;
  font-weight: 800;
  text-decoration: none;
}

#exam-paper .q-passage-link:hover,
#exam-paper .q-passage-link:focus-visible {
  border-color: #8e4779;
  background: rgba(255, 239, 235, 0.72);
  outline: none;
}

/* 30번 클립 링크는 <보기> 상자 없이 시험지 위에 독립 버튼으로 표시한다. */
#exam-paper.layout-clip-link .q-question-passage {
  width: auto;
  margin: 14px auto 22px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#exam-paper.layout-clip-link .q-question-passage::before {
  display: none;
}

#exam-paper.layout-clip-link .q-passage-link {
  min-height: 52px;
  gap: 10px;
  padding: 11px 26px;
  border: 1px solid rgba(120, 66, 99, 0.72);
  background: linear-gradient(180deg, rgba(73, 25, 70, 0.96), rgba(43, 12, 43, 0.98));
  box-shadow: 0 8px 18px rgba(43, 16, 35, 0.20), inset 0 0 0 1px rgba(232, 190, 122, 0.20);
  color: #fff5e6;
}

#exam-paper .q-passage-link-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 768px) {
  #exam-paper:not(.has-question-asset) .q-answer-area {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }

  #exam-paper:not(.has-question-asset) .answer-grid[data-choice-count="4"] {
    flex: 1 1 auto;
    grid-template-rows: repeat(2, minmax(108px, 1fr));
  }

  #exam-paper:not(.has-question-asset) .answer-grid[data-choice-count="4"] .answer-strip {
    height: 100%;
  }
}

#exam-paper.has-question-asset.has-question-passage .q-question-passage {
  width: min(100% - 180px, 660px);
  margin: 0 auto 2px;
  padding: 11px 18px 9px;
  font-size: 16px;
  line-height: 1.35;
}

#exam-paper.has-question-asset.has-question-passage .q-asset {
  max-height: 112px;
  margin-bottom: 2px;
}

#exam-paper.has-question-asset.has-question-passage .q-asset img,
#exam-paper.has-question-asset.has-question-passage .q-asset video {
  max-height: 108px;
}

#exam-paper.has-question-asset.has-question-passage .answer-grid {
  gap: 7px 18px;
}

#exam-paper.has-question-asset.has-question-passage .answer-strip {
  min-height: 74px;
  padding: 10px 18px;
  font-size: 18px;
}

@media (max-width: 767px) {
  #exam-paper .q-question-passage {
    width: calc(100% - 8px);
    margin: 0 auto 15px;
    padding: 15px 13px 12px;
    font-size: clamp(15px, 4.5vw, 18px);
    line-height: 1.42;
  }
}

/* Q5·Q8·Q17·Q22: 데스크톱 문제지는 왼쪽 이미지 + 오른쪽 1열 답안 구성. */
@media (min-width: 768px) {
  #exam-paper.layout-side-asset {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
    grid-template-rows: auto auto auto minmax(410px, 1fr) auto;
    column-gap: 22px;
    row-gap: 3px;
  }

  #exam-paper.layout-side-asset .q-top-row {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #exam-paper.layout-side-asset .q-subject-title {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 0;
  }

  #exam-paper.layout-side-asset .q-subject-kicker {
    display: none;
  }

  #exam-paper.layout-side-asset .q-question-text {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    margin: 18px auto 5px;
    padding: 0 18px 5px;
  }

  #exam-paper.layout-side-asset .q-question-passage {
    display: none;
  }

  #exam-paper.layout-side-asset .q-asset {
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0;
    padding: 5px 2px 5px 10px;
  }

  #exam-paper.layout-side-asset .q-asset img,
  #exam-paper.layout-side-asset .q-asset video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  #exam-paper.layout-side-asset .q-answer-area {
    grid-column: 2;
    grid-row: 4;
    height: 100%;
    min-height: 0;
  }

  #exam-paper.layout-side-asset .answer-grid {
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding-right: 10px;
  }

  #exam-paper.layout-side-asset .answer-strip,
  #exam-paper.layout-side-asset .answer-grid[data-choice-count="4"] .answer-strip {
    height: 100%;
    min-height: 0;
    padding: 10px 18px;
    gap: 13px;
    font-size: clamp(17px, 1.15vw, 21px);
  }

  #exam-paper.layout-side-asset .answer-strip .letter {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  #exam-paper.layout-side-asset .exam-bottom-row {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 0;
  }

  /* Q25: 짧은 연도 보기는 좁게, 가로형 방송 이미지는 가능한 크게 표시한다. */
  #exam-paper.layout-side-asset.layout-side-asset-wide {
    grid-template-columns: minmax(520px, 1.58fr) minmax(250px, 0.42fr);
    column-gap: 16px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-wide .q-asset {
    padding-left: 4px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-wide .answer-strip > span:last-child {
    white-space: nowrap;
  }

  /* Q26: 자료 네 장을 왼쪽 2×2, 순서 보기를 오른쪽 1열로 배치한다. */
  #exam-paper.layout-side-asset.layout-side-asset-gallery {
    grid-template-columns: minmax(450px, 1.18fr) minmax(350px, 0.82fr);
    column-gap: 16px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .q-asset {
    padding: 4px 0 4px 6px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .q-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    height: 100%;
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .q-asset-card {
    width: 100%;
    height: 100%;
    padding: 5px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .q-asset-card img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .q-asset-card figcaption {
    left: 5px;
    right: auto;
    max-width: calc(100% - 10px);
    padding: 3px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(13px, 0.9vw, 15px);
  }

  #exam-paper.layout-side-asset.layout-side-asset-gallery .answer-strip > span:last-child {
    white-space: nowrap;
  }

  /* Q27: 0~26초 영상은 왼쪽을 넓게, 긴 보기는 오른쪽 1열로 배치한다. */
  #exam-paper.layout-side-asset.layout-side-video {
    grid-template-columns: minmax(480px, 1.12fr) minmax(390px, 0.88fr);
    column-gap: 18px;
  }

  #exam-paper.layout-side-asset.layout-side-video .q-asset {
    align-items: center;
    padding: 0 0 0 4px;
  }

  #exam-paper.layout-side-asset.layout-side-video .q-asset.has-video iframe,
  #exam-paper.layout-side-asset.layout-side-video .timed-youtube-player {
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 16 / 9;
  }

  /* Q29: 왼쪽 위에 보기 지문, 그 아래 노션 이미지, 오른쪽에 4지선다. */
  #exam-paper.layout-side-asset.layout-side-asset-prompt {
    grid-template-columns: minmax(500px, 1.16fr) minmax(380px, 0.84fr);
    grid-template-rows: auto auto 0 minmax(82px, auto) minmax(300px, 1fr) auto;
    column-gap: 18px;
    row-gap: 8px;
  }

  #exam-paper.layout-side-asset.layout-side-asset-prompt .q-question-text:empty {
    display: none;
  }

  #exam-paper.layout-side-asset.layout-side-asset-prompt .q-question-passage {
    display: block;
    grid-column: 1;
    grid-row: 4;
    width: 100%;
    margin: 2px 0 0 6px;
    padding: 17px 18px 13px;
    font-size: clamp(16px, 1.1vw, 19px);
    line-height: 1.38;
  }

  #exam-paper.layout-side-asset.layout-side-asset-prompt .q-asset {
    grid-column: 1;
    grid-row: 5;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 2px 0 2px 6px;
  }

  #exam-paper.has-question-asset.has-question-passage.layout-side-asset-prompt .q-asset img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center top;
  }

  #exam-paper.layout-side-asset.layout-side-asset-prompt .q-answer-area {
    grid-column: 2;
    grid-row: 4 / 6;
  }

  #exam-paper.layout-side-asset.layout-side-asset-prompt .exam-bottom-row {
    grid-row: 6;
  }
}

.timed-youtube-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 767px) {
  #exam-paper.layout-side-asset-prompt .q-question-text:empty {
    display: none;
  }

  #exam-paper.layout-side-asset-prompt .q-question-passage {
    display: block;
    width: calc(100% - 8px);
    margin-bottom: 10px;
  }

  #exam-paper.layout-side-asset-prompt .q-asset {
    max-height: 210px;
    margin: 0 auto 14px;
    padding: 0;
  }

  #exam-paper.layout-side-asset-prompt .q-asset img {
    max-height: 200px;
  }
}

/* Q13: 사진과 원문을 한 보기 상자 안에 배치한다. */
#exam-paper.layout-inline-asset-passage .q-question-passage.has-inline-asset {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  gap: 22px;
  width: min(100% - 100px, 820px);
  min-height: 158px;
  max-height: 178px;
  margin: 2px auto 7px;
  padding: 14px 22px 13px;
  font-size: 17px;
  line-height: 1.42;
  text-wrap: initial;
}

#exam-paper .q-passage-asset {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 128px;
  max-height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 6px 7px rgba(47, 21, 29, 0.2));
}

#exam-paper .q-passage-copy {
  align-self: center;
  white-space: pre-line;
  text-align: left;
}

#exam-paper.layout-inline-asset-passage .q-asset {
  display: none;
}

/* display와 동일하게, 일반 상단 이미지 문제는 사진 아래 호흡과 답안 높이를 확보한다. */
#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-asset {
  width: min(100%, 760px);
  max-height: 204px;
  min-height: 0;
  margin-top: -4px;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-asset > img,
#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-asset > video {
  max-height: 196px;
}

#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-asset.has-gallery {
  width: min(100%, 880px);
}

#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-asset.has-gallery .q-asset-card img {
  height: 112px;
}

#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .answer-grid[data-choice-count="4"] {
  gap: 12px 20px;
  padding-top: 6px;
}

#exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .answer-grid[data-choice-count="4"] .answer-strip {
  min-height: 112px;
}

@media (min-width: 768px) {
  #exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .q-answer-area {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
  }

  #exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .answer-grid[data-choice-count="4"] {
    flex: 1 1 auto;
    width: 100%;
    grid-template-rows: repeat(2, minmax(112px, 1fr));
    align-items: stretch;
  }

  #exam-paper.has-question-asset:not(.layout-side-asset):not(.layout-inline-asset-passage):not(.layout-image-choice-board) .answer-grid[data-choice-count="4"] .answer-strip {
    height: 100%;
  }
}

/* Q14: 훼손본은 왼쪽, 클릭 가능한 원본 후보 네 장은 오른쪽 답안 종이 안에 2×2로 둔다. */
#exam-paper.layout-image-choice-board .q-featured-asset-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 20px 14px 18px;
  border: 1px solid rgba(99, 51, 78, 0.22);
  background: rgba(255, 249, 239, 0.42);
  box-shadow: 0 7px 12px rgba(54, 28, 34, 0.1);
}

#exam-paper.layout-image-choice-board .q-featured-asset-card img {
  display: block;
  width: min(205px, 88%);
  max-height: 240px;
  object-fit: contain;
  image-rendering: pixelated;
}

#exam-paper.layout-image-choice-board .q-featured-asset-card figcaption {
  margin-top: 10px;
  color: rgba(72, 31, 65, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#exam-paper.layout-image-choice-board .q-answer-image-content {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

#exam-paper.layout-image-choice-board .q-answer-image-content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 768px) {
  #exam-paper.layout-image-choice-board {
    display: grid;
    grid-template-columns: minmax(220px, 0.56fr) minmax(560px, 1.44fr);
    grid-template-rows: auto auto auto 405px minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 3px;
  }

  #exam-paper.layout-image-choice-board .q-top-row {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #exam-paper.layout-image-choice-board .q-subject-title {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 0;
  }

  #exam-paper.layout-image-choice-board .q-subject-kicker,
  #exam-paper.layout-image-choice-board .q-question-passage {
    display: none;
  }

  #exam-paper.layout-image-choice-board .q-question-text {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 17px auto 0;
    padding: 0 20px 6px;
  }

  #exam-paper.layout-image-choice-board .q-asset {
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0;
    padding: 14px 0 12px 14px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #exam-paper.layout-image-choice-board .q-answer-area {
    grid-column: 2;
    grid-row: 4;
    height: 100%;
    min-height: 0;
  }

  #exam-paper.layout-image-choice-board .answer-grid {
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px 13px;
    padding-right: 12px;
  }

  #exam-paper.layout-image-choice-board .answer-strip,
  #exam-paper.layout-image-choice-board .answer-grid[data-choice-count="4"] .answer-strip {
    height: 100%;
    min-height: 0;
    padding: 12px 15px;
    gap: 10px;
    overflow: hidden;
  }

  #exam-paper.layout-image-choice-board .answer-strip .letter {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    font-size: 18px;
  }

  #exam-paper.layout-image-choice-board .exam-bottom-row {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  #exam-paper.layout-image-choice-board .q-asset {
    max-height: 230px;
    margin-bottom: 14px;
  }

  #exam-paper.layout-image-choice-board .q-featured-asset-card {
    min-height: 200px;
  }

  #exam-paper.layout-image-choice-board .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #exam-paper.layout-image-choice-board .answer-strip {
    min-height: 128px;
    padding: 10px;
    gap: 7px;
  }

  #exam-paper.layout-image-choice-board .answer-strip .letter {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    font-size: 15px;
  }
}

@media (max-width: 767px) {
  #exam-paper.layout-inline-asset-passage .q-question-passage.has-inline-asset {
    grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
    gap: 10px;
    width: 100%;
    min-height: 128px;
    max-height: none;
    padding: 13px 11px 11px;
    font-size: clamp(13px, 3.8vw, 16px);
  }

  #exam-paper .q-passage-asset {
    min-height: 104px;
    max-height: 132px;
  }
}

/* 순서 배열 문제도 host/display와 같은 답안지 + 네 칸 직접 입력 방식으로 통일한다. */
#exam-paper .answer-strip.ordering-choice {
  cursor: default;
  user-select: none;
}

#exam-paper .answer-strip.ordering-choice:hover {
  filter: drop-shadow(0 8px 8px rgba(47, 21, 29, 0.23));
}

#exam-paper:not(.has-question-asset) .answer-grid.is-ordering[data-choice-count="4"] {
  grid-template-rows: repeat(2, minmax(92px, 1fr)) auto;
  row-gap: 12px;
}

#exam-paper .exam-ordering-response {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 58px;
  padding-top: 2px;
  color: #321a38;
  font-family: var(--font-nanum-myeongjo);
}

#exam-paper .exam-ordering-label {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 800;
}

#exam-paper .exam-ordering-slots {
  display: flex;
  align-items: center;
  gap: 9px;
}

#exam-paper .exam-ordering-arrow {
  color: rgba(54, 22, 49, 0.72);
  font-family: var(--font-nanum-myeongjo);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

#exam-paper .exam-ordering-input {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(69, 35, 57, 0.62);
  border-radius: 0;
  outline: 0;
  background: rgba(255, 251, 242, 0.16);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  color: #321a38;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

#exam-paper .exam-ordering-input:focus {
  border-color: #a23e78;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), 0 0 0 3px rgba(162, 62, 120, 0.18);
}

@media (max-width: 767px) {
  #exam-paper .answer-grid.is-ordering {
    grid-template-columns: 1fr;
  }

  #exam-paper .exam-ordering-response {
    gap: 8px;
    padding: 7px 0 2px;
  }

  #exam-paper .exam-ordering-label {
    font-size: 18px;
  }

  #exam-paper .exam-ordering-slots {
    gap: 4px;
  }

  #exam-paper .exam-ordering-arrow {
    font-size: 15px;
  }

  #exam-paper .exam-ordering-input {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }
}

/* 레이아웃별 후반 규칙보다 오답 정답 공개 색상이 항상 우선한다. */
#exam-paper.is-incorrect .answer-strip.correct-answer-reveal {
  color: #9f2836;
  filter: drop-shadow(0 8px 8px rgba(47,21,29,0.2)) drop-shadow(0 0 9px rgba(177,48,62,0.82));
}

#exam-paper.is-incorrect .answer-strip.correct-answer-reveal .letter {
  background: #a52f3e;
  color: #fff4e9;
}

#exam-paper.is-incorrect .answer-strip.wrong-selection {
  filter: grayscale(0.35) brightness(0.9) drop-shadow(0 7px 7px rgba(47,21,29,0.18));
  opacity: 0.72;
}

/* Q13·Q14 /exam 최종 배치 보정
   두 문항도 display에서 요청한 구성대로 종이의 남는 세로 공간을 활용한다. */
@media (min-width: 768px) {
  #exam-paper.layout-inline-asset-passage .q-question-passage.has-inline-asset {
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
    width: min(100% - 72px, 920px);
    min-height: 184px;
    max-height: 198px;
    margin-bottom: 10px;
    padding: 14px 24px;
    gap: 24px;
  }

  #exam-paper.layout-inline-asset-passage .q-passage-asset {
    min-height: 150px;
    max-height: 166px;
  }

  #exam-paper.layout-inline-asset-passage .q-passage-copy {
    font-size: clamp(17px, 1.15vw, 20px);
    line-height: 1.48;
  }

  #exam-paper.layout-inline-asset-passage .q-answer-area {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
  }

  #exam-paper.layout-inline-asset-passage .answer-grid {
    flex: 1 1 auto;
    width: 100%;
    grid-template-rows: repeat(2, minmax(100px, 1fr));
    align-items: stretch;
    gap: 10px 18px;
  }

  #exam-paper.layout-inline-asset-passage .answer-strip,
  #exam-paper.layout-inline-asset-passage .answer-grid[data-choice-count="4"] .answer-strip {
    height: 100%;
    min-height: 0;
    padding: 14px 20px;
  }

  #exam-paper.layout-inline-asset-passage .exam-bottom-row {
    align-self: end;
  }

  #exam-paper.layout-image-choice-board {
    grid-template-rows: auto auto auto minmax(430px, 1fr) auto;
  }

  #exam-paper.layout-image-choice-board .q-featured-asset-card {
    padding: 16px 12px 15px;
  }

  #exam-paper.layout-image-choice-board .q-featured-asset-card img {
    width: min(250px, 94%);
    max-height: 292px;
  }

  #exam-paper.layout-image-choice-board .answer-strip,
  #exam-paper.layout-image-choice-board .answer-grid[data-choice-count="4"] .answer-strip {
    position: relative;
    padding: 8px 10px;
    overflow: hidden;
  }

  #exam-paper.layout-image-choice-board .answer-strip .letter {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    transform: translateY(-50%);
  }

  #exam-paper.layout-image-choice-board .q-answer-image-content {
    position: relative;
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #exam-paper.layout-image-choice-board .q-answer-image-content img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
  }

  #exam-paper.layout-image-choice-board .exam-bottom-row {
    align-self: end;
  }
}
