/* edu.drwon.kr 수업관리(11-26 결재① 시안 class-manage-mockup.html 그대로). 모두 .cm 안에서만 — 비교과 화면에는 닿지 않음
   edu.css 와 이름이 겹치는 것은 바꿔 씀: table.att→table.cm-att, td.who→td.stu, .nm→.cm-nm, .legend→.cm-legend, .x→.cm-x */

/* 왼쪽 메뉴: 수업관리에 들어가면 비교과 메뉴를 감추고 수업관리 메뉴 + '비교과 가기' 하나만 */
.rail a.nav em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--now); color: #fff; margin-left: auto; }
.rail .cm-nav { display: none !important; }
body.mode-class .rail a.nav:not(.cm-nav), body.mode-class .rail .legend { display: none !important; }
body.mode-class .rail .cm-nav { display: flex !important; }
/* 수업관리는 주인(교수님 계정, is_owner())만: 주인이 아니면 들어가는 메뉴도 감춤(app.js boot 이 body.is-owner 를 붙임) */
body:not(.is-owner) .rail a.cm-entry { display: none !important; }
.rail .cm-back { margin-top: 10px; border: 1px dashed rgba(255, 255, 255, .18); }
@media (max-width: 1000px) { .rail .cm-back { margin-top: 0; } }

.cm .btn { min-height: 44px; padding: 0 16px; font-size: 13.5px; }
.cm .btn.sm { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.cm .btn.danger { color: var(--bad); border-color: #efc4c0; }
.cm .in { min-height: 44px; padding: 8px 10px; }
.cm textarea.in { min-height: 84px; }
.cm label.f { min-width: 0; }
.cm .page, .page.cm { max-width: 1240px; gap: 16px; }
.cm .pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cm .pill.now { background: var(--now-soft); color: var(--now-ink); } .cm .pill.blue { background: #e8eefb; color: #2a529f; }
.cm .pill.bad { background: var(--bad-soft); color: var(--bad); }
.cm { --blue: #2c5bb8; --blue-soft: #e8eefb; --mint: #14907d; --mint-soft: #ddf3ef; --gold: #c98a14; --gold-soft: #fbf0dc; --warn: #9a6512; }

/* 학기 고르기 */
.cm-term { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-term select.in { width: auto; font-weight: 700; padding-right: 28px; }
.cm .linked { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--mint-soft); color: #0e6e60; font-size: 12.5px; font-weight: 700; }
.cm .linked i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(20, 144, 125, .2); }
.cm .linked.off { background: var(--soft); color: var(--muted); } .cm .linked.off i { background: var(--faint); box-shadow: none; }

/* 탭 */
.cm .tabs .tab { min-height: 44px; padding: 0 16px; font-size: 14.5px; }
.cm .tab small { font-size: 11px; font-weight: 600; color: var(--faint); margin-left: 4px; }
.cm .seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--soft); gap: 2px; }
.cm .seg button { border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.cm .seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(20, 26, 36, .12); }

/* 1. 시간표 */
.cm .tt-wrap { overflow-x: auto; }
.cm .tt { display: grid; grid-template-columns: 52px repeat(var(--nd, 6), minmax(104px, 1fr)); min-width: 720px; }
.cm .tt .dh { text-align: center; font-size: 13px; font-weight: 700; padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.cm .tt .dh.today { color: var(--now-ink); }
.cm .tt .dh.today::after { content: "오늘"; display: block; font-size: 10.5px; font-weight: 600; }
.cm .tt .gut { position: relative; }
.cm .tt .gut span { position: absolute; right: 8px; font-size: 11px; color: var(--faint); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cm .tt .col { position: relative; border-left: 1px solid var(--line2); background-image: linear-gradient(var(--line2) 1px, transparent 1px); background-size: 100% 56px; }
.cm .blk { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 6px 8px 6px 11px; text-align: left; border: 0; cursor: pointer; overflow: hidden; background: var(--bs); color: var(--ink); display: grid; align-content: start; gap: 1px; }
.cm .blk::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bc); }
.cm .blk b { font-size: 13px; font-weight: 700; line-height: 1.3; }
.cm .blk span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.cm .blk[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--now); }
.cm .blk.short { padding-top: 4px; }
.cm .blk.short span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm .k-0 { --bc: var(--blue); --bs: var(--blue-soft); }
.cm .k-1 { --bc: var(--mint); --bs: var(--mint-soft); }
.cm .k-2 { --bc: var(--gold); --bs: var(--gold-soft); }
.cm .k-3 { --bc: #7a5bb5; --bs: #f1edfb; }
.cm .k-4 { --bc: #c2362c; --bs: #fbe5e3; }
.cm .k-5 { --bc: #5f6878; --bs: #eef1f5; }
.cm .online { display: grid; grid-template-columns: 52px minmax(0, 1fr); min-width: 720px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; align-items: center; }
.cm .online > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.cm .online .lane { display: flex; flex-wrap: wrap; gap: 8px; }
.cm .online .blk { position: relative; left: auto; right: auto; min-height: 52px; min-width: 200px; }
.cm .ag { display: none; }
.cm .ag-day { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-top: 1px solid var(--line2); }
.cm .ag-day:first-child { border-top: 0; }
.cm .ag-day > b { font-size: 15px; padding-top: 10px; }
.cm .ag-day > div { display: grid; gap: 6px; }
.cm .ag .blk { position: relative; left: auto; right: auto; min-height: 52px; }
.cm .ag .none { color: var(--faint); font-size: 13px; padding-top: 12px; }
.cm .tt-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.cm .form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cm .form-grid .w2 { grid-column: span 2; } .cm .form-grid .w3 { grid-column: 1 / -1; }
.cm .daypick { display: flex; flex-wrap: wrap; gap: 4px; }
.cm .daypick button { min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; padding: 0 10px; }
.cm .daypick button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cm .note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-s); background: var(--soft); font-size: 13px; line-height: 1.55; }
.cm .note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.cm .note.warn { background: var(--bad-soft); color: #7d211a; } .cm .note.warn svg { color: var(--bad); }
.cm .note.mint { background: var(--mint-soft); color: #0b5a4f; } .cm .note.mint svg { color: var(--mint); }
/* 과목 0개일 때 시간표 위 안내 띠(11-26) */
.cm .note.cm-band { flex-wrap: wrap; align-items: center; padding: 12px 14px; font-size: 14px; border: 1px solid #b9e3da; }
.cm .note.cm-band > span:first-of-type { flex: 1 1 260px; }
.cm .note.cm-band .row { gap: 8px; flex-wrap: wrap; }
.cm table.cm-stack td { vertical-align: middle; }
/* 좁은 화면: 줄마다 카드처럼(왼쪽 학교·과목·요일, 오른쪽 학생 수·단추) — 단추가 옆으로 밀려 안 보이지 않게 */
@media (max-width: 640px) {
  .cm table.cm-stack, .cm table.cm-stack tbody { display: block; }
  .cm table.cm-stack thead { display: none; }
  .cm table.cm-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .cm table.cm-stack tr:last-child { border-bottom: 0; }
  .cm table.cm-stack td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  .cm table.cm-stack td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 12.5px; color: var(--muted); }
  .cm table.cm-stack td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 15px; }
  .cm table.cm-stack td:nth-child(3) { grid-column: 1; grid-row: 3; font-size: 13px; }
  .cm table.cm-stack td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; font-size: 12.5px; }
  .cm table.cm-stack td.per::before { content: '주 '; } .cm table.cm-stack td.per::after { content: '차시'; }
  .cm table.cm-stack td:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
}
.cm .msg { color: var(--bad); font-size: 13px; font-weight: 600; min-height: 1em; margin: 0; }

/* 표 */
.cm table { font-size: 13.5px; }
.cm th { position: static; }
.cm tr.sel td { background: #fff6f2; }
.cm tr.clickable { cursor: pointer; } .cm tr.clickable:hover td { background: #fafbfc; }
.cm .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--bc); margin-right: 6px; vertical-align: -1px; }

/* 2. 과목 카드 */
.cm .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cm .card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 22px; display: grid; gap: 10px; text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.cm .card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px; border-radius: 0 4px 4px 0; background: var(--bc); }
.cm .card:hover { border-color: #c3cad5; box-shadow: 0 4px 16px rgba(20, 26, 36, .06); }
.cm .card .sch { font-size: 12px; font-weight: 700; color: var(--bc); }
.cm .card h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.cm .slots { display: flex; flex-wrap: wrap; gap: 6px; }
.cm .slot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--soft); font-size: 12.5px; font-weight: 600; }
.cm .slot.on { background: #f1edfb; color: #4b3fa8; }
.cm .slot svg { width: 13px; height: 13px; }
.cm .bundle { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cm .bundle::before { content: ""; width: 16px; height: 10px; border: 2px solid var(--faint); border-left: 0; border-radius: 0 6px 6px 0; }
.cm .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line2); padding-top: 10px; }
.cm .stats div { display: grid; gap: 0; }
.cm .stats span { font-size: 11.5px; color: var(--muted); }
.cm .stats strong { font-size: 18px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cm .stats strong small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.cm .wkbar { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; margin-top: 4px; }
.cm .wkbar i { height: 5px; border-radius: 2px; background: var(--line2); }
.cm .wkbar i.d { background: var(--bc); opacity: .55; } .cm .wkbar i.n { background: var(--now); }
.cm .card.broken { border-color: #efc4c0; }
.cm .broken-tag { font-size: 12px; color: var(--bad); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; line-height: 1.45; }
.cm .broken-tag svg { width: 15px; height: 15px; flex: none; }
.cm .suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: var(--r); background: #f3f1fb; border: 1px solid #e0dbf3; }
.cm .suggest.plain { background: var(--card); border-color: var(--line); }
.cm .suggest p { margin: 0; flex: 1 1 320px; font-size: 13.5px; }

/* 과목 상세 머리 */
.cm .crumb { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cm .crumb a { color: var(--blue); padding: 6px 0; font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.cm .dhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cm .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 6px; align-items: center; }
.cm .meta b { color: var(--ink); font-weight: 600; }
.cm .chasi { display: inline-flex; align-items: center; gap: 6px; }
.cm .chasi select { min-height: 32px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-weight: 700; }

/* 3. 출석부 */
.cm .roster-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.cm textarea.paste { font-family: ui-monospace, Consolas, "Malgun Gothic", monospace; font-size: 12.5px; min-height: 196px; white-space: pre; tab-size: 10; }
.cm label.btn { position: relative; overflow: hidden; }
.cm input[type=file][data-file] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cm td.why { white-space: normal; min-width: 150px; line-height: 1.4; }
.cm tr.rej td { background: var(--bad-soft); color: #7d211a; }
.cm tr.rej td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.cm tr.add td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.cm tr.wd td { color: var(--faint); }
.cm tr.wd td .cm-nm { text-decoration: line-through; }
.cm .sumline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.cm .sumline b { color: var(--ink); }

/* 4. 주차별 출석 */
.cm .wk-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm .wk-nav .arrow { width: 44px; height: 44px; padding: 0; }
.cm .wk-title { display: grid; min-width: 150px; }
.cm .wk-title b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.cm .wk-title span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm .wkstrip { display: grid; grid-template-columns: repeat(var(--n, 15), minmax(36px, 1fr)); gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.cm .wkstrip button { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; gap: 0; padding: 4px 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.cm .wkstrip button small { font-size: 10px; font-weight: 500; color: var(--faint); line-height: 1; }
.cm .wkstrip button.done { background: var(--soft); }
.cm .wkstrip button.future { color: var(--faint); border-style: dashed; }
.cm .wkstrip button.today::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--now); }
.cm .wkstrip button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cm .wkstrip button[aria-pressed="true"] small { color: var(--navy-ink); }
.cm .wk-body { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 16px; align-items: start; }
.cm .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.cm .cm-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); align-items: center; }
.cm .cm-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.cm .cm-legend .ac { width: 26px; height: 26px; min-width: 0; min-height: 0; font-size: 12px; cursor: default; }
.cm .cm-legend select { min-height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-weight: 700; padding: 0 4px; }
.cm .saved { font-size: 12.5px; color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.cm .saved i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.cm .saved.flash { color: var(--now-ink); } .cm .saved.flash i { background: var(--now); }
.cm .saved.err { color: var(--bad); } .cm .saved.err i { background: var(--bad); }

.cm table.cm-att th, .cm table.cm-att td { padding: 4px 6px; }
.cm table.cm-att thead th { position: sticky; top: 0; z-index: 2; }
.cm table.cm-att td.stu { min-width: 132px; padding-left: 10px; }
.cm td.stu .cm-nm { font-weight: 600; font-size: 14px; display: block; line-height: 1.3; }
.cm td.stu small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm table.cm-att th.pc { text-align: center; min-width: 58px; line-height: 1.25; }
.cm table.cm-att th.pc small { display: block; font-size: 10.5px; font-weight: 500; color: var(--faint); }
.cm .lms-tag { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 0 4px; border-radius: 3px; background: #f1edfb; color: #4b3fa8; border: 1px solid #d9d2f3; margin-top: 2px; letter-spacing: .02em; }
.cm .ac { position: relative; width: 52px; height: 46px; min-width: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; font-size: 16px; color: var(--faint); display: inline-grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: transform .08s; padding: 0; }
.cm .ac:active { transform: scale(.94); }
.cm .ac:disabled { cursor: default; }
.cm .ac.s-P { background: var(--ok-soft); border-color: #a9d8c3; color: var(--ok); }
.cm .ac.s-A { background: var(--bad); border-color: var(--bad); color: #fff; }
.cm .ac.s-L { background: var(--warn-soft); border-color: #e7c78a; color: var(--warn); }
.cm .ac.s-E { background: var(--blue-soft); border-color: #b5c7ee; color: #2a529f; }
.cm .ac.s-W, .cm .ac.s-N { background: repeating-linear-gradient(135deg, var(--soft) 0 5px, #fff 5px 9px); border-color: var(--line2); color: var(--faint); font-size: 11px; cursor: default; }
.cm .ac .src { position: absolute; right: -4px; top: -6px; font-size: 8.5px; font-weight: 700; padding: 0 3px; border-radius: 3px; background: #4b3fa8; color: #fff; line-height: 13px; letter-spacing: .02em; }
.cm .ac.lms { border-style: dashed; border-color: #a99ce0; }
.cm .ac.busy { opacity: .6; }
.cm td.wsum { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.cm td.wsum b { color: var(--bad); }
.cm .allabs { min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid #efc4c0; background: var(--card); color: var(--bad); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.cm .allabs:hover { background: var(--bad-soft); }
.cm .allabs .s { display: none; }
.cm .week-att-wrap { max-height: 640px; overflow: auto; }

.cm .side { display: grid; gap: 14px; position: sticky; top: 16px; }
.cm .side h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cm .side h2 small { font-size: 12px; font-weight: 500; color: var(--muted); }
.cm .links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm .links li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 44px; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; border: 1px solid var(--line2); border-radius: var(--r-s); min-height: 52px; }
.cm .links li.empty { grid-template-columns: 1fr; color: var(--faint); font-size: 13px; }
.cm .links li svg { width: 18px; height: 18px; color: var(--blue); }
.cm .links li a { color: var(--ink); text-decoration: none; display: grid; min-width: 0; }
.cm .links li a b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm .links li a small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm .links li .cm-x { width: 44px; height: 44px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 18px; border-radius: 8px; }
.cm .links li .cm-x:hover { color: var(--bad); background: var(--bad-soft); }
.cm .addlink { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; }

/* 학기 요약 */
.cm table.sum th, .cm table.sum td { padding: 4px 3px; text-align: center; }
.cm table.sum td.stu, .cm table.sum th.stu { text-align: left; padding-left: 10px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.cm table.sum th.stu { background: #f8f9fb; z-index: 3; }
.cm table.sum thead th { position: sticky; top: 0; z-index: 2; }
.cm table.sum th.wk { min-width: 44px; cursor: pointer; }
.cm table.sum th.wk:hover { color: var(--ink); text-decoration: underline; }
.cm table.sum th.wk.cur { background: var(--now-soft); color: var(--now-ink); }
.cm .sc { display: inline-grid; place-items: center; width: 40px; height: 34px; border-radius: 7px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--faint); background: var(--bg); }
.cm .sc.a1 { background: #fbe1de; color: var(--bad); } .cm .sc.a2 { background: #f4b8b2; color: #8d2018; } .cm .sc.a3 { background: var(--bad); color: #fff; }
.cm .sc.fu { background: none; color: var(--line); }
.cm .sc.wd { background: repeating-linear-gradient(135deg, var(--soft) 0 4px, #fff 4px 8px); color: var(--faint); font-size: 10px; }
.cm .sc sup { font-size: 9px; color: var(--warn); margin-left: 1px; font-weight: 700; }
.cm tr.many td.stu .cm-nm { color: var(--bad); }
.cm td.tot { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 5. 성적 */
.cm th.later, .cm td.later { color: var(--faint); background: repeating-linear-gradient(135deg, #fafbfc 0 6px, #fff 6px 12px); }
.cm th.later .pill { display: table; margin: 3px auto 0; font-size: 10.5px; padding: 1px 6px; }
.cm th.item { text-align: center; }
.cm th.item button { display: block; margin: 2px auto 0; border: 0; background: none; color: var(--faint); font-size: 11px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.cm th.item button:hover { color: var(--bad); }
.cm .rate { display: grid; grid-template-columns: 44px 80px; gap: 8px; align-items: center; justify-content: start; }
.cm .rate i { display: block; height: 6px; border-radius: 3px; background: var(--line2); position: relative; overflow: hidden; }
.cm .rate i u { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.cm .rate.low i u { background: var(--bad); }
.cm .confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-s); background: var(--bad-soft); color: #7d211a; font-size: 13px; }
.cm .confirm p { margin: 0; flex: 1 1 200px; }

/* 묶음 바꾸기·과목 만들기 창 */
dialog .cm-dlg { width: 100%; }
dialog:has(.cm-dlg) { width: min(760px, calc(100vw - 32px)); }
.cm-dlg .tbl-wrap { max-height: 50vh; overflow: auto; }
.cm-dlg select.in { min-height: 38px; }
.cm-dlg .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .cm-dlg .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* 태블릿 세로·작은 화면 */
@media (max-width: 1100px) {
  .cm .wk-body { grid-template-columns: minmax(0, 1fr); }
  .cm .side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm .side > .links-panel { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .cm .tt-bottom, .cm .roster-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .cm h1 { font-size: 20px; }
  .cm .tt-wrap { display: none; } .cm .ag { display: block; }
  .cm .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cm .form-grid .w2, .cm .form-grid .w3 { grid-column: 1 / -1; }
  .cm .side { grid-template-columns: minmax(0, 1fr); }
  .cm table.cm-att td.no, .cm table.cm-att th.no, .cm table.cm-att td.wsum, .cm table.cm-att th.wsum { display: none; }
  .cm table.cm-att th, .cm table.cm-att td { padding: 4px 3px; }
  .cm table.cm-att td.stu { min-width: 76px; padding-left: 8px; }
  .cm table.cm-att th.pc { min-width: 50px; }
  .cm table.cm-att th.pc small, .cm .lms-tag .lg { display: none; }
  .cm .ac { width: 44px; }
  .cm .allabs { padding: 0 6px; font-size: 12px; min-width: 52px; line-height: 1.15; }
  .cm .allabs .l { display: none; } .cm .allabs .s { display: inline; }
  .cm .wk-title { min-width: 0; flex: 1; }
  .cm .stats strong { font-size: 16px; }
  .cm .addlink { grid-template-columns: minmax(0, 1fr); }
  .cm .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .cm .ac { transition: none; } }

/* ═════════ 과목 페이지(11-30 결재① LXP 식, 시안 design/course-lxp-mockup.html) ═════════
   시안 이름과 겹치는 것은 바꿔 씀: .wkbar(과목 카드)→.pwk, .chips(edu.css)→.wchips, .legend→.symleg, .sch(카드)→.sch2 */
.cm { --violet: #4b3fa8; --violet-soft: #f1edfb; --now-bg: #fff6f2; }
.cm .phead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cm .panel { display: grid; gap: 14px; align-content: start; }
.cm .hint { font-size: 12.5px; color: var(--muted); }
.cm .sp { flex: 1 1 auto; }
.cm .more { font-size: 12.5px; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; background: none; border: 0; cursor: pointer; font-weight: 600; }
.cm .pill.mint { background: var(--mint-soft); color: #0e6e60; }
.cm .pill.vio { background: var(--violet-soft); color: var(--violet); }
.cm .ttl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.cm .sch2 { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--bc); }
.cm .sch2 i { width: 10px; height: 10px; border-radius: 3px; background: var(--bc); }
.cm .cm-tabs { position: sticky; top: 0; z-index: 15; background: var(--bg); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.cm .cm-tabs::-webkit-scrollbar { display: none; }
.cm .cm-tabs .tab { min-height: 48px; padding: 0 18px; white-space: nowrap; border-bottom-width: 3px; }
.cm .cm-tabs .tab[aria-selected="true"] { font-weight: 700; border-bottom-color: var(--navy); }
.cm .cm-tabs .cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--now); color: #fff; font-size: 11px; font-weight: 700; }
.cm h2.big { font-size: 18px; }

/* 홈: 진행 요약 */
.cm .prog { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.cm .prog > div { padding: 14px 18px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cm .prog > div + div { border-left: 1px solid var(--line2); }
.cm .prog .lab { font-size: 12px; color: var(--muted); font-weight: 600; }
.cm .prog strong { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cm .prog strong small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.cm .prog strong.hot { color: var(--now-ink); } .cm .prog strong.cool { color: var(--mint); }
.cm .prog .sub { font-size: 12.5px; color: var(--muted); }
.cm .pwk { display: flex; gap: 3px; }
.cm .pwk i { flex: 1; height: 8px; border-radius: 2px; background: var(--soft); }
.cm .pwk i.done { background: #9fb0cc; } .cm .pwk i.now { background: var(--now); }
.cm .prog button.link { justify-self: start; border: 0; background: none; padding: 0; color: var(--now-ink); font-weight: 700; font-size: 12.5px; cursor: pointer; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }

/* 홈: 출석체크 현황 */
.cm .att2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cm .att2.one { grid-template-columns: minmax(0, 1fr); }
.cm .wkcol { display: grid; gap: 8px; align-content: start; min-width: 0; }
.cm .wkcol .wkt { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm .wkcol h3 { margin: 0; font-size: 14px; } .cm .wkcol h3 span { color: var(--muted); font-weight: 500; }
.cm .slist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cm .srow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "d m b" "n m b"; gap: 4px 12px; align-items: center; padding: 10px 12px 10px 14px; min-height: 64px; }
.cm .srow .dchip { grid-area: d; justify-self: start; } .cm .srow .nm { grid-area: n; } .cm .srow .miss { grid-area: m; } .cm .srow .btn { grid-area: b; }
.cm .srow + .srow { border-top: 1px solid var(--line2); }
.cm .srow.today { background: var(--now-bg); }
.cm .srow.off { background: #fafbfc; color: var(--faint); }
.cm .srow.empty { display: flex; min-height: 52px; }
.cm .dchip { font-size: 12.5px; font-weight: 600; color: var(--navy2); background: var(--blue-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.cm .srow.today .dchip { background: var(--now-soft); color: var(--now-ink); }
.cm .srow .nm { font-weight: 700; font-size: 13.5px; min-width: 0; }
.cm .srow .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.cm .miss { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cm .miss b { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
.cm .miss.has b { border-color: var(--now); background: var(--now); color: #fff; }
.cm .miss.done b { border-color: var(--mint); color: var(--mint); }
.cm .miss.fut b { color: var(--faint); }

/* 홈: 오늘의 주차시 */
.cm .today-wk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cm .twk-topic { border-left: 4px solid var(--now); padding: 4px 0 4px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cm .twk-topic strong { font-size: 18px; letter-spacing: -.02em; }
.cm .twk-topic p { margin: 0; }
.cm .mats { display: grid; gap: 6px; min-width: 0; }
.cm .mat { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; color: var(--ink); background: var(--card); font: inherit; }
.cm .mat:hover { border-color: #c3cad5; }
.cm .mat .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--mint-soft); color: var(--mint); flex: none; }
.cm .mat .ic svg { width: 16px; height: 16px; }
.cm .mat > span:not(.ic) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.cm .mat small { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.cm .mat.add { border-style: dashed; color: var(--muted); justify-content: center; cursor: pointer; font-weight: 600; }
.cm .mat.add svg { width: 16px; height: 16px; flex: none; }

/* 강의관리 */
.cm .wchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cm .wchips button { min-height: 44px; min-width: 64px; padding: 0 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink); }
.cm .wchips button.past { background: #e7eaef; border-color: #e7eaef; color: #6b7482; }
.cm .wchips button.now { background: var(--now); border-color: var(--now); color: #fff; }
.cm .wchips button.all { background: none; border-color: transparent; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.cm .wchips button[aria-pressed="true"]:not(.now) { box-shadow: inset 0 0 0 2px var(--navy); }
.cm .wchips button.all[aria-pressed="true"] { color: var(--ink); }
.cm .wchips .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.cm .miss-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--now); margin-left: 5px; vertical-align: 2px; }
.cm .wchips button.now .miss-dot { background: #fff; }
.cm .symleg i.sq { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.cm .symleg i.sq.past { background: #e7eaef; border-color: #e7eaef; } .cm .symleg i.sq.now { background: var(--now); border-color: var(--now); }
.cm .wkgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.cm .wkgroup > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 18px; min-height: 60px; cursor: pointer; }
.cm .wkgroup > summary::-webkit-details-marker { display: none; }
.cm .tog { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; transition: transform .15s; }
.cm details[open] > summary .tog { transform: rotate(180deg); }
.cm .tog svg { width: 14px; height: 14px; }
.cm .wkgroup > summary b { font-size: 15px; }
.cm .wkgroup > summary .rng { color: var(--muted); font-size: 13px; }
.cm .wkgroup > summary .topic { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.cm .wkgroup.cur { border-color: #efb8a2; box-shadow: 0 0 0 3px var(--now-bg); }
.cm .sesslist { display: grid; gap: 12px; padding: 0 18px 18px; }
.cm .sess { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cm .sess-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; background: var(--mint-soft); border-bottom: 1px solid #c6e8e1; }
.cm .sess.online .sess-h { background: var(--violet-soft); border-bottom-color: #ddd6f5; }
.cm .sess.today .sess-h { background: var(--now-bg); border-bottom-color: #f6d3c4; }
.cm .sess.off .sess-h { background: #f3f5f8; border-bottom-color: var(--line2); }
.cm .sess.off { color: var(--muted); }
.cm .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; color: #0e6e60; border: 1px solid #c6e8e1; }
.cm .badge i { width: 18px; height: 18px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; }
.cm .badge i svg { width: 11px; height: 11px; color: #fff; }
.cm .sess.online .badge { color: var(--violet); border-color: #ddd6f5; } .cm .sess.online .badge i { background: var(--violet); }
.cm .sess-h .when { font-weight: 700; font-size: 15px; }
.cm .sess-h .when small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.cm .sess-h .refl { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cm .sess-b { padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; }
.cm .sum3 { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.cm .sum3 span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.cm .sum3 b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cm .sum3 .m b { color: var(--now-ink); }
.cm .sum3 i { width: 8px; height: 8px; border-radius: 50%; }
.cm .sum3 i.d-p { background: var(--blue); } .cm .sum3 i.d-a { background: var(--bad); } .cm .sum3 i.d-u { background: var(--now); }
.cm .sum3 i.d-l { background: var(--gold); } .cm .sum3 i.d-e { background: var(--mint); }
.cm .sess-topic { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.cm .sess-topic .tp { font-weight: 600; margin-right: 4px; }
.cm .flink { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: var(--r-s); background: var(--soft); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 600; border: 0; font-family: inherit; max-width: 100%; }
.cm .flink.add { background: none; border: 1px dashed var(--line); color: var(--muted); cursor: pointer; }
.cm .flink svg { width: 14px; height: 14px; flex: none; }

/* 출석 기호(LXP) */
.cm .sym { display: inline-grid; place-items: center; width: 24px; height: 24px; font-weight: 800; font-size: 14px; line-height: 1; }
.cm .sym.P { color: var(--blue); } .cm .sym.A { color: var(--bad); } .cm .sym.L { color: #c26a12; } .cm .sym.U { color: var(--faint); }
.cm .sym.E, .cm .sym.S { width: 22px; height: 22px; border-radius: 50%; font-size: 10.5px; font-weight: 800; }
.cm .sym.E { color: #0e6e60; border: 1.5px solid var(--mint); } .cm .sym.S { color: var(--violet); border: 1.5px solid var(--violet); }
.cm .sym.W { font-size: 10.5px; color: var(--faint); font-weight: 600; } .cm .sym.N { color: var(--line); }
.cm .symleg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); align-items: center; }
.cm .symleg > span { display: inline-flex; align-items: center; gap: 4px; }
.cm .symleg b { color: var(--ink); }

/* 출석부 */
.cm .subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cm .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); }
.cm .subtabs button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cm .tw { overflow-x: auto; }
.cm table.info { width: 100%; border-collapse: collapse; font-size: 13px; }
.cm table.info th, .cm table.info td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.cm table.info th { background: var(--soft); font-weight: 600; color: var(--muted); white-space: nowrap; width: 1%; }
.cm .tscroll { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); max-height: 70vh; }
.cm table.roll { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.cm table.roll th, .cm table.roll td { border: 0; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 0 8px; height: 44px; text-align: center; white-space: nowrap; background: var(--card); }
.cm table.roll thead th { position: sticky; top: 0; z-index: 3; background: #f3f5f8; font-weight: 600; color: var(--muted); font-size: 12px; }
.cm table.roll thead tr:first-child th { height: 36px; }
.cm table.roll thead tr:nth-child(2) th { top: 36px; height: 32px; }
.cm table.roll .stk { position: sticky; z-index: 2; }
.cm table.roll thead .stk { z-index: 4; }
.cm table.roll .stk-last { box-shadow: 2px 0 0 var(--line); }
.cm table.roll td.l { text-align: left; }
.cm table.roll th.wk { border-bottom: 1px solid var(--line); color: var(--ink); }
.cm table.roll th.wk.now { background: var(--now-soft); color: var(--now-ink); }
.cm table.roll td.c { padding: 0; width: 44px; min-width: 44px; }
.cm table.roll td.c button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.cm table.roll td.c button:hover { background: var(--soft); }
.cm table.roll td.c.nowc { background: var(--now-bg); }
.cm table.roll td.c.fut { background: #fafbfc; }
.cm table.roll .wkend { border-right: 1px solid var(--line); }
.cm table.roll .rt b { font-variant-numeric: tabular-nums; }
.cm table.roll .absn { color: var(--bad); font-weight: 700; }
.cm table.roll .stu .cm-nm { font-weight: 700; display: inline; font-size: 13px; }
.cm table.roll .stu small { display: none; color: var(--muted); font-size: 11.5px; }
.cm table.roll tr.wd td.stu .cm-nm { text-decoration: line-through; color: var(--faint); }
.cm table.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.cm table.dtable th, .cm table.dtable td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.cm table.dtable thead th { background: var(--soft); color: var(--muted); font-weight: 600; white-space: nowrap; }
.cm table.dtable td.c, .cm table.dtable th.c { text-align: center; }
.cm table.dtable tr.cur td { background: var(--now-bg); }
.cm table.dtable tr.off td { color: var(--faint); background: #fafbfc; }
.cm table.dtable .sym { vertical-align: middle; }
.cm details.manage { padding: 0; }
.cm details.manage > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 18px; min-height: 60px; cursor: pointer; }
.cm details.manage > summary::-webkit-details-marker { display: none; }
.cm details.manage > summary h2 { margin: 0; }
.cm .manage-in { display: grid; gap: 16px; padding: 0 18px 18px; }
.cm .manage-in > .panel { border-color: var(--line2); }

/* 출석 입력 시트 */
body.cm-lock { overflow: hidden; }
.cm-sheetwrap .scrim { position: fixed; inset: 0; background: rgba(15, 22, 35, .45); z-index: 80; }
.cm-sheetwrap .sheet { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--card); border-radius: 16px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.cm-sheetwrap .sheet-h { padding: 16px 20px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; border-bottom: 1px solid var(--line2); }
.cm-sheetwrap .sheet-h h2 { margin: 0; font-size: 16px; }
.cm-sheetwrap .sheet-h .t { flex: 1 1 260px; min-width: 0; }
.cm-sheetwrap .sheet-h .t small { display: block; color: var(--muted); font-size: 13px; }
.cm-sheetwrap .sheet-h .saved { min-height: 44px; }
.cm-sheetwrap .sheet-tools { padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; border-bottom: 1px solid var(--line2); background: #fafbfc; }
.cm-sheetwrap .cnts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.cm-sheetwrap .cnts span { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.cm-sheetwrap .cnts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cm-sheetwrap .cnts .m b { color: var(--now-ink); }
.cm-sheetwrap .sgrid { overflow-y: auto; padding: 14px 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 8px; align-content: start; }
.cm-sheetwrap .stile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; text-align: left; user-select: none; -webkit-tap-highlight-color: transparent; font: inherit; color: inherit; }
.cm-sheetwrap .stile .no { width: 24px; color: var(--faint); font-size: 12px; flex: none; }
.cm-sheetwrap .stile .swho { flex: 1; min-width: 0; }
.cm-sheetwrap .stile .swho b { display: block; font-size: 15px; }
.cm-sheetwrap .stile .swho small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-sheetwrap .stile .st { min-width: 64px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--soft); color: var(--faint); flex: none; }
.cm-sheetwrap .stile.P { border-color: #c5d3ef; } .cm-sheetwrap .stile.P .st { background: var(--blue-soft); color: var(--blue); }
.cm-sheetwrap .stile.A { border-color: #efc2bd; background: #fffafa; } .cm-sheetwrap .stile.A .st { background: var(--bad-soft); color: var(--bad); }
.cm-sheetwrap .stile.L { border-color: #ecd1a8; } .cm-sheetwrap .stile.L .st { background: var(--warn-soft); color: #a85a0c; }
.cm-sheetwrap .stile.E { border-color: #b9e1d9; } .cm-sheetwrap .stile.E .st { background: var(--mint-soft); color: #0e6e60; }
.cm-sheetwrap .stile.S { border-color: #d8d1f2; } .cm-sheetwrap .stile.S .st { background: var(--violet-soft); color: var(--violet); }
.cm-sheetwrap .stile:active { transform: scale(.985); }

/* 수업계획서 */
.cm .syl { gap: 22px; }
.cm .syl section { display: grid; gap: 10px; }
.cm .syl section > h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.cm .syl section > h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--navy); }
.cm .syl p { line-height: 1.75; color: #2b3342; max-width: 72ch; margin: 0; }
.cm .syl ol { margin: 0; padding-left: 20px; line-height: 1.8; }
.cm .comp { display: flex; flex-wrap: wrap; gap: 8px; }
.cm .comp span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.cm .syl-form { gap: 14px; }
.cm .syl-form .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cm .syl-form .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cm .syl-form textarea.in { font-size: 13.5px; line-height: 1.6; }

/* 성적 */
.cm table.grade input.gin { width: 64px; min-height: 40px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font: inherit; }
.cm table.grade .auto { color: var(--blue); font-weight: 700; }
.cm .gpts input { width: 76px; min-height: 36px; }
.cm .gadd input { width: 150px; min-height: 36px; }
.cm table.grade .gmax { display: block; font-size: 11px; font-weight: 600; color: var(--blue); }
.cm table.grade input.gin.over { border-color: var(--bad); background: var(--bad-soft); color: #7d211a; }
.cm .gpts a.hint { text-decoration: underline; text-underline-offset: 3px; }

/* 홈: 평가 비율(11-30) */
.cm .evp h2 small { font-size: 12px; }
.cm .evsum { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--soft); }
.cm .evsum b { font-size: 18px; }
.cm .evsum.ok { background: var(--mint-soft); color: #0e6e60; }
.cm .evsum.bad { background: var(--bad-soft); color: var(--bad); }
.cm .note.evbig { font-size: 15px; padding: 14px 16px; border: 1px solid #efc4c0; }
.cm .note.evbig b { font-size: 17px; display: block; margin-bottom: 2px; }
.cm .note.evbig svg { width: 22px; height: 22px; }
.cm .evrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 12px; }
.cm .evrow { display: grid; grid-template-columns: minmax(0, 1fr) 104px 36px; gap: 6px; align-items: center; }
.cm .evpct { position: relative; display: block; }
.cm .evpct input { width: 100%; padding-right: 26px; text-align: right; }
.cm .evpct i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.cm .evrow .cm-x { width: 36px; height: 44px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 18px; border-radius: 8px; }
.cm .evrow .cm-x:hover { color: var(--bad); background: var(--bad-soft); }
.cm .evwarn.err { color: #7d211a; }
.cm .evwarn { margin: 0; min-height: 1.2em; font-size: 13px; font-weight: 600; color: var(--bad); }
.cm .evwarn:empty { display: none; }
.cm-dlg.cm .links { margin: 0; }

@media (max-width: 1100px) {
  .cm .prog { grid-template-columns: 1fr 1fr; }
  .cm .prog > div:nth-child(3) { border-left: 0; }
  .cm .prog > div:nth-child(n+3) { border-top: 1px solid var(--line2); }
}
@media (max-width: 1000px) {
  .cm .att2, .cm .today-wk { grid-template-columns: minmax(0, 1fr); }
  .cm .syl-form .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cm .cm-tabs .tab { padding: 0 13px; font-size: 14px; }
  .cm .prog > div { padding: 12px 14px; }
  .cm .prog strong { font-size: 19px; }
  .cm .srow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "d m" "n b"; gap: 6px 10px; padding: 10px 12px; }
  .cm .srow .miss { justify-self: end; }
  .cm .sess-b { grid-template-columns: minmax(0, 1fr); }
  .cm .sess-b > .row { justify-content: stretch; } .cm .sess-b > .row .btn { flex: 1; }
  .cm .sess-h .refl { margin-left: 0; width: 100%; white-space: normal; }
  .cm .wkgroup > summary, .cm .sesslist { padding-inline: 12px; }
  .cm .wchips button { min-width: 56px; padding: 0 8px; }
  .cm table.roll .hide-m { display: none; }
  .cm table.roll .stu small { display: block; }
  .cm details.manage > summary, .cm .manage-in { padding-inline: 12px; }
  .cm .syl-form .grid4, .cm .syl-form .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cm .gadd input { width: 120px; }
  .cm-sheetwrap .sheet { left: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: calc(100vh - 24px); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .cm-sheetwrap .sheet-h, .cm-sheetwrap .sheet-tools, .cm-sheetwrap .sgrid { padding-inline: 14px; }
  .cm-sheetwrap .sheet-h .t { flex-basis: 100%; }
  .cm-sheetwrap .sheet-h .saved { margin-right: auto; }
  .cm-sheetwrap .sgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .cm .tog { transition: none; } .cm-sheetwrap .stile:active { transform: none; } }

/* ───────── 실제 출석 · 학교 최종(11-30, 65번 SQL) ───────── */
/* '학' 표시: 학교 최종이 실제와 다른 칸. 출석부 칸 오른쪽 위 작은 단추(누르면 날짜), 범례·시트·카드는 그림만 */
.cm .schm, .cm-sheetwrap .schm { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: #0e6e60; color: #fff; font-size: 9.5px; font-weight: 800; font-style: normal; line-height: 1; flex: none; }
.cm table.roll td.c { position: relative; }
.cm table.roll td.c button.schm { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; padding: 0; border-radius: 4px; background: #0e6e60; color: #fff; font-size: 9.5px; cursor: pointer; }
.cm table.roll td.c button.schm:hover { background: #0a5248; }
.cm table.roll td.c.dif { box-shadow: inset 0 0 0 2px #b9e1d9; }
.cm table.roll td.c .rcv { width: 44px; height: 44px; display: grid; place-items: center; }
.cm .ac .src.sch { right: auto; left: -4px; background: #0e6e60; }
.cm .schtxt { display: block; color: #0e6e60; font-size: 11.5px; font-weight: 600; }
.cm-sheetwrap .stile .swho small.tsch { display: flex; align-items: center; gap: 4px; color: #0e6e60; font-weight: 600; white-space: normal; }
.cm-sheetwrap .cnts .sd b, .cm-sheetwrap .cnts .sd { color: #0e6e60; }
.cm .sum3 button.schl { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid #b9e1d9; border-radius: 999px; background: var(--mint-soft); color: #0e6e60; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cm .sum3 button.schl b { color: #0e6e60; }
.cm .subtabs.aview button { min-height: 40px; padding: 0 14px; }
.cm .rreal { display: block; font-size: 11.5px; }
.cm #cm-rate .lab small { font-weight: 500; color: var(--muted); }
.cm #cm-rate-s b { color: var(--ink); }
.cm #cm-rate-s .pill { font-size: 11px; padding: 1px 6px; }
