/* Light, rounded, card-based admin UI. Colours are tokens so a theme change is one place. */
:root {
  --bg:#f5f6fa; --card:#ffffff; --ink:#191f28; --sub:#4e5968; --muted:#8b95a1; --line:#e5e8eb;
  --accent:#5b5bd6; --accent-soft:#eeeefc; --ok:#12a150; --ok-soft:#e6f6ec; --bad:#e5484d; --bad-soft:#fdecec;
  --warn:#f5a524; --radius:16px; --shadow:0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#111317; --card:#1b1e24; --ink:#eceef1; --sub:#b0b8c1; --muted:#7d8592; --line:#2b2f37;
          --accent:#8b8bf5; --accent-soft:#25264a; --ok-soft:#14321f; --bad-soft:#3a1d1e; --shadow:none; }
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font-family:"Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
       background:var(--bg); color:var(--ink); font-size:15px; line-height:1.5; letter-spacing:-0.01em; }
a { color:var(--accent); text-decoration:none; } a:hover { text-decoration:underline; }

/* layout */
body.app { display:grid; grid-template-columns:232px 1fr; min-height:100vh; }
.side { position:sticky; top:0; height:100vh; background:var(--card); border-right:1px solid var(--line);
        display:flex; flex-direction:column; padding:20px 12px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; color:var(--ink); padding:4px 8px 20px; }
.brand:hover { text-decoration:none; }
.logo { width:32px; height:32px; border-radius:10px; background:var(--accent); color:#fff; display:grid; place-items:center; font-size:15px; }
.menu { display:flex; flex-direction:column; gap:2px; } .menu.bottom { margin-top:auto; }
.menu a { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; color:var(--sub); font-weight:500; }
.menu a:hover { background:var(--bg); text-decoration:none; }
.menu a.active { background:var(--accent-soft); color:var(--accent); font-weight:700; }
.ico { width:22px; text-align:center; }
.tabbar { display:none; }
main { padding:28px 32px 48px; max-width:1120px; width:100%; }
body.plain main { margin:0 auto; }

/* type */
h1 { font-size:24px; font-weight:700; margin:4px 0 20px; letter-spacing:-0.02em; }
h2 { font-size:17px; font-weight:700; margin:0 0 12px; } h3 { font-size:15px; margin:20px 0 8px; }
.muted { color:var(--muted); font-weight:400; font-size:.92em; }
.error { color:var(--bad); } .ok { color:var(--ok); }

/* cards */
.card { background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow); border:1px solid var(--line);
        padding:20px; margin-bottom:16px; overflow-x:auto; }
.notice { background:var(--ok-soft); border-color:transparent; color:var(--ok); font-weight:500; }
.narrow { max-width:380px; margin:12vh auto; text-align:center; }
.narrow form { text-align:left; }
.head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.head h1 { margin:0; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:16px; margin-bottom:16px; }
.grid .card { margin-bottom:0; }

/* dashboard numbers */
.stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-bottom:16px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px 18px; }
.stat span { display:block; color:var(--sub); font-size:13px; font-weight:500; }
.stat b { display:block; font-size:28px; font-weight:700; margin-top:4px; letter-spacing:-0.02em; }
.stat.good b { color:var(--ok); } .stat.warn b { color:var(--bad); } .stat.main b { color:var(--accent); }

/* roster rows */
.roster { list-style:none; padding:0; margin:0; }
.roster li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; margin-bottom:6px; background:var(--bg); }
.roster li a { color:var(--ink); font-weight:600; }
.roster li.present { background:var(--ok-soft); }
.roster li.late, .roster li.absent { background:var(--bad-soft); }
.pill { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12.5px; font-weight:600; background:var(--card); color:var(--sub); white-space:nowrap; }
.pill.present { color:var(--ok); } .pill.late, .pill.absent { color:var(--bad); }

/* tables */
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:12px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
th { color:var(--muted); font-weight:500; font-size:13px; }
tr:last-child td { border-bottom:0; }
tr.dim td { opacity:.5; }
td a { color:var(--ink); font-weight:600; }

/* forms */
.form label { display:block; margin-bottom:14px; font-size:14px; color:var(--sub); font-weight:500; }
.form .row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
input, select, textarea { display:block; width:100%; padding:11px 12px; margin-top:6px; font:inherit; color:var(--ink);
  border:1px solid var(--line); border-radius:10px; background:var(--card); }
input:focus, select:focus, textarea:focus { outline:2px solid var(--accent); outline-offset:-1px; border-color:transparent; }
fieldset { border:1px solid var(--line); border-radius:12px; margin:0 0 14px; padding:12px 14px; }
legend { padding:0 6px; font-weight:600; color:var(--ink); }
label.check { display:inline-flex; align-items:center; gap:6px; margin-right:16px; color:var(--ink); }
label.check input { width:18px; height:18px; margin:0; accent-color:var(--accent); }
.inline { display:flex; gap:8px; align-items:center; } .inline.wrap { flex-wrap:wrap; }
.inline input, .inline select { width:auto; margin:0; }
.slot { display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.slot select, .slot input { width:auto; margin:0; }
.row3 { display:grid; grid-template-columns:1fr 1.3fr .8fr auto; gap:8px; margin-bottom:8px; }
.row3 input { margin:0; }
.row3 .button { align-self:center; white-space:nowrap; }
.row3 .notify-box { align-self:center; white-space:nowrap; margin:0; font-size:13px; }
.search { margin-bottom:12px; } .search input { max-width:260px; margin:0; }

/* buttons */
button, .button { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 18px; background:var(--accent); color:#fff;
  border:0; border-radius:10px; font:inherit; font-weight:600; cursor:pointer; text-decoration:none; }
button:hover, .button:hover { filter:brightness(1.05); text-decoration:none; }
.button.ghost, button.ghost { background:var(--accent-soft); color:var(--accent); }
button.danger { background:transparent; color:var(--bad); border:1px solid var(--bad); }
button.link { background:none; color:var(--bad); padding:0; font-weight:500; }
.actions { display:flex; gap:16px; align-items:center; margin-top:8px; }
details { margin-top:8px; } summary { cursor:pointer; }
pre.log { font-size:12px; background:var(--bg); padding:12px; border-radius:10px; overflow-x:auto; white-space:pre; }

.notice.warn-note { background:var(--bad-soft); color:var(--bad); }
a.nolink { text-decoration:none; }
button.small, .button.small { padding:4px 10px; font-size:12.5px; border-radius:8px; }

/* progress and counselling notes */
.note-add { display:flex; gap:8px; align-items:flex-start; margin-bottom:12px; } .note-add.wrap { flex-wrap:wrap; }
.note-add input, .note-add select, .note-add textarea { margin:0; width:auto; } .note-add input[name=content], .note-add textarea { flex:1; min-width:200px; }
ul.notes { list-style:none; padding:0; margin:0; } ul.notes li { border-top:1px solid var(--line); padding:10px 0; }
.note-row { display:grid; grid-template-columns:150px 1fr auto; gap:8px 12px; align-items:start; }
.note-text { white-space:pre-wrap; word-break:break-word; }
.note-edit summary { color:var(--accent); font-size:13px; } .note-edit { grid-column:3; text-align:right; }
.note-edit[open] { grid-column:1 / -1; text-align:left; }
.progress-list { margin:6px 0 0; padding-left:18px; } .progress-list li { margin-bottom:4px; }
@media screen and (max-width:760px) { .note-row { grid-template-columns:1fr auto; } .note-row .muted { grid-column:1 / -1; } .note-add { flex-wrap:wrap; } }

/* monthly report */
.stats.five { grid-template-columns:repeat(5, 1fr); }
.stats.three { grid-template-columns:repeat(3, 1fr); }
.report { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:28px; margin-bottom:24px; max-width:820px; }
.report .stat { box-shadow:none; }
.report-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; }
.report-head h2 { font-size:20px; margin:4px 0; }
.logo.big { width:44px; height:44px; font-size:20px; border-radius:12px; }
table.cal { table-layout:fixed; border-collapse:separate; border-spacing:4px; }
table.cal th { text-align:center; padding:4px; }
table.cal td { vertical-align:top; height:62px; padding:6px; border:0; border-radius:10px; background:var(--bg); white-space:normal; font-size:12px; }
table.cal td:empty { background:transparent; }
.cal .dnum { font-weight:600; color:var(--sub); } .cal .mark { font-weight:700; margin-top:2px; } .cal .t { font-size:11px; color:var(--sub); }
.cal td.present { background:var(--ok-soft); } .cal td.present .mark { color:var(--ok); }
.cal td.late, .cal td.absent { background:var(--bad-soft); } .cal td.late .mark, .cal td.absent .mark { color:var(--bad); }
.cal td.extra { background:var(--accent-soft); } .cal td.extra .mark { color:var(--accent); }
.cal td.future { outline:1px dashed var(--line); background:transparent; }
.legend { font-size:12.5px; margin:10px 0 0; }
.dot { display:inline-block; width:10px; height:10px; border-radius:3px; margin:0 4px 0 10px; vertical-align:-1px; }
.dot.present { background:var(--ok); } .dot.late { background:#f0a3a3; } .dot.absent { background:var(--bad); } .dot.extra { background:var(--accent); }
.note-form { margin-top:18px; } .note-form label { font-weight:600; font-size:14px; }
.note { white-space:pre-wrap; margin:6px 0 0; }
.report .card { box-shadow:none; margin:18px 0 0; }

@media print {
  @page { size:A4; margin:0; }  /* 여백은 .report 의 padding 으로 (인쇄 대화상자 여백 설정과 무관하게 안쪽에 들어오게) */
  :root { color-scheme:light; --bg:#f5f6fa; --card:#fff; --ink:#191f28; --sub:#4e5968; --muted:#8b95a1; --line:#e5e8eb;
          --accent:#5b5bd6; --accent-soft:#eeeefc; --ok-soft:#e6f6ec; --bad-soft:#fdecec; }
  body, body.app { display:block; background:#fff; color:#111; padding:0; }
  .side, .tabbar, .noprint { display:none !important; }
  main { padding:0; max-width:none; }
  .report { border:0; box-shadow:none; padding:16mm 16mm 12mm; margin:0; max-width:none; break-after:page; }
  .report:last-child { break-after:auto; }
  textarea { border:0; padding:0; resize:none; }
  textarea:placeholder-shown { display:none; }
  html, body { width:auto; min-width:0; overflow:visible; }
  main { width:auto; box-sizing:border-box; }
  .report { width:auto; box-sizing:border-box; overflow:hidden; }
  .stats.five { grid-template-columns:repeat(5, minmax(0, 1fr)); gap:8px; }
  .report .stat { padding:10px 12px; min-width:0; } .report .stat b { font-size:22px; }
  table.cal { width:100%; }
  table.cal td { height:56px; padding:4px; font-size:11px; }
  .report-head h2 { overflow-wrap:anywhere; }
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* phone (screen only: a printed A4 page is also < 760px wide) */
@media screen and (max-width:760px) {
  body.app { display:block; padding-bottom:72px; }
  .side { display:none; }
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:10; background:var(--card); border-top:1px solid var(--line);
            padding:6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:11px; color:var(--muted); padding:4px 0; }
  .tabbar a.active { color:var(--accent); font-weight:700; }
  .stats.five { grid-template-columns:repeat(3, 1fr); }
  .report { padding:16px; }
  table.cal td { height:54px; padding:4px; font-size:11px; } .cal .t { display:none; }
  .tabbar .ico { font-size:20px; }
  main { padding:20px 16px 32px; }
  h1 { font-size:21px; }
  .stats { grid-template-columns:repeat(2, 1fr); }
  .form .row, .row3 { grid-template-columns:1fr; }
  .card { padding:16px; }
}

/* one-tap check-in buttons on roster rows */
.roster form.quick { margin:0; }
.roster li > .pill { margin-left:auto; }
.roster .quick button { min-width:64px; }

.tpl-example { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; white-space:pre-wrap; margin:6px 0 12px; }

/* 수납 page */
.payform .scroll { overflow-x:auto; }
table.pay { min-width:980px; }
table.pay select, table.pay input:not([type=checkbox]):not([type=radio]) { margin:0; padding:6px 8px; }
table.pay input.fee, table.pay input.amount { width:96px; text-align:right; }
table.pay input[type=date] { width:140px; }
table.pay td.methods { white-space:nowrap; }
table.pay td.methods label.check { margin-right:8px; }
.stat b.small { font-size:17px; }
@media print { .payform .scroll { overflow:visible; } }
table.pay select[name^=day_] { width:84px; }
table.pay th, table.pay td { padding:8px 5px; }
table.pay td.methods label.check { margin-right:2px; font-size:13px; gap:3px; }
table.pay td.methods input { width:15px; height:15px; }
table.pay input.fee, table.pay input.amount { width:84px; }
table.pay input[type=date] { width:132px; }
table.pay td.overdue { white-space:nowrap; min-width:90px; }
table.pay td.overdue .pill { text-decoration:none; }

/* guardian consent (public page) */
.consent-public { max-width:680px; margin:24px auto; }
.consent-public table { width:100%; border-collapse:collapse; margin:8px 0 12px; font-size:14px; }
.consent-public th, .consent-public td { border:1px solid var(--line); padding:8px 10px; text-align:left; vertical-align:top; }
.consent-public th { background:var(--bg); width:26%; font-weight:600; }
.consent-public h2 { font-size:15px; margin:18px 0 4px; }
.consent-public .actions { margin-top:16px; }
.consent-public td, .consent-public th { white-space:normal; overflow-wrap:anywhere; }
@media (max-width:560px) {
  .consent-public { margin:8px auto; }
  .consent-public table, .consent-public tbody, .consent-public tr, .consent-public th, .consent-public td { display:block; width:100%; box-sizing:border-box; }
  .consent-public tr { border:1px solid var(--line); border-radius:8px; margin-bottom:6px; overflow:hidden; }
  .consent-public th, .consent-public td { border:0; }
  .consent-public th { padding-bottom:0; background:transparent; color:var(--sub); font-size:12px; }
}

/* 시험·성적 */
.bulk { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0 12px; }
.bulk input, .bulk select { margin:0; width:auto; } .bulk input[type=number] { width:76px; }
.examinfo { grid-template-columns:2fr 1fr 1fr 1fr; }
table.qtable td, table.grade td { padding:6px 8px; } table.qtable select, table.grade select, table.qtable input, table.grade input { margin:0; }
table.qtable input[name^=points_] { width:80px; }
table.grade input[name^=wrong_] { min-width:200px; } table.grade select { width:auto; }
td.bad { color:var(--bad); font-weight:600; }
.gradetabs { display:flex; flex-wrap:wrap; gap:6px; }
.transcript h3 { margin:22px 0 8px; } .transcript h4 { margin:12px 0 6px; font-size:14px; }
.goodh { color:var(--ok); } .badh { color:var(--bad); }
.stats.four { grid-template-columns:repeat(4, 1fr); }
svg.trend { width:100%; height:auto; max-height:230px; }
svg.trend .grid { stroke:var(--line); stroke-width:1; } svg.trend .ax { fill:var(--muted); font-size:11px; }
svg.trend .ln { fill:none; stroke:var(--accent); stroke-width:2.5; stroke-linejoin:round; }
svg.trend .dot { fill:var(--card); stroke:var(--accent); stroke-width:2.5; } svg.trend .val { fill:var(--ink); font-size:12px; font-weight:700; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.crow { display:grid; grid-template-columns:1fr 110px 44px; gap:8px; align-items:center; margin-bottom:8px; font-size:13.5px; }
.crow .cname { min-width:0; } .crow .cname .muted { display:block; font-size:12px; }
.cbar { height:9px; background:var(--line); border-radius:99px; overflow:hidden; } .cbar i { display:block; height:100%; background:var(--accent); }
.crow.strong .cbar i { background:var(--ok); } .crow.weak .cbar i { background:var(--bad); } .cpct { font-weight:700; text-align:right; }
.notebox textarea { margin:0; } .report-foot { margin-top:20px; text-align:right; font-size:12px; }
@media screen and (max-width:760px) { .two { grid-template-columns:1fr; } .stats.four { grid-template-columns:repeat(2, 1fr); } .examinfo { grid-template-columns:1fr 1fr; } }
@media print { .transcript .two { grid-template-columns:1fr 1fr; } .stats.four { grid-template-columns:repeat(4, 1fr); } .cbar, .cbar i { -webkit-print-color-adjust:exact; print-color-adjust:exact; } .transcript h3 { break-after:avoid; } .crow { break-inside:avoid; } }
.keyhelp { background:var(--bg); border-radius:10px; padding:8px 12px; font-size:13px; color:var(--sub); margin-bottom:10px; }
.chunks { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:8px; } .chunks .muted { font-size:12.5px; }
table.grid th, table.grid td { padding:4px 2px; text-align:center; } table.grid td.who { text-align:left; white-space:nowrap; padding-right:8px; }
table.grid td.q input { width:34px; height:32px; margin:0; padding:0; text-align:center; font-weight:700; background:var(--bg); border-color:transparent; }
table.grid input.ok { color:var(--ok); background:var(--ok-soft); } table.grid input.ng { color:var(--bad); background:var(--bad-soft); }
table.grid input.part { color:#b26b00; background:#fff4e0; } table.grid input.na { color:var(--muted); }
table.grid td.sum { font-weight:700; min-width:52px; } table.grid td.acts { white-space:nowrap; font-size:12.5px; } table.grid td.acts .link { margin:0 3px; color:var(--sub); }
.savebar { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:12px; }
.pdfbox .inline { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:8px; } .pdfbox input[type=file] { margin:0; width:auto; max-width:100%; }
.aibox { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); } .aibox p { margin:6px 0 0; }
.ai-run { color:var(--sub); } .ai-ok { color:var(--ok); } .ai-err { color:var(--bad); }
table.qtable tr.ai td { background:#fff8db; } table.qtable tr.ai.low td { background:#ffe9c7; }
.aitag { display:inline-block; font-size:11px; font-weight:700; color:#8a6100; background:#ffe9a8; border-radius:6px; padding:0 5px; }
mark { background:#fff8db; padding:0 3px; border-radius:4px; }

/* 더보기 (휴대폰 메뉴) */
.morelist { padding:6px; } .morelist a { display:flex; align-items:center; gap:14px; padding:16px 14px; font-size:16px; font-weight:500; color:var(--ink); border-bottom:1px solid var(--line); }
.morelist a:last-child { border-bottom:0; } .morelist a:hover { text-decoration:none; background:var(--bg); } .morelist .ico { font-size:22px; width:28px; text-align:center; } .morelist a.out { color:var(--bad); }

/* 시험 등록 팝업 */
dialog.modal { border:0; border-radius:16px; padding:0; width:min(520px, calc(100vw - 24px)); max-height:calc(100vh - 24px); box-shadow:0 20px 60px rgba(0,0,0,.25); background:var(--card); color:var(--ink); }
dialog.modal::backdrop { background:rgba(25,31,40,.45); }
dialog.modal form { padding:22px 22px 18px; } dialog.modal h2 { margin:0 0 14px; }
.dropbox { border:1.5px dashed var(--line); border-radius:12px; padding:14px; margin-bottom:14px; } .dropbox p { margin:8px 0 0; font-size:13px; line-height:1.5; } .dropbox label { margin:0; }
.req { color:var(--bad); } p.hint { margin:-4px 0 12px; font-size:12.5px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }
input[type=file]::file-selector-button { font:inherit; font-weight:600; color:#fff; background:var(--accent); border:0; border-radius:8px; padding:7px 14px; margin-right:12px; cursor:pointer; }

.muted-in { opacity:.7; font-weight:400; font-size:12.5px; margin-left:4px; } .card.empty { text-align:center; padding:36px 16px; border-style:dashed; } .card.empty p { margin:6px 0; }

/* 시험 목록 */
.count { margin:-6px 0 10px; } .filterbar { margin-bottom:12px; gap:8px; } .filterbar select { width:auto; margin:0; } .filterbar button { margin:0; }
table.examlist td { padding:12px 8px; } .chip { display:inline-block; margin-left:6px; padding:2px 9px; border-radius:999px; font-size:12px; background:#e9edf5; color:var(--sub); text-decoration:none; }
a.chip:hover { text-decoration:none; background:#dde3ef; }
.tagpill { display:inline-block; padding:3px 11px; border-radius:999px; font-size:12.5px; font-weight:600; white-space:nowrap; background:var(--bg); color:var(--sub); }
.tagpill.tagged { background:#dff3e6; color:#14804a; } .tagpill.partial { background:#fff1d6; color:#9a6200; } .tagpill.running { background:var(--accent-soft); color:var(--accent); }
.tagpill.failed { background:var(--bad-soft); color:var(--bad); }

/* AI 태깅 화면 */
.crumb { margin:0 0 4px; } .tsub { margin:0 0 8px; } .tinfo div { margin:2px 0; font-size:13.5px; }
.tagging .trow { display:grid; grid-template-columns:2fr 1fr 1fr 1fr 1fr; gap:10px; margin-bottom:10px; }
.tagging .trow label { display:flex; flex-direction:column; gap:3px; font-size:12.5px; color:var(--sub); }
.tagging .bulkd { margin-bottom:10px; } .tagging .bulkd summary { cursor:pointer; color:var(--sub); }
.ttable { width:100%; border-collapse:collapse; } .ttable th { text-align:left; font-size:12.5px; color:var(--sub); padding:6px; }
.ttable td { padding:8px 6px; border-top:1px solid var(--line); vertical-align:top; } .ttable td.no { font-weight:700; width:46px; }
.ttable .pts { width:76px; } .ttable td.cc { display:flex; flex-direction:column; gap:6px; max-width:420px; }
.ttable tr.un td { background:#fff8ec; }
.badge.un { align-self:flex-start; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; background:#fff1d6; color:#9a6200; }
.why summary { cursor:pointer; font-size:12.5px; color:var(--accent); } .why p { margin:4px 0 0; font-size:13px; color:var(--sub); }
.tfoot { position:sticky; bottom:0; display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin:12px -16px -16px; padding:12px 16px; background:var(--card, #fff); border-top:1px solid var(--line); }
.tfoot .tstat { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .tfoot .tbtns { display:flex; gap:8px; flex-wrap:wrap; }
@media screen and (max-width:760px) { .tagging .trow { grid-template-columns:1fr 1fr; } .tagging .trow label:first-child { grid-column:1 / -1; } .ttable td.cc { max-width:none; } }

/* 분석 중 모래시계: 천천히 뒤집히며 돈다 */
.hg { display:inline-block; animation:hgflip 1.8s ease-in-out infinite; }
@keyframes hgflip { 0%,15% { transform:rotate(0); } 85%,100% { transform:rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .hg { animation:none; } }

.tagpill.grade-done { background:#dff3e6; color:#14804a; } .tagpill.grade-partial { background:#fff1d6; color:#9a6200; } .tagpill.grade-none, .tagpill.grade-empty { background:var(--bg); color:var(--sub); }

.resdot { color:#14804a; font-weight:700; font-size:12px; }
.button:not(.ghost) .resdot { color:#b8f0cf; }

.examsum { width:100%; border-collapse:collapse; font-size:14px; } .examsum th { text-align:left; color:var(--sub); font-size:12.5px; padding:4px 6px; } .examsum td { padding:6px; border-top:1px solid var(--line); }

/* 취약개념 히트맵 */
.heat { border-collapse:separate; border-spacing:0; font-size:13px; } .heat th { font-weight:600; color:var(--sub); padding:6px 8px; text-align:center; vertical-align:bottom; }
.heat th.grp { border-bottom:1px solid var(--line); border-left:1px solid var(--line); } .heat th.cn { min-width:92px; font-size:12.5px; }
.heat td { padding:4px 5px; text-align:center; border-top:1px solid var(--line); } .heat .stick { position:sticky; left:0; background:var(--card, #fff); text-align:left; font-weight:600; white-space:nowrap; z-index:1; }
.hc { display:inline-block; min-width:62px; padding:6px 4px; border-radius:7px; font-weight:700; background:var(--bg); color:var(--sub); }
.hc.strong { background:#dff3e6; color:#14804a; } .hc.mid { background:#fde7cf; color:#9a5b00; } .hc.weak { background:#fbdcdc; color:#c0272d; }
.heat .avgrow td { border-top:2px solid var(--line); }

.carea { margin:16px 0 4px; color:var(--sub); font-size:14px; }

/* 시험 상세: 기본 정보 + PDF 미리보기 */
.exgrid { display:grid; grid-template-columns:minmax(280px, 1fr) 1.4fr; gap:16px; align-items:start; margin-bottom:16px; }
.exgrid .card { margin-bottom:0; }
.infocard { display:flex; flex-direction:column; gap:10px; } .infocard label { display:flex; flex-direction:column; gap:3px; font-size:12.5px; color:var(--sub); }
.pdfhead { display:flex; justify-content:space-between; align-items:center; } .pdfview { width:100%; height:520px; border:1px solid var(--line); border-radius:8px; margin:8px 0; }
.pdfempty { padding:40px 0; text-align:center; }
.hbtns { display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .hbtns form { margin:0; } .button.danger, button.danger { color:var(--bad); }
.stable { width:100%; border-collapse:collapse; } .stable td { padding:8px 6px; border-top:1px solid var(--line); } .stable td.num { text-align:right; }
.basebox { margin-top:12px; } .basebox input { width:70px; }
td.base input { width:56px; }
@media screen and (max-width:760px) { .exgrid { grid-template-columns:1fr; } .pdfview { height:380px; } }
.setlinks { display:flex; flex-wrap:wrap; gap:10px; align-items:center; } .setlinks h2 { width:100%; margin:0 0 4px; }
