/* Natural OMR polish for mocktest_exam.php and mocktest_view.php */
#mocktest, #omr_wr, #nclex_view, #nclex_omr_overlay { --omr-uncertain-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9.09%209a3%203%200%200%201%205.83%201c0%202-3%203-3%203%22%2F%3E%3Cpath%20d%3D%22M12%2017h.01%22%2F%3E%3C%2Fsvg%3E"); --omr-primary: #74a7f2; --omr-primary-soft: #f5f9ff; --omr-text: #334155; --omr-muted: #667085; --omr-border: #e2e8f0; --omr-soft: #f8fafc; --omr-danger: #ef9a9d; --omr-focus: #a9c8f2; --omr-shadow: 0 10px 26px rgba(15,23,42,0.07); }

/* OMR answer sheet */
#omr_wr.show { right: 0 !important; }
#omr_wr > .box, #omr_wr > .box.aSheet { box-sizing: border-box; color: var(--omr-text); border-color: #edf2f7 !important; box-shadow: var(--omr-shadow) !important; overflow-y: auto !important; overflow-x: hidden !important; }
#omr_wr .popup_title_wr { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 0; }
#omr_wr .popup_title_wr h5 { min-width: 0; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#omr_wr .popup_title_wr p { flex-shrink: 0; color: var(--omr-text); }
#omr_wr .popup_title_wr .close_omr, #omr_wr .popup_title_wr .close_btn { box-sizing: border-box; flex: 0 0 auto; display: inline-flex !important; align-items: center; justify-content: center; min-width: 42px; height: 28px; margin: 0; padding: 0 10px; border: 1px solid var(--omr-border); border-radius: 7px; background: #fff; color: var(--omr-muted) !important; font-size: 12px; font-weight: 700; line-height: 1; text-align: center; text-decoration: none !important; white-space: nowrap; cursor: pointer; }
#omr_wr .popup_title_wr .close_omr:hover, #omr_wr .popup_title_wr .close_btn:hover { border-color: var(--omr-focus); background: var(--omr-primary-soft); color: var(--omr-primary) !important; }
#omr_wr .item_new { width: 100%; margin-top: 12px; }
#omr_wr .aSeet_new, #omr_wr .aSeet_new > li, #omr_wr .item_con_new { width: 100%; min-width: 0; margin-left: 0; padding-left: 0; list-style: none; }
#omr_wr .item_con_new > .div_no { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; min-height: 48px; margin-bottom: 8px; padding: 9px 11px; border: 1px solid var(--omr-border); border-radius: 8px; background: #fff; color: var(--omr-muted); transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease; transform: none !important; }
#omr_wr .item_con_new > .div_no > p { flex: 0 0 44px; width: 44px !important; min-width: 0; color: var(--omr-muted); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
#omr_wr .item_con_new > .div_no .con_list { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 0 !important; }
#omr_wr .item_con_new > .div_no .con_list ul { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; max-width: 208px; margin: 0; padding: 0; list-style: none; flex-wrap: nowrap; }
#omr_wr .item_con_new > .div_no .con_list ul li { box-sizing: border-box; width: 28px; height: 28px; margin: 0; border: 1px solid var(--omr-border); border-radius: 50%; background: #fff; color: #6b7280; font-size: 13px; font-weight: 700; line-height: 26px; text-align: center; }
#omr_wr .item_con_new > .div_no .con_list ul li.n_on { color: #fff !important; background: var(--omr-primary) !important; border-color: var(--omr-primary) !important; }
#omr_wr .item_con_new > .div_no .con_list ul li.n_nrt { color: #fff !important; background: var(--omr-danger) !important; border-color: var(--omr-danger) !important; }
#omr_wr .item_con_new > .div_no .con_list ul li.n_yrt { color: #fff !important; background: var(--omr-primary) !important; border-color: var(--omr-primary) !important; }
#omr_wr .item_con_new > .div_no .short-answer-omr { width: auto; min-width: 56px; max-width: 100%; padding: 0 7px; border-radius: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 답안 원과 구분되는 헷갈림 토글. 보이는 표시는 28px, 실제 터치 영역은 44px이다. */
#omr_wr .item_con_new > .div_no .omr_icon_01 {box-sizing:border-box; flex:0 0 44px; display:inline-grid; place-items:center; width:44px; height:44px; margin:-7px -5px -7px 0; padding:0; border:0; border-radius:8px; background:none; color:var(--omr-muted); font:inherit; line-height:1; opacity:1; cursor:pointer; touch-action:manipulation; transform:none; transition:none; animation:none;}
#omr_wr .item_con_new > .div_no .omr_icon_01::before {content:""; box-sizing:border-box; grid-area:1 / 1; width:28px; height:28px; border:1px solid var(--omr-border); border-radius:8px; background:var(--bg-card,#fff);}
#omr_wr .item_con_new > .div_no .omr_icon_01::after {content:""; grid-area:1 / 1; width:20px; height:20px; background:currentColor; -webkit-mask:var(--omr-uncertain-icon) center / contain no-repeat; mask:var(--omr-uncertain-icon) center / contain no-repeat; pointer-events:none;}
#omr_wr .item_con_new > .div_no .omr_icon_01.on {background:none; color:var(--text-link,#006cd4);}
#omr_wr .item_con_new > .div_no .omr_icon_01.on::before {border-color:var(--color-primary-200,#93cafe); background:var(--fill-brand-tint,#e8f4ff);}
#omr_wr .item_con_new > .div_no .omr_icon_01:hover::before {border-color:var(--text-link,#006cd4);}
#omr_wr .item_con_new > .div_no .omr_icon_01:focus-visible {outline:2px solid var(--text-link,#006cd4); outline-offset:0;}
#omr_wr .item_con_new > .div_no .omr_icon_01[aria-busy="true"] {cursor:wait; opacity:.6;}
#omr_wr .item_con_new > .div_no.show_omr { border-color: #d8e4f0 !important; background: var(--omr-soft) !important; }
#omr_wr .item_con_new > .div_no.select_orm { border-color: var(--omr-focus) !important; background: #fff !important; box-shadow: none !important; }
#omr_wr .item_con_new > .div_no.show_omr.select_orm { background: var(--omr-primary-soft) !important; }
#omr_wr .item_con_new > .div_no.show_omr > p, #omr_wr .item_con_new > .div_no.select_orm > p { color: var(--omr-primary); font-weight: 700; }
#omr_wr > .box.aSheet .div_no.current-question { color: var(--omr-text) !important; background: var(--omr-primary-soft) !important; border: 1px solid var(--omr-focus) !important; border-radius: 8px !important; box-shadow: inset 3px 0 0 var(--omr-primary) !important; transform: none !important; }
#omr_wr > .box.aSheet .div_no.current-question p { color: var(--omr-primary) !important; font-weight: 700 !important; }

/* NCLEX OMR */
@media screen and (min-width: 1101px) { #nclex_view { grid-template-columns: minmax(0, 1fr) 316px; gap: 18px; } }
#nclex_view .omr_side { box-sizing: border-box; background: #fff; border: 1px solid #edf2f7; border-radius: 10px; padding: 15px; box-shadow: var(--omr-shadow); max-height: min(620px, calc(100vh - 92px)); overflow-y: auto; overflow-x: hidden; }
#nclex_view .omr_side h4 { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid #edf2f7; color: var(--omr-text); font-size: 13px; font-weight: 800; line-height: 1.35; }
#nclex_view .nclex-omr-grid, #nclex_omr_overlay .nclex-omr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
#nclex_omr_overlay .nclex-omr-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
#nclex_view .nclex-omr-cell, #nclex_omr_overlay .nclex-omr-cell { box-sizing: border-box; position:relative; aspect-ratio: 1 / 1; min-width: 0; overflow: hidden; border: 1px solid var(--omr-border); border-radius: 8px; background: #fff; color: var(--omr-muted); transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
#nclex_view .nclex-omr-cell:hover, #nclex_omr_overlay .nclex-omr-cell:hover { border-color: var(--omr-focus); background: var(--omr-primary-soft); box-shadow: 0 4px 12px rgba(15,23,42,0.07); transform: translateY(-1px); }
#nclex_view .nclex-omr-cell-link, #nclex_omr_overlay .nclex-omr-cell-link { box-sizing: border-box; position:absolute; inset:0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 16px 3px 4px; color: inherit; text-decoration: none; }
#nclex_view .nclex-omr-num, #nclex_omr_overlay .nclex-omr-num { color: var(--omr-muted); font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: 0; }
#nclex_view .nclex-omr-picked, #nclex_omr_overlay .nclex-omr-picked { max-width: 92%; margin-top: 4px; color: var(--omr-primary); font-size: 10px; font-weight: 800; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nclex_view .nclex-omr-clip, #nclex_omr_overlay .nclex-omr-clip {display:none; position:absolute; top:4px; right:4px; width:16px; height:16px; box-sizing:border-box; border:1px solid var(--color-primary-200,#93cafe); border-radius:4px; background:var(--fill-brand-tint,#e8f4ff); color:var(--text-link,#006cd4); font-family:var(--font-base,Arial,sans-serif); font-size:13px; font-weight:700; line-height:1; pointer-events:none;}
#nclex_view .nclex-omr-clip.on, #nclex_omr_overlay .nclex-omr-clip.on {display:grid; place-items:center;}
#nclex_view .nclex-omr-clip.on::before, #nclex_omr_overlay .nclex-omr-clip.on::before {content:""; width:14px; height:14px; background:currentColor; -webkit-mask:var(--omr-uncertain-icon) center / contain no-repeat; mask:var(--omr-uncertain-icon) center / contain no-repeat;}
#nclex_view .nclex-omr-cell.is-answered, #nclex_omr_overlay .nclex-omr-cell.is-answered { border-color: var(--omr-focus); background: var(--omr-primary-soft); }
#nclex_view .nclex-omr-cell.is-answered .nclex-omr-num, #nclex_omr_overlay .nclex-omr-cell.is-answered .nclex-omr-num { color: var(--omr-primary); }
#nclex_view .nclex-omr-cell.is-correct, #nclex_omr_overlay .nclex-omr-cell.is-correct { border-color: var(--omr-primary); background: #f7fbff; }
#nclex_view .nclex-omr-cell.is-correct .nclex-omr-num, #nclex_omr_overlay .nclex-omr-cell.is-correct .nclex-omr-num, #nclex_view .nclex-omr-cell.is-correct .nclex-omr-picked, #nclex_omr_overlay .nclex-omr-cell.is-correct .nclex-omr-picked { color: var(--omr-primary); }
#nclex_view .nclex-omr-cell.is-wrong, #nclex_omr_overlay .nclex-omr-cell.is-wrong { border-color: #f1b5b8; background: #fff8f8; }
#nclex_view .nclex-omr-cell.is-wrong .nclex-omr-num, #nclex_omr_overlay .nclex-omr-cell.is-wrong .nclex-omr-num, #nclex_view .nclex-omr-cell.is-wrong .nclex-omr-picked, #nclex_omr_overlay .nclex-omr-cell.is-wrong .nclex-omr-picked { color: var(--omr-danger); }
#nclex_view .nclex-omr-cell.is-current, #nclex_omr_overlay .nclex-omr-cell.is-current { border-color: var(--omr-primary); background: #fff; box-shadow: inset 0 -3px 0 var(--omr-primary), 0 0 0 2px rgba(116,167,242,0.16); }
#nclex_view .nclex-omr-cell.is-current .nclex-omr-num, #nclex_omr_overlay .nclex-omr-cell.is-current .nclex-omr-num, #nclex_view .nclex-omr-cell.is-current .nclex-omr-picked, #nclex_omr_overlay .nclex-omr-cell.is-current .nclex-omr-picked { color: var(--omr-primary); }
#nclex_omr_overlay.nclex-modal-overlay { background: rgba(15,23,42,0.28); }
#nclex_omr_overlay .nclex-modal-box { box-sizing: border-box; width: min(430px, calc(100vw - 28px)); max-width: 430px; max-height: calc(100dvh - 108px); padding: 18px 16px 16px; border: 1px solid #edf2f7; border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,0.18); overflow-y: auto; overflow-x: hidden; }
#nclex_omr_overlay .nclex-modal-box > h3 { margin: 0 42px 14px 0 !important; color: var(--omr-text) !important; font-size: 16px !important; line-height: 1.35 !important; }
#nclex_omr_overlay .nclex-modal-close { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--omr-border); border-radius: 8px; background: #fff; color: var(--omr-muted); font-size: 20px; line-height: 1; cursor: pointer; }
#nclex_omr_overlay .nclex-modal-close:hover { border-color: var(--omr-focus); background: var(--omr-primary-soft); color: var(--omr-primary); }
@media screen and (max-width: 767px) { #nclex_omr_overlay.nclex-modal-overlay.active { align-items: flex-end; justify-content: center; } #nclex_omr_overlay .nclex-modal-box { width: calc(100vw - 16px); max-width: none; max-height: calc(100dvh - 96px); padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; } #nclex_omr_overlay .nclex-omr-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; } #nclex_omr_overlay .nclex-omr-cell-link { padding: 16px 2px 4px; } #nclex_omr_overlay .nclex-omr-num { font-size: 14px; } }

/* Question surface */
#mocktest .detail .content .tool.flex-left { height: auto !important; min-height: 25px; flex-wrap: wrap; gap: 6px; align-items: center; }
#mocktest .detail { box-sizing: border-box; }
#mocktest .detail .content .problem { color: #111827; word-break: keep-all; overflow-wrap: break-word; }
#mocktest .detail .content .problem .case_qn, #mocktest .detail .content .problem .sub_qn { border-color: var(--omr-border); background: var(--omr-soft); border-radius: 8px; }
#mocktest .detail .content .answer ul { margin-left: 0; padding-left: 0; list-style: none; }
#mocktest .detail .content .answer li .checkbox input ~ p { min-width: 0; overflow-wrap: break-word; }
#mocktest .answer_li { min-width: 0; }
#mocktest .answer_li > label { min-width: 0; }
#mocktest .answernum { box-sizing: border-box; flex-shrink: 0; }

@media screen and (min-width: 900px) { #mocktest .detail { flex-direction: row; align-items: flex-start; gap: 22px; } #new_item_wrap { order: 1; flex: 1 1 0 !important; width: auto !important; min-width: 0; } #omr_wr { order: 2; width: 364px !important; flex: 0 0 364px !important; } #omr_wr > .box, #omr_wr > .box.aSheet { width: 100% !important; height: auto !important; max-height: calc(100vh - 150px) !important; padding: 15px !important; border-radius: 10px !important; } #omr_wr .popup_title_wr .close_omr { display: none !important; } }

@media screen and (max-width: 900px) { body #omr_wr { align-items: center !important; justify-content: flex-end !important; } body #omr_wr.show { right: 0 !important; } body #omr_wr > .box, body #omr_wr > .box.aSheet { width: min(386px, 94vw) !important; max-width: 94vw !important; height: auto !important; max-height: calc(100dvh - 96px) !important; padding: 15px 12px !important; border-radius: 15px 0 0 15px !important; } #omr_wr .item_new { max-height: none !important; overflow: visible !important; } #omr_wr .item_con_new > .div_no { min-height: 47px; padding: 8px 10px; } #omr_wr .item_con_new > .div_no > p { flex-basis: 42px; width: 42px !important; } #omr_wr .item_con_new > .div_no .con_list ul { gap: 4px; max-width: 204px; } #omr_wr .item_con_new > .div_no .con_list ul li { width: 27px; height: 27px; font-size: 13px; line-height: 25px; } #mocktest .detail { padding: 0 14px; } #mocktest .detail .content .problem { font-size: 18px; line-height: 1.52; } }

@media screen and (max-width: 486px) { body #omr_wr > .box, body #omr_wr > .box.aSheet { width: min(372px, calc(100vw - 16px)) !important; max-width: calc(100vw - 16px) !important; max-height: calc(100dvh - 112px) !important; padding: 12px 10px !important; border-radius: 14px 0 0 14px !important; } #omr_wr .popup_title_wr { align-items: center; } #omr_wr .item_con_new > .div_no { gap: 7px; min-height: 45px; padding: 7px 8px; } #omr_wr .item_con_new > .div_no > p { flex-basis: 32px; width: 32px !important; font-size: 13px; letter-spacing: 0; } #omr_wr .item_con_new > .div_no .con_list { gap: 6px; } #omr_wr .item_con_new > .div_no .con_list ul { justify-content: space-between; gap: 3px; max-width: 198px; } #omr_wr .item_con_new > .div_no .con_list ul li { width: 25px; height: 25px; flex-shrink:0; font-size: 13px; line-height: 23px; } #omr_wr .item_con_new > .div_no .short-answer-omr { min-width: 58px; padding: 0 7px; } #mocktest .detail { padding: 0 12px; } #mocktest .detail .content .problem { font-size: 17px; line-height: 1.52; } #mocktest .detail .content .answer li .checkbox input ~ p { font-size: 14px; line-height: 1.72 !important; } #mocktest .answernum { width: 25px; height: 25px; font-size: 13px; line-height: 23px; } }

@media screen and (max-width:375px) { #nclex_omr_overlay .nclex-omr-grid {grid-template-columns:repeat(4,minmax(0,1fr));} }

/* 선지 소거 — OMR 헷갈림 표시와 같은 사각 표시·44px 터치 영역. 기존 wrong_ans 토글을 그대로 사용한다. */
#mocktest {--choice-eliminate-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%206%206%2018%22%2F%3E%3Cpath%20d%3D%22m6%206%2012%2012%22%2F%3E%3C%2Fsvg%3E"); --choice-restore-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%2014%204%209l5-5%22%2F%3E%3Cpath%20d%3D%22M4%209h10.5a5.5%205.5%200%200%201%205.5%205.5a5.5%205.5%200%200%201-5.5%205.5H11%22%2F%3E%3C%2Fsvg%3E");}
#mocktest .answer_li > .wronganswer_new {box-sizing:border-box; flex:0 0 44px; display:inline-grid; place-items:center; width:44px; height:44px; margin:-7px 0 0; padding:0; border:0; border-radius:8px; background:none; color:var(--omr-muted,#667085); line-height:1; cursor:pointer; touch-action:manipulation;}
#mocktest .answer_li > .wronganswer_new::before {content:""; box-sizing:border-box; grid-area:1 / 1; width:28px; height:28px; border:1px solid var(--omr-border,#e2e8f0); border-radius:8px; background:var(--bg-card,#fff);}
#mocktest .answer_li > .wronganswer_new::after {content:""; grid-area:1 / 1; width:20px; height:20px; background:currentColor; -webkit-mask:var(--choice-eliminate-icon) center / contain no-repeat; mask:var(--choice-eliminate-icon) center / contain no-repeat; pointer-events:none;}
#mocktest .answer_li.wrong_ans > .wronganswer_new {background:none; color:var(--text-link,#006cd4);}
#mocktest .answer_li.wrong_ans > .wronganswer_new::before {border-color:var(--color-primary-200,#93cafe); background:var(--fill-brand-tint,#e8f4ff);}
#mocktest .answer_li.wrong_ans > .wronganswer_new::after {-webkit-mask-image:var(--choice-restore-icon); mask-image:var(--choice-restore-icon);}
#mocktest .answer_li > .wronganswer_new:hover::before {border-color:var(--text-link,#006cd4);}
#mocktest .answer_li > .wronganswer_new:focus-visible {outline:2px solid var(--text-link,#006cd4); outline-offset:0;}

#mocktest .answer_li > label > p:not(.selection_rate) {overflow-wrap:anywhere !important;}

/* OMR 저장 칸 — 「헷갈림」(?)을 걷고 저장 하나로(2026-11-05, mm_star_only_on · lib/omr_star.lib.php). 자리 · 크기는 ? 칸 그대로, 그림은 북마크(별은 난이도 표시와 겹쳐 바꿈). 저장됨 = 채운 북마크 */
#mocktest .omr_star, #omr_wr .omr_star {--omr-uncertain-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m19%2021-7-4-7%204V5a2%202%200%200%201%202-2h10a2%202%200%200%201%202%202v16z%22%2F%3E%3C%2Fsvg%3E");}
#mocktest .omr_star.on, #omr_wr .omr_star.on {--omr-uncertain-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22black%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m19%2021-7-4-7%204V5a2%202%200%200%201%202-2h10a2%202%200%200%201%202%202v16z%22%2F%3E%3C%2Fsvg%3E");}
