/* 매일신문 수능 온라인 풀이. 흰 상자·표 중심, 색은 아낀다. 시험지 화면만 실제 시험지·OMR 답안지 느낌을 낸다. */
:root {
  --ink: #111;
  --text: #222;
  --muted: #666;
  --line: #d9d9d9;
  --bg: #f4f5f7;
  --red: #d7141a;      /* 매일신문 로고 빨강: 채점 표시에만 */
  --omr: #e2567a;      /* OMR 답안지 인쇄색 */
  --omr-soft: #fbe9ee;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", "바탕", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* 머리띠: 왼쪽 위에 매일신문 로고 */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.top .logo { display: flex; align-items: center; flex: none; }
.top .logo img { height: 22px; width: auto; display: block; }
.top .where { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; border-left: 1px solid var(--line); }
.top .tools { display: flex; align-items: center; gap: 6px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; height: 34px; padding: 0 12px; border: 1px solid #bbb; background: #fff; border-radius: 4px; font-size: 14px; white-space: nowrap; }
.btn:hover { background: #f3f3f3; }
.btn.dark { background: #111; border-color: #111; color: #fff; font-weight: 700; }
.btn.dark:hover { background: #333; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.on { background: #111; color: #fff; border-color: #111; }

/* ---------- 첫 화면 ---------- */
.wrap { max-width: 860px; margin: 0 auto; padding: 20px 14px 60px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin-bottom: 14px; }
h1.title { margin: 0 0 4px; font-size: 22px; color: var(--ink); letter-spacing: -.02em; }
.sub { margin: 0; color: var(--muted); font-size: 14px; }
table.tt { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tt th, table.tt td { border-bottom: 1px solid #e8e8e8; padding: 11px 8px; text-align: left; vertical-align: middle; }
table.tt thead th { font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid #999; background: #fafafa; }
table.tt tr.period td { background: #fafafa; font-weight: 700; color: var(--ink); border-top: 1px solid #999; }
table.tt td.act { text-align: right; white-space: nowrap; }
table.tt td.when { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.state { font-size: 13px; color: var(--muted); }
.state.open { color: #0a7a2f; font-weight: 700; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.gate { text-align: center; padding: 36px 20px; }
.gate h2 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.gate p { margin: 0 0 18px; color: var(--muted); }
.gate .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gate .btn { height: 42px; padding: 0 20px; font-size: 15px; }
footer.foot { font-size: 12px; color: #888; text-align: center; padding: 8px 14px 30px; line-height: 1.7; }

/* ---------- 풀이 화면 ---------- */
body.exam { background: #8a8d91; overflow: hidden; }
.stage { position: fixed; inset: 52px 0 0 0; display: flex; }
.paper { flex: 1; min-width: 0; overflow: auto; overflow-y: scroll; -webkit-overflow-scrolling: touch; padding: 18px 12px 120px; }
.sheet { position: relative; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.sheet canvas { display: block; width: 100%; height: 100%; }
.sheet .pno { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #bbb; font-size: 14px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; color: var(--ink); min-width: 62px; text-align: center; }
.timer.low { color: var(--red); }

/* OMR 답안지 */
.omr { flex: none; width: 318px; display: flex; flex-direction: column; background: #fffdfd; border-left: 2px solid var(--omr); }
.omr-head { flex: none; padding: 10px 12px 8px; border-bottom: 2px solid var(--omr); color: var(--omr); }
.omr-head b { display: block; font: 700 17px/1.3 var(--serif); letter-spacing: .3em; text-align: center; }
.omr-head span { display: block; font-size: 11.5px; text-align: center; margin-top: 2px; }
.omr-body { flex: 1; overflow: auto; padding: 8px 10px 14px; }
.omr-sec { font-size: 12px; font-weight: 700; color: var(--omr); margin: 10px 2px 4px; }
.omr-grid { border: 1.5px solid var(--omr); }
.orow { display: grid; grid-template-columns: 38px 1fr; align-items: center; min-height: 31px; border-bottom: 1px solid #f1bccb; position: relative; }
.orow:last-child { border-bottom: 0; }
.orow:nth-child(5n):not(:last-child) { border-bottom: 1.5px solid var(--omr); }
.orow .no { align-self: stretch; display: flex; align-items: center; justify-content: center; background: var(--omr-soft); border-right: 1.5px solid var(--omr); color: #b02a52; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.orow .marks { display: flex; justify-content: space-around; align-items: center; padding: 0 6px; }
.bub { width: 17px; height: 25px; border: 1.2px solid var(--omr); border-radius: 50%; background: #fff; color: var(--omr); font-size: 11px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; }
.bub.sel { background: #111; border-color: #111; color: #111; }
.orow input.short { width: 92px; height: 25px; margin: 0 auto; display: block; border: 1.2px solid var(--omr); border-radius: 3px; text-align: center; font: 700 15px var(--sans); color: #111; background: #fff; }
.orow input.short::placeholder { font-weight: 400; font-size: 11px; color: #d58aa0; }
/* 채점 뒤 */
.orow.right .no::after, .orow.wrong .no::after { position: absolute; left: 0; width: 38px; text-align: center; color: var(--red); font: 400 30px/1 var(--serif); pointer-events: none; opacity: .85; }
.orow.right .no::after { content: "○"; top: 0; font-size: 31px; line-height: 31px; }
.orow.wrong .no::after { content: "／"; top: 0; font-size: 30px; line-height: 31px; }
.bub.ans { box-shadow: 0 0 0 2.5px var(--red); }
.orow .fix { font-size: 12.5px; color: var(--red); font-weight: 700; text-align: center; }
.omr.graded .bub, .omr.graded input.short { pointer-events: none; }
.omr-foot { flex: none; padding: 10px; border-top: 2px solid var(--omr); background: #fff; }
.omr-foot .btn { width: 100%; height: 44px; font-size: 16px; }
.omr-foot .cnt { font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 6px; }
.omr-toggle { display: none; }

/* 점수 */
.score { border: 1.5px solid var(--red); margin: 4px 0 10px; padding: 10px 12px; text-align: center; background: #fff; }
.score .n { font: 700 46px/1.1 var(--serif); color: var(--red); }
.score .n small { font-size: 18px; color: #555; font-weight: 400; }
.score p { margin: 4px 0 0; font-size: 13px; color: #444; }
.score .links { margin-top: 8px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.score .links .btn { height: 30px; font-size: 13px; padding: 0 10px; }

/* 듣기 */
.audio { position: sticky; top: 0; z-index: 5; max-width: 900px; margin: 0 auto 12px; background: #fff; border: 1px solid #555; padding: 8px 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.audio audio { flex: 1; min-width: 200px; height: 34px; }

/* 표지(시작 전) */
.cover { position: fixed; inset: 52px 0 0 0; z-index: 20; background: #8a8d91; overflow: auto; padding: 20px 12px 40px; }
.cover-sheet { max-width: 620px; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); padding: 34px 28px 28px; font-family: var(--serif); color: #000; }
.cover-sheet .yr { text-align: center; font-size: 17px; font-weight: 700; margin: 0; }
.cover-sheet .pd { display: inline-block; border: 2px solid #000; border-radius: 16px; padding: 2px 14px; font-size: 16px; font-weight: 700; }
.cover-sheet h1 { text-align: center; font-size: 42px; letter-spacing: .12em; margin: 14px 0 6px; font-weight: 800; }
.cover-sheet .rule { border: 0; border-top: 3px double #000; margin: 14px 0 18px; }
.cover-sheet ul { margin: 0 0 16px; padding-left: 18px; font-size: 14.5px; line-height: 1.85; }
.cover-sheet .pick { border: 1.5px solid #000; padding: 12px 14px; margin: 0 0 14px; font-family: var(--sans); }
.cover-sheet .pick b { display: block; margin-bottom: 8px; font-size: 14px; }
.cover-sheet .pick label { display: inline-flex; align-items: center; gap: 6px; margin: 0 16px 4px 0; font-size: 15px; cursor: pointer; }
.cover-sheet .go { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--sans); }
.cover-sheet .go .btn { flex: 1; height: 48px; font-size: 16px; min-width: 150px; }
.cover-sheet .src { margin: 16px 0 0; font: 12px/1.6 var(--sans); color: #777; text-align: center; }
.msg.gate h2 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.msg.gate p { color: var(--muted); }
.msg { max-width: 520px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 28px 22px; text-align: center; }

/* 좁은 화면: 답안지는 아래에서 올라온다 */
@media (max-width: 860px) {
  .top { gap: 8px; padding: 0 10px; }
  .top .logo img { height: 18px; }
  .top .where { font-size: 14px; padding-left: 8px; }
  .hide-s { display: none; }
  .paper { padding: 10px 0 150px; }
  .sheet { margin-bottom: 8px; box-shadow: none; }
  .omr { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: 62vh; border-left: 0; border-top: 2px solid var(--omr); transform: translateY(100%); transition: transform .2s; z-index: 25; box-shadow: 0 -6px 20px rgba(0, 0, 0, .3); }
  .omr.up { transform: none; }
  .omr-toggle { display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 24; height: 48px; align-items: center; justify-content: center; gap: 8px; background: #111; color: #fff; border: 0; border-radius: 6px; font-size: 16px; font-weight: 700; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
  .omr-head { position: relative; }
  .omr-close { position: absolute; right: 8px; top: 8px; }
  .bub { width: 22px; height: 30px; font-size: 12px; }
  .orow { min-height: 38px; }
  .orow.right .no::after, .orow.wrong .no::after { line-height: 38px; }
  .cover-sheet { padding: 24px 18px 20px; }
  .cover-sheet h1 { font-size: 34px; }
  table.tt th, table.tt td { padding: 10px 5px; }
}
@media (min-width: 861px) { .omr-close { display: none; } }
@media print { body { display: none; } }

/* ===== 시험장 느낌 (2026-11-19) ===== */
/* 책상: 나뭇결 */
body.exam, .cover { background-color: #b08a5b; background-image: repeating-linear-gradient(92deg, rgba(90, 58, 24, .10) 0 2px, transparent 2px 9px, rgba(255, 236, 200, .07) 9px 11px, transparent 11px 23px), linear-gradient(180deg, #b9925f, #a57f51); }
.sheet { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 3px 3px 0 -1px #f3f1ec, 3px 3px 0 0 #c9c4b8, 6px 6px 0 -1px #f3f1ec, 6px 6px 0 0 #c9c4b8, 0 14px 26px rgba(40, 22, 4, .45); margin-bottom: 26px; }
.sheet svg.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.sheet svg.ink path { fill: none; stroke: #23272f; stroke-opacity: .82; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
body.pen .sheet svg.ink { pointer-events: auto; touch-action: none; cursor: crosshair; }
body.pen .paper { outline: 3px solid rgba(35, 39, 47, .0); }
.timer { background: #111; color: #7dff9b; border-radius: 4px; padding: 3px 10px; font: 700 16px/1.5 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.timer.low { color: #ff6b6b; }

/* 표지 */
.cover-sheet { position: relative; max-width: 640px; padding: 30px 34px 26px; background: #fffefb; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 4px 4px 0 -1px #f3f1ec, 4px 4px 0 0 #c9c4b8, 8px 8px 0 -1px #f3f1ec, 8px 8px 0 0 #c9c4b8, 0 18px 34px rgba(40, 22, 4, .5); }
.cv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cover-sheet .yr { text-align: left; font-size: 18px; margin: 4px 0 0; }
.odd { flex: none; border: 2px solid #000; padding: 3px; }
.odd b { display: block; border: 1px solid #000; padding: 4px 12px; font: 800 17px var(--serif); letter-spacing: .1em; }
.cv-pd { text-align: center; margin: 22px 0 0; }
.cover-sheet h1 { font-size: 50px; letter-spacing: .22em; margin: 10px 0 20px; padding-left: .22em; }
.cv-id { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.cv-id th, .cv-id td { border: 1.5px solid #000; height: 40px; padding: 0 8px; }
.cv-id th { width: 74px; font-weight: 700; background: #f4f2ec; white-space: nowrap; }
.cv-id input { width: 100%; height: 34px; border: 0; background: transparent; font: 600 16px var(--serif); color: #1c2a5a; outline: none; min-width: 60px; }
.cv-id input::placeholder { color: #bbb; font-weight: 400; font-size: 13px; }
.cv-id .boxes { white-space: nowrap; text-align: center; }
.cv-id .boxes i { display: inline-block; width: 17px; height: 24px; border: 1px solid #000; margin: 0 1px; vertical-align: middle; }
.cv-id .boxes em { font-style: normal; margin: 0 2px; }
.cover-sheet ul.cv-rules { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14.5px; line-height: 1.9; }
.cv-rules li { position: relative; padding-left: 20px; }
.cv-rules li::before { content: "○"; position: absolute; left: 0; }
.cv-warn { text-align: center; font: 700 15.5px var(--serif); margin: 4px 0 16px; padding: 9px 6px; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; }
.cover-sheet .src { margin-top: 14px; }
.cv-kice { margin-top: 16px; text-align: center; font: 800 17px var(--serif); letter-spacing: .3em; color: #000; }

/* 답안지: 인쇄된 카드처럼 */
.omr { background: #fffafb; box-shadow: -6px 0 18px rgba(40, 22, 4, .35); }
.omr-head { padding: 9px 10px 7px; background: #fff; }
.omr-head b { font-size: 15.5px; letter-spacing: .12em; }
.omr-id { width: 100%; border-collapse: collapse; margin: 7px 0 5px; font-size: 11.5px; table-layout: fixed; }
.omr-id th, .omr-id td { border: 1.2px solid var(--omr); height: 23px; padding: 0 3px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.omr-id th { background: var(--omr-soft); color: #b02a52; font-weight: 700; width: 34px; }
.omr-id td { color: #111; font-weight: 700; }
.omr-head #omr-sub { font-size: 10.5px; text-align: left; line-height: 1.4; margin-top: 0; }
/* 왼쪽 가장자리의 검은 타이밍 마크 */
.omr-body { padding-left: 22px; background: repeating-linear-gradient(to bottom, transparent 0 11px, #111 11px 20px, transparent 20px 32px) 6px 0 / 8px 100% no-repeat local, #fffafb; }
.omr-grid { background: #fff; }
.bub { font-family: Arial, sans-serif; }
.bub.sel { box-shadow: inset 0 0 0 1px #000; transform: rotate(-4deg) scale(1.06); }
@media (max-width: 860px) {
  .sheet { box-shadow: 0 1px 0 #c9c4b8, 0 6px 12px rgba(40, 22, 4, .35); margin-bottom: 12px; }
  .cover-sheet { padding: 20px 16px 18px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 12px 24px rgba(40, 22, 4, .45); }
  .cover-sheet .yr { font-size: 15px; }
  .cover-sheet h1 { font-size: 38px; margin: 8px 0 14px; }
  .odd b { font-size: 14px; padding: 3px 8px; }
  .cv-id th { width: auto; font-size: 12.5px; padding: 0 5px; }
  .cv-id .boxes i { width: 11px; height: 20px; margin: 0; }
  .cv-id input { min-width: 0; font-size: 15px; }
  .cover-sheet ul.cv-rules { font-size: 13.5px; }
  .top .tools .btn { padding: 0 8px; height: 32px; font-size: 13px; }
  .top .tools { gap: 4px; }
  body.exam .top .where { display: none; }
  body.exam .top .tools { margin-left: auto; }
  .timer { font-size: 14px; padding: 2px 6px; min-width: 0; }
}
.omr-id #o-el { font-size: 10px; letter-spacing: -.06em; text-overflow: clip; }
.omr-id tr:last-child th:nth-of-type(2) + td { width: 30%; }

/* 등급컷 */
.cut { margin: 10px 0 8px; padding: 10px 8px 8px; border-top: 1px dashed #d9a3a6; text-align: center; }
.cut.none { font-size: 12.5px; color: #777; line-height: 1.6; }
.cut .g { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.cut .g span { font-size: 13px; color: #555; }
.cut .g strong { font: 800 26px var(--serif); color: var(--red); }
.cut .cap { font-size: 11.5px; color: #777; margin: 6px 0 4px; }
.cut ol { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid #ccc; }
.cut li { flex: 1; border-right: 1px solid #ddd; font-size: 11.5px; min-width: 0; }
.cut li:last-child { border-right: 0; }
.cut li b { display: block; background: #f3f3f3; color: #555; font-weight: 600; border-bottom: 1px solid #ddd; }
.cut li span { display: block; padding: 2px 0; font-variant-numeric: tabular-nums; color: #222; }
.cut li.me b { background: var(--red); color: #fff; }
.cut li.me span { font-weight: 800; color: var(--red); }
.cut p { margin: 6px 0 0; font-size: 11px; color: #888; line-height: 1.5; }

/* 공유·랭킹 등록 */
#social { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #d9a3a6; }
#social .rk { margin: 0 0 8px; font-size: 13.5px; color: #333; }
#social .rk b { color: var(--red); }
#social .rk span { color: #888; font-size: 12px; }
#social .rk.ok { color: #0a7a2f; }
#social .join { display: flex; gap: 6px; margin-bottom: 4px; }
#social .join input { flex: 1; min-width: 0; height: 34px; border: 1px solid #999; border-radius: 4px; padding: 0 9px; font: inherit; font-size: 14px; }
#social .jmsg { margin: 0 0 8px; font-size: 11.5px; color: #888; }
#social .jmsg.bad { color: var(--red); }
#social .links { margin-top: 0; }
.top .btn.rank { border-color: #111; font-weight: 700; }

/* 표지: 온라인 응시자 유의 사항(웃자고 적은 것) */
.cv-fun { border: 1.5px dashed #000; padding: 12px 14px 10px; margin: 0 0 14px; background: #fffdf3; position: relative; }
.cv-fun b { display: inline-block; font: 800 14.5px var(--serif); background: #000; color: #fff; padding: 2px 10px; margin-bottom: 8px; letter-spacing: .04em; }
.cv-fun ol { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.75; }
.cv-fun li { margin-bottom: 2px; }
.cv-fun li::marker { font-weight: 800; }
@media (max-width: 860px) { .cv-fun { padding: 10px 10px 8px; } .cv-fun ol { font-size: 13px; padding-left: 20px; } }
@media (max-width: 860px) { .cover-sheet .go { flex-direction: column; } .cover-sheet .go .btn { flex: none; width: 100%; min-width: 0; } }
