/* =========================================================
   한빛국어학원 · 문항 스튜디오
   UI: Pretendard / 시험지: Noto Serif KR / 포인트: 딥 인디고
   ========================================================= */
:root {
  --ink: #111827;
  --ink-2: #374151;
  --sub: #6B7280;
  --mute: #9CA3AF;
  --line: #E5E7EB;
  --line-2: #F1F3F5;
  --soft: #F8F9FA;
  --paper-bg: #EEF0F3;
  --brand: #312E81;
  --brand-2: #3730A3;
  --brand-weak: #EFF0FA;
  --brand-line: #C6C8EC;
  --ok: #15803D;
  --ok-weak: #F0FDF4;
  --ok-line: #BBF7D0;
  --warn: #B45309;
  --warn-weak: #FFFBEB;
  --warn-line: #FDE68A;
  --danger: #B91C1C;
  --danger-weak: #FEF2F2;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow-1: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-2: 0 6px 20px rgba(17, 24, 39, .10);
  --shadow-paper: 0 2px 6px rgba(17, 24, 39, .07), 0 18px 40px rgba(17, 24, 39, .08);
  --sidebar-w: 232px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 앱 셸 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--soft); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 15px 16px 14px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 13.5px; letter-spacing: -.01em; }
.brand-text span { font-size: 11.5px; color: var(--sub); }

.nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 6px;
  color: var(--ink-2); font-size: 12.8px; text-align: left; width: 100%;
}
.nav-item svg { width: 17px; height: 17px; color: #6B7280; }
.nav-item:hover { background: #F1F2F4; }
.nav-item.is-active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow-1); }
.nav-item.is-active svg { color: var(--brand); }
.nav-count {
  margin-left: auto; font-size: 11px; font-style: normal; color: var(--sub);
  background: #ECEEF1; border-radius: 20px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.nav-item.is-active .nav-count { background: var(--brand-weak); color: var(--brand); }

.side-sec { padding: 18px 10px 0; min-height: 0; overflow: auto; }
.side-label { font-size: 11px; color: var(--mute); padding: 0 9px 6px; letter-spacing: .02em; }
.recent {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
  padding: 7px 9px; border-radius: 6px; color: var(--ink-2);
}
.recent:hover { background: #F1F2F4; }
.recent.is-current .recent-title { color: var(--brand); font-weight: 600; }
.recent-title { font-size: 12.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: 11px; color: var(--mute); }

.side-foot { margin-top: auto; padding: 10px; border-top: 1px solid #ECEEF1; }
.side-link {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px;
  border-radius: 6px; color: var(--ink-2); font-size: 12.2px; text-align: left;
}
.side-link svg { width: 16px; height: 16px; color: #6B7280; }
.side-link:hover { background: #F1F2F4; }
.me { display: flex; align-items: center; gap: 9px; padding: 10px 9px 4px; margin-top: 4px; border-top: 1px solid #ECEEF1; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600; flex: none;
}
.me-text { display: flex; flex-direction: column; line-height: 1.3; }
.me-text strong { font-size: 12.2px; font-weight: 600; }
.me-text span { font-size: 11px; color: var(--mute); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; z-index: 5;
}
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.crumbs .c-sep { color: #D1D5DB; }
.crumbs .c-now { font-weight: 600; letter-spacing: -.01em; }
.crumbs .c-sub { color: var(--sub); font-size: 12.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.save-state { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mute); }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: #34D399; }
.view { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.view.view-workspace { overflow: hidden; background: #FCFCFD; }

/* ---------- 버튼 · 칩 · 배지 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--soft); border-color: #D8DCE1; }
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--sub); }
.btn-ghost:hover { background: var(--soft); border-color: transparent; color: var(--ink-2); }
.btn-line-brand { border-color: var(--brand-line); color: var(--brand); background: #fff; }
.btn-line-brand:hover { background: var(--brand-weak); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-lg { padding: 10px 14px; font-size: 13px; }
.link-btn { color: var(--brand); font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--brand-line); }
.link-btn:hover { text-decoration-color: var(--brand); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 20px;
  padding: 2px 8px; font-size: 11px; font-weight: 500; border: 1px solid var(--line);
  color: var(--ink-2); background: #fff; white-space: nowrap;
}
.chip-ok { color: var(--ok); background: var(--ok-weak); border-color: var(--ok-line); }
.chip-warn { color: var(--warn); background: var(--warn-weak); border-color: var(--warn-line); }
.chip-brand { color: var(--brand); background: var(--brand-weak); border-color: var(--brand-line); }
.chip-mute { color: var(--sub); background: var(--soft); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  border-radius: 4px; padding: 1px 6px; border: 1px solid transparent; white-space: nowrap;
}
.badge-diff-상 { background: #F5F3FF; color: #5B21B6; border-color: #DDD6FE; }
.badge-diff-중 { background: #EFF6FF; color: #1D4ED8; border-color: #DBEAFE; }
.badge-diff-하 { background: #F0FDF4; color: #15803D; border-color: #DCFCE7; }
.badge-type { background: var(--soft); color: var(--ink-2); border-color: var(--line); font-weight: 500; }

/* ---------- 카드 공통 ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.card-head .muted { font-size: 11.5px; color: var(--mute); font-weight: 500; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 13px; }
.muted { color: var(--sub); }
.tiny { font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }

/* =========================================================
   출제 워크스페이스
   ========================================================= */
.ws { display: grid; grid-template-columns: minmax(360px, 39%) minmax(0, 1fr); height: 100%; }
.ws-left { min-width: 0; overflow-y: auto; padding: 14px 14px 20px; background: #FCFCFD; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.ws-right { min-width: 0; overflow-y: auto; background: #fff; position: relative; }
.ws-left::-webkit-scrollbar, .ws-right::-webkit-scrollbar { width: 10px; }
.ws-left::-webkit-scrollbar-thumb, .ws-right::-webkit-scrollbar-thumb { background: #DDE1E6; border-radius: 10px; border: 3px solid #fff; }

.sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sec-head h3 { font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.sec-head .spacer { margin-left: auto; }

/* 지문 입력 */
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--soft); border-radius: 6px; border: 1px solid var(--line-2); margin: 13px 13px 0; }
.tabs button {
  flex: 1; padding: 5px 8px; border-radius: 4px; font-size: 12px; color: var(--sub); font-weight: 500;
}
.tabs button.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.tab-body { padding: 13px; }

.paste-zone {
  border: 1px dashed #D5D9DF; border-radius: 7px; background: #FCFCFD; padding: 14px;
  text-align: center; color: var(--sub); font-size: 12px;
}
.paste-zone strong { color: var(--ink-2); font-weight: 600; }
.paste-zone .kbd {
  display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px;
  padding: 0 5px; font-size: 11px; background: #fff; color: var(--ink-2); margin: 0 1px;
}

.passage-item { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.passage-item .pi-head { display: flex; align-items: center; gap: 7px; padding: 10px 11px; }
.passage-item .pi-no {
  width: 18px; height: 18px; border-radius: 4px; background: var(--brand-weak); color: var(--brand);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none;
}
.pi-title { font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.pi-meta { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 11px 10px 36px; font-size: 11px; color: var(--sub); }
.pi-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pi-meta svg { width: 13px; height: 13px; color: var(--mute); }
.pi-tools { display: flex; gap: 5px; padding: 0 9px 9px; }
.pi-tools .btn { flex: 1; }

.capture-frame { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: auto; background: #fff; max-height: 268px; }
.capture-inner { position: relative; line-height: 0; }
.capture-frame img { display: block; width: 100%; }
.crop-box {
  position: absolute; line-height: 1.4; border: 1.5px solid var(--brand); background: rgba(49, 46, 129, .06);
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, .06);
}
.crop-box .crop-tag {
  position: absolute; top: -18px; left: -1px; background: var(--brand); color: #fff; line-height: 16px;
  font-size: 9.5px; font-weight: 600; padding: 1px 5px; border-radius: 3px 3px 0 0; white-space: nowrap;
}
.ocr-line { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--sub); margin-top: 8px; }
.ocr-line svg { width: 14px; height: 14px; color: var(--ok); }

/* 출제 기준 */
.setting-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-label { font-size: 12px; color: var(--sub); width: 86px; flex: none; }
.setting-row .s-value { font-size: 12.5px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.setting-row .spacer { margin-left: auto; }
.sel {
  appearance: none; border: 1px solid var(--line); border-radius: 5px; background: #fff;
  padding: 4px 24px 4px 8px; font-size: 12px; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' fill='none' stroke='%236B7280' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.stepper button { width: 22px; height: 24px; display: grid; place-items: center; color: var(--sub); font-size: 13px; }
.stepper button:hover { background: var(--soft); color: var(--ink); }
.stepper span { min-width: 20px; text-align: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.type-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.type-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 20px; border: 1px solid var(--line);
  color: var(--sub); background: #fff;
}
.type-chip.is-on { background: var(--brand-weak); border-color: var(--brand-line); color: var(--brand); font-weight: 600; }
.switch { position: relative; width: 30px; height: 17px; border-radius: 20px; background: #D1D5DB; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch.is-on { background: var(--brand); }
.switch.is-on::after { transform: translateX(13px); }
.model-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--sub); padding: 4px 0; }
.model-row b { font-weight: 600; color: var(--ink-2); }
.model-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }

.gen-bar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px;
  margin-top: auto; padding: 14px 0 2px; background: linear-gradient(to bottom, rgba(252,252,253,0), #FCFCFD 30%);
}
.gen-bar .btn-primary { flex: 1; height: 38px; }
.gen-hint { font-size: 11px; color: var(--mute); line-height: 1.35; }

/* 우측 결과 */
.res-head { position: sticky; top: 0; z-index: 3; background: rgba(255,255,255,.96); backdrop-filter: blur(4px); border-bottom: 1px solid var(--line); padding: 11px 18px 0; }
.res-head-row { display: flex; align-items: center; gap: 8px; }
.res-title { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.res-sub { font-size: 11.5px; color: var(--sub); }
.res-head .spacer { margin-left: auto; }
.res-tabs { display: flex; gap: 16px; margin-top: 9px; }
.res-tab { position: relative; padding: 0 0 8px; font-size: 12px; color: var(--sub); font-weight: 500; }
.res-tab.is-active { color: var(--brand); font-weight: 600; }
.res-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px 2px 0 0; }
.res-tab em { font-style: normal; font-size: 11px; color: var(--mute); margin-left: 3px; }

.selection-bar { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); background: #FCFCFD; }
.sel-count { font-size: 11.5px; color: var(--sub); }
.sel-count b { color: var(--ink); font-weight: 600; }
.dist { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-left: auto; }
.dist-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; width: 22px; height: 26px; }
.dist-bar { width: 13px; background: var(--brand); border-radius: 2px 2px 1px 1px; transition: height .35s cubic-bezier(.2,.8,.2,1), background .2s; min-height: 2px; }
.dist-item.is-zero .dist-bar { background: #E2E4E9; }
.dist-lab { font-size: 9.5px; color: var(--mute); line-height: 1; }
.dist-item.has .dist-lab { color: var(--ink-2); font-weight: 600; }
.dist-ok { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ok); font-weight: 600; margin-left: 4px; }
.dist-ok svg { width: 13px; height: 13px; }

.hint-bar {
  display: flex; align-items: center; gap: 8px; margin: 12px 18px 0; padding: 8px 11px;
  background: var(--brand-weak); border: 1px solid var(--brand-line); border-radius: 6px;
  font-size: 11.5px; color: var(--brand);
}
.hint-bar svg { width: 15px; height: 15px; flex: none; }
.hint-bar button { margin-left: auto; color: var(--brand); opacity: .7; }
.hint-bar button:hover { opacity: 1; }

.qlist { padding: 14px 18px 60px; display: flex; flex-direction: column; gap: 10px; }

/* 문항 카드 */
.qcard { border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.qcard:hover { border-color: #D5DAE1; }
.qcard.is-off { background: #FCFCFD; border-style: dashed; }
.qcard.is-off .qbody { opacity: .42; }
.qcard.is-flash { animation: flash 1s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(49,46,129,.16); border-color: var(--brand-line); } 100% { box-shadow: 0 0 0 0 rgba(49,46,129,0); } }
.qhead { display: flex; align-items: center; gap: 7px; padding: 9px 11px 9px 10px; }
.qcheck { width: 15px; height: 15px; border: 1.5px solid #CBD2DA; border-radius: 4px; display: grid; place-items: center; flex: none; }
.qcheck svg { width: 11px; height: 11px; stroke-width: 2.6; color: #fff; opacity: 0; }
.qcheck.is-on { background: var(--brand); border-color: var(--brand); }
.qcheck.is-on svg { opacity: 1; }
.qno { font-size: 12.5px; font-weight: 700; width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.qno.is-off { color: var(--mute); font-weight: 500; }
.qhead .spacer { margin-left: auto; }
.verif { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.verif svg { width: 12px; height: 12px; stroke-width: 2; }
.verif.is-ok { color: var(--ok); background: var(--ok-weak); border: 1px solid var(--ok-line); }
.verif.is-fixed { color: var(--warn); background: var(--warn-weak); border: 1px solid var(--warn-line); }
.qmenu { color: var(--mute); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; }
.qmenu:hover { background: var(--soft); color: var(--ink-2); }

.qbody { padding: 0 13px 4px 13px; }
.qstem { font-size: 13px; font-weight: 600; letter-spacing: -.01em; margin: 2px 0 8px; }
.qbogi { border: 1px solid #D9DEE5; border-radius: 5px; background: #FBFBFD; padding: 8px 10px; font-size: 12.2px; line-height: 1.6; color: var(--ink-2); margin-bottom: 9px; }
.qbogi b { display: block; font-size: 11px; color: var(--sub); margin-bottom: 2px; letter-spacing: .04em; }
.qchoices { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; }
.qchoice { display: flex; gap: 7px; font-size: 12.3px; line-height: 1.55; color: var(--ink-2); padding: 2px 4px; border-radius: 3px; }
.qchoice .cir { color: var(--sub); flex: none; font-size: 12px; width: 12px; }
.qchoice.is-answer { background: var(--ok-weak); color: #14532D; }
.qchoice.is-answer .cir { color: var(--ok); font-weight: 700; }
.qchoice.is-edited { background: #FFFBEB; }
.qfig { border: 1px solid var(--line); border-radius: 5px; padding: 6px; margin: 0 0 9px; background: #fff; display: flex; gap: 10px; align-items: center; }
.qfig img { width: 300px; max-width: 46%; height: auto; border: 1px solid #E9ECEF; border-radius: 3px; display: block; }
.qfig .fig-cap { font-size: 11px; color: var(--sub); line-height: 1.5; }
.qfig .fig-cap b { display: block; color: var(--ink-2); font-weight: 600; font-size: 11.5px; margin-bottom: 2px; }

.qevid { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--sub); background: #FAFAFB; border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 8px; margin-bottom: 8px; }
.qevid svg { width: 13px; height: 13px; color: var(--mute); flex: none; margin-top: 2px; }
.qevid q { color: var(--ink-2); quotes: "“" "”"; }
.qevid .link-btn { margin-left: auto; flex: none; font-size: 11px; }
.qexplain { font-size: 11.8px; color: var(--sub); line-height: 1.62; padding: 0 2px 9px; display: none; }
.qexplain.is-open { display: block; }
.qexplain b { color: var(--ink-2); }

.qfoot { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-top: 1px solid var(--line-2); background: #FCFCFD; border-radius: 0 0 8px 8px; }
.qans { font-size: 11.5px; color: var(--sub); }
.qans b { color: var(--ink); font-weight: 700; }
.qfoot .spacer { margin-left: auto; }
.qfoot .btn { padding: 4px 9px; font-size: 11.5px; }
.approved-line { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ok); font-weight: 600; }
.approved-line svg { width: 13px; height: 13px; }

/* 교차 검증 상세 */
.vdetail { margin: 0 13px 10px; border: 1px solid var(--warn-line); border-left: 3px solid var(--warn); background: var(--warn-weak); border-radius: 5px; padding: 9px 11px; }
.vdetail h4 { font-size: 11.5px; font-weight: 700; color: #92400E; display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.vdetail h4 svg { width: 13px; height: 13px; }
.vd-row { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.6; padding: 3px 0; }
.vd-row .vd-k { width: 58px; flex: none; color: #92400E; font-weight: 600; }
.vd-row .vd-v { color: #78350F; }
.vd-row .vd-v s { color: #A16207; text-decoration-color: #D97706; }
.vd-arrow { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--warn); font-weight: 600; margin-top: 5px; padding-top: 5px; border-top: 1px dashed #F3D9A4; }
.vd-arrow svg { width: 12px; height: 12px; }

/* 수정 패널 */
.editpane { margin: 0 13px 10px; border: 1px solid var(--brand-line); border-radius: 6px; background: #FBFBFF; padding: 11px; }
.editpane .ep-label { font-size: 11px; color: var(--sub); font-weight: 600; margin-bottom: 3px; display: block; }
.editpane textarea, .editpane input[type=text] {
  width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; font-size: 12px;
  background: #fff; resize: vertical; line-height: 1.55;
}
.editpane textarea:focus, .editpane input:focus { outline: 2px solid var(--brand-line); border-color: var(--brand-line); }
.ep-grid { display: flex; flex-direction: column; gap: 7px; }
.ep-choice { display: flex; align-items: center; gap: 7px; }
.ep-choice .cir { flex: none; width: 14px; color: var(--sub); font-size: 12px; }
.ep-foot { display: flex; gap: 6px; margin-top: 9px; }
.ep-hist { font-size: 11px; color: var(--mute); margin-top: 8px; }

/* 스켈레톤 · 파이프라인 */
.pipeline { margin: 14px 18px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pipe-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: #FCFCFD; border-bottom: 1px solid var(--line-2); }
.pipe-head .spin { width: 13px; height: 13px; border: 1.8px solid var(--brand-line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pipe-title { font-size: 12px; font-weight: 600; }
.pipe-pct { margin-left: auto; font-size: 11.5px; color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.pipe-progress { height: 2px; background: #EEF0F3; }
.pipe-progress i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .45s ease; }
.pipe-log { padding: 9px 12px; display: flex; flex-direction: column; gap: 5px; max-height: 216px; overflow: auto; }
.log-line { display: flex; gap: 8px; font-size: 11.5px; color: var(--sub); align-items: baseline; }
.log-line .t { color: var(--mute); font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; flex: none; }
.log-line .m { color: var(--ink-2); }
.log-line .model { color: var(--mute); font-size: 10.5px; margin-left: auto; flex: none; padding-left: 8px; }
.log-line.is-warn .m { color: var(--warn); }
.log-line .okmark { color: var(--ok); flex: none; }
.sk { background: #F1F3F5; border-radius: 4px; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.sk-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sk-row { display: flex; gap: 7px; align-items: center; }

/* 빈 상태 */
.empty { padding: 56px 28px; text-align: center; }
.empty-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-weak); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-icon svg { width: 22px; height: 22px; color: var(--brand); }
.empty h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.empty p { font-size: 12.5px; color: var(--sub); line-height: 1.65; max-width: 360px; margin: 0 auto 16px; }
.empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   문제 은행
   ========================================================= */
.page { padding: 20px 22px 60px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.page-desc { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.page-head .spacer { margin-left: auto; }
.page-head-actions { display: flex; gap: 8px; align-items: center; }

.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #FCFCFD; margin-bottom: 12px; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group > label { font-size: 11.5px; color: var(--sub); }
.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px 8px; }
.search svg { width: 14px; height: 14px; color: var(--mute); }
.search input { border: 0; outline: 0; font-size: 12px; width: 140px; background: transparent; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.seg button { padding: 4px 9px; font-size: 11.5px; color: var(--sub); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.is-active { background: var(--brand-weak); color: var(--brand); font-weight: 600; }

.tbl-wrap { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; overflow-y: hidden; background: #fff; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.2px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--sub); background: #FCFCFD;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #FBFBFD; }
.tbl tbody tr.is-picked { background: var(--brand-weak); }
.tbl .c-chk { width: 34px; }
.tbl .c-id { color: var(--sub); font-size: 11px; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; }
.tbl .c-stem { max-width: 420px; }
.tbl .c-stem .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-weight: 500; }
.tbl .c-stem .ps { font-size: 11px; color: var(--mute); margin-top: 1px; }
.tbl .c-stem .ps-m { display: none; font-size: 10.5px; color: var(--mute); margin-top: 2px; line-height: 1.45; }
.tbl .c-ans { text-align: center; font-weight: 700; color: var(--brand); font-size: 13px; }
.tbl .c-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--sub); }
.tbl-foot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--sub); background: #FCFCFD; }
.tbl-foot .spacer { margin-left: auto; }
.pager { display: flex; gap: 2px; }
.pager button { width: 24px; height: 24px; border-radius: 4px; font-size: 11.5px; color: var(--sub); }
.pager button.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.pager button:hover:not(.is-active) { background: var(--soft); }

.pickbar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--brand); color: #fff; border-radius: 8px; margin-top: 12px; box-shadow: var(--shadow-2);
}
.pickbar b { font-weight: 700; }
.pickbar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.pickbar .btn:hover { background: rgba(255,255,255,.22); }
.pickbar .btn-white { background: #fff; color: var(--brand); border-color: #fff; }
.pickbar .spacer { margin-left: auto; }

/* 은행 상세 모달 */
.drawer { background: #fff; border-radius: 10px; width: min(680px, 94vw); max-height: 86vh; overflow: auto; box-shadow: var(--shadow-2); }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.drawer-head h3 { font-size: 13.5px; font-weight: 700; }
.drawer-head .spacer { margin-left: auto; }
.drawer-body { padding: 16px; }
.dr-passage { background: #FAFAFB; border: 1px solid var(--line-2); border-radius: 6px; padding: 11px 12px; font-size: 12.2px; line-height: 1.72; color: var(--ink-2); margin-bottom: 14px; }
.dr-passage b { display: block; font-size: 11px; color: var(--sub); margin-bottom: 4px; letter-spacing: .03em; }

/* =========================================================
   시험지 · 수업 자료 (A4)
   ========================================================= */
.preview-view { background: var(--paper-bg); min-height: 100%; }
.preview-bar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.pv-title { font-size: 13px; font-weight: 700; }
.pv-sub { font-size: 11.5px; color: var(--sub); }
.preview-bar .spacer { margin-left: auto; }
.zoom { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.zoom button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--sub); }
.zoom button:hover { background: var(--soft); }
.zoom span { min-width: 42px; text-align: center; font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sheets { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 26px 18px 80px; }
.sheet-scale { width: calc(210mm * var(--z, 1)); height: calc(297mm * var(--z, 1)); flex: none; }
.sheet-scale.is-auto { height: auto; }
.sheet {
  width: 210mm; height: 297mm; background: #fff; box-shadow: var(--shadow-paper);
  padding: 11mm 13mm 9mm; position: relative; overflow: hidden;
  transform: scale(var(--z, 1)); transform-origin: top left;
  font-family: "Noto Serif KR", "Nanum Myeongjo", serif; color: #111;
}
.sheet.land-is-empty { display: flex; }

/* 시험지 머리글 */
.sheet-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; font-size: 8.4pt; letter-spacing: .02em; }
.sheet-head .sh-academy { font-weight: 700; font-size: 10pt; letter-spacing: .06em; }
.sheet-head .sh-exam { color: #333; }
.sheet-head .sh-target { font-weight: 600; }
.sheet-rule { height: 0; border-top: 1.1pt solid #111; margin-top: 2.4mm; }
.sheet-rule.thin { border-top: .5pt solid #999; margin-top: 1mm; }
.sheet-meta { display: flex; justify-content: space-between; font-size: 7.6pt; color: #444; padding: 1.6mm 0 0; letter-spacing: .02em; }

.paper-passage { margin-top: 3.4mm; }
.paper-instr { font-size: 8.6pt; font-weight: 600; margin-bottom: 1.6mm; }
.paper-passage p { font-size: 8.6pt; line-height: 1.72; text-align: justify; text-indent: 0; margin-bottom: 1.3mm; }
.paper-passage p:first-of-type::first-letter { }
.paper-fig { margin: 1.8mm 0 2mm; }
.paper-fig img { width: 84mm; display: block; margin: 0 auto; }
.paper-fig figcaption { font-size: 7.8pt; text-align: center; margin-top: 1mm; }
.paper-fig .fig-note { font-size: 7.2pt; text-align: center; color: #333; margin-top: .6mm; }

.paper-qgrid { column-count: 2; column-gap: 8mm; margin-top: 2.4mm; }
.pq { break-inside: avoid; page-break-inside: avoid; margin-bottom: 2.8mm; }
.pq-head { display: flex; gap: 1.4mm; font-size: 8.6pt; font-weight: 600; line-height: 1.55; }
.pq-no { font-weight: 700; flex: none; }
.pq-pt { font-weight: 500; flex: none; font-size: 8pt; }
.pq-bogi { border: .5pt solid #555; padding: 1.6mm 2.2mm; margin: 1.4mm 0 1.3mm; font-size: 7.9pt; line-height: 1.68; background: #FCFCFC; }
.pq-bogi .bogi-h { text-align: center; font-size: 7.6pt; font-weight: 600; letter-spacing: .3em; margin-bottom: .8mm; }
.pq-fig { margin: 1.6mm 0; }
.pq-fig img { width: 100%; display: block; }
.paper-choices { margin-top: 1.2mm; }
.paper-choices li { display: flex; gap: 1.4mm; font-size: 8.3pt; line-height: 1.6; }
.paper-choices .p-cir { flex: none; font-size: 8.2pt; }
.paper-choices li.is-correct .p-cir { font-weight: 700; }
.paper-choices li.is-correct .p-cir::after { content: ""; }

.sheet-foot { position: absolute; left: 13mm; right: 13mm; bottom: 6mm; display: flex; justify-content: space-between; font-size: 7.2pt; color: #555; border-top: .5pt solid #ccc; padding-top: 1.2mm; }

.paper-answers { column-count: 2; column-gap: 8mm; }
.pa { break-inside: avoid; margin-bottom: 4.4mm; }
.pa-head { font-size: 9.4pt; font-weight: 700; display: flex; gap: 2mm; align-items: baseline; }
.pa-head .pa-ans { font-weight: 700; }
.pa-explain { font-size: 9pt; line-height: 1.85; margin-top: 1mm; }
.pa-src { font-size: 8.2pt; color: #333; margin-top: .9mm; line-height: 1.72; }

/* 학습지 */
.lsheet h2 { font-size: 13pt; text-align: center; letter-spacing: .04em; margin: 3mm 0 1mm; }
.lsheet .l-sub { text-align: center; font-size: 8.4pt; color: #444; }
.lsheet .l-info { display: flex; justify-content: space-between; font-size: 8pt; border-top: .5pt solid #999; border-bottom: .5pt solid #999; padding: 1.4mm 0; margin: 3mm 0 4mm; }
.lsheet h3 { font-size: 9.6pt; margin: 3.4mm 0 1.5mm; display: flex; align-items: center; gap: 2mm; }
.lsheet h3 .ln { display: inline-block; width: 4mm; height: 4mm; background: #111; color: #fff; font-size: 7.4pt; text-align: center; line-height: 4mm; border-radius: .6mm; }
.lsheet p, .lsheet li { font-size: 8.6pt; line-height: 1.75; }
.lsheet ol.ls-list { margin-left: 4mm; }
.lsheet ol.ls-list li { list-style: decimal; margin-left: 3mm; padding-left: 1mm; }
.lsheet .blank { border-bottom: .6pt solid #333; display: inline-block; min-width: 18mm; }
.lsheet .ans { color: #1F3A93; font-weight: 600; }
.lsheet table { width: 100%; border-collapse: collapse; font-size: 8.5pt; table-layout: fixed; }
.lsheet th, .lsheet td { border: .5pt solid #777; padding: 1.1mm 1.8mm; text-align: left; vertical-align: top; word-break: keep-all; }
.lsheet th { background: #F4F4F4; font-weight: 600; }
.lsheet .box { border: .5pt solid #999; padding: 2mm 3mm; min-height: 8mm; }
.lsheet .note { font-size: 7.8pt; color: #444; margin-top: 1mm; }

/* =========================================================
   수업 자료 화면
   ========================================================= */
.mat { display: grid; grid-template-columns: minmax(320px, 38%) minmax(0, 1fr); height: 100%; }
.mat-left { overflow-y: auto; border-right: 1px solid var(--line); padding: 16px; background: #FCFCFD; }
.mat-right { overflow-y: auto; background: var(--paper-bg); }
.mat-right .preview-bar { position: sticky; top: 0; }
.mat-sheet-wrap { padding: 24px 18px 70px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.analysis { display: flex; flex-direction: column; gap: 10px; }
.an-row { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.an-row:last-child { border-bottom: 0; }
.an-p { font-size: 11px; font-weight: 700; color: var(--brand); width: 40px; flex: none; }
.an-body { min-width: 0; }
.an-key { display: inline-block; font-size: 10.5px; color: var(--brand); background: var(--brand-weak); border-radius: 3px; padding: 0 5px; margin-bottom: 3px; }
.an-sum { font-size: 11.8px; color: var(--ink-2); line-height: 1.6; }
.word-list { display: flex; flex-direction: column; }
.word { display: flex; gap: 8px; font-size: 11.8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.word:last-child { border-bottom: 0; }
.word b { flex: none; width: 76px; font-weight: 600; }
.word span { color: var(--sub); }

/* =========================================================
   모달 · 토스트
   ========================================================= */
.modal-scrim { position: fixed; inset: 0; background: rgba(17, 24, 39, .42); display: grid; place-items: center; padding: 20px; z-index: 60; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 10px; width: min(520px, 94vw); max-height: 88vh; overflow: auto; box-shadow: var(--shadow-2); animation: rise .18s ease; }
@keyframes rise { from { transform: translateY(6px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 14px; font-weight: 700; }
.modal-head .spacer { margin-left: auto; }
.modal-body { padding: 15px 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line-2); background: #FCFCFD; border-radius: 0 0 10px 10px; }
.reason-list { display: flex; flex-direction: column; gap: 6px; }
.reason {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.2px; cursor: pointer; color: var(--ink-2);
}
.reason:hover { border-color: #D5DAE1; }
.reason.is-on { border-color: var(--brand-line); background: var(--brand-weak); color: var(--brand); font-weight: 500; }
.reason .r-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #CBD2DA; flex: none; margin-top: 2px; display: grid; place-items: center; }
.reason.is-on .r-dot { border-color: var(--brand); }
.reason.is-on .r-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 11.5px; color: var(--sub); font-weight: 600; margin-bottom: 4px; }
.field input[type=text], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: 12.2px;
  background: #fff; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(49,46,129,.08); }
.kv { display: flex; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 96px; color: var(--sub); flex: none; }
.kv .v { color: var(--ink); }

.toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #111827; color: #fff; font-size: 12.2px;
  padding: 9px 14px; border-radius: 7px; box-shadow: var(--shadow-2); animation: toastIn .2s ease;
}
.toast svg { width: 15px; height: 15px; color: #6EE7B7; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; background: rgba(17, 24, 39, .72); display: grid; place-items: center; z-index: 70; padding: 24px; }
.lightbox img { max-width: 92vw; max-height: 86vh; background: #fff; padding: 10px; border-radius: 4px; box-shadow: var(--shadow-2); }
.lightbox .lb-cap { position: absolute; bottom: 26px; color: #fff; font-size: 12px; opacity: .85; }

.only-mobile { display: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
  .ws { grid-template-columns: minmax(320px, 42%) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 250px; z-index: 50;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-2);
  }
  .sidebar.is-open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 45; display: none; }
  .scrim.is-on { display: block; }
  .only-mobile { display: inline-flex; }
  .view.view-workspace { overflow: auto; }
  .ws { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ws-left { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .ws-right { overflow: visible; }
  .mat { grid-template-columns: minmax(0, 1fr); height: auto; }
  .mat-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .page { padding: 16px 14px 60px; }
  .preview-bar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .sheets { padding: 16px 10px 70px; }
  .sheet-scale { width: calc(210mm * var(--z, .46)); height: calc(297mm * var(--z, .46)); }
  .save-state { display: none; }
}
@media (max-width: 620px) {
  .qhead { flex-wrap: wrap; row-gap: 6px; }
  .approved-line { display: none; }
  .verif { white-space: normal; font-size: 10.5px; line-height: 1.35; text-align: left; }
  .qevid { flex-wrap: wrap; }
  .qevid span { flex: 1 1 calc(100% - 22px); }
  .qevid .link-btn { flex: 0 0 auto; margin-left: auto; }
  .res-sub { display: none; }
  .tbl { min-width: 0; }
  .tbl th:nth-child(2), .tbl td:nth-child(2),
  .tbl th:nth-child(3), .tbl td:nth-child(3),
  .tbl th:nth-child(4), .tbl td:nth-child(4),
  .tbl th:nth-child(5), .tbl td:nth-child(5),
  .tbl th:nth-child(7), .tbl td:nth-child(7) { display: none; }
  .tbl .c-stem { max-width: none; white-space: normal; }
  .tbl .c-stem .ps { display: none; }
  .tbl .c-stem .ps-m { display: block; }
  .preview-bar { flex-wrap: wrap; row-gap: 6px; }
  .preview-bar > div:first-child { flex: 1 1 100%; }
  .preview-bar .pv-title { font-size: 12.5px; }
  .preview-bar .btn { padding: 5px 9px; font-size: 11.5px; }
  .preview-bar .btn-ghost { display: none; }
  .preview-bar [data-act="goWorkspace"] { display: none; }
  .zoom span { min-width: 34px; }
  .sheet-scale { width: calc(210mm * var(--z, .46)); height: calc(297mm * var(--z, .46)); }
  .page-title { font-size: 17px; }
  .page-head { flex-wrap: wrap; }
  .topbar { padding: 0 12px; gap: 8px; }
  .crumbs .c-sub { display: none; }
  .filterbar { gap: 6px; }
  .search input { width: 96px; }
  .tbl .c-stem { max-width: 160px; }
  .tbl th:nth-child(6), .tbl td:nth-child(6), .tbl th:nth-child(7), .tbl td:nth-child(7) { display: none; }
  .dist { display: none; }
  .qfig { flex-direction: column; align-items: flex-start; }
  .qfig img { width: 100%; }
  .sheets { padding: 12px 6px 60px; gap: 16px; }
  .pv-sub { display: none; }
  .res-head { padding: 10px 14px 0; }
  .qlist { padding: 12px 12px 50px; }
  .sel-bar, .selection-bar { padding: 8px 14px; }
  .hint-bar { margin: 10px 14px 0; }
  .toast { font-size: 11.5px; padding: 8px 12px; }
}

/* ---------- 인쇄 ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; height: auto; }
  .sidebar, .topbar, .preview-bar, .mat-left, .no-print, .toast-root, .modal-scrim, .scrim { display: none !important; }
  .app { display: block; height: auto; }
  .main { display: block; }
  .view, .view.view-workspace { overflow: visible !important; height: auto; background: #fff; }
  .preview-view, .mat-right { background: #fff !important; }
  .sheets, .mat-sheet-wrap { display: block; padding: 0; gap: 0; }
  .sheet-scale { width: auto !important; height: auto !important; }
  .sheet {
    box-shadow: none !important; margin: 0; transform: none !important;
    break-after: page; page-break-after: always; width: 210mm; height: 297mm;
  }
  .sheet:last-child, .sheet-scale:last-child .sheet { break-after: auto; page-break-after: auto; }
  .sheet-scale { break-after: page; page-break-after: always; }
  .sheet-scale:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 정답·해설지 문항 정보 표 */
.pa-table { width: 100%; border-collapse: collapse; font-size: 7.6pt; margin-top: .6mm; }
.pa-table th, .pa-table td { border: .5pt solid #888; padding: .9mm 1.4mm; }
.pa-table th { background: #F5F5F5; font-weight: 600; text-align: center; }
.pa-table td { text-align: center; }
.pa-table td:nth-child(2) { text-align: left; }
.pa-note { font-size: 7.2pt; color: #444; margin-top: 1.2mm; }

.lsheet .blank { border-bottom: .6pt solid #333; display: inline-block; min-width: 16mm; height: 3.4mm; }
.pa-src + .pa-src { margin-top: .4mm; }
@media print { .sheet-scale { page-break-after: always; } }

.pa-intent { font-size: 7.9pt; color: #555; margin-top: .8mm; letter-spacing: -.01em; }

.pa-summary { margin-top: 2mm; border-top: .5pt solid #bbb; padding-top: 2mm; font-size: 8.2pt; line-height: 1.75; color: #222; }
.pa-summary b { margin-right: 1.6mm; }

.crop-legend { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 10.5px; color: var(--brand); font-weight: 600; }
.crop-legend i { width: 10px; height: 10px; border: 1.5px solid var(--brand); background: rgba(49,46,129,.10); border-radius: 2px; }
