  * { box-sizing: border-box; margin: 0; padding: 0; }
  :root { --page-bg: #eef1f5; --page-fg: #222; --page-sub: #667; }
  /* 스킨 (2026-11-14 원장 요청 "스킨을 취향에 따라 여러 개") — 강조색 변수. html[data-skin] 로 바꿈, 기기마다 저장(vt_skin) */
  :root { --ac: #2563eb; --ac2: #7c3aed; --ac-deep: #1e3a8a; --ac-strong: #1d4ed8; --ac-soft: #eef2ff; --ac-line: #c7d2fe; }
  :root[data-skin="mint"]   { --ac: #0d9488; --ac2: #0891b2; --ac-deep: #115e59; --ac-strong: #0f766e; --ac-soft: #f0fdfa; --ac-line: #99f6e4; --page-bg: #e9f5f3; }
  :root[data-skin="coral"]  { --ac: #e11d48; --ac2: #f97316; --ac-deep: #9f1239; --ac-strong: #be123c; --ac-soft: #fff1f2; --ac-line: #fecdd3; --page-bg: #fbf0f1; }
  :root[data-skin="purple"] { --ac: #7c3aed; --ac2: #db2777; --ac-deep: #4c1d95; --ac-strong: #6d28d9; --ac-soft: #f5f3ff; --ac-line: #ddd6fe; --page-bg: #f2effa; }
  :root[data-skin="forest"] { --ac: #16a34a; --ac2: #65a30d; --ac-deep: #14532d; --ac-strong: #15803d; --ac-soft: #f0fdf4; --ac-line: #bbf7d0; --page-bg: #edf5ee; }
  :root[data-skin="sunny"]  { --ac: #d97706; --ac2: #ea580c; --ac-deep: #78350f; --ac-strong: #b45309; --ac-soft: #fffbeb; --ac-line: #fde68a; --page-bg: #faf5e8; }
  :root[data-skin="night"]  { --ac: #6366f1; --ac2: #a855f7; --ac-deep: #312e81; --ac-strong: #4f46e5; --ac-soft: #eef2ff; --ac-line: #c7d2fe; --page-bg: #1b1f2a; --page-fg: #e6e9ef; --page-sub: #9aa4b2; }
  @media (prefers-color-scheme: dark) { :root { --page-bg: #1e222a; --page-fg: #e6e9ef; --page-sub: #9aa4b2; } }
  :root[data-theme="dark"] { --page-bg: #1e222a; --page-fg: #e6e9ef; --page-sub: #9aa4b2; }
  :root[data-theme="light"] { --page-bg: #eef1f5; --page-fg: #222; --page-sub: #667; }
  /* 시험지·패널 표면은 인쇄물과 동일한 밝은 배경을 의도적으로 유지 */
  body { font-family: "Malgun Gothic", "맑은 고딕", sans-serif; background: var(--page-bg); color: var(--page-fg); }

  /* ---------- 화면 UI ---------- */
  .ui { max-width: 1080px; margin: 0 auto; padding: 16px; }
  header.ui h1 { font-size: 20px; padding: 8px 0 2px; }
  header.ui p { color: var(--page-sub); font-size: 12.5px; }
  .tabs { display: flex; gap: 6px; margin: 14px 0 0; }
  .tabs button { padding: 9px 18px; border: 1px solid #ccd; border-bottom: none; background: #dde3ea;
    border-radius: 8px 8px 0 0; cursor: pointer; font-size: 14px; font-weight: 600; color: #556; }
  .tabs button.on { background: #fff; color: #114; }
  .panel { background: #fff; border: 1px solid #ccd; border-radius: 0 8px 8px 8px; padding: 18px; display: none; }
  .panel.on { display: block; }
  .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 14px; }
  .field label { display: block; font-size: 12px; font-weight: 700; color: #445; margin-bottom: 4px; }
  select, input[type=text], input[type=password], input[type=number], input[type=date] { padding: 7px 9px; border: 1px solid #bbc; border-radius: 6px; font-size: 16px; font-family: inherit; }
  .roundpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
  .roundpick .rp { border: 2px solid #ccd; border-radius: 8px; padding: 10px; cursor: pointer; text-align: center; }
  .roundpick .rp.on { border-color: var(--ac); background: var(--ac-soft); }
  .roundpick .rp b { display: block; font-size: 14px; }
  .roundpick .rp span { font-size: 11.5px; color: #667; }
  button.act { padding: 10px 20px; background: var(--ac); color: #fff; border: none; border-radius: 7px;
    font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
  button.act.gray { background: #64748b; }
  button.act.green { background: #059669; }
  button.act.red { background: #dc2626; }
  button.act:disabled { background: #aab; cursor: default; }
  a.mini { display: inline-block; color: #223; line-height: 1.4; }
  button.mini, a.mini { padding: 4px 10px; font-size: 12px; border: 1px solid #bbc; background: #f6f7f9; border-radius: 5px; cursor: pointer; font-family: inherit; }
  button.mini.on { background: var(--ac); border-color: var(--ac); color: #fff; }

  /* ---------- 학생 현황(선생님용) ---------- */
  .pg-row { border: 1px solid #dde; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
  .pg-row:hover { background: #f6f8ff; }
  .pg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .pg-name { font-weight: 700; font-size: 15px; }
  .pg-chip { font-size: 11.5px; color: #fff; border-radius: 10px; padding: 1px 9px; }
  .pf-tag { font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 1px 9px; background: var(--ac-soft); color: #3730a3; border: 1px solid var(--ac-line); }
  .pf-tag.lv { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
  .pf-tag.none { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; font-weight: 400; }
  .pf-group { font-weight: 800; color: var(--ac-deep); margin: 14px 0 6px; padding-bottom: 3px; border-bottom: 2px solid var(--ac-line); font-size: 14px; }
  .pf-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 4px 0 10px; }
  .pf-bar label { display: block; font-size: 11.5px; font-weight: 700; color: #445; margin-bottom: 3px; }
  .pf-bar select { font-size: 14px; padding: 5px 7px; }
  .pf-edit { border: 1px dashed #93c5fd; background: #f5f9ff; border-radius: 8px; padding: 10px 12px; margin: 4px 0 10px; }
  .spk { border: 0; background: var(--ac-soft); border-radius: 50%; width: 26px; height: 26px; padding: 0; cursor: pointer; font-size: 14px; margin-right: 6px; vertical-align: middle; line-height: 1; }
  .spk:hover { background: #dbe4ff; }
  .spk.big { width: 38px; height: 38px; font-size: 19px; margin: 0 0 0 8px; }
  .plan-card { border: 2px solid var(--ac-line); background: #fafaff; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
  .plan-card .plan-title { font-weight: 800; font-size: 16px; color: var(--ac-deep); }
  .plan-card .plan-title small { font-weight: 400; color: #667; font-size: 12px; margin-left: 6px; }
  .plan-sec { margin-top: 10px; border-radius: 8px; padding: 8px 10px; }
  .plan-sec h4 { margin: 0 0 6px; font-size: 14px; }
  .plan-sec.today { background: #eff6ff; border: 1px solid #bfdbfe; } .plan-sec.today h4 { color: var(--ac-strong); }
  .plan-sec.missed { background: #fef2f2; border: 1px solid #fecaca; } .plan-sec.missed h4 { color: #b91c1c; }
  .plan-sec.next { background: #f0fdf4; border: 1px solid #bbf7d0; } .plan-sec.next h4 { color: #15803d; }
  .plan-sec .ti { margin-bottom: 5px; }
  .plan-sec .pdate { font-size: 12px; color: #b91c1c; font-weight: 700; }
  .plan-days { display: flex; gap: 8px; flex-wrap: wrap; }
  .plan-days label { font-size: 14px; }
  .pf-tag.pl { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
  .pf-tag.warn { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
  .pf-tag.ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
  .pf-tag.exp-soon { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
  .gate-card select { width: 100%; margin-bottom: 8px; font-size: 16px; box-sizing: border-box; }
  .gate-card .pf-row2 { display: flex; gap: 8px; }
  .gate-card .pf-row2 select { flex: 1; min-width: 0; }
  .pg-bar { height: 6px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-top: 7px; }
  .pg-bar i { display: block; height: 100%; background: var(--ac); }
  .pg-sub { font-size: 12.5px; color: #667; margin-top: 5px; }
  .pg-detail { border: 2px solid var(--ac); border-radius: 10px; padding: 14px; margin-top: 10px; background: #fbfcff; }
  .pg-detail h4 { margin: 12px 0 6px; font-size: 13.5px; color: #334; }
  .pg-grid .rlabel { font-size: 12px; font-weight: 700; color: #445; margin: 8px 0 2px; }
  .pg-cell { display: inline-block; width: 22px; height: 22px; margin: 1px; border-radius: 4px; background: #e5e7eb; color: #8a93a3; font-size: 10px; line-height: 22px; text-align: center; }
  .pg-cell.g { background: #16a34a; color: #fff; }
  .pg-cell.a { background: #f59e0b; color: #fff; }
  .pg-cell.r { background: #dc2626; color: #fff; }
  .wk { border: 1px solid #dbe3f0; border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 12px; }
  .wk-h { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-size: 13px; color: #445; margin-bottom: 8px; }
  .wk-h > b:first-child { font-size: 14px; color: var(--ac-deep); }
  .wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .wk-dh { text-align: center; font-size: 12px; font-weight: 700; color: #556; }
  .wk-dh.sat { color: #2563eb; } .wk-dh.sun { color: #dc2626; }
  .wk-c { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; min-height: 58px; border: 1px solid #e5e7eb;
    border-radius: 8px; background: #f8fafc; color: #334; font: inherit; cursor: pointer; }
  .wk-c.dark { color: #fff; border-color: transparent; }
  .wk-c.today { border: 2px solid #f59e0b; }
  .wk-c.sel { outline: 3px solid var(--ac-deep); outline-offset: 1px; }
  .wk-c.fut { background: transparent; border-style: dashed; color: #b6bcc8; cursor: default; }
  .wk-c .wk-d { font-size: 11px; opacity: .8; }
  .wk-c b { font-size: 17px; line-height: 1.1; } .wk-c b small { font-size: 11px; font-weight: 400; }
  .wk-c .wk-t { font-size: 11px; opacity: .85; }
  .wk-avg { text-align: center; font-size: 11px; color: #667; }
  .wk-idle { margin-top: 8px; font-size: 12.5px; color: #b45309; }
  .wk-det { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #eef4ff; font-size: 13px; }
  .wk-who { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
  .wk-p { background: #fff; border: 1px solid var(--ac-line); border-radius: 999px; padding: 2px 9px; }
  .wk-p small { color: #667; }
  .wk-miss { margin-top: 5px; font-size: 12.5px; color: #778; }
  /* ---- 학생 관리: 학원 구분 · 한 줄 목록 ---- */
  .sm-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; font-size: 15px; color: #223; }
  .sm-top .sm-book { font-size: 12.5px; color: #778; }
  .sm-top .sm-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
  .acad-seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .acad-seg button { border: 1px solid var(--ac-line); background: #fff; color: #334; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .acad-seg button small { font-weight: 400; color: #889; margin-left: 2px; }
  .acad-seg button.on { background: var(--ac-deep); border-color: var(--ac-deep); color: #fff; }
  .acad-seg button.on small { color: var(--ac-line); }
  .sm-help { margin: 0 0 10px; font-size: 13px; } .sm-help summary { cursor: pointer; color: #556; font-weight: 700; }
  .sm-create { margin: 6px 0 12px; border: 1px solid #dbe3f0; border-radius: 10px; padding: 8px 12px; background: #fbfcff; }
  .sm-create summary { cursor: pointer; font-weight: 700; color: var(--ac-strong); }
  .pf-tag.ac { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
  .sr { border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; margin-bottom: 6px; }
  .sr.open { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,.08); }
  .sr-main { display: flex; align-items: center; gap: 6px 10px; padding: 9px 12px; cursor: pointer; flex-wrap: wrap; }
  .sr-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
  .sr-name { font-weight: 800; color: #1f2937; min-width: 84px; }
  .sr-name small { font-weight: 400; color: #778; font-size: 12px; margin-left: 2px; }
  .sr-chips { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; flex: 1 1 auto; font-size: 12.5px; }
  .sr-last { font-weight: 700; min-width: 44px; }
  .sr-chip { font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 1px 8px; border: 1px solid #e5e7eb; background: #f8fafc; color: #445; }
  .sr-chip.ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
  .sr-chip.pl { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
  .sr-chip.warn { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
  .sr-prog { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #445; margin-left: auto; }
  .sr-bar { width: 70px; height: 7px; background: #e5e7eb; border-radius: 4px; overflow: hidden; display: inline-block; }
  .sr-bar i { display: block; height: 100%; background: var(--ac); }
  .sr-caret { color: #99a; transition: transform .15s; }
  .sr.open .sr-caret { transform: rotate(90deg); }
  .sr.open .sr-body { padding: 0 12px 12px; border-top: 1px dashed #e5e7eb; }
  .sr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
  .sr-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
  @media (max-width: 560px) { .sr-name { min-width: 0; } .sr-bar { width: 44px; } }
  /* ---- 오늘 학부모 보고서 ---- */
  .dr { border: 1px solid var(--ac-line); border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 12px; }
  .dr-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13.5px; }
  .dr-h > b { color: var(--ac-deep); font-size: 14.5px; }
  .dr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
  .dr-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; background: #f8fafc; display: flex; flex-direction: column; gap: 6px; }
  .dr-item.idle { background: #fffbeb; }
  .dr-item pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-family: inherit; font-size: 12.5px; line-height: 1.5; color: #223; }
  .dr-item .dr-copy { align-self: flex-end; }
  /* ---- 학생 오답노트 ---- */
  .note { margin-top: 10px; }
  .note-books, .note-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
  .note-books button, .note-tabs button { border: 1px solid var(--ac-line); background: #fff; color: #334; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .note-books button small { font-weight: 400; color: #889; }
  .note-books button.on { background: var(--ac-deep); border-color: var(--ac-deep); color: #fff; } .note-books button.on small { color: var(--ac-line); }
  .note-tabs button { border-radius: 8px; background: #f8fafc; }
  .note-tabs button.on { background: #eff6ff; border-color: var(--ac); color: var(--ac-strong); }
  .note-tabs button.due { border-color: #f59e0b; color: #b45309; }
  .note-tabs button.due.on { background: #fffbeb; }
  .note-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
  .note-filters select { font-size: 14px; padding: 5px 8px; }
  .note-bar { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; padding: 8px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
  .note-bar .nb-cnt { color: #667; margin-right: auto; }
  .note-opt { font-size: 13px; margin-bottom: 4px; } .note-opt summary { cursor: pointer; color: #556; }
  .note-w .nw-chk { flex: 0 0 auto; }
  .note-w .nw-src { display: block; color: #889; font-size: 12px; margin-top: 1px; }
  .note-w .nw-streak { color: #16a34a; font-weight: 700; }
  .note-test { border: 1px solid #e3e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: #fff; }
  .nt-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13.5px; }
  .nt-h .nt-sc { font-weight: 700; color: var(--ac-strong); } .nt-h .nt-left { color: #667; font-size: 12.5px; margin-right: auto; }
  .nt-words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
  .nt-w { font-size: 12.5px; border-radius: 999px; padding: 2px 9px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
  .nt-w.ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
  .ga-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; }
  .ga-item { font-size: 13.5px; font-weight: 400; white-space: nowrap; cursor: pointer; }
  .ga-item small { color: #889; font-size: 11.5px; }
  /* ---- 학부모 보고서 페이지 (?r=) ---- */
  #parentReport { display: none; }
  body.report-mode #parentReport { display: block; }
  body.report-mode .ui, body.report-mode #gate, body.report-mode #quizov, body.report-mode #paperwrap, body.report-mode #dictModal, body.report-mode #buildBadge { display: none !important; }
  .rp-wrap { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; }
  .rp-head { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; border-radius: 14px; padding: 16px 16px 14px; margin-bottom: 12px; }
  .rp-brand { font-size: 12.5px; opacity: .85; letter-spacing: .5px; }
  .rp-name { font-size: 22px; font-weight: 800; margin-top: 4px; } .rp-name small { font-size: 13px; font-weight: 400; opacity: .9; }
  .rp-date { font-size: 12.5px; opacity: .9; margin-top: 4px; } .rp-date a { color: #fff; }
  .rp-card { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
  .rp-card h3 { margin: 0 0 8px; font-size: 15px; color: #1f2937; } .rp-card h3 small { font-weight: 400; color: #778; font-size: 12px; margin-left: 4px; }
  .rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; margin-bottom: 8px; }
  .rp-kpis div { background: #eff6ff; border-radius: 10px; padding: 8px; text-align: center; }
  .rp-kpis b { display: block; font-size: 18px; color: #1e3a8a; } .rp-kpis span { font-size: 11.5px; color: #667; }
  .rp-row { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed #edf0f5; font-size: 13.5px; }
  .rp-when { color: #778; font-size: 12.5px; min-width: 90px; } .rp-lb { flex: 1 1 auto; color: #223; }
  .rp-sc { font-weight: 800; } .rp-sc.g { color: #16a34a; } .rp-sc.a { color: #d97706; } .rp-sc.r { color: #dc2626; }
  .rp-ms { font-size: 12px; color: #667; }
  .rp-wrong { margin-top: 8px; font-size: 13px; color: #b91c1c; background: #fef2f2; border-radius: 8px; padding: 6px 8px; }
  .rp-none { color: #667; margin: 4px 0; } .rp-none small { color: #99a; }
  .rp-sub { font-weight: 700; font-size: 13.5px; margin: 6px 0 2px; color: #334; } .rp-sub.warn { color: #b91c1c; } .rp-sub.ok { color: #166534; }
  .rp-unit { font-size: 13px; color: #445; padding: 2px 0 2px 4px; }
  .rp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .rp-dh { text-align: center; font-size: 12px; font-weight: 700; color: #556; } .rp-dh.sat { color: #2563eb; } .rp-dh.sun { color: #dc2626; }
  .rp-dc { display: flex; flex-direction: column; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; padding: 4px 1px; min-height: 52px; background: #f8fafc; }
  .rp-dc i { font-style: normal; font-size: 10.5px; color: #889; } .rp-dc b { color: #16a34a; font-size: 15px; line-height: 1.2; } .rp-dc small { font-size: 10px; color: #667; }
  .rp-dc.on { background: #ecfdf5; border-color: #86efac; } .rp-dc.today { border: 2px solid #f59e0b; } .rp-dc.fut { background: transparent; border-style: dashed; }
  .rp-word { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px dashed #edf0f5; font-size: 13.5px; }
  .rp-word b { min-width: 110px; } .rp-word span { flex: 1; color: #445; } .rp-word em { font-style: normal; color: #b91c1c; font-weight: 700; font-size: 12.5px; }
  .rp-foot { text-align: center; font-size: 11.5px; color: #99a; margin-top: 16px; line-height: 1.6; }
  .resume-card { border: 2px solid #16a34a; background: #f0fdf4; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
  /* 응시 중: 화면 맨 위에서 아래로 쓸어도 브라우저가 새로고침하지 않게(안드로이드 크롬 '당겨서 새로고침') */
  html.quiz-open, html.quiz-open body { overscroll-behavior-y: none; }
  html.quiz-open #quizov { overscroll-behavior: contain; }
  .resume-card .rc-t { font-weight: 800; color: #166534; font-size: 14.5px; }
  .resume-card .rc-b { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; margin: 4px 0 8px; font-size: 13.5px; color: #334; }
  .resume-card .rc-b span { color: #667; font-size: 12.5px; }
  .resume-card .rc-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .pg-cell.has { cursor: pointer; }
  .pg-cell.sel { outline: 3px solid var(--ac-deep); outline-offset: 1px; }
  .pg-att { margin-top: 10px; border: 1px solid var(--ac-line); border-radius: 8px; background: #fff; padding: 10px 12px; font-size: 13px; }
  .pg-att-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid #e5e7eb; }
  .pg-att-h b:first-child { font-size: 14px; color: var(--ac-deep); }
  .pg-att-r { display: flex; flex-wrap: wrap; gap: 3px 12px; padding: 7px 0; border-bottom: 1px dashed #e5e7eb; }
  .pg-att-r:last-child { border-bottom: 0; padding-bottom: 0; }
  .pg-att-n { font-weight: 700; color: #334; min-width: 26px; }
  .pg-att-sc { font-weight: 700; }
  .pg-att-sc.g { color: #16a34a; } .pg-att-sc.a { color: #d97706; } .pg-att-sc.r { color: #dc2626; }
  .rm { margin-top: 8px; }
  .rm-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
  .rm-book { flex: 0 0 44px; font-size: 12px; font-weight: 700; color: #334; }
  .rm-steps { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .rm-step { position: relative; height: 28px; border-radius: 6px; background: #e5e7eb; overflow: hidden; }
  .rm-step i { position: absolute; left: 0; top: 0; bottom: 0; background: #93c5fd; }
  .rm-step.full i { background: #4ade80; }
  .rm-step span { position: relative; z-index: 1; display: block; text-align: center; font-size: 11.5px; font-weight: 700; color: #334; line-height: 15px; padding-top: 1px; }
  .rm-step small { position: relative; z-index: 1; display: block; text-align: center; font-size: 9.5px; color: #556; line-height: 10px; }
  .rm-step.cred i { background: #5eead4; }
  .rm-step.pend { background: #fff; border: 1.5px dashed #f59e0b; }
  .rm-step.pend i { background: #fde68a; }
  .pl-req { border: 2px solid #f59e0b; background: #fffbeb; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
  .pl-req .pl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed #f3d9a0; font-size: 13px; }
  .pl-req .pl-row:first-of-type { border-top: none; }
  .rm-step.cur { outline: 2px solid var(--ac); outline-offset: -1px; }
  .rm-step.cur::after { content: '📍'; position: absolute; right: 2px; top: -1px; font-size: 11px; z-index: 2; }
  .pg-legend { font-size: 11.5px; color: #667; margin-top: 6px; }
  .pg-legend .pg-cell { width: 12px; height: 12px; line-height: 12px; vertical-align: middle; margin: 0 2px 0 8px; }
  .hint { font-size: 12px; color: #778; margin: 6px 0; }
  .testlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-height: 260px; overflow-y: auto; }
  .testlist .ti { display: flex; gap: 10px; align-items: center; border: 1px solid #dde; border-radius: 7px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
  .testlist .ti.on { border-color: var(--ac); background: var(--ac-soft); }
  .testlist .ti .del { margin-left: auto; }
  .gradegrid { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
  #buildBadge { position: fixed; right: 10px; bottom: 8px; z-index: 101; font-size: 11px;
    color: #8a90a6; background: rgba(255,255,255,.82); border: 1px solid #e2e5f0;
    border-radius: 999px; padding: 3px 10px; pointer-events: none; }
  @media print { #buildBadge { display: none !important; } }
  .daypick { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; max-width: 640px; }
  @media (max-width: 520px) { .daypick { grid-template-columns: repeat(5, minmax(0, 1fr)); } } /* 휴대폰: 10칸이면 화면보다 넓어져 가로로 밀린다 */
  .daypick label { display: flex; align-items: center; justify-content: center; gap: 3px; border: 1.5px solid #ccd; border-radius: 6px; padding: 5px 2px; font-size: 12.5px; cursor: pointer; user-select: none; background: #fff; }
  .daypick label:hover { border-color: #6a7cff; }
  .daypick label.on { background: #eef1ff; border-color: #6a7cff; color: #26307a; font-weight: 700; }
  .daypick input { margin: 0; }
  .dayctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .dayctl input[type=number] { width: 62px; padding: 5px 6px; }
  .daysum { font-size: 13px; color: #445; font-weight: 600; }
  .daysum b { color: #26307a; }
  .gg { width: 92px; border: 1.5px solid #ccd; border-radius: 7px; padding: 5px 4px; text-align: center; cursor: pointer; user-select: none; }
  .gg .n { font-weight: 700; font-size: 13px; }
  .gg .w { font-size: 11px; color: #667; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gg.wrong { border-color: #dc2626; background: #fef2f2; }
  .gg.wrong .n { color: #dc2626; }
  .wordlist { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
  .wl { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #eef; padding: 6px 4px; font-size: 13.5px; }
  .wl b { min-width: 130px; }
  .wl .m { color: #556; flex: 1; }
  .wl .src { font-size: 11px; color: #99a; }

  /* ---------- 휴대폰(선생님 화면 포함): 좁은 칸에 욱여넣어 글자가 한 글자씩 세로로 쪼개지지 않게 ---------- */
  @media (max-width: 560px) {
    .ui { padding: 10px; }
    header.ui h1 { font-size: 17px; }
    .hdr-desc { display: none; }
    /* 탭: 한 줄에 5~6개를 욱여넣지 않고 3개씩 두 줄로, 모두 보이게 */
    .tabs { flex-wrap: wrap; gap: 5px; margin-top: 10px; }
    .tabs button { flex: 1 1 calc(33.33% - 5px); padding: 8px 4px; font-size: 13px; white-space: nowrap;
      border-bottom: 1px solid #ccd; border-radius: 8px; }
    .tabs button.on { background: var(--ac); border-color: var(--ac); color: #fff; }
    .panel { padding: 12px; border-radius: 8px; margin-top: 8px; }
    /* 회차 카드: 5개 한 줄 → 3개씩 */
    .roundpick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .roundpick .rp { padding: 8px 4px; }
    /* 목록 줄(학생·오답·배정 등): 버튼이 눌려 찌그러지지 않게 넘치면 다음 줄로 */
    .wl { flex-wrap: wrap; gap: 6px 8px; }
    .wl b { min-width: 0; }
    .wl .m { flex: 1 1 55%; min-width: 0; }
    .wl button, .testlist .ti button { flex: 0 0 auto; white-space: nowrap; }
    .testlist .ti { flex-wrap: wrap; }
    /* 시험지·암기지 미리보기는 인쇄용 A4 폭 그대로 두고, 페이지 전체가 아니라 미리보기 칸 안에서만 옆으로 넘겨 본다 */
    #paperwrap { overflow-x: auto; padding: 10px 0 40px; }
  }
  .statbar { display: flex; gap: 18px; font-size: 13px; color: #445; margin-bottom: 10px; }
  .previewwrap { margin-top: 18px; border-top: 2px dashed #ccd; padding-top: 14px; }
  .previewwrap .pvtitle { font-size: 13px; font-weight: 700; color: #445; margin-bottom: 8px; }

  /* ---------- 인쇄 영역 ---------- */
  #paperwrap { padding: 16px 0 50px; }
  #paper { background: #fff; width: 210mm; min-height: 50mm; margin: 0 auto; padding: 12mm;
    box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  #paper:empty { display: none; }
  .optchk { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 1px solid #bbc; border-radius: 6px; padding: 8px 10px; background: #f8fafc; }
  .optchk label { font-size: 13px; font-weight: 400; color: #223; white-space: nowrap; cursor: pointer; }

  .sheet-head { border: 2px solid #222; border-radius: 6px; padding: 8px 12px; margin-bottom: 5mm; }
  .sheet-head .t1 { font-size: 15pt; font-weight: 800; }
  .sheet-head .t2 { font-size: 9.5pt; color: #333; margin-top: 2px; }
  .sheet-head .blanks { display: flex; gap: 18px; margin-top: 6px; font-size: 10pt; }
  .sheet-head .blanks span { border-bottom: 1px solid #222; min-width: 110px; display: inline-block; }

  .qcols { column-count: 2; column-gap: 8mm; }
  .qcols.single { column-count: 1; }          /* 보기가 긴 회차: 1단으로 안전하게 */
  .q { break-inside: avoid; page-break-inside: avoid; -webkit-column-break-inside: avoid;
       margin-bottom: 3.4mm; font-size: 10pt; line-height: 1.45; }
  .q .qh { font-weight: 700; }
  .q .qh .wd { font-size: 11pt; }
  .q .pron { font-weight: 400; color: #444; font-size: 9pt; }
  .q .stem { margin: 0.6mm 0; color: #111; }
  .q .chs { display: flex; flex-wrap: wrap; column-gap: 4.5mm; row-gap: 0.5mm; }
  .q .chs span { white-space: nowrap; }
  .q .chs span.long { white-space: normal; }

  .anskey { break-before: page; page-break-before: always; }
  .anskey h2 { font-size: 13pt; border-bottom: 2px solid #222; padding-bottom: 4px; margin-bottom: 4mm; }
  .anskey .akcols { column-count: 3; column-gap: 8mm; font-size: 9.5pt; line-height: 1.7; }

  .memhead { border-bottom: 3px double #222; padding-bottom: 6px; margin-bottom: 4mm; }
  .memhead .t1 { font-size: 14pt; font-weight: 800; }
  .memhead .t2 { font-size: 9.5pt; color: #444; margin-top: 3px; }
  .card { break-inside: avoid; border: 1px solid #999; border-radius: 5px; padding: 3mm; margin-bottom: 3mm; font-size: 9.5pt; line-height: 1.5; }
  .card .cw { font-size: 12pt; font-weight: 800; }
  .card .cp { color: #555; font-size: 9pt; margin-left: 4px; }
  .card .csrc { float: right; font-size: 8pt; color: #888; }
  .card .sec { margin-top: 1mm; }
  .card .sec b.lb { color: #1d4ed8; font-size: 8.5pt; margin-right: 3px; }
  .card .chkbox { float: right; width: 5mm; height: 5mm; border: 1.5px solid #555; border-radius: 2px; margin-left: 3mm; }
  /* PDF 저장용 용지(html2pdf가 화면 밖 A4 본문 폭 틀에 복제해 그린다). html2canvas는 CSS 다단을 못 그려 2단은 격자로 바꾼다 */
  .pdfpaper { background: #fff; color: #000; }
  .pdfpaper [style*="column-count"] { column-count: auto !important; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6mm; align-items: start; }

  /* ---------- 로그인 게이트 ---------- */
  #gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
    background: radial-gradient(1100px 600px at 18% -8%, rgba(37,99,235,.14), transparent 60%),
                radial-gradient(900px 500px at 100% 100%, rgba(124,58,237,.10), transparent 55%),
                var(--page-bg); }
  .gate-card { position: relative; overflow: hidden; background: #fff; border: 1px solid #ccd; border-radius: 14px; padding: 30px 28px 28px; width: 380px; max-width: 100%; box-shadow: 0 10px 32px rgba(30,40,90,.14); box-sizing: border-box; }
  .gate-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg,var(--ac),var(--ac2)); }
  .gate-card .badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .gate-card .brand-badge { display: inline-block; background: linear-gradient(90deg,var(--ac),var(--ac2)); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .2px; padding: 4px 11px; border-radius: 999px; }
  .gate-card .brand-name { font-size: 24px; font-weight: 800; line-height: 1.25; background: linear-gradient(90deg,var(--ac),var(--ac2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .gate-card .brand-sub { font-size: 13.5px; font-weight: 700; color: #334; margin-top: 2px; margin-bottom: 14px; }
  .gate-card .product-line { font-size: 12.5px; color: #334; background: #f4f6fb; border: 1px solid #e3e7f0; border-radius: 8px; padding: 8px 11px; margin-bottom: 18px; }
  .gate-card h2 { margin-bottom: 4px; font-size: 20px; color: #114; }
  .gate-card .sub { color: #667; font-size: 12.5px; margin-bottom: 16px; }
  .gate-card input { width: 100%; margin-bottom: 8px; font-size: 16px; box-sizing: border-box; }
  .gate-card button.act { width: 100%; margin-top: 4px; }
  .gate-card .links { margin-top: 12px; font-size: 12px; color: #778; text-align: center; }
  .gate-card .links a { color: var(--ac); text-decoration: none; cursor: pointer; }
  #loginMsg { color: #dc2626; font-size: 12.5px; min-height: 16px; margin-top: 6px; }
  #userBar { font-size: 12.5px; }
  #bookSel { max-width: 60vw; }
  @media (max-width: 480px){ #bookSel { max-width: 100%; display: block; margin-top: 4px; } }
  .rolechip { background: var(--ac-deep); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; margin: 0 4px; }
  .scorechip { background: #eef4ff; border: 1px solid #bcd; color: var(--ac-deep); border-radius: 10px; padding: 1px 8px; font-size: 12px; }

  /* ---------- 온라인 응시 (다크 퀴즈 UI) ---------- */
  #quizov { position: fixed; inset: 0; z-index: 50; flex-direction: column; color: #fff;
    background: radial-gradient(1100px 700px at 72% 12%, #241d3e 0%, #17141f 55%, #121016 100%); }
  .qz-top { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: rgba(10,8,14,.72); }
  .qz-badge { flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg,#f43f5e,#ec4899);
    display: flex; align-items: center; justify-content: center; font-size: 18px; }
  .qz-count b, .qz-pct b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
  .qz-count span, .qz-pct span { font-size: 11px; color: #9a93ad; }
  .qz-pct { text-align: right; }
  .qz-bar { flex: 1; height: 8px; background: #2a2438; border-radius: 4px; overflow: hidden; max-width: 430px; margin: 0 auto; }
  #qzBarFill { height: 100%; width: 0; background: linear-gradient(90deg,#8b5cf6,#ec4899); border-radius: 4px; transition: width .3s; }
  .qz-quit { background: none; border: 1px solid #453c5c; color: #b9b2cc; border-radius: 8px; padding: 6px 12px;
    cursor: pointer; font-family: inherit; font-size: 12px; }
  .qz-body { flex: 1; overflow-y: auto; padding: 28px 24px 10px; width: 100%; max-width: 900px; margin: 0 auto; }
  .qz-sub { color: #8d86a3; font-size: 12.5px; margin-bottom: 14px; }
  .qz-qrow { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
  .qz-qnum { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #7c3aed; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
  .qz-qtext { font-size: 23px; font-weight: 800; line-height: 1.45; }
  .qz-word { font-size: 30px; letter-spacing: .3px; }
  .qz-pron { font-size: 15px; color: #9a93ad; font-weight: 400; margin-left: 6px; }
  .qz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 8px; }
  .qz-ch { position: relative; display: flex; align-items: center; justify-content: center; min-height: 92px;
    padding: 20px 18px 16px; border-radius: 16px; cursor: pointer; font-family: inherit; font-size: 17px; font-weight: 600;
    color: #ece8f6; background: rgba(255,255,255,.03); border: 1.5px solid #453c5c; text-align: center; line-height: 1.4;
    transition: transform .12s, background-color .12s, box-shadow .12s; }
  .qz-ch:hover { transform: translateY(-2px); }
  .qz-ch .qz-key { position: absolute; top: 10px; left: 12px; width: 22px; height: 22px; border-radius: 6px;
    background: rgba(255,255,255,.10); color: #cfc8e0; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; }
  .qz-ch.c0 { border-color: #8b5cf6; background: rgba(139,92,246,.10); }
  .qz-ch.c1 { border-color: #ec4899; background: rgba(236,72,153,.10); }
  .qz-ch.c2 { border-color: #14b8a6; background: rgba(20,184,166,.10); }
  .qz-ch.c3 { border-color: #f59e0b; background: rgba(245,158,11,.10); }
  .qz-ch.c4 { border-color: #22c55e; background: rgba(34,197,94,.10); }
  .qz-ch.sel { border-width: 2.5px; background-color: rgba(255,255,255,.13);
    box-shadow: 0 6px 26px rgba(139,92,246,.35); }
  .qz-ch.sel .qz-key { background: #fff; color: #17141f; }
  .qz-foot { display: flex; align-items: center; gap: 14px; padding: 12px 24px 20px; width: 100%; max-width: 900px; margin: 0 auto; }
  .qz-keyhint { flex: 1; text-align: center; color: #8d86a3; font-size: 13px; }
  .qz-keyhint b { background: #2a2438; border-radius: 4px; padding: 1px 7px; color: #cfc8e0; font-weight: 700; }
  .qz-navbtn { background: none; border: 1px solid #453c5c; color: #d6d0e4; padding: 10px 18px; border-radius: 10px;
    cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700; }
  .qz-navbtn.submit { background: linear-gradient(135deg,#7c3aed,#ec4899); border: none; color: #fff; }
  .qz-res { text-align: center; padding: 26px 0; color: #ece8f6; }
  .qz-res .score { font-size: 56px; font-weight: 800; margin: 12px 0;
    background: linear-gradient(90deg,#a78bfa,#f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .qz-wrongs { text-align: left; margin-top: 20px; border-top: 1px solid #2a2438; padding-top: 14px; }
  #quizov .wl { border-bottom: 1px solid #2a2438; }
  #quizov .wl .m { color: #b9b2cc; }

  /* ========== 응시 화면 테마 ========== */
  .qz-theme { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; }
  .qz-theme button { background: rgba(255,255,255,.06); border: 1px solid #453c5c; color: #b9b2cc;
    border-radius: 8px; padding: 5px 10px; cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 700; }
  .qz-theme button.on { background: #7c3aed; border-color: #7c3aed; color: #fff; }
  /* 휴대폰: 상단 바를 두 줄로 정리(글자가 한 글자씩 줄바꿈되지 않게) */
  @media (max-width: 560px) {
    .qz-top { flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; }
    .qz-badge { order: 1; width: 30px; height: 30px; font-size: 15px; }
    .qz-count { order: 2; white-space: nowrap; }
    .qz-pct { order: 3; margin-left: auto; white-space: nowrap; }
    .qz-quit { order: 4; white-space: nowrap; padding: 5px 10px; }
    .qz-count span, .qz-pct span { display: none; }
    .qz-top .qz-bar { order: 5; flex: 1 1 100%; max-width: none; margin: 0; }
    .qz-theme { order: 6; flex: 1 1 100%; margin: 0; }
    .qz-theme button { flex: 1; white-space: nowrap; padding: 5px 4px; font-size: 11px; }
  }

  /* --- ①-B 카드형(밝은) : 부드러운 배경 + 파스텔 컬러 타일 --- */
  #quizov.t-card2 { color: #23213a;
    background: radial-gradient(1200px 760px at 78% 8%, #eef2ff 0%, #f6f4ff 42%, #fdf2f8 100%); }
  .t-card2 .qz-top { background: rgba(255,255,255,.82); border-bottom: 1px solid #e6e3f5; }
  .t-card2 .qz-count b, .t-card2 .qz-pct b { color: #23213a; }
  .t-card2 .qz-count span, .t-card2 .qz-pct span, .t-card2 .qz-sub, .t-card2 .qz-keyhint { color: #7a7396; }
  .t-card2 .qz-bar { background: #e6e3f5; }
  .t-card2 #qzBarFill { background: linear-gradient(90deg,#6366f1,#d946ef); }
  .t-card2 .qz-quit, .t-card2 .qz-navbtn { border-color: #d9d5ee; color: #4b4570; background: rgba(255,255,255,.7); }
  .t-card2 .qz-theme button { background: rgba(255,255,255,.7); border-color: #d9d5ee; color: #6b6490; }
  .t-card2 .qz-theme button.on { background: #6366f1; border-color: #6366f1; color: #fff; }
  .t-card2 .qz-qnum { background: linear-gradient(135deg,#6366f1,#d946ef); }
  .t-card2 .qz-qtext { color: #23213a; }
  .t-card2 .qz-pron { color: #8b84a8; }
  .t-card2 .qz-ch { color: #2a2740; background: #fff !important; border-width: 2px !important;
    box-shadow: 0 2px 10px rgba(80,70,140,.07); }
  .t-card2 .qz-ch:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,.18); }
  .t-card2 .qz-ch .qz-key { background: #f1effc; color: #6b6490; }
  .t-card2 .qz-ch.c0 { border-color: #6366f1 !important; background: #f4f4ff !important; }
  .t-card2 .qz-ch.c1 { border-color: #d946ef !important; background: #fdf3ff !important; }
  .t-card2 .qz-ch.c2 { border-color: #0ea5e9 !important; background: #f0faff !important; }
  .t-card2 .qz-ch.c3 { border-color: #f59e0b !important; background: #fffaf0 !important; }
  .t-card2 .qz-ch.c4 { border-color: #10b981 !important; background: #f0fdf7 !important; }
  .t-card2 .qz-ch.sel { box-shadow: 0 6px 22px rgba(99,102,241,.30); font-weight: 800;
    background: #eef0ff !important; }
  .t-card2 .qz-ch.sel .qz-key { background: #6366f1; color: #fff; }
  .t-card2 .qz-keyhint b { background: #ebe8fa; color: #4b4570; }
  .t-card2 .qz-navbtn.submit { background: linear-gradient(135deg,#6366f1,#d946ef); border: none; color: #fff; }
  .t-card2 .qz-res { color: #23213a; }
  .t-card2 .qz-res .score { background: linear-gradient(90deg,#6366f1,#d946ef);
    -webkit-background-clip: text; background-clip: text; }
  .t-card2 .qz-wrongs { border-top-color: #e6e3f5; }
  #quizov.t-card2 .wl { border-bottom-color: #eeecf8; }
  #quizov.t-card2 .wl .m { color: #6b6490; }

  /* --- ② 목록형(구글폼 스타일) : 밝고 단정, 보기 세로 나열 --- */
  #quizov.t-form { background: #f1f3f8; color: #1f2330; }
  .t-form .qz-top { background: #fff; border-bottom: 1px solid #e2e6f0; }
  .t-form .qz-count b, .t-form .qz-pct b { color: #1f2330; }
  .t-form .qz-count span, .t-form .qz-pct span, .t-form .qz-sub, .t-form .qz-keyhint { color: #6b7285; }
  .t-form .qz-bar { background: #e2e6f0; }
  .t-form .qz-quit, .t-form .qz-navbtn { border-color: #ccd2e0; color: #3a4157; background: #fff; }
  .t-form .qz-theme button { background: #fff; border-color: #ccd2e0; color: #5a6076; }
  .t-form .qz-theme button.on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
  .t-form .qz-body { background: transparent; }
  .t-form .qz-qrow { background: #fff; border: 1px solid #e2e6f0; border-radius: 14px; padding: 20px 22px; }
  .t-form .qz-qtext { font-size: 20px; font-weight: 700; color: #1f2330; }
  .t-form .qz-word { font-size: 27px; }
  .t-form .qz-pron { color: #8a90a6; }
  .t-form .qz-qnum { background: #4f46e5; }
  .t-form .qz-grid { grid-template-columns: 1fr; gap: 8px; }
  .t-form .qz-ch { min-height: 0; justify-content: flex-start; text-align: left; padding: 13px 16px 13px 46px;
    border-radius: 10px; background: #fff !important; border: 1.5px solid #d7dbe7 !important; color: #262b3a;
    font-size: 16px; font-weight: 500; }
  .t-form .qz-ch:hover { transform: none; border-color: #4f46e5 !important; background: #f7f8ff !important; }
  .t-form .qz-ch .qz-key { top: 50%; transform: translateY(-50%); left: 14px; width: 22px; height: 22px;
    border-radius: 50%; background: #eef0f7; color: #6b7285; }
  .t-form .qz-ch.sel { border-color: #4f46e5 !important; background: #eef0ff !important; box-shadow: none; font-weight: 700; }
  .t-form .qz-ch.sel .qz-key { background: #4f46e5; color: #fff; }
  .t-form .qz-keyhint b { background: #e8eaf3; color: #3a4157; }
  .t-form .qz-navbtn.submit { background: #4f46e5; color: #fff; border: none; }
  .t-form .qz-res { color: #1f2330; }
  .t-form .qz-res .score { background: linear-gradient(90deg,#4f46e5,#0ea5e9); -webkit-background-clip: text; background-clip: text; }
  .t-form .qz-wrongs { border-top-color: #e2e6f0; }
  #quizov.t-form .wl { border-bottom-color: #e8eaf3; }
  #quizov.t-form .wl .m { color: #5a6076; }

  /* --- ③ 시험지형 : 흰 종이 + ①②③, 컴팩트 --- */
  #quizov.t-paper { background: #e9eaee; color: #111; }
  .t-paper .qz-top { background: #fff; border-bottom: 1px solid #d5d7de; }
  .t-paper .qz-count b, .t-paper .qz-pct b { color: #111; }
  .t-paper .qz-count span, .t-paper .qz-pct span, .t-paper .qz-sub, .t-paper .qz-keyhint { color: #6a6d78; }
  .t-paper .qz-bar { background: #dcdee5; }
  .t-paper #qzBarFill { background: #111; }
  .t-paper .qz-quit, .t-paper .qz-navbtn { border-color: #c8cad2; color: #222; background: #fff; }
  .t-paper .qz-theme button { background: #fff; border-color: #c8cad2; color: #555; }
  .t-paper .qz-theme button.on { background: #111; border-color: #111; color: #fff; }
  .t-paper .qz-body { background: #fff; max-width: 820px; border: 1px solid #d5d7de; margin-top: 14px;
    border-radius: 4px; padding: 30px 34px 16px; }
  .t-paper .qz-qrow { margin-bottom: 18px; }
  .t-paper .qz-qnum { background: #111; border-radius: 4px; }
  .t-paper .qz-qtext { font-size: 19px; font-weight: 700; color: #111; }
  .t-paper .qz-word { font-size: 26px; }
  .t-paper .qz-pron { color: #777; }
  .t-paper .qz-grid { grid-template-columns: 1fr; gap: 2px; }
  .t-paper .qz-ch { min-height: 0; justify-content: flex-start; text-align: left; padding: 9px 12px 9px 40px;
    border-radius: 3px; background: transparent !important; border: 1px solid transparent !important;
    color: #111; font-size: 16px; font-weight: 400; }
  .t-paper .qz-ch:hover { transform: none; background: #f3f4f7 !important; }
  .t-paper .qz-ch .qz-key { top: 50%; transform: translateY(-50%); left: 10px; width: 24px; height: 24px;
    border-radius: 50%; background: transparent; border: 1.3px solid #555; color: #333; font-size: 12.5px; }
  .t-paper .qz-ch.sel { background: #f0f1f5 !important; border-color: #111 !important; font-weight: 700; box-shadow: none; }
  .t-paper .qz-ch.sel .qz-key { background: #111; border-color: #111; color: #fff; }
  .t-paper .qz-keyhint b { background: #eceef3; color: #222; }
  .t-paper .qz-navbtn.submit { background: #111; color: #fff; border: none; }
  .t-paper .qz-res { color: #111; }
  .t-paper .qz-res .score { background: none; -webkit-text-fill-color: #111; color: #111; }
  .t-paper .qz-wrongs { border-top-color: #d5d7de; }
  #quizov.t-paper .wl { border-bottom-color: #e4e6ec; }
  #quizov.t-paper .wl .m { color: #555; }
  @media (max-width: 640px){ .qz-grid { grid-template-columns: 1fr; } .qz-qtext { font-size: 19px; } .qz-word { font-size: 25px; } .qz-bar { max-width: 120px; } }
  @media (prefers-reduced-motion: reduce){ .qz-ch, #qzBarFill { transition: none; } .qz-ch:hover { transform: none; } }
  .badge { background: #dc2626; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
  .badge.b1 { background: #94a3b8; }

  /* 사전 창 */
  #dictModal { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
  #dictModal .dict-box { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
  #dictForm { display: flex; gap: 8px; margin: 10px 0 12px; }
  #dictQ { flex: 1; min-width: 0; padding: 9px 10px; font-size: 16px; border: 1px solid #ccd; border-radius: 8px; }
  .dict-entry { border: 1px solid #e3e6ee; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
  .dict-entry .dw { font-size: 19px; font-weight: 700; }
  .dict-entry .dp { color: #667; margin-left: 6px; }
  .dict-entry .db { font-size: 12px; color: #889; margin-left: 8px; }
  .dict-sec { margin-top: 6px; font-size: 14px; line-height: 1.55; }
  .dict-sec b.lb { display: inline-block; min-width: 70px; color: #445; font-size: 12.5px; }
  .dict-sim button { margin: 3px 4px 0 0; }
  .dict-src { font-size: 11.5px; color: #99a; margin-top: 8px; }

  @page { size: A4; margin: 12mm; }
  @media print {
    body { background: #fff; height: auto !important; overflow: visible !important; }
    html { height: auto !important; overflow: visible !important; }
    .ui, #quizov { display: none !important; }
    #paperwrap { padding: 0; overflow: visible !important; height: auto !important; }
    #paper { width: auto; margin: 0; padding: 0; box-shadow: none; min-height: 0;
             overflow: visible !important; height: auto !important; }
    /* 다단 인쇄 시 뒤쪽 문항이 잘리는 문제 방지 */
    .qcols { overflow: visible !important; height: auto !important; }
    .q { overflow: visible !important; }
    .anskey { break-before: page; page-break-before: always; }
  }
  /* 변경 기록(원장) */
  .audit-list { max-height: 420px; overflow: auto; margin-top: 8px; font-size: 13px; }
  .audit-row { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 5px 0; border-top: 1px dashed #e5e7eb; align-items: baseline; }
  .audit-row .au-at { color: #778; min-width: 110px; font-size: 12.5px; }
  .audit-row .au-who { font-weight: 700; }
  .audit-row .au-act { color: var(--ac-strong); font-weight: 700; }
  .audit-row .au-det { color: #445; }

  /* ---------- 스킨 고르기 (2026-11-14) ---------- */
  header.ui { border-top: 5px solid var(--ac); background: linear-gradient(180deg, var(--ac-soft), transparent 70%); border-radius: 0 0 12px 12px; }
  :root[data-skin="night"] header.ui { background: none; }
  @media (min-width: 561px) { .tabs button.on { box-shadow: inset 0 3px 0 var(--ac); color: var(--ac-deep); } }
  #skinBox { display: none; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 2px; padding: 10px 12px; background: #fff; border: 1px solid #dde; border-radius: 10px; }
  #skinBox.on { display: flex; }
  #skinBox > b { font-size: 12.5px; color: #334; margin-right: 4px; }
  .sk-btn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #dde; background: #fff; border-radius: 999px; padding: 4px 11px 4px 5px; font: inherit; font-size: 12.5px; color: #334; cursor: pointer; }
  .sk-btn i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
  .sk-btn.on { border-color: #222; font-weight: 700; }
  /* 학부모 보고서는 스킨과 상관없이 늘 밝은 기본색 */
  body.report-mode { --page-bg: #eef1f5; --page-fg: #222; --page-sub: #667; --ac: #2563eb; --ac2: #7c3aed; --ac-deep: #1e3a8a; --ac-strong: #1d4ed8; --ac-soft: #eef2ff; --ac-line: #c7d2fe; }
  /* 밤 스킨: 바탕만 어둡고 흰 판 안의 글자는 진하게 */
  :root[data-skin="night"] .panel, :root[data-skin="night"] #skinBox, :root[data-skin="night"] .dict-box { color: #222; }
  input[type=checkbox], input[type=radio] { accent-color: var(--ac); }

/* 가입 종류 학생/선생님 (v4.41) */
.su-kind{display:flex;gap:6px;margin-bottom:10px}
.su-kind button{flex:1;padding:9px 0;border-radius:10px;border:1px solid var(--ac-line,#cbd5e1);background:#fff;color:#334155;font-weight:700;cursor:pointer}
.su-kind button.on{background:var(--ac,#2563eb);border-color:var(--ac,#2563eb);color:#fff}
