/* exam-paper-mcq.css — 변리사 앱 객관식 시험지 조판.
   byunrisa_final_v1.html 에서 semusa_paper_css_build.py 가 추출(손으로 고치지 말 것).
   추출 규칙 125개, 문서 순서 유지. */
* {
  margin: 0; padding: 0; box-sizing: border-box;
}
body {
  font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', system-ui, sans-serif;
  background:
  radial-gradient(circle at top left, rgba(29, 78, 216, 0.06), transparent 30%),
  radial-gradient(circle at top right, rgba(37, 99, 235, 0.04), transparent 26%),
  var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.5);
}
@media (min-width: 600px) {
  .app {
    max-width: 600px;
  }
  .prob-text, .choices {
    max-width: 520px;  /* A4 ?띿뒪???곸뿭 洹쇱궗媛?*/
  }
}
.screen {
  display: none; padding: 0 20px 18px 20px;
}
.screen.active {
  display: block;
}
.prob-text {
  font-family: 'HY신명조', 'HY Sinmyeongjo', 'Noto Serif CJK KR', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -0.025em;
  word-break: keep-all;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prob-text strong {
  font-weight: 700;
}
.choices {
  margin-bottom: 24px;
  padding: 0;
}
.choice-row {
  display: grid;
  grid-template-columns: 1.45em minmax(0, 1fr);
  column-gap: 0.22em;
  align-items: baseline;
  width: 100%;
  margin-bottom: 0;
  line-height: 1.6;
  position: relative;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.choice-row:last-child {
  border-bottom: none;
}
.choice-row.correct .choice-num, .choice-row.correct .choice-txt {
  font-weight: 700;
}
.choice-row.correct .choice-num {
  color: var(--success);
}
.choice-num {
  font-family: 'Noto Serif CJK KR', serif;
  font-size: inherit;
  width: 1.45em;
  cursor: pointer;
  text-align: center;
  padding: 0;
  position: relative;
  z-index: 1;
  user-select: none;
  transition: opacity 0.1s;
  line-height: inherit;
  color: var(--text);
}
.choice-num.disabled {
  cursor: default; pointer-events: none;
}
.choice-txt {
  min-width: 0;
  font-family: var(--exam-serif-font, 'Batang', '바탕', 'KoPub World Batang', 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif);
  font-size: 16px;
  letter-spacing: -0.03em;
  color: var(--text);
  word-break: keep-all;
  user-select: none;
  -webkit-user-select: none;
  overflow-wrap: break-word;
  line-break: strict;
  text-align: left;
  text-align-last: auto;
  position: relative;
  z-index: 1;
  cursor: pointer;
  touch-action: manipulation;
  white-space: pre-wrap;
}
#screen-study {
  zoom: 0.74;
  max-width: 940px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  padding-top: 10px;
}
#screen-study .study-question-card {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
#screen-study .study-question-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 0 0;
  box-shadow: none;
  margin-top: 12px;
}
#screen-study .prob-text {
  margin-bottom: 18px;
  max-width: var(--study-paper-width);
  font-family: var(--exam-serif-font, 'Batang', '바탕', 'KoPub World Batang', 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif);
  font-size: 17.3px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  white-space: normal;
}
#screen-study .prob-text table, #screen-study .prob-text td, #screen-study .prob-text th {
  font-family: inherit;
}
#screen-study .study-paper-box {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#screen-study .study-paper-box .prob-text {
  margin-bottom: 0;
}
#screen-study .choices {
  width: 100%;
  max-width: var(--study-paper-width);
}
#screen-study .choice-row {
  padding-left: 2px;
  padding-right: 2px;
}
* {
  caret-color: transparent !important;
}
#screen-study .choice-row {
  grid-template-columns: 1.45em minmax(0, 1fr);
  column-gap: 0.37em;
  padding: 2px 0;
  margin-bottom: 0;
  border-bottom: none;
}
#screen-study .choice-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}
#screen-study .choice-num {
  font-size: inherit;
  color: var(--text);
}
#screen-study .choice-txt {
  font-family: var(--exam-serif-font, 'Batang', '바탕', 'KoPub World Batang', 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif);
  font-size: 16px;
  line-height: 1.82;
}
#screen-study .gnd-box {
  display: block;
  border: 1px solid var(--text-3, #6B7280);
  padding: 8px 14px;
  margin: 10px 0 6px;
  line-height: 1.8;
  text-indent: 0;
}
#screen-study .prob-text, #screen-study .gnd-box, #screen-study .prob-text * {
  user-select: text !important;
  -webkit-user-select: text !important;
}
.q-pipe-table-wrap {
  overflow-x: auto;
  margin: 6px 0;
}
.q-pipe-table {
  border-collapse: collapse;
  font-size: 0.93em;
  width: auto;
}
.q-pipe-table th, .q-pipe-table td {
  border: 1px solid #94A3B8;
  padding: 4px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.q-pipe-table th {
  font-weight: 600;
}
.q-pipe-table th:first-child {
  text-align: left;
  width: auto;
  white-space: normal;
}
.q-pipe-table td:not(:first-child) {
  width: 1%;
}
@media (min-width: 1100px) {
  body {
    background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
    padding: 24px;
  }
  .app {
    max-width: 1480px;
    margin: 0 auto;
    background: rgba(250, 250, 248, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.10);
    overflow: hidden;
  }
  .app:has(#screen-study.active) {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .screen {
    padding: 0 44px 32px;
  }
  #screen-study {
    max-width: 980px;
    margin: 0 auto;
  }
  #screen-study .prob-text, #screen-study #choicesArea {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  #screen-study .prob-text, #screen-study .choices {
    max-width: 760px;
  }
  #screen-study .prob-text {
    font-size: 17px;
    line-height: 1.72;
    margin-bottom: 18px;
  }
  #screen-study .choices {
    margin-bottom: 24px;
  }
}
@media (max-width: 767px) {
  body {
    background: #F4F6FB;
  }
  .app {
    max-width: 100%;
    min-height: 100vh;
  }
  .screen {
    padding: 0 16px 14px;
  }
  #screen-study {
    background: linear-gradient(180deg, #F4F6FB 0%, #EEF2F7 100%);
    border-radius: 0;
    padding-top: 4px;
  }
  #screen-study .study-question-card {
    background: #FCFCFA;
    border-color: #D8D4CC;
  }
  .prob-text {
    font-size: 15px;
    line-height: 1.68;
    margin-bottom: 14px;
  }
  .choice-row {
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
    margin-bottom: 8px;
    padding: 1px 4px 1px 4px;
  }
  .choice-num {
    width: 26px;
  }
  .choices {
    margin-bottom: 14px;
    padding: 0 2px 0 4px;
  }
}
#screen-study .study-question-card {
  margin-top: 10px;
}
#screen-study .prob-text {
  letter-spacing: 0;
}
@media (max-width: 767px) {
  .screen {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}
#screen-study {
  --study-paper-width: min(540px, calc(100vw - 52px));
  --study-ox-answer-gap: 30px;
}
#screen-study .study-question-card, #screen-study .study-paper-box, #screen-study #choicesArea {
  width: var(--study-paper-width) !important;
  max-width: var(--study-paper-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#screen-study .study-paper-box .prob-text {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
@media (max-width: 767px) {
  #screen-study {
    --study-paper-width: calc(100vw - 32px);
  }
}
body {
  background:
  radial-gradient(circle at top left, rgba(36, 81, 223, 0.045), transparent 30%),
  linear-gradient(180deg, #F7F8FA 0%, #EEF1F5 100%);
}
#screen-study {
  background:
  radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 36%),
  linear-gradient(180deg, #EEF1F5 0%, #E3E7EC 100%) !important;
}
#screen-study .study-question-card {
  color: var(--text) !important;
}
#screen-study .choice-num {
  color: var(--text) !important;
}
@media (min-width: 900px) {
  #screen-study {
    --study-paper-width: min(1010px, calc(100vw - 72px));
    max-width: min(1120px, calc(100vw - 48px)) !important;
    padding-top: 14px !important;
  }
  #screen-study .study-question-card {
    margin-top: 12px !important;
  }
  #screen-study .prob-text {
    font-size: 18px !important;
    line-height: 1.62 !important;
    letter-spacing: -0.015em !important;
  }
  #screen-study .choice-txt {
    font-size: 17px !important;
    line-height: 1.62 !important;
  }
  #screen-study .choice-num {
    font-size: 17px !important;
  }
}
.exam-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
}
.exam-table {
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  width: auto;
  white-space: normal;
}
.exam-table th, .exam-table td {
  border: 1px solid #333;
  padding: 4px 12px;
  text-align: right;
  white-space: nowrap;
  word-break: normal;
  vertical-align: middle;
  background: none;
  color: inherit;
}
.exam-table th {
  font-weight: 700;
  text-align: center;
}
.prob-text {
  word-break: keep-all; overflow-wrap: anywhere;
}
.prob-text table {
  border-collapse: collapse; margin: 8px 0; font-size: 14px; word-break: normal; width: 100%; max-width: 540px;
}
.prob-text td, .prob-text th {
  border: 1px solid #333; padding: 4px 10px; background: none; vertical-align: middle; word-break: normal; min-width: 80px; text-align: center;
}
.prob-text th {
  white-space: nowrap;
}
.prob-text th {
  font-weight: 700; text-align: center; white-space: nowrap;
}
#screen-study {
  --exam-line-color: var(--text);
}
#screen-study .choice-txt {
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-break: strict;
  text-wrap: pretty;
}
@media (min-width: 900px) {
  #screen-study .choice-txt {
    font-size: 17.05px !important;
    line-height: 1.6 !important;
    letter-spacing: -0.024em !important;
  }
}
@media (max-width: 767px) {
  #screen-study .choice-txt {
    letter-spacing: -0.015em !important;
    line-height: 1.64 !important;
  }
}
#screen-study #choicesArea > .mcq-layout {
  width: 100% !important;
  max-width: var(--study-paper-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#screen-study .mcq-main {
  min-width: 0;
}
#screen-study .mcq-main .choices {
  width: 100% !important;
  max-width: 100% !important;
}
#screen-study .study-paper-box.multiple-mode .prob-text {
  font-family: 'Noto Serif CJK KR', 'Noto Serif KR', 'Batang', serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.8;
  color: var(--exam-line-color, var(--text));
  text-indent: 0;
  padding-left: 0;
  max-width: 43em;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
#screen-study .study-paper-box.multiple-mode .gnd-box {
  font-weight: 700;
}
#screen-study .study-paper-box.multiple-mode + #choicesArea .choices {
  max-width: 43em;
  margin-left: auto;
  margin-right: auto;
}
#screen-study .study-paper-box.multiple-mode + #choicesArea .choice-row {
  grid-template-columns: 1.3em minmax(0, 1fr);
  column-gap: 0.45em;
  margin-bottom: 4px;
  padding: 0;
}
#screen-study .study-paper-box.multiple-mode + #choicesArea .choice-txt {
  line-height: 1.8;
  font-size: 23px;
}
@media (min-width: 1000px) {
  #screen-study #choicesArea > .mcq-layout {
    display: block;
  }
}
#screen-study {
  --study-paper-width: min(980px, calc(100vw - 64px));
  --study-ink: var(--text);
  --study-muted: #64748B;
  --study-line: #1F2937;
  --study-paper: #F3F4F5;
  --study-blue: #2F55D8;
  background:
  radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.58), transparent 28%),
  linear-gradient(180deg, #EEF0F2 0%, #E6E8EB 100%) !important;
  border-radius: 28px !important;
  padding: 18px 0 38px !important;
  color: var(--study-ink) !important;
}
#screen-study .study-question-card, #screen-study #choicesArea {
  width: var(--study-paper-width) !important;
  max-width: var(--study-paper-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#screen-study .study-question-card {
  margin-top: 16px !important;
  padding: 0 !important;
  gap: 13px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#screen-study .study-paper-box {
  width: var(--study-paper-width) !important;
  max-width: var(--study-paper-width) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#screen-study #choicesArea {
  margin-top: 0 !important;
}
#screen-study .choices {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#screen-study .choice-row {
  padding: 4px 0 !important;
  border-bottom: none !important;
}
#screen-study .choice-num {
  color: var(--text) !important;
  font-family: 'Noto Serif CJK KR', 'Noto Serif KR', 'Batang', serif !important;
  font-weight: 700 !important;
}
@media (min-width: 1100px) {
  #screen-study {
    --study-paper-width: min(1010px, calc(100vw - 100px));
  }
}
@media (max-width: 767px) {
  #screen-study {
    --study-paper-width: calc(100vw - 56px);
    border-radius: 0 !important;
    padding: 8px 0 28px !important;
  }
}
#screen-study .choice-txt {
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  line-break: strict !important;
}
#screen-study {
  --study-text-scale: 0.96;
  --study-base-font-size: 17.1px;
  --audit-ox-font-size: 17.35px;
  --audit-ox-line-height: 1.56;
  /* OX 답안지 활성 셀 하이라이트 색 — 단일 노브. 색 바꾸려면 여기만 수정. JS(setActiveAnswerCell)가 var()로 참조. */
  --ox-active-hl: rgba(253, 224, 110, 0.18);
  /* 약술형·OX 답안지 점선 배경 — 단일 노브. CSS·JS 모두 var() 참조. */
  --dot-bg-img: radial-gradient(circle at 2.5px 31px, #BDD1CC 1px, transparent 1.4px);
  /* 행 높이 64px 전용 점선 — 32px 변수와 동일 색·크기지만 간격 2배, 점이 행마다 1개 */
  --dot-bg-img-64: radial-gradient(circle at 2.5px 63px, #BDD1CC 1px, transparent 1.4px);
  /* 채점 후 리뷰 카드 전용 점선 */
  --dot-bg-img-card: radial-gradient(circle at 2.5px 31px, #C0CDD8 1px, transparent 1.4px);
  background:
  radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.50), transparent 28%),
  linear-gradient(180deg, #EEF0F2 0%, #E5E7EA 100%) !important;
}
#screen-study {
  --exam-serif-font: "HY신명조", "HY Sinmyeongjo", "Noto Serif CJK KR", "Noto Serif KR", "Batang", "바탕", "AppleMyungjo", serif;
}
body:has(#screen-study.active) {
  background: var(--bg) !important;
}
.app:has(#screen-study.active) {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#screen-study {
  background: transparent !important;
  border-radius: 0 !important;
}
#screen-study:not(.essay-two-col-width-mode) .study-question-card {
  background: var(--bg) !important;   /* 배경과 동일한 회색 채움 */
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06) !important;
  padding: 30px 36px 26px !important;   /* 여백은 앱별로 조정 예정 */
  max-width: 960px !important;
  margin: 14px auto 0 !important;
}
@media (max-width: 767px) {
  #screen-study:not(.essay-two-col-width-mode) .study-question-card {
    padding: 20px 18px 18px !important;
    border-radius: 12px !important;
  }
}
#screen-study:not(.essay-two-col-width-mode) .study-question-card {
  width: calc(var(--study-paper-width, 860px) + 56px) !important;
  max-width: calc(100vw - 20px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
#screen-study:not(.essay-two-col-width-mode) .study-question-card {
  padding: 26px 28px !important;
}
@media (max-width: 767px) {
  #screen-study:not(.essay-two-col-width-mode) .study-question-card {
    padding: 20px 16px !important;
  }
}
@media (max-width: 400px) {
  #screen-study:not(.essay-two-col-width-mode) .study-question-card {
    padding: 18px 12px !important;
  }
}
#screen-study:not(.essay-two-col-width-mode) .study-paper-box {
  margin-bottom: 0 !important;
}
@media (max-width: 768px) {
  #screen-study #choicesArea {
    padding-bottom: 84px !important;
  }
}
#screen-study .study-paper-box, #screen-study .study-paper-box + #choicesArea, #screen-study .prob-text, #screen-study .choices {
  max-width: 100% !important;
}
#screen-study .study-question-card {
  overflow-x: clip;
}
@media (max-width: 767px) {
  html, body {
    max-width: 100%;
    overflow-x: clip;
  }
  .app, .screen, #screen-study, #screen-study .study-question-card, #screen-study .study-paper-box, #screen-study #probText, #screen-study #choicesArea {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  #screen-study .prob-text, #screen-study .prob-text *, #screen-study .choice-row, #screen-study .choice-txt, #screen-study .choices, #screen-study .gnd-box {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  #screen-study .prob-text table, #screen-study .q-pipe-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
