/* 수업관리 과목 '시험' 탭 (2026-11-30 결재①, 시안 design/exam-tab-mockup.html) — course-exam.js
   모두 .cx 안에서만(과목 페이지·비교과 화면과 섞이지 않게). 학생 서랍·확인 창은 body 끝 .cx.cx-layer */
.cx { --blue: #2c5bb8; --blue-soft: #e8eefb; --mint: #14907d; --mint-soft: #ddf3ef; --violet: #4b3fa8; --violet-soft: #f1edfb; --warn: #9a6512; --now-bg: #fff6f2; }
.cx .cx-v { display: grid; gap: 16px; }
.cx .cx-v > * { min-width: 0; }
.cx h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.015em; }
.cx h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.cx p { margin: 0; }
.cx .tn, .cx .n { font-variant-numeric: tabular-nums; }
.cx .muted { color: var(--muted); }
.cx .faint { color: var(--faint); }
.cx .hint { font-size: 12.5px; color: var(--muted); }
.cx .sp { flex: 1 1 auto; }
.cx .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx .warnt { color: var(--now-ink); }
.cx .msg { color: var(--bad); font-size: 13px; }
.cx .msg:empty { display: none; }
.cx code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }

.cx .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.cx .btn:hover { border-color: #c3cad5; background: #fafbfc; }
.cx .btn.pri { background: #c24d26; border-color: #c24d26; color: #fff; }
.cx .btn.pri:hover { background: #a8411f; }
.cx .btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.cx .btn.navy:hover { background: var(--navy2); }
.cx .btn.danger { color: var(--bad); border-color: #efc2bd; }
.cx .btn.danger.fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.cx .btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.cx .btn.sm { min-height: 40px; padding: 0 12px; font-size: 12.5px; }
.cx .btn.big { min-height: 56px; padding: 0 22px; font-size: 16px; border-radius: 10px; }
.cx .btn .bsub { font-weight: 600; font-size: 13px; opacity: .85; }
.cx .btn[disabled], .cx .btn:disabled { opacity: .45; cursor: not-allowed; }
.cx .btn svg { width: 16px; height: 16px; flex: none; }
.cx .pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.cx .pill.now { background: var(--now-soft); color: var(--now-ink); }
.cx .pill.mint { background: var(--mint-soft); color: #0e6e60; }
.cx .pill.blue { background: var(--blue-soft); color: var(--blue); }
.cx .pill.ok { background: var(--ok-soft); color: var(--ok); }
.cx .pill.warn { background: var(--warn-soft); color: var(--warn); }
.cx .pill.bad { background: var(--bad-soft); color: var(--bad); }
.cx .pill.violet { background: var(--violet-soft); color: var(--violet); }
.cx .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.cx .phead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cx .note { padding: 10px 14px; border-radius: 10px; background: #f8f9fb; font-size: 13px; color: var(--muted); display: block; }
.cx .note.warn { background: var(--warn-soft); color: #6f4a0e; }
.cx .note.ok { background: var(--ok-soft); color: #145c42; }
.cx .legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.cx .subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cx .subtabs button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; color: var(--muted); font-size: 14px; }
.cx .subtabs button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cx .subtabs button small { font-weight: 700; margin-left: 4px; opacity: .8; font-size: 12px; }
.cx .sumrow { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.cx .more { color: var(--blue); font-weight: 700; font-size: 13px; white-space: nowrap; }
.cx .sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #0e6e60; }
.cx .sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(20,144,125,.2); flex: none; }
.cx .sync.bad { color: var(--bad); }
.cx .sync.bad i { background: var(--bad); box-shadow: 0 0 0 3px rgba(194,54,44,.18); animation: cx-blink 1.2s infinite; }

.cx .xtabs-wrap { display: grid; gap: 12px; }
.cx .xhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cx .xhead h2 { font-size: 19px; }
.cx .st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cx .st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cx .st.ready { background: var(--soft); color: var(--muted); }
.cx .st.wait { background: var(--blue-soft); color: var(--blue); }
.cx .st.run { background: var(--now-soft); color: var(--now-ink); }
.cx .st.run i { animation: cx-blink 1.2s infinite; }
.cx .st.end { background: var(--ok-soft); color: var(--ok); }
@keyframes cx-blink { 50% { opacity: .25; } }

/* 1. 시험 카드 */
.cx .xcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.cx .xcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 12px; align-content: start; }
.cx .xcard.soon { border-color: #efb8a2; box-shadow: 0 0 0 3px var(--now-bg); }
.cx .xcard.empty { border-style: dashed; background: #fbfbfc; }
.cx .xcard .top { display: flex; align-items: flex-start; gap: 10px; }
.cx .xcard .top .t { flex: 1; min-width: 0; }
.cx .xcard .top .t b { font-size: 17px; letter-spacing: -.02em; display: block; }
.cx .xcard .top .t small { display: block; color: var(--muted); font-size: 13px; }
.cx .kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx .kv > div { background: #f8f9fb; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.cx .kv .l { font-size: 11.5px; color: var(--muted); font-weight: 600; display: block; }
.cx .kv .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx .kv .v small { font-size: 12px; color: var(--muted); font-weight: 600; }
.cx .kv .v.alert, .cx .kv .v.alert small { color: var(--now-ink); }
.cx .flags { display: flex; flex-wrap: wrap; gap: 6px; }
.cx .flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.cx .flag.ok { background: var(--ok-soft); color: var(--ok); }
.cx .flag.warn { background: var(--warn-soft); color: var(--warn); }
.cx .flag.now { background: var(--now-soft); color: var(--now-ink); }
.cx .flag svg { width: 14px; height: 14px; }
.cx .xcard .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cx .xcard .acts .btn { flex: 1 1 auto; }
.cx .chk { display: grid; gap: 4px; font-size: 13px; }
.cx .chk span { display: flex; gap: 8px; align-items: center; }
.cx .chk span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.cx .chk span.y::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain; border-color: var(--ok); }

.cx table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.cx table.t th, .cx table.t td { border-bottom: 1px solid var(--line2); padding: 10px 10px; text-align: left; white-space: nowrap; vertical-align: middle; }
.cx table.t th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8f9fb; }
.cx table.t td.n, .cx table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.cx table.t td.wrap { white-space: normal; min-width: 200px; }
.cx table.t tr.click { cursor: pointer; }
.cx table.t tr.click:hover td { background: #fafbfd; }
.cx .tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }

/* 2. 설정 폼 */
.cx .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cx .fld { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.cx .fld.w { grid-column: 1 / -1; }
.cx .fld input, .cx .fld select, .cx .fld textarea, .cx input.in { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; color: var(--ink); font: inherit; font-weight: 500; font-size: 14px; width: 100%; }
.cx .fld textarea { line-height: 1.55; resize: vertical; }
.cx .fld input[readonly] { background: #f6f7f9; color: var(--muted); }
.cx .fld .h { font-weight: 500; font-size: 12px; color: var(--faint); }
/* 성적 보내기: 환산 / 원점수 고르기 */
.cx .gmode { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.cx .gmode label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; min-height: 44px; }
.cx .gmode label:has(input:checked) { border-color: var(--navy); background: #f5f7fc; }
.cx .gmode label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.cx .gmode input { margin-top: 3px; accent-color: var(--navy); }
.cx .gmode b { display: block; font-size: 14px; } .cx .gmode small { color: var(--muted); font-size: 12.5px; }
.cx .gconv small { display: inline-block; margin-top: 4px; }
.cx .tog { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line2); cursor: pointer; position: relative; }
.cx .tog:first-child { border-top: 0; }
.cx .tog .sw { width: 46px; height: 28px; border-radius: 999px; background: #cdd3dc; position: relative; flex: none; margin-top: 2px; transition: background .15s; }
.cx .tog .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.cx .tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cx .tog input:checked + .sw { background: var(--mint); }
.cx .tog input:checked + .sw::after { transform: translateX(18px); }
.cx .tog input:focus-visible + .sw { outline: 2px solid var(--now); outline-offset: 2px; }
.cx .tog .tx b { display: block; font-size: 14px; }
.cx .tog .tx small { color: var(--muted); font-size: 12.5px; }
.cx .grid2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cx .linkbox { border: 1px solid #c6e8e1; background: var(--mint-soft); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13px; }
.cx .linkbox b { color: #0e6e60; word-break: break-all; }

/* 문항 */
.cx .qsum { display: flex; flex-wrap: wrap; gap: 8px; }
.cx .qsum span { background: #f8f9fb; border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.cx .qsum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cx .qsum .tot { background: var(--navy); color: #fff; } .cx .qsum .tot b { color: #fff; }
.cx .qlist { display: grid; gap: 8px; }
.cx .q { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cx .q-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 56px; cursor: pointer; }
.cx .q-h .no { width: 30px; height: 30px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.cx .q-h .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.cx .q-h .ans { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cx .qt { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.cx .qt.ox { background: var(--blue-soft); color: var(--blue); }
.cx .qt.mc { background: var(--mint-soft); color: #0e6e60; }
.cx .qt.es { background: var(--violet-soft); color: var(--violet); }
.cx .q.open { border-color: var(--navy2); box-shadow: 0 0 0 3px #e6ebf4; }
.cx .q-b { padding: 4px 14px 14px; display: grid; gap: 12px; border-top: 1px solid var(--line2); }
.cx .seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; padding: 0; background: #fff; gap: 0; flex-wrap: wrap; }
.cx .seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 0; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); box-shadow: none; }
.cx .seg button + button { border-left: 1px solid var(--line); }
.cx .seg button[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.cx .seg button:disabled { cursor: not-allowed; }
.cx .opts { display: grid; gap: 6px; }
.cx .opt { display: flex; align-items: center; gap: 8px; }
.cx .opt .mk { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; flex: none; }
.cx .opt .mk[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.cx .opt input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; }
.cx .addq { display: flex; flex-wrap: wrap; gap: 6px; }
.cx .addq .btn { border-style: dashed; color: var(--muted); }
.cx .lock { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; background: var(--warn-soft); color: #6f4a0e; border-radius: 10px; font-size: 13px; }
.cx .lock.soft { background: #f8f9fb; color: var(--muted); }
.cx .lock svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* 명단 */
.cx .rost { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.cx .rost span { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; font-size: 13px; background: #fff; min-height: 44px; }
.cx .rost span small { color: var(--faint); font-variant-numeric: tabular-nums; }
.cx .rost span .ph { margin-left: auto; font-size: 11px; color: var(--faint); }
.cx .rost span.nophone .ph { color: var(--bad); font-weight: 700; }
.cx .rost span.test { border-style: dashed; color: var(--muted); }
.cx .smsbox { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; }

/* 3. 감독 — 왼쪽 메뉴·과목 머리·탭은 숨김(태블릿 가로 1180px) */
body.cx-focus .shell { grid-template-columns: minmax(0, 1fr); }
body.cx-focus .rail, body.cx-focus .cm .crumb, body.cx-focus .cm .dhead, body.cx-focus .cm .cm-tabs { display: none !important; }
body.cx-focus .main { padding-inline: 20px; padding-block: 12px 40px; }
body.cx-focus .page.cm { max-width: none; gap: 12px; }
.cx .mon-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cx .mon-head h2 { font-size: 20px; }
.cx .mon-head .sub { color: var(--muted); font-size: 13px; }
.cx .mon-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); padding-block: 4px 8px; display: grid; gap: 10px; }
.cx .mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 8px; }
.cx .ms { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: grid; gap: 0; min-width: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.cx .ms .l { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cx .ms .l i { width: 10px; height: 10px; border-radius: 3px; }
.cx .ms b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cx .ms b small { font-size: 15px; color: var(--faint); font-weight: 700; margin-left: 2px; }
.cx .ms[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.cx .ms.time { background: var(--navy); border-color: var(--navy); color: #fff; cursor: default; }
.cx .ms.time .l { color: var(--navy-ink); }
.cx .ms.time b { font-size: 40px; }
.cx .ms.time .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); margin-top: 6px; overflow: hidden; }
.cx .ms.time .bar i { display: block; height: 100%; background: var(--now); }
.cx .ms.time.low b { color: #ffb59c; }
.cx .mact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx .alertbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: var(--r); background: var(--now-bg); border: 1px solid #f6d3c4; }
.cx .alertbar > b { color: var(--now-ink); font-size: 14px; }
.cx .achip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 10px; background: #fff; border: 1px solid #f0c9b8; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; color: var(--ink); }
.cx .achip .btn { min-height: 36px; padding: 0 12px; }
.cx .achip.off { padding-right: 12px; border-color: var(--line); color: var(--muted); }
.cx .mfilter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cx .mfilter button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); font-family: inherit; }
.cx .mfilter button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cx .mfilter button b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.cx .mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
.cx .mt { position: relative; display: grid; gap: 6px; align-content: start; min-height: 104px; padding: 10px 12px 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; font: inherit; color: var(--ink); }
.cx .mt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line); }
.cx .mt .nm { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding-right: 30px; }
.cx .mt .nm b { font-size: 18px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx .mt .nm small { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.cx .mt .sline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cx .mt .stx { font-size: 13.5px; font-weight: 800; display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cx .mt .prog { display: block; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.cx .mt .prog i { display: block; height: 100%; background: var(--mint); }
.cx .mt .foot { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cx .mt .wb { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.cx .mt.absent { border-style: dashed; background: #fafbfc; } .cx .mt.absent .nm b { color: var(--faint); } .cx .mt.absent .stx { color: var(--faint); }
.cx .mt.wait { border-color: #c5d3ef; background: #f7f9fe; } .cx .mt.wait::before { background: var(--blue); } .cx .mt.wait .stx { color: var(--blue); }
.cx .mt.wait.off .stx, .cx .mt.wait.off .nm b { color: var(--faint); } .cx .mt.wait.off::before { background: #a9b8d8; }
.cx .mt.run::before { background: var(--mint); } .cx .mt.run .stx { color: #0e6e60; }
.cx .mt.done { border-color: #bfe0d1; background: #f4fbf7; } .cx .mt.done::before { background: var(--ok); } .cx .mt.done .stx { color: var(--ok); }
/* 감독관 종료(제출): 제출과 같은 초록, 왼쪽 띠만 줄무늬로 구별 */
.cx .mt.adm { border-color: #bfe0d1; background: #f4fbf7; } .cx .mt.adm::before { background: repeating-linear-gradient(180deg, var(--ok), var(--ok) 6px, #8fcbb0 6px, #8fcbb0 10px); } .cx .mt.adm .stx { color: var(--ok); }
.cx .mlegend i.adm { background: repeating-linear-gradient(135deg, var(--ok), var(--ok) 3px, #8fcbb0 3px, #8fcbb0 6px) !important; }
.cx .mt.warned { border-color: #e9c98f; } .cx .mt.warned::before { background: var(--warn); }
.cx .mt.lost { border-color: #c9ced6; background: repeating-linear-gradient(135deg, #fff, #fff 8px, #f4f5f7 8px, #f4f5f7 16px); } .cx .mt.lost::before { background: #8a929e; } .cx .mt.lost .stx { color: #5b636f; }
.cx .mt.req { border-color: var(--now); box-shadow: 0 0 0 3px var(--now-soft); } .cx .mt.req::before { background: var(--now); } .cx .mt.req .stx { color: var(--now-ink); }
.cx .mt.term { border-color: #efc2bd; background: #fff8f7; } .cx .mt.term::before { background: var(--bad); } .cx .mt.term .stx { color: var(--bad); }
.cx .mt.sel { outline: 3px solid var(--navy); outline-offset: 1px; }
.cx .mt .reqbtn { margin-top: 2px; min-height: 44px; pointer-events: none; }
.cx .mlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.cx .mlegend span { display: inline-flex; align-items: center; gap: 6px; }
.cx .mlegend i { width: 12px; height: 12px; border-radius: 3px; }
.cx .waitnote { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--blue-soft); color: #1f437f; font-size: 14px; }
.cx .waitnote b { font-size: 16px; }

/* 서랍·모달(body 끝 .cx.cx-layer) */
.cx-layer { font-family: var(--f); font-size: 14px; line-height: 1.55; color: var(--ink); }
.cx .scrim { position: fixed; inset: 0; background: rgba(15, 22, 35, .4); z-index: 60; }
.cx .drawer { position: fixed; z-index: 61; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); background: #fff; box-shadow: -12px 0 40px rgba(0,0,0,.18); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding-top: env(safe-area-inset-top, 0px); }
.cx .dr-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--line2); display: grid; gap: 8px; }
.cx .dr-h .nmr { display: flex; align-items: center; gap: 10px; }
.cx .dr-h .nmr b { font-size: 22px; letter-spacing: -.02em; }
.cx .dr-b { overflow-y: auto; padding: 14px 18px; display: grid; gap: 14px; align-content: start; }
.cx .dr-f { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line2); display: grid; gap: 8px; }
.cx .dr-f .row .btn { flex: 1; }
.cx .resume { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.cx .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cx .facts div { background: #f8f9fb; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.cx .facts .l { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cx .facts .v { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.cx .facts .v.sm { font-size: 14px; }
.cx .facts .v small { font-size: 11px; color: var(--muted); font-weight: 600; }
.cx .tl { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.cx .tl div { position: relative; padding: 6px 0 10px 16px; font-size: 13px; }
.cx .tl div::before { content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--faint); }
.cx .tl div.w::before { border-color: var(--warn); background: var(--warn-soft); }
.cx .tl div.b::before { border-color: var(--bad); background: var(--bad-soft); }
.cx .tl div.o::before { border-color: var(--ok); background: var(--ok-soft); }
.cx .tl div.n::before { border-color: var(--now); background: var(--now-soft); }
.cx .tl time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; margin-right: 8px; font-weight: 700; }
.cx .tl small { display: block; color: var(--faint); font-size: 12px; word-break: break-all; }
.cx .modal { position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.cx .modal.wide { width: min(860px, calc(100vw - 32px)); }
.cx .scrim.m { z-index: 70; }
.cx .mo-h { padding: 16px 20px 10px; display: grid; gap: 4px; border-bottom: 1px solid var(--line2); }
.cx .mo-h h2 { font-size: 18px; }
.cx .mo-b { overflow-y: auto; padding: 14px 20px; display: grid; gap: 12px; align-content: start; }
.cx .mo-f { padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line2); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cx .pickgrid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; }
.cx .pickgrid button { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); font-family: inherit; }
.cx .pickgrid button[aria-pressed="true"] { background: var(--blue-soft); border-color: #c5d3ef; color: var(--blue); }
.cx .qrbox { justify-items: center; text-align: center; }
.cx .qrbox svg { width: min(360px, 70vw); height: auto; }
.cx .qrlink { font-size: 20px; word-break: break-all; }
.cx .qrlive { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 15px; color: var(--muted); }
.cx .qrlive b { color: var(--ink); font-size: 20px; }

/* 4. 채점·결과 */
.cx .gstats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.cx #cx-gstats { display: grid; gap: 10px; }
.cx .gstats > div { padding: 12px 16px; display: grid; gap: 2px; min-width: 0; }
.cx .gstats > div + div { border-left: 1px solid var(--line2); }
.cx .gstats .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.cx .gstats b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cx .gstats b.sm { font-size: 16px; }
.cx .gstats b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.cx .gstats .alert b { color: var(--now-ink); }
.cx .hist svg { width: 100%; height: auto; display: block; }
.cx .essays { display: grid; gap: 10px; }
.cx .essay { border: 1px solid var(--line); border-radius: 12px; background: #fff; display: grid; grid-template-columns: minmax(0, 1fr) 250px; overflow: hidden; }
.cx .essay.done { border-color: #bfe0d1; }
.cx .essay .ea { padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.cx .essay .ea .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cx .essay .ea .who b { font-size: 15px; }
.cx .essay .ea .txt { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.cx .essay .ea .rec { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); }
.cx .essay .ea .rec b { color: var(--ink); }
.cx .essay .ea .rec .sus b { color: var(--bad); }
.cx .essay .es { padding: 14px; background: #f8f9fb; border-left: 1px solid var(--line2); display: grid; gap: 8px; align-content: start; }
.cx .essay .es .sc { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.cx .essay .es .sc .hint { display: inline; white-space: nowrap; }
.cx .essay .es .sc input { width: 84px; min-height: 48px; text-align: center; font-size: 20px; font-weight: 800; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }
.cx .signimg { max-height: 48px; vertical-align: middle; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cx .qbtns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cx .qbtns button { min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: inherit; }
.cx .qbtns button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cx .rubric { padding: 12px 14px; border-radius: 10px; background: var(--violet-soft); color: #3a3180; font-size: 13px; display: grid; gap: 4px; }
.cx .rubric summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.cx .rubric .pre { display: block; white-space: pre-wrap; margin-top: 4px; }
.cx .rbar { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: var(--soft); vertical-align: middle; overflow: hidden; }
.cx .rbar i { display: block; height: 100%; background: var(--blue); }
.cx .rbar i.low { background: var(--bad); }
.cx .slist { display: grid; gap: 4px; align-content: start; max-height: 560px; overflow-y: auto; }
.cx .slist button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: 13.5px; font-family: inherit; color: var(--ink); }
.cx .slist button[aria-pressed="true"] { background: #fff; border-color: var(--navy); font-weight: 700; }
.cx .slist button .pill { margin-left: auto; }
.cx .gsplit { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }

/* 5. 출석 */
.cx .astep { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.cx .astep .ag { display: grid; gap: 10px; min-width: 0; }
.cx .astep .n { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.cx .astep .n.ok { background: var(--ok); }
.cx .astep .n.todo { background: var(--now); }
.cx .donebox { display: grid; gap: 6px; padding: 16px; border-radius: 12px; background: var(--ok-soft); color: #145c42; }
.cx .donebox b { font-size: 16px; }

@media (max-width: 1000px) {
  .cx .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cx .essay { grid-template-columns: minmax(0, 1fr); }
  .cx .essay .es { border-left: 0; border-top: 1px solid var(--line2); }
  .cx .gstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cx .gstats > div:nth-child(4) { border-left: 0; }
  .cx .gstats > div:nth-child(n+4) { border-top: 1px solid var(--line2); }
}
@media (max-width: 760px) {
  body.cx-focus .main { padding-inline: 12px; }
  .cx .panel { padding: 14px; }
  .cx .xcards { grid-template-columns: minmax(0, 1fr); }
  .cx .form { grid-template-columns: minmax(0, 1fr); }
  .cx .mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx .ms.time { grid-column: 1 / -1; order: -1; }
  .cx .ms b { font-size: 28px; }
  .cx .ms.time b { font-size: 34px; }
  .cx .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx .mt { min-height: 96px; padding: 8px 10px 8px 12px; }
  .cx .mt .nm b { font-size: 16px; }
  .cx .mact .btn { flex: 1 1 auto; }
  .cx .drawer { top: auto; left: 0; width: 100%; max-height: 86vh; border-radius: 16px 16px 0 0; }
  .cx .modal { left: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: calc(100vh - 24px); border-radius: 16px 16px 0 0; }
  .cx .modal.wide { width: 100%; }
  .cx .gstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx .gstats > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line2); }
  .cx .gstats > div:nth-child(-n+2) { border-top: 0; }
  .cx .gstats > div:nth-child(even) { border-left: 1px solid var(--line2); }
  .cx .gsplit { grid-template-columns: minmax(0, 1fr); }
  .cx .slist { max-height: none; display: flex; overflow-x: auto; }
  .cx .slist button { flex: none; }
  .cx .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx .resume { grid-template-columns: minmax(0, 1fr); }
  .cx .hide-m { display: none; }
  .cx .mon-head .sub { width: 100%; order: 5; }
}
@media (prefers-reduced-motion: reduce) { .cx .st.run i, .cx .sync.bad i { animation: none; } .cx .tog .sw, .cx .tog .sw::after { transition: none; } }
