/* 유현T 과학 — 학원 관리 시스템 스타일 (디자인 규칙: CLAUDE.md "디자인 규칙")
   레이아웃: 휴대폰은 위 머리말 + 아래 탭, 900px 이상은 왼쪽 메뉴 + 넓은 본문
   예전 색 이름(coral·navy·mint·lav·butter)은 그대로 두고 값만 차분한 색으로 바꿈: 면 = 옅은 면, 글자 = 상태 색 */
:root {
  --bg: #FBFAF7; --surface: #FFFFFF; --line: #E3DFD6; --line2: #ECE8E0; --seg: #F3F1EC; --soft: #F3F1EC;
  --ink: #1C1B19; --muted: #6B6760;
  --accent: #1F3A5F; --warn: #9A3B2E; --ok: #2F6B4F; --caution: #8A6516;
  --coral: #F3F1EC; --coral-ink: #9A3B2E; --coral-deep: #6B6760; --track: #ECE8E0; --fill: #1F3A5F;
  --primary: #1F3A5F; --primary-ink: #FFFFFF;
  --navy: #F3F1EC; --navy-ink: #1F3A5F;
  --mint: #F3F1EC; --mint-ink: #2F6B4F;
  --lav: #F3F1EC; --lav-ink: #1F3A5F;
  --butter: #F3F1EC; --butter-ink: #8A6516;
  --danger: #9A3B2E;
  --shadow: none;
  --radius: 2px;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif;
  --font: 'Pretendard Variable', Pretendard, 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171614; --surface: #1F1E1B; --line: #36332E; --line2: #2B2925; --seg: #252320; --soft: #252320;
    --ink: #ECE8E1; --muted: #A39E95;
    --accent: #9DB6D6; --warn: #E08A7A; --ok: #86C2A2; --caution: #D9B45A;
    --coral: #252320; --coral-ink: #E08A7A; --coral-deep: #A39E95; --track: #2B2925; --fill: #9DB6D6;
    --primary: #2E4E78; --primary-ink: #FFFFFF;
    --navy: #252320; --navy-ink: #9DB6D6;
    --mint: #252320; --mint-ink: #86C2A2;
    --lav: #252320; --lav-ink: #9DB6D6;
    --butter: #252320; --butter-ink: #D9B45A;
    --danger: #E08A7A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171614; --surface: #1F1E1B; --line: #36332E; --line2: #2B2925; --seg: #252320; --soft: #252320;
  --ink: #ECE8E1; --muted: #A39E95;
  --accent: #9DB6D6; --warn: #E08A7A; --ok: #86C2A2; --caution: #D9B45A;
  --coral: #252320; --coral-ink: #E08A7A; --coral-deep: #A39E95; --track: #2B2925; --fill: #9DB6D6;
  --primary: #2E4E78; --primary-ink: #FFFFFF;
  --navy: #252320; --navy-ink: #9DB6D6;
  --mint: #252320; --mint-ink: #86C2A2;
  --lav: #252320; --lav-ink: #9DB6D6;
  --butter: #252320; --butter-ink: #D9B45A;
  --danger: #E08A7A;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55;
  word-break: keep-all; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent;
}
a { color: var(--navy-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--navy-ink); outline-offset: 2px; border-radius: 8px; }

/* ---------- 틀 ---------- */
.layout { min-height: 100dvh; }
.side { display: none; }
.main {
  max-width: 720px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; color: inherit; }
.logo { width: 30px; height: 30px; border-radius: 10px; background: var(--coral); color: var(--coral-ink); font-weight: 800; font-size: 15px; display: grid; place-items: center; flex-shrink: 0; }
.who { text-align: right; font-size: 12px; color: var(--muted); line-height: 1.35; }
.who b { color: var(--ink); font-size: 14px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr)); gap: 4px;
}
.tabbar a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11.5px; font-weight: 500; border-radius: 12px; }
.tabbar a.on { color: var(--coral-ink); font-weight: 700; }
.tabbar svg, .side nav svg { width: 22px; height: 22px; }
.backrow { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.backrow a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.backrow a:hover { color: var(--ink); }
.backrow .here { color: var(--ink); font-weight: 700; }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--line); padding: 28px 18px;
  }
  .side .brand { margin: 0 8px 22px; font-size: 18px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a { text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-size: 14.5px; }
  .side nav a.on { background: var(--coral); color: var(--coral-ink); font-weight: 700; }
  .side nav a:hover:not(.on) { background: var(--bg); }
  .side .foot { margin-top: auto; padding: 0 8px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
  .side .foot b { color: var(--ink); font-size: 14px; }
  .tabbar { display: none; }
  .main { max-width: 1100px; margin: 0; padding: 28px 36px 48px; gap: 18px; }
  .topbar { display: none; }
  .only-m { display: none !important; }
  .cols { display: flex; gap: 18px; align-items: flex-start; }
  .cols > .col-a { flex: 3 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .cols > .col-b { flex: 2 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .hero-title { font-size: 28px !important; }
}
@media (max-width: 899px) {
  .cols, .cols > .col-a, .cols > .col-b { display: flex; flex-direction: column; gap: 16px; }
  .only-pc { display: none !important; }
}

/* ---------- 카드·목록 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.tight { padding: 2px 16px; }
.tint { border: 0; box-shadow: none; }
.tint.coral { background: var(--coral); } .tint.navy { background: var(--navy); } .tint.mint { background: var(--mint); }
.tint.lav { background: var(--lav); } .tint.butter { background: var(--butter); }
.coral .k, .k.coral { color: var(--coral-ink); } .navy .k { color: var(--navy-ink); } .mint .k { color: var(--mint-ink); }
.lav .k { color: var(--lav-ink); } .butter .k { color: var(--butter-ink); }
.k { font-size: 13px; font-weight: 700; color: var(--muted); }
.big { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.huge { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sec-h a, .sec-h button.link { font-weight: 700; }
.row {
  text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%;
}
button.row { cursor: pointer; }
a.row:hover, button.row:hover { border-color: var(--primary); }
.row .t { font-weight: 700; font-size: 15px; }
.row .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row > div { min-width: 0; }
.list { display: flex; flex-direction: column; }
.list > .li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line2); text-decoration: none; color: inherit; }
.list > .li:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap; background: var(--seg); color: var(--muted); }
.chip.coral { background: var(--coral); color: var(--coral-ink); } .chip.navy { background: var(--navy); color: var(--navy-ink); }
.chip.mint { background: var(--mint); color: var(--mint-ink); } .chip.lav { background: var(--lav); color: var(--lav-ink); }
.chip.butter { background: var(--butter); color: var(--butter-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--fill); border-radius: 99px; }
.bar.navy { background: var(--line); } .bar.navy > i { background: var(--navy-ink); opacity: .55; }
.bar.mint { background: var(--line); } .bar.mint > i { background: var(--mint-ink); opacity: .6; }

.notice-strip {
  text-decoration: none; color: inherit; background: var(--lav); border-radius: 16px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: center; font-size: 13.5px; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.notice-strip .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-strip svg { color: var(--lav-ink); flex-shrink: 0; width: 18px; height: 18px; }

/* ---------- 버튼·입력 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; padding: 11px 16px; font-weight: 700; font-size: 14px;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(.97); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns > .btn { flex: 0 1 auto; }
.btns.grow > .btn { flex: 1 1 auto; }
button.link { background: none; border: 0; padding: 0; color: var(--navy-ink); cursor: pointer; font-weight: 700; font-size: 13px; }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; font-size: 15px; min-width: 0;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--coral); }
.input.sm { padding: 7px 9px; font-size: 13.5px; border-radius: 10px; }
.err { color: var(--danger); font-size: 13px; font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > .input { flex: 1 1 120px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--coral-ink); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--seg); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; border-radius: 11px; padding: 9px 6px; font-size: 14px; font-weight: 500; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 0; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tabs .on { border-bottom-color: var(--coral-ink); color: var(--coral-ink); font-weight: 700; }

/* ---------- 로그인 ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.auth .brand { justify-content: center; font-size: 20px; }
.auth .logo { width: 40px; height: 40px; border-radius: 13px; font-size: 19px; }
.auth .lead { text-align: center; color: var(--muted); font-size: 14px; }
.pin { letter-spacing: .35em; font-size: 20px; text-align: center; }
.pin::placeholder { letter-spacing: normal; font-size: 15px; }

/* ---------- 숙제 풀이 ---------- */
.q { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.q.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--coral); }
.q-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.q-no { font-weight: 800; font-size: 16px; }
.qimg { border-radius: 12px; border: 1px solid var(--line2); background: #fff; overflow: hidden; }
.qimg img { width: 100%; }
.pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pad button {
  aspect-ratio: 1 / 1; max-height: 56px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 18px; font-weight: 700; cursor: pointer; color: var(--ink); justify-self: center; width: 100%; max-width: 56px;
}
.pad button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.confused { border: 1px dashed var(--line); background: transparent; border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.confused.on { background: var(--lav); color: var(--lav-ink); border-color: transparent; }
.submitbar {
  position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 10; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 10px 10px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 6px 20px rgba(47, 52, 55, .08);
}
@media (min-width: 900px) { .submitbar { bottom: 16px; } }
.res { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.mark.O { background: var(--mint); color: var(--mint-ink); } .mark.X { background: var(--coral); color: var(--coral-ink); } .mark.P { background: var(--butter); color: var(--butter-ink); }
.kv { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.kv span b { font-weight: 700; }
.exp { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }

/* OMR 한 문항씩 */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip button { flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.strip button.done { background: var(--coral); color: var(--coral-ink); border-color: transparent; }
.strip button.cur { border-color: var(--coral-ink); color: var(--coral-ink); box-shadow: 0 0 0 2px var(--coral); }
.strip .check-tab { padding: 0 12px; }
.pad.big { gap: 10px; padding: 6px 0; }
.pad.big button { max-width: 64px; max-height: 64px; font-size: 21px; }
.review { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.review button { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); min-width: 0; }
.review button .n { font-size: 12px; color: var(--muted); font-weight: 700; }
.review button .a { font-weight: 800; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review button.miss { background: var(--coral); border-color: transparent; }
.review button.miss .a { color: var(--coral-ink); font-size: 13px; }

/* ---------- 자료실 ---------- */
.unit { display: flex; flex-direction: column; gap: 12px; }
.vid { display: flex; flex-direction: column; gap: 8px; }
.vid-btn { display: flex; align-items: center; gap: 10px; background: var(--navy); color: var(--navy-ink); border: 0; border-radius: 14px; padding: 12px 14px; font-weight: 700; cursor: pointer; text-align: left; width: 100%; }
.vid-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.file .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--butter); color: var(--butter-ink); display: grid; place-items: center; flex-shrink: 0; }
.file .ic svg { width: 18px; height: 18px; }

/* ---------- 표·차트 ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line2); text-align: left; white-space: nowrap; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--bg); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tbl th.sticky { background: var(--bg); z-index: 2; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 6px; }
.spark > div { flex: 1; min-width: 6px; border-radius: 6px 6px 3px 3px; background: var(--navy-ink); opacity: .45; position: relative; }
.spark > div.last { opacity: .9; }
.area-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 13.5px; }
.area-row .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- 팝업·알림 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; max-width: calc(100% - 32px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: pop .18s ease-out;
}
@media (min-width: 900px) { .toast { bottom: 28px; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.dim { position: fixed; inset: 0; z-index: 90; background: rgba(20, 18, 16, .45); display: grid; place-items: end center; padding: 0; }
@media (min-width: 640px) { .dim { place-items: center; padding: 24px; } }
.sheet {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
.sheet.wide { max-width: 1000px; }
@media (min-width: 640px) { .sheet { border-radius: 22px; padding: 22px; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--coral-ink); border-radius: 50%; animation: rot .8s linear infinite; margin: 30px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 30px 0; }
.loading .spin { margin: 0; }

/* ---------- 강사: 문제 사진 자르기 ---------- */
.crop-page { position: relative; margin: 0 auto 16px; border: 1px solid var(--line); background: #fff; touch-action: pan-y; user-select: none; }
.crop-page canvas { display: block; width: 100%; height: auto; }
.cbox { position: absolute; border: 2px solid #E36A44; background: rgba(227, 106, 68, .08); touch-action: none; cursor: move; }
.cbox.sel { border-color: #3B5BDB; background: rgba(59, 91, 219, .1); }
.cbox .tag { position: absolute; left: -2px; top: -22px; background: #E36A44; color: #fff; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 6px 6px 0 0; }
.cbox.sel .tag { background: #3B5BDB; }
.cbox .hd { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #3B5BDB; border: 2px solid #fff; cursor: nwse-resize; touch-action: none; }
.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.qedit { display: grid; grid-template-columns: 34px 96px minmax(0, 1fr) 100px 60px auto; grid-template-areas: "no type ans area pts act"; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.qedit:last-child { border-bottom: 0; }
.qedit .q-no { grid-area: no; } .qedit .q-type { grid-area: type; } .qedit .q-ans { grid-area: ans; }
.qedit .q-area { grid-area: area; } .qedit .q-pts { grid-area: pts; } .qedit .q-act { grid-area: act; }
.qedit .q-more { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .qedit { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 56px auto; grid-template-areas: "no type ans ans ans" "no area area pts act"; }
}
.target { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.target.on { border-color: var(--primary); }

/* 출석 버튼 · 메모 · QR */
.att { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.att button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 6px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.att button.on.mint { background: var(--mint); color: var(--mint-ink); border-color: transparent; }
.att button.on.butter { background: var(--butter); color: var(--butter-ink); border-color: transparent; }
.att button.on.coral { background: var(--coral); color: var(--coral-ink); border-color: transparent; }
.att button.on.navy { background: var(--navy); color: var(--navy-ink); border-color: transparent; }
.att button.on.lav { background: var(--lav); color: var(--lav-ink); border-color: transparent; }
@media (max-width: 420px) { .att button { padding: 6px 8px; font-size: 12px; } }
.notebox { text-align: left; width: 100%; border: 1px solid var(--line2); background: var(--bg); border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.notebox.pinned { border-color: var(--butter); background: var(--butter); }
.qrbox { background: #fff; padding: 16px; border-radius: 18px; display: inline-block; }
.qrbox img, .qrbox canvas { display: block; width: min(300px, 70vw) !important; height: auto !important; }

/* ===================== 인쇄용 성적표 ===================== */
.print-only { display: none; }
.rc-wrap { min-height: 100vh; background: var(--bg); padding: 16px; }
.rc-bar { max-width: 210mm; margin: 0 auto 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.rc-bar .inline.wrap { flex-wrap: wrap; }
.rc-bar input[type=date] { width: auto; }
.rc-bar select { width: auto; }
.rc-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.rc-page {
  --p-ink: #2F3437; --p-muted: #6A6F75; --p-line: #E6E0D6; --p-soft: #FAF7F2; --p-accent: #E39A7D; --p-accent-ink: #A84C2A; --p-avg: #9AA0A6;
  width: 100%; max-width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 14mm 13mm 12mm;
  background: #fff; color: var(--p-ink); border-radius: 6px; box-shadow: 0 2px 14px rgba(0,0,0,.08);
  display: flex; flex-direction: column; gap: 5mm; font-size: 10.5pt; line-height: 1.45;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 4mm; border-bottom: 2px solid var(--p-ink); }
.rc-title { font-size: 21pt; font-weight: 800; letter-spacing: -.02em; }
.rc-sub { font-size: 9.5pt; color: var(--p-muted); }
.rc-who { text-align: right; }
.rc-who .n { font-size: 16pt; font-weight: 800; }
.rc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; }
.rc-kpi { background: var(--p-soft); border: 1px solid var(--p-line); border-radius: 8px; padding: 3mm 3.5mm; }
.rc-kpi .l { font-size: 9pt; color: var(--p-muted); font-weight: 700; }
.rc-kpi .v { font-size: 17pt; font-weight: 800; color: var(--p-accent-ink); line-height: 1.25; }
.rc-kpi .s { font-size: 8.5pt; color: var(--p-muted); }
.rc-sec { break-inside: avoid; page-break-inside: avoid; }
.rc-sec h3 { font-size: 11pt; font-weight: 800; margin: 0 0 2mm; padding-left: 2.5mm; border-left: 3px solid var(--p-accent); line-height: 1.2; }
.rc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; align-items: start; }
.rc-tbl { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.rc-tbl th { text-align: left; font-weight: 700; color: var(--p-muted); font-size: 8.5pt; border-bottom: 1px solid var(--p-ink); padding: 1.2mm 1.5mm; }
.rc-tbl td { border-bottom: 1px solid var(--p-line); padding: 1.2mm 1.5mm; }
.rc-tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-tbl td.b { font-weight: 700; }
.rc-miss { color: var(--p-accent-ink); font-weight: 800; }
.rc-empty { color: var(--p-muted); font-size: 9.5pt; margin: 0; }
.rc-small { font-size: 9pt; color: var(--p-muted); margin: 2mm 0 0; }
.rc-chart { width: 100%; height: auto; display: block; }
.rc-chart .grid { stroke: var(--p-line); stroke-width: 1; }
.rc-chart .ax { fill: var(--p-muted); font-size: 10px; }
.rc-chart .val { fill: var(--p-accent-ink); font-size: 10px; font-weight: 700; }
.rc-chart .me { fill: none; stroke: var(--p-accent); stroke-width: 2.5; stroke-linejoin: round; }
.rc-chart .avg { fill: none; stroke: var(--p-avg); stroke-width: 1.5; stroke-dasharray: 4 3; }
.rc-chart .dot { fill: #fff; stroke: var(--p-accent); stroke-width: 2; }
.rc-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 8.5pt; color: var(--p-muted); margin: -1mm 0 2mm; }
.rc-legend .k { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid var(--p-accent); margin-left: 8px; }
.rc-legend .k.avg { border-top: 1.5px dashed var(--p-avg); }
.rc-att { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2mm; text-align: center; }
.rc-att div { background: var(--p-soft); border: 1px solid var(--p-line); border-radius: 6px; padding: 1.5mm 0; display: flex; flex-direction: column; }
.rc-att b { font-size: 13pt; line-height: 1.2; }
.rc-att span { font-size: 8.5pt; color: var(--p-muted); }
.rc-areas { display: flex; flex-direction: column; gap: 1.8mm; }
.rc-area { display: grid; grid-template-columns: minmax(0, 1fr) 26mm auto; align-items: center; gap: 2mm; font-size: 9pt; }
.rc-area .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-area .bar { height: 2.2mm; background: var(--p-line); border-radius: 2mm; overflow: hidden; }
.rc-area .bar i { display: block; height: 100%; background: #9CC9B0; }
.rc-area.weak .bar i { background: var(--p-accent); }
.rc-area.weak .n { font-weight: 700; color: var(--p-accent-ink); }
.rc-area .p { font-size: 8.5pt; color: var(--p-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-ta { min-height: 70px; font-size: 14px; }
.rc-comment { white-space: pre-wrap; border: 1px solid var(--p-line); background: var(--p-soft); border-radius: 8px; padding: 3mm 4mm; min-height: 18mm; font-size: 10pt; }
.rc-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 8.5pt; color: var(--p-muted); border-top: 1px solid var(--p-line); padding-top: 2mm; }
@media (max-width: 640px) {
  .rc-wrap { padding: 10px; }
  .rc-page { min-height: 0; padding: 18px 14px; font-size: 13px; }
  .rc-kpis { grid-template-columns: repeat(2, 1fr); }
  .rc-2col { grid-template-columns: 1fr; }
  .rc-head { flex-direction: column; align-items: flex-start; }
  .rc-who { text-align: left; }
}
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  .no-print, .toast, .sheet-wrap { display: none !important; }
  .print-only { display: block !important; }
  .rc-cm.empty { display: none; }
  .rc-wrap { padding: 0; background: #fff; min-height: 0; }
  .rc-pages { display: block; }
  .rc-page { max-width: none; width: 210mm; min-height: 296mm; border-radius: 0; box-shadow: none; break-after: page; page-break-after: always; font-size: 10.5pt; padding: 14mm 13mm 12mm; }
  .rc-page:last-child { break-after: auto; page-break-after: auto; }
  .rc-kpis { grid-template-columns: repeat(4, 1fr); }
  .rc-2col { grid-template-columns: 1fr 1fr; }
  .rc-head { flex-direction: row; align-items: flex-end; }
  .rc-who { text-align: right; }
}

/* ===================== 영상 플레이어: 워터마크 · 전체 화면 ===================== */
.wmframe .ythost, .wmframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wmframe .wm {
  position: absolute; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; user-select: none;
  color: rgba(255, 255, 255, .5); text-shadow: 0 0 3px rgba(0, 0, 0, .55); font-weight: 800; letter-spacing: .02em;
  font-size: clamp(12px, 2.4vw, 22px); white-space: nowrap; transition: opacity .6s;
}
.wmframe .fs-exit { display: none; }
.wmframe:fullscreen, .wmframe:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.wmframe:fullscreen .wm { font-size: clamp(16px, 2.2vw, 30px); }
.wmframe.pseudo-fs { position: fixed; inset: 0; z-index: 9999; aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
.wmframe.pseudo-fs .fs-exit { display: block; position: absolute; z-index: 4; top: max(10px, env(safe-area-inset-top)); left: 10px; font: inherit; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; }
body.noscroll { overflow: hidden; }
.vid-btn .tiny.done { color: var(--mint-ink); font-weight: 700; }
.wbar { position: relative; height: 16px; min-width: 90px; background: var(--line2); border-radius: 8px; overflow: hidden; margin-bottom: 2px; }
.wbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--butter); }
.wbar.done i { background: var(--mint); }
.wbar b { position: relative; font-size: 11px; padding-left: 6px; line-height: 16px; }

/* ===================== 풀이 방식: 한 화면 빠른 입력 ===================== */
.solve-seg button { font-size: 13px; padding: 8px 4px; }
.sheet { padding: 4px 12px; }
.srow { padding: 9px 0; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; }
.srow:last-child { border-bottom: 0; }
.sline { display: flex; align-items: center; gap: 8px; }
.sno { flex: 0 0 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; background: var(--seg); color: var(--muted); }
.srow.done .sno { background: var(--coral); color: var(--coral-ink); }
.sline > .pad.mini, .sline > .input { flex: 1; min-width: 0; }
.pad.mini { gap: 4px; }
.pad.mini button { max-width: 40px; max-height: 40px; font-size: 15px; border-width: 1.5px; }
.stools { display: flex; gap: 4px; flex: 0 0 auto; }
.peek { display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.peek.on { background: var(--navy); color: var(--navy-ink); border-color: transparent; }
.peek.q { width: 32px; padding: 0; justify-content: center; font-size: 14px; }
.peek.q.on { background: var(--lav); color: var(--lav-ink); }
.speek { margin-left: 40px; }
@media (max-width: 380px) { .stools .peek:not(.q) svg { display: none; } .pad.mini button { font-size: 14px; } }

/* ===================== 개인정보: 하단 링크 · 동의 ===================== */
.site-foot { text-align: center; font-size: 12px; padding: 18px 0 6px; }
.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth + .site-foot, #app > .site-foot { padding-bottom: 24px; }
.consent { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.consent ul { margin: 0; padding-left: 18px; color: var(--muted); }
.consent .check { font-weight: 700; font-size: 14px; }
.danger-zone { border-top: 1px solid var(--line2); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
/* 여러 반: 반별 묶음 제목 */
.class-h { font-size: 15px; font-weight: 800; color: var(--navy-ink); background: var(--navy); border-radius: 12px; padding: 8px 12px; margin-top: 4px; }
.class-group { gap: 10px; }

/* ===================== 달력 ===================== */
.cal { display: flex; flex-direction: column; gap: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h2 { font-size: 18px; }
.cal-card { padding: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-dow.sun, .cal-cell.sun .n { color: var(--coral-ink); }
.cal-dow.sat, .cal-cell.sat .n { color: var(--navy-ink); }
.cal-cell { min-height: 74px; border: 1px solid transparent; border-radius: 10px; background: transparent; padding: 4px 3px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; min-width: 0; }
.cal-cell.empty { cursor: default; }
.cal-cell:hover:not(.empty) { background: var(--line2); }
.cal-cell.today { background: var(--coral); }
.cal-cell.sel { border-color: var(--fill); }
.cal-cell .n { font-size: 12.5px; font-weight: 700; padding-left: 3px; }
.cal-cell .evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal .ev { font-size: 10.5px; line-height: 1.35; border-radius: 5px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.cal .more { font-size: 10px; color: var(--muted); padding-left: 3px; }
.k-regular { background: var(--navy); color: var(--navy-ink); }
.k-extra { background: var(--mint); color: var(--mint-ink); }
.k-cancel { background: var(--coral); color: var(--coral-ink); text-decoration: line-through; }
.k-test { background: var(--lav); color: var(--lav-ink); }
.k-exam { background: var(--lav-ink); color: var(--surface); }
.k-due { background: var(--butter); color: var(--butter-ink); }
.k-due.done { opacity: .55; }
.k-hw { background: var(--seg); color: var(--muted); }
.cal-tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; }
.cal-strike { text-decoration: line-through; text-decoration-color: var(--coral-ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-detail { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 600px) {
  .cal-cell { min-height: 52px; padding: 3px 2px; }
  .cal .ev { font-size: 0; height: 6px; width: 6px; padding: 0; border-radius: 99px; display: inline-block; }
  .cal-cell .evs { flex-direction: row; flex-wrap: wrap; gap: 3px; padding-left: 3px; }
  .cal .more { font-size: 9px; }
}
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line2); padding: 8px 0; }
.rule-row:last-child { border-bottom: 0; }

/* ===================== 강사 홈: 빠른 작업 · 숫자 카드 ===================== */
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .btn { flex: 1 1 140px; }
.btn.primary-soft { background: var(--coral); color: var(--coral-ink); border-color: transparent; }
.btn.primary-soft:hover { filter: brightness(.97); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.stat .big { font-size: 22px; }
.stat .tiny { opacity: .8; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:last-child { grid-column: 1 / -1; } }

/* ===================== 학생 프로필 (강사) ===================== */
.stu-head { display: flex; flex-direction: column; gap: 12px; }
.stu-id { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.stu-id .chips a { text-decoration: none; }
.stu-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line2); padding-top: 12px; }
.stu-facts .fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; }
@media (max-width: 600px) { .stu-facts { grid-template-columns: 1fr; } .stu-facts .fact { flex-direction: row; justify-content: space-between; align-items: center; } }
/* 출결 7가지 상태: 휴대폰에서는 두 줄로 */
.att { flex-wrap: wrap; justify-content: flex-end; }
.att-log summary { cursor: pointer; }

/* ===== 2단계: 교재 진도 ===== */
.prog-list { display: flex; flex-direction: column; gap: 6px; }
.prog-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.prog-row .n { flex: 1 1 140px; min-width: 0; }
.prog-row .chip { flex: 0 0 auto; min-width: 54px; justify-content: center; text-align: center; }
.prog-chip { cursor: pointer; border: 0; font: inherit; font-size: 12px; font-weight: 700; }

/* ===== 2단계: OMR ===== */
.omr-cam { position: fixed; inset: 0; z-index: 10000; background: #000; display: flex; flex-direction: column; }
.omr-stage { position: relative; flex: 1; overflow: hidden; display: grid; place-items: center; }
.omr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.omr-guide { position: relative; height: min(84%, calc(84vw * 297 / 210)); aspect-ratio: 210 / 297; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.omr-guide i { position: absolute; width: 34px; height: 34px; border: 4px solid rgba(255, 255, 255, .85); }
.omr-guide .tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; } .omr-guide .tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; }
.omr-guide .bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; } .omr-guide .br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; }
.omr-cam.ready .omr-guide i { border-color: #3ddc97; }
.omr-hint { position: absolute; left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top)); text-align: center; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.omr-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px max(14px, env(safe-area-inset-bottom)); background: #000; }
.omr-bar .btn { background: rgba(255, 255, 255, .14); color: #fff; border-color: transparent; }
.omr-shot { width: 68px; height: 68px; border-radius: 50%; border: 5px solid #fff; background: rgba(255, 255, 255, .25); cursor: pointer; flex: 0 0 auto; }
.omr-shot:disabled { opacity: .4; }
.omr-cam.ready .omr-shot { background: #3ddc97; }
.omr-preview { width: 100%; max-height: 46vh; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.omr-ansgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.omr-ans { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; background: var(--seg); font-size: 15px; }
.omr-ans b { font-size: 11.5px; color: var(--muted); }
.omr-ans small { font-size: 10.5px; font-weight: 700; color: var(--butter-ink); }
.omr-ans.flag { background: #fff3b0; color: #5c4700; }
.omr-up .omr-thumb, .omr-thumb { width: 84px; height: 119px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--seg); flex: 0 0 auto; }
.omr-verify { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.omr-left { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 8px; }
.omr-ovwrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.omr-ov { display: block; width: 100%; height: auto; cursor: pointer; }
.omr-right { display: flex; flex-direction: column; gap: 4px; }
.omr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line2); }
.omr-row.flag { background: #fff3b0; border-color: #f0d24a; color: #4a3a00; }
.omr-row .no { width: 26px; text-align: right; flex: 0 0 auto; }
.omr-row .tiny { flex: 1 1 90px; }
.omr-row.flag .tiny.muted { color: #6b5600; }
.omr-choices { display: inline-flex; gap: 4px; }
.omr-choices button { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; cursor: pointer; }
.omr-choices button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.omr-row.box { align-items: flex-start; }
.omr-boxcell { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.omr-crop { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.omr-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.omr-sheet { background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); width: min(210mm, 100%); }
.omr-sheet svg { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .omr-verify { grid-template-columns: 1fr; } .omr-left { position: static; } }
@media print {
  .omr-pages { display: block; gap: 0; }
  .omr-sheet { width: 210mm; height: 297mm; box-shadow: none; break-after: page; page-break-after: always; overflow: hidden; }
  .omr-sheet:last-child { break-after: auto; page-break-after: auto; }
  .omr-sheet svg { width: 210mm; height: 297mm; }
  .omr-wrap { padding: 0; }
}
.omr-boxcell .tiny { flex: none; }
.omr-choices button.on { background: #1f9d6b; color: #fff; border-color: #1f9d6b; }

/* ===== 2단계: 문항 분석 · 성적 분석 ===== */
.an-tbl td { vertical-align: middle; }
.an-rate { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.an-rate .bar { flex: 1; }
.an-rate span { font-size: 12.5px; font-weight: 700; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.an-dist { display: flex; flex-wrap: wrap; gap: 4px; }
.an-c { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: var(--seg); white-space: nowrap; }
.an-c.ok { background: var(--mint); color: var(--mint-ink); font-weight: 700; }
.an-low td:first-child { color: var(--coral-ink); }
.ch { width: 100%; height: auto; display: block; }
.ch .grid { stroke: var(--line); stroke-width: 1; }
.ch .ax { fill: var(--muted); font-size: 10.5px; }
.ch .val { fill: var(--ink); font-size: 10.5px; font-weight: 700; }
.ch .hb { fill: var(--mint-ink); opacity: .55; }
.ch .avgline { stroke: var(--coral-ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ch .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.ch .ln.dash { stroke-width: 1.8; stroke-dasharray: 5 4; }
.ch .s0 { stroke: var(--coral-ink); } .ch .s1 { stroke: var(--navy-ink); } .ch .s2 { stroke: var(--mint-ink); }
.ch .dt { fill: var(--surface); stroke-width: 2; }
.ch .range { stroke-width: 6; stroke-linecap: round; opacity: .3; }
.ch-legend { display: flex; gap: 14px; justify-content: flex-end; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.ch-legend i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid; margin-right: 5px; vertical-align: middle; }
.ch-legend i.s0 { border-color: var(--coral-ink); } .ch-legend i.s1 { border-color: var(--navy-ink); } .ch-legend i.s2 { border-color: var(--mint-ink); }
.ch-legend i.dash { border-top-style: dashed; border-top-width: 2px; }

/* =====================================================================
   디자인 규칙 적용 층 (2026-11) — 위 규칙보다 뒤에 있어서 이 값이 이김
   ===================================================================== */
/* 모서리 최대 2~3px, 그림자 없음 (원형이 의미 있는 것만 예외) */
*, *::before, *::after { border-radius: 2px !important; box-shadow: none !important; }
.pad button, .omr-shot, .omr-choices button, .spin, .dot, .chip::before, .cal .ev::before, .st-dot::before,
.cbox .hd, .cal-legend i, .mark { border-radius: 50% !important; }
.omr-guide { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35) !important; }
.frame, .wmframe, .omr-video, .omr-stage, .ythost { border-radius: 0 !important; }

body { font-family: var(--font); font-size: 15px; line-height: 1.6; font-feature-settings: 'tnum' 0; }
body.admin { font-size: 14px; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .big, .huge, .tbl td, .kv, .stat, time { font-variant-numeric: tabular-nums; }

/* 제목: 명조 700, 페이지 제목 아래 2px 먹색 선 */
h1, h2, h3, .big, .huge, .brand, .rc-title, .rc-who .n, .q-no { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
body.admin h1 { font-size: 22px; }
.auth h1, .sheet h1, .rc-page h1, .inline > div > h1 { border-bottom: 0; padding-bottom: 0; }
.ptitle { border-bottom: 2px solid var(--ink); padding-bottom: 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ptitle h1 { border: 0; padding: 0; }
h2 { font-size: 18px; }
h3 { font-size: 15.5px; }
.big { font-size: 26px; font-weight: 700; line-height: 1.2; }
.huge { font-size: 34px; font-weight: 700; }
.k { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.coral .k, .k.coral, .navy .k, .mint .k, .lav .k, .butter .k { color: var(--muted); }

/* 섹션 제목: 01, 02 번호(남색) + 아래 1px 선 */
.main { counter-reset: sec; }
.sec-h, .card > h3:first-child, section > h3:first-child {
  counter-increment: sec; font-family: var(--serif); font-size: 15.5px; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 7px; justify-content: flex-start;
}
.sec-h::before, .card > h3:first-child::before, section > h3:first-child::before {
  content: counter(sec, decimal-leading-zero); color: var(--accent); font-family: var(--serif); font-weight: 700; margin-right: 10px; font-variant-numeric: tabular-nums;
}
.sec-h > a, .sec-h > button, .sec-h > .chip, .sec-h > span:last-child:not(:first-child) { margin-left: auto; font-family: var(--font); font-size: 13px; font-weight: 500; }
.sheet .sec-h::before, .sheet .card > h3:first-child::before, .sheet section > h3:first-child::before,
.auth .card > h3:first-child::before, .cal-detail .sec-h::before { content: none; }
.cal-detail .sec-h { counter-increment: none; }

/* 틀: 왼쪽 메뉴(글자만, 선택은 왼쪽 2px 먹색 선) · 아래 탭(글자만, 위쪽 2px 선) */
.logo { display: none !important; }
.brand { font-size: 17px; gap: 0; }
.tabbar { padding: 0 4px env(safe-area-inset-bottom, 0px); gap: 0; border-top: 1px solid var(--line); background: var(--surface); }
.tabbar svg, .side nav svg, .tabbar .ic, .side nav .ic { display: none !important; }
.tabbar a { padding: 15px 0 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); border-top: 2px solid transparent; margin-top: -1px; }
.tabbar a.on { color: var(--ink); font-weight: 700; border-top-color: var(--ink); }
.main { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.topbar { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.who { font-size: 12px; }
.backrow { font-size: 12.5px; gap: 4px; }
.backrow .sep { color: var(--line); }
@media (min-width: 900px) {
  .layout { grid-template-columns: 216px minmax(0, 1fr); }
  .side { padding: 24px 0; gap: 0; background: var(--surface); }
  .side .brand { margin: 0 20px 20px; font-size: 17px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
  .side nav { gap: 0; }
  .side nav a { padding: 9px 20px 9px 18px; border-left: 2px solid transparent; color: var(--muted); font-size: 14px; gap: 0; }
  .side nav a.on { background: none; color: var(--ink); font-weight: 700; border-left-color: var(--ink); }
  .side nav a:hover:not(.on) { background: var(--soft); color: var(--ink); }
  .side .foot { padding: 0 20px; }
  .main { max-width: 1160px; padding: 26px 36px 48px; gap: 22px; }
  body.admin .main { max-width: 1240px; gap: 18px; }
  .hero-title { font-size: 26px !important; }
}

/* 카드 → 흰 면 + 1px 선. 색 면(tint)은 옅은 면 + 왼쪽 2px 상태 선 */
.card { background: var(--surface); border: 1px solid var(--line); padding: 16px; }
.card.tight { padding: 0 16px; }
.tint, .tint.coral, .tint.navy, .tint.mint, .tint.lav, .tint.butter { background: var(--soft); border: 0; border-left: 2px solid var(--line); }
.tint.coral { border-left-color: var(--warn); } .tint.mint { border-left-color: var(--ok); } .tint.butter { border-left-color: var(--caution); }
.tint.navy, .tint.lav { border-left-color: var(--accent); }
a.card:hover, a.row:hover, button.row:hover { border-color: var(--accent); }
.row { border-radius: 2px; padding: 13px 14px; }
.row.tint { border: 0; border-left: 2px solid var(--accent); }
.row .t { font-weight: 600; }
.list > .li { padding: 11px 0; border-bottom-color: var(--line2); }
.empty { text-align: left; padding: 16px 0; font-size: 14px; }
.card.empty { padding: 16px; }

/* 상태: 알약 대신 작은 색 점 + 글자 */
.chip { background: none !important; padding: 0; border-radius: 0; font-size: 12.5px; font-weight: 500; color: var(--muted); gap: 6px; }
.chip::before { content: ''; width: 6px; height: 6px; background: currentColor; flex-shrink: 0; }
.chip.coral { color: var(--warn); } .chip.mint { color: var(--ok); } .chip.butter { color: var(--caution); }
.chip.navy, .chip.lav { color: var(--accent); }
a.chip { text-decoration: none; } a.chip:hover { text-decoration: underline; }
.chips { gap: 4px 14px; }

/* 막대: 가는 직사각형, 남색 채움 */
.bar { height: 6px; background: var(--track); }
.bar > i { background: var(--accent); }
.bar.navy, .bar.mint { background: var(--track); }
.bar.navy > i, .bar.mint > i { background: var(--accent); opacity: 1; }

.notice-strip { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 10px 14px; }
.notice-strip svg { color: var(--muted); }
.notice-strip > .ic:first-child, .notice-strip > span:first-child { display: none; }

/* 버튼: 주요 = 남색 채움, 보조 = 먹색 테두리, 덜 중요 = 밑줄 글자 */
.btn { border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 9px 16px; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--ink); background: var(--soft); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: none; background: #18304F; border-color: #18304F; }
.btn.primary-soft { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.danger { color: var(--warn); border-color: var(--warn); }
.btn.primary.danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
button.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.iconbtn { width: 34px; height: 34px; border-color: var(--line); background: var(--surface); }
.iconbtn:hover { border-color: var(--ink); }
/* 아이콘: 검색·닫기·인쇄·다운로드·이전/다음·재생·화면 밝기만 */
.ic { display: none !important; }
.ic-search, .ic-x, .ic-print, .ic-down, .ic-left, .ic-right, .ic-play, .iconbtn .ic { display: inline-flex !important; }
.tabbar .ic, .side nav .ic, .notice-strip .ic-right, .row .ic-right { display: none !important; }

/* 입력칸 */
.input, select.input, textarea.input { border: 1px solid var(--line); padding: 9px 11px; font-size: 15px; background: var(--surface); }
body.admin .input { font-size: 14px; }
.input:focus { border-color: var(--accent); box-shadow: none !important; }
.input.sm { padding: 6px 8px; font-size: 13.5px; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.check input { accent-color: var(--accent); }

/* 세그먼트·탭 → 밑줄형 탭 (선택 탭만 아래 2px 먹색 선) */
.seg { background: none; padding: 0; gap: 0; border-bottom: 1px solid var(--line); }
.seg button { padding: 9px 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 500; }
.seg button.on { background: none; color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.tabs { gap: 20px; border-bottom-color: var(--line); }
.tabs a, .tabs button { padding: 9px 0; color: var(--muted); margin-bottom: -1px; }
.tabs .on { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }

/* 표: 머리글은 작은 회색 글자, 가는 구분선 */
.tbl-wrap { border: 1px solid var(--line); background: var(--surface); }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.tbl th { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); letter-spacing: .02em; }
.tbl th.sticky { background: var(--surface); }
.tbl tr.today td { background: var(--soft); font-weight: 600; }
body.admin table.tbl { font-size: 13px; }

/* 상단 요약 줄: 테두리 없는 칸 + 세로선 */
.summary { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary > * { padding: 12px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary > *:first-child { border-left: 0; padding-left: 0; }
.summary .l { font-size: 12.5px; color: var(--muted); }
.summary .v { font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.summary .s { font-size: 12px; color: var(--muted); }
.summary .up { color: var(--ok); } .summary .down { color: var(--warn); }
@media (max-width: 520px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > *:nth-child(odd) { border-left: 0; padding-left: 0; }
  .summary > *:nth-child(n+3) { border-top: 1px solid var(--line); }
  .summary.n3 > *:last-child { grid-column: 1 / -1; }
  .summary .v { font-size: 21px; }
}
.stats { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .stat, .stats .stat.card { background: none; border: 0; border-left: 1px solid var(--line); padding: 10px 14px; }
.stats .stat:first-child { border-left: 0; padding-left: 0; }
.stats .stat .big { font-size: 24px; }
.stats .stat .tiny { opacity: 1; color: var(--muted); }
@media (max-width: 900px) { .stats .stat:nth-child(3n+1) { border-left: 0; padding-left: 0; } .stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .stats .stat { border-left: 1px solid var(--line); padding-left: 14px; } .stats .stat:nth-child(odd) { border-left: 0; padding-left: 0; } .stats .stat:nth-child(n+3) { border-top: 1px solid var(--line); } .stats .stat:last-child { border-left: 0; padding-left: 0; } }

/* 로그인 */
.auth .brand { font-size: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.auth .lead { text-align: left; }
.auth .box > .brand { justify-content: flex-start; }

/* 풀이 */
.q.active { border-color: var(--accent); }
.qimg { border-color: var(--line); }
.pad button { border: 1px solid var(--line); font-weight: 600; }
.pad button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.confused { border: 1px dashed var(--line); }
.confused.on { background: var(--soft); color: var(--accent); border-color: var(--accent); }
.submitbar { border: 1px solid var(--line); border-top: 2px solid var(--ink); padding: 10px 10px 10px 14px; }
.mark { background: none !important; border: 1px solid currentColor; width: 26px; height: 26px; font-size: 13px; }
.mark.O { color: var(--ok); } .mark.X { color: var(--warn); } .mark.P { color: var(--caution); }
.exp { background: var(--soft); border-left: 2px solid var(--line); }
.strip button { border: 1px solid var(--line); font-weight: 600; }
.strip button.done { background: var(--soft); color: var(--ink); border-color: var(--line); }
.strip button.cur { border-color: var(--ink); color: var(--ink); }
.review button { background: var(--surface); }
.review button.miss { background: var(--soft); border: 1px solid var(--warn); }
.review button.miss .a { color: var(--warn); }
.sno { background: var(--soft); }
.srow.done .sno { background: var(--accent); color: #fff; }
.peek.on, .peek.q.on { background: var(--soft); color: var(--accent); border-color: var(--accent); }

/* 자료실 */
.vid-btn { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 11px 14px; }
.vid-btn:hover { border-color: var(--accent); }
.vid-btn svg { color: var(--accent); }
.file { border-color: var(--line); }
.file .ic { display: none !important; }
.wbar { background: var(--track); height: 14px; }
.wbar i { background: var(--line); } .wbar.done i { background: var(--ok); opacity: .35; }

/* 알림·팝업 */
.toast { animation: none; background: var(--ink); color: var(--bg); font-weight: 500; }
.sheet { border-top: 2px solid var(--ink); }
.sheet-h { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.spin { border-width: 2px; border-top-color: var(--accent); }

/* 출석 버튼: 직사각형, 선택은 먹색 테두리 + 상태 색 글자 */
.att button { border: 1px solid var(--line); background: var(--surface); padding: 5px 9px; font-weight: 500; }
.att button.on.mint, .att button.on.butter, .att button.on.coral, .att button.on.navy, .att button.on.lav { background: var(--soft); border-color: var(--ink); font-weight: 700; }
.att button.on.mint { color: var(--ok); } .att button.on.butter { color: var(--caution); } .att button.on.coral { color: var(--warn); }
.att button.on.navy, .att button.on.lav { color: var(--accent); }
.notebox { background: var(--soft); border-color: var(--line2); }
.notebox.pinned { background: var(--soft); border-color: var(--caution); border-left-width: 2px; }
.target.on { border-color: var(--accent); }
.consent { border-color: var(--line); }
.class-h { background: none; color: var(--ink); padding: 0 0 6px; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-size: 17px; }

/* 달력: 일정은 색 점 + 글자 */
.cal-head h2 { font-size: 18px; }
.cal-card { padding: 0; }
.cal-grid { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); font-weight: 600; }
.cal-cell { border: 0 !important; border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; min-height: 78px; }
.cal-cell.today { background: var(--soft); }
.cal-cell.today .n { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cal-cell.sel { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-dow.sun, .cal-cell.sun .n { color: var(--warn); }
.cal-dow.sat, .cal-cell.sat .n { color: var(--accent); }
.cal .ev { background: none !important; color: var(--ink); font-weight: 500; padding: 0 2px; display: flex; align-items: center; gap: 4px; }
.cal .ev::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; background: var(--kc, var(--muted)); }
.k-regular { --kc: var(--accent); } .k-extra { --kc: var(--ok); } .k-cancel { --kc: var(--warn); }
.k-test { --kc: var(--ink); } .k-exam { --kc: var(--warn); } .k-due { --kc: var(--caution); } .k-hw { --kc: var(--muted); }
.cal-tag, .k-regular, .k-extra, .k-cancel, .k-test, .k-exam, .k-due, .k-hw { background: none !important; color: inherit; }
.cal-tag { padding: 0; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.cal-tag::before { content: ''; width: 6px; height: 6px; background: var(--kc, var(--muted)); border-radius: 50% !important; }
.k-cancel.ev { text-decoration: line-through; color: var(--muted); }
.cal-legend i { width: 7px; height: 7px; background: var(--kc, var(--muted)) !important; }
@media (max-width: 600px) {
  .cal-cell { min-height: 54px; }
  .cal .ev { font-size: 0; width: 6px; height: 6px; padding: 0; }
  .cal .ev::before { width: 6px; height: 6px; }
}

/* 진도 */
.prog-row .chip { min-width: 58px; justify-content: flex-start; }

/* 그래프: 선 = 남색 실선, 반 평균 = 회색 점선 */
.spark > div { background: var(--accent); opacity: .35; border-radius: 0 !important; }
.spark > div.last { opacity: .9; }
.ch .grid { stroke: var(--line2); }
.ch .hb { fill: var(--accent); opacity: .7; }
.ch .avgline { stroke: var(--muted); }
.ch .s0 { stroke: var(--accent); } .ch .s1 { stroke: var(--muted); } .ch .s2 { stroke: var(--ok); }
.ch-legend i.s0 { border-color: var(--accent); } .ch-legend i.s1 { border-color: var(--muted); } .ch-legend i.s2 { border-color: var(--ok); }
.lc { width: 100%; height: auto; display: block; overflow: visible; }
.lc .grid { stroke: var(--line2); stroke-width: 1; }
.lc .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.lc .me { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.lc .avg { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.lc .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.lc .val { fill: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--font); }
.legend { display: flex; gap: 14px; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--accent); margin-right: 6px; vertical-align: middle; }
.legend i.avg { border-top: 1.5px dashed var(--muted); }
.an-c { background: none; padding: 0 4px; border: 1px solid var(--line2); }
.an-c.ok { background: none; color: var(--ok); border-color: var(--ok); }
.an-low td:first-child { color: var(--warn); }

/* 줄 목록 (학부모·학생): 표처럼 가는 선 */
.lines { border-top: 1px solid var(--line); }
.lines > div { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); align-items: baseline; }
.lines .d { flex: 0 0 74px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.lines .t { flex: 1; min-width: 0; }
.lines .r { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.pbar { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.pbar .n { font-weight: 600; }
.pbar .p { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pbar .seg3 { grid-column: 1 / -1; display: flex; height: 8px; background: var(--track); }
.pbar .seg3 i { display: block; height: 100%; }
.pbar .seg3 .done { background: var(--accent); } .pbar .seg3 .doing { background: var(--accent); opacity: .4; }
.pbar .s { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* 인쇄용 성적표: 같은 글꼴·색, 흰 배경 */
.rc-page { --p-ink: #1C1B19; --p-muted: #6B6760; --p-line: #E3DFD6; --p-soft: #F3F1EC; --p-accent: #1F3A5F; --p-accent-ink: #1F3A5F; --p-avg: #8C877E; font-family: var(--font); }
.rc-bar { border-color: var(--line); }
.rc-kpis { gap: 0; border-top: 1px solid var(--p-line); border-bottom: 1px solid var(--p-line); }
.rc-kpi { background: none; border: 0; border-left: 1px solid var(--p-line); padding: 2.5mm 3.5mm; }
.rc-kpi:first-child { border-left: 0; padding-left: 0; }
.rc-kpi .v { font-family: var(--serif); font-weight: 700; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.rc-sec h3 { font-family: var(--serif); border-left: 0; padding: 0 0 1.2mm; border-bottom: 1px solid var(--p-line); }
.rc-att div { background: none; border: 0; border-left: 1px solid var(--p-line); }
.rc-att div:first-child { border-left: 0; }
.rc-att b { font-family: var(--serif); }
.rc-area .bar i { background: var(--p-accent); }
.rc-area.weak .bar i { background: #9A3B2E; }
.rc-area.weak .n, .rc-miss { color: #9A3B2E; }
.rc-comment { background: none; border: 1px solid var(--p-line); }
.rc-chart .val { fill: var(--p-ink); }
.omr-sheet { border: 1px solid var(--line); }
.omr-ans { background: var(--soft); }
.omr-ans.flag, .omr-row.flag { background: #F6EEDC; color: #5C4710; border-color: #D9C38E; }
.omr-choices button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media print {
  body, .rc-page { font-family: var(--font); background: #fff !important; color: #1C1B19; }
  .omr-sheet { border: 0; }
}
.sec-h + .lines, .sec-h + div > .lines:first-child, .lbl + .lines { border-top: 0; }
.sec-h + .tbl-wrap { margin-top: 2px; }
.lines a.t, .lines a { text-decoration: none; } .lines a:hover { text-decoration: underline; }
.lc { max-height: 260px; }
.rc-page { counter-reset: sec; }
.rc-sec h3::before { margin-right: 2.5mm; }
