/* =====================================================================
   common.css — 모든 페이지가 같이 쓰는 디자인
   목차: 1) 색·기본  2) 위쪽 메뉴  3) 공통 부품(버튼·세그먼트·입력창·메시지·카드)
         4) 설명 말풍선·팝업  5) 홈  6) 준비 중 화면  7) 좁은 화면  8) 인쇄
   ===================================================================== */

/* ---------- 1) 색·기본 ----------
   ✏️ 사이트 전체의 색·글꼴·페이지 상자 너비(테마 변수 --bg, --ink, --acc …, --box)는 css/theme.css 맨 위 :root 한 곳에 있습니다.
   여기는 예전 이름을 테마 변수에 이어 주는 묶음과 "종이 안" 묶음만 둡니다.
   - 시험지·워크북·본문 학습자료의 종이(미리보기 = 인쇄) 안은 테마를 쓰지 않음 → 아래 "종이 안" 묶음이 예전 값·예전 글꼴을 그대로 둠
     (인쇄 결과가 테마 때문에 한 글자도 바뀌지 않게) */
:root {

  /* 예전 이름 → 테마 (페이지 CSS가 예전 이름을 그대로 써도 테마 색이 나오게) */
  --navy-900: var(--ink);
  --navy-800: var(--ink);
  --navy-600: var(--ink2);
  --navy-300: var(--line);
  --navy-100: var(--accbg);
  --navy-50:  var(--bg2);
  --text: var(--ink);
  --disabled: var(--line);
  --accent: var(--acc);
  --accent-dark: var(--acc2);
  --accent-soft: var(--accbg);
  --del-bg: #fde2e1; --del-text: #b42318;   /* 원문에서 바뀐 부분 (테마와 상관없이 그대로) */
  --add-bg: #dcf5e6; --add-text: #13703a;   /* 변형 지문에서 바뀐 부분 */
  --theme-radius: 6px;    /* 모서리 — 화면 틀 (theme.css) */
  --radius: var(--theme-radius);
  --font-ui: var(--font-sans);
  --font-en: var(--font-sans);   /* 화면 틀의 영어 칸(문장 목록 등)도 고딕 — 세리프(Times·명조)는 아래 "종이 안"(인쇄물)에만 */
}
/* 종이 안 (미리보기 = 인쇄): 테마 이전 값 그대로 — 시험지(.sheet-page)·본문 학습자료(.pk-page)·워크북(.wb-book)과 쪽 나누기용 측정 칸 */
.sheet-page, .sheet-measure, .pk-page, .pk-measure, .wb-book, .wb-page {
  /* 화면 바탕(검정·먹색·밤하늘 …)·강조 색을 바꿔도 종이는 늘 밝은 그대로 (2026-10-16 — 예전엔 어두운 바탕이 종이 안 상자에 스며들었음) */
  color-scheme: light;
  --bg: #ffffff; --bg2: #f5f7fa; --ink: #0b1220; --ink2: #1f2937; --accbg: #e8f3fc;
  --dk-surface: initial; --dk-line: initial; --dk-text: initial;
  --navy-900: #14203d;
  --navy-800: #1e2d52;
  --navy-600: #3b4f80;
  --navy-300: #a9b6d3;
  --navy-100: #e6ebf5;
  --navy-50:  #f4f6fb;
  --text: #1b2338;
  --muted: #667085;
  --line: #dde3ee;
  --disabled: #c8ced9;
  --accent: #f08a24;
  --accent-dark: #d9741a;
  --accent-soft: #fff4e8;
  --radius: 16px;
  --font-en: "Times New Roman", Times, "Nanum Myeongjo", Batang, serif;
  --font-ui: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--navy-50);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
}

.page { max-width: 1480px; margin: 0 auto; padding: 24px; }

/* ---------- 2) 위쪽 메뉴 (js/common/site.js가 그립니다) ---------- */
.site-header { background: var(--navy-900); color: #fff; position: relative; z-index: 30; }
.site-header-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap; min-height: 64px;
}
.site-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.site-logo-mark { flex: none; width: 30px; height: 30px; display: block; }   /* 로고 그림 assets/brand/q-mark.png */

.site-menu { display: flex; align-items: stretch; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-menu > li { position: relative; display: flex; }
.menu-link {
  display: flex; align-items: center; gap: 4px;
  padding: 0 16px; min-height: 64px;
  border: 0; background: none; color: #c9d2e8;
  font: inherit; font-size: 15.5px; font-weight: 700; text-decoration: none; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.menu-link:hover, .menu-link:focus-visible { color: #fff; outline: none; }
.menu-link.active { color: #fff; border-bottom-color: var(--accent); }
.menu-caret { font-size: 11px; opacity: .7; transition: transform .2s; }

/* 하위 메뉴: 마우스를 올리거나(hover), 키보드로 들어가거나(focus-within), 눌렀을 때(open) 펼침 */
.submenu {
  display: none;
  position: absolute; top: 100%; left: 0; min-width: 230px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--dk-surface, #fff); border-radius: 0 0 14px 14px; border: 1px solid var(--line); border-top: 0;
  box-shadow: 0 14px 30px rgba(20, 32, 61, .18);
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.open .submenu { display: block; }
.has-sub:hover .menu-caret, .has-sub.open .menu-caret { transform: rotate(180deg); }
.submenu a {
  display: block; padding: 10px 14px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.submenu a small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.submenu a:hover, .submenu a:focus-visible { background: var(--navy-50); outline: none; }
.submenu a.active { background: var(--navy-100); color: var(--navy-800); }

/* 페이지 제목 줄 (메뉴 아래) */
.page-head { background: var(--dk-surface, #fff); border-bottom: 1px solid var(--line); }
.page-head-inner {
  max-width: 1480px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.page-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 2px; }

/* ---------- 3) 공통 부품 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--dk-surface, #fff); color: var(--navy-800);
  font: inherit; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--navy-600); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn.ghost { color: var(--muted); font-weight: 600; }
.btn-big { width: 100%; min-height: 56px; font-size: 17px; border-radius: 12px; }
/* 지금 눌러야 할 버튼 (cta 클래스를 붙였다 뗐다 합니다) */
.btn.cta { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(240, 138, 36, .28); }
.btn.cta:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.link {
  border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--navy-600); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link:hover { color: var(--accent-dark); }
.links { display: flex; gap: 12px; }

/* 세그먼트 버튼 (여러 개 중 하나 고르기) */
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--dk-surface, #fff); }
.seg button {
  border: 0; border-right: 1.5px solid var(--line); background: var(--dk-surface, #fff); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600; padding: 10px 18px; min-height: 46px; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--navy-50); }
.seg button.active { background: var(--navy-800); color: #fff; }
.seg-fill { display: flex; }
.seg-fill button { flex: 1; padding: 8px 6px; min-height: 42px; }
/* 말풍선이 있는 세그먼트: 말풍선이 잘리지 않게 */
.seg-tips { overflow: visible; }
.seg-tips button { position: relative; }
.seg-tips button:first-child { border-radius: 10px 0 0 10px; }
.seg-tips button:last-child { border-radius: 0 10px 10px 0; }
.seg-tips button:first-child::after { left: 0 !important; transform: none !important; }
.seg-tips button:last-child::after { left: auto !important; right: 0; transform: none !important; }
.seg-wide { display: flex; flex-wrap: wrap; overflow: visible; }
.seg-wide button { flex: 1 1 auto; position: relative; }
.seg-wide button:first-child { border-radius: 10px 0 0 10px; }
.seg-wide button:last-child { border-radius: 0 10px 10px 0; }

/* 페이지 안의 탭 (예: 모의고사 변형의 [출제하기] [지문 등록]) */
.page-tabs { display: flex; gap: 4px; background: var(--navy-50); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.page-tabs button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700;
  padding: 8px 18px; border-radius: 9px; cursor: pointer;
}
.page-tabs button small { font-weight: 500; opacity: .75; margin-left: 2px; }
.page-tabs button.active { background: var(--navy-800); color: #fff; }

.select {
  min-height: 46px; padding: 8px 14px; min-width: 220px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--dk-surface, #fff);
  font: inherit; font-size: 16px; color: var(--text);
}
.select.narrow { min-width: 0; width: 120px; }
.select:focus, input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px var(--navy-100); }

input[type="text"], textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; background: var(--dk-surface, #fcfdff); color: var(--text);
}
textarea { min-height: 140px; resize: vertical; }
textarea.en { font-family: var(--font-en); font-size: 16px; line-height: 1.8; }
textarea.tall { min-height: 260px; }
textarea.mono { font-family: Consolas, "D2Coding", monospace; font-size: 12.5px; line-height: 1.5; min-height: 110px; }

.lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.lbl-inline { font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.field { margin-bottom: 10px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.card { background: var(--dk-surface, #fff); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }

.msg { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; }
.msg.info { background: var(--navy-100); color: var(--navy-800); }
.msg.ok { background: var(--dk-surface, #e7f6ec); color: var(--dk-text, #13703a); }
.msg.warn { background: var(--dk-surface, #fff8e1); color: #8a5a00; }
.msg.error { background: var(--dk-surface, #fdecec); color: var(--dk-text, #b42318); }
.msg ul { margin: 6px 0 0; padding-left: 18px; white-space: normal; }
.msg .btn { margin-top: 8px; }

/* 상태 표시 (사용 가능 / 준비 중) */
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.status-pill.ready { background: var(--dk-surface, #e7f6ec); color: var(--dk-text, #13703a); }
.status-pill.soon { background: var(--navy-100); color: var(--navy-600); }

/* 단계 머리표 (STEP 1 …) */
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step-head h2 { margin: 0; font-size: 15px; color: var(--muted); font-weight: 600; }
.step-num { background: var(--navy-800); color: #fff; font-size: 12.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }

/* 원문 ↔ 변형(시험지) 비교 색 표시 (js/common/diff.js) */
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.compare-box { border-top: 1px dashed var(--line); padding: 8px 0; font-family: var(--font-en); font-size: 15px; line-height: 1.85; white-space: pre-wrap; }
.compare-box h4 { margin: 0 0 4px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
mark.del { background: var(--del-bg); color: var(--del-text); border-radius: 3px; padding: 0 2px; }
mark.add { background: var(--add-bg); color: var(--add-text); border-radius: 3px; padding: 0 2px; font-weight: 700; }

/* ---------- 4) 설명 말풍선 · 팝업 ---------- */
[data-tip]:not([data-tip=""]):hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  z-index: 20; width: max-content; max-width: 260px;
  padding: 7px 11px; border-radius: 8px;
  background: var(--navy-900); color: #fff;
  font-size: 12.5px; font-weight: 500; line-height: 1.5; text-align: left; white-space: pre-line;
  pointer-events: none;
}

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 32, 61, .45); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--dk-surface, #fff); border-radius: 16px; width: min(760px, 100%); max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close { border: 0; background: var(--navy-50); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.modal-body { padding: 18px 22px 24px; overflow: auto; }

/* ---------- 문제 유형 선택 + 미리보기 (js/common/question-types.js) — 모의고사 변형·본문 학습자료 공통 ---------- */
.qt-picker { position: relative; }
.qt-desc-switch { position: absolute; top: -2px; right: 0; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.qt-desc-switch input { position: absolute; opacity: 0; pointer-events: none; }
.qt-desc-switch i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--disabled); transition: background .2s; }
.qt-desc-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--dk-surface, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.qt-desc-switch input:checked + i { background: var(--navy-800); }
.qt-desc-switch input:checked + i::after { transform: translateX(14px); }
.qt-desc-switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--navy-100); }
.qt-group + .qt-group { margin-top: 14px; }
.qt-group-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; padding-right: 110px; }
.qt-group + .qt-group .qt-group-head { padding-right: 0; }
.qt-group-name { font-size: 14px; font-weight: 700; color: var(--navy-800); }
.qt-count { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: var(--navy-50); color: var(--navy-600); font-size: 12px; font-weight: 700; }
.qt-group-links { display: inline-flex; gap: 10px; font-size: 13px; }
.qt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qt-item { display: inline-flex; flex-direction: column; }
.qt-chip-row { display: inline-flex; align-items: center; }
.qt-chip {
  border: 1.5px solid var(--line); background: var(--dk-surface, #fff); color: var(--text);
  border-radius: 999px 0 0 999px; border-right: 0; padding: 8px 10px 8px 16px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.qt-chip small { font-size: 11px; color: var(--navy-600); margin-left: 4px; font-weight: 700; }
.qt-zoom {
  display: inline-grid; place-items: center; align-self: stretch; width: 34px;
  border: 1.5px solid var(--line); border-left: 1px solid var(--line); border-radius: 0 999px 999px 0;
  background: var(--dk-surface, #fff); color: var(--navy-600); cursor: pointer; padding: 0 4px 0 0;
}
.qt-chip:hover, .qt-chip:hover + .qt-zoom, .qt-zoom:hover { border-color: var(--navy-600); }
.qt-zoom:hover { background: var(--navy-50); }
.qt-chip.on, .qt-chip.on + .qt-zoom { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.qt-chip.on + .qt-zoom { border-left-color: rgba(255, 255, 255, .35); }
.qt-chip.on small { color: var(--navy-300); }
.qt-desc { display: none; }
.show-desc .qt-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }
.show-desc .qt-desc { display: block; margin: 4px 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

.qt-hover {
  position: absolute; z-index: 60; width: 340px; max-width: calc(100vw - 16px);
  padding: 12px 14px; border-radius: 12px; background: var(--dk-surface, #fff); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(20, 32, 61, .18); font-size: 13px; line-height: 1.5; pointer-events: none;
}
.qt-hover-name { font-weight: 800; color: var(--navy-800); margin-bottom: 6px; }
.qt-hover-name small { font-weight: 600; color: var(--muted); margin-left: 4px; }
.qt-hover-tip { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.qt-ex-passage { font-family: var(--font-en); font-size: 14.5px; line-height: 1.75; text-align: justify; }
.qt-hover .qt-ex-passage { font-size: 13px; line-height: 1.55; color: #4a5268; margin-bottom: 6px; }
.qt-ex-passage.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.qt-ex-inst { margin: 0 0 8px; font-weight: 700; }
.qt-hover .qt-ex-inst { margin: 0 0 4px; }
.qt-ex-box { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-en); font-size: 14px; line-height: 1.7; }
.qt-bogi { display: block; font-family: var(--font-ui); font-size: 12.5px; color: var(--navy-600); margin-bottom: 2px; }
.qt-ex-choices { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-family: var(--font-en); }
.qt-ex-choices li { display: flex; gap: 6px; }
.qt-hover .qt-ex-choices { margin-top: 4px; gap: 1px; }
.qt-cn { flex: none; min-width: 18px; font-family: var(--font-ui); }
.qt-more { color: var(--muted); padding-left: 24px; }
.qt-blank { display: inline-block; width: 7em; border-bottom: 1.5px solid currentColor; vertical-align: -2px; }
.qt-ex .nemo, .qt-hover .nemo { border: 1px solid currentColor; padding: 0 4px; }
.qt-ex-cond { margin-top: 10px; font-size: 14px; }
.qt-ex-cond ul { margin: 4px 0 0; padding-left: 20px; }
.qt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.qt-tag { padding: 2px 9px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-size: 12px; font-weight: 700; }
.qt-where { margin-left: auto; font-size: 12px; color: var(--muted); }
.qt-modal-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.qt-ex { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.qt-ex-answer { margin-top: 14px; font-size: 14.5px; }
.qt-ex-answer b, .qt-ex-explain b { color: var(--navy-800); margin-right: 6px; }
.qt-ex-answer span { color: #c0392b; font-weight: 800; }
.qt-ex-explain { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--navy-50); font-size: 14px; line-height: 1.65; }
.qt-ex-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
/* full (모의고사 변형): 묶음별 칩 + 문항 수 배지 + 옵션 패널 + 자주 쓰는 구성 */
.qt-picker.full .qt-desc-switch { position: static; }
.qt-top { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.qt-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qt-presets select { font: inherit; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--dk-surface, #fff); max-width: 220px; }
.qt-save-row { display: flex; gap: 6px; align-items: center; margin: -2px 0 10px; }
.qt-save-row[hidden] { display: none; }
.qt-save-row input { flex: 1; min-width: 0; max-width: 320px; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.qt-msg { margin: 0 0 8px; font-size: 13px; color: var(--navy-600); }
.qt-msg[hidden] { display: none; }
.qt-group-title { margin: 14px 0 2px; font-size: 15px; font-weight: 800; color: var(--navy-900, var(--navy-800)); }
.qt-group:first-of-type .qt-group-title { margin-top: 4px; }
.qt-cat { padding: 6px 0 4px; }
.qt-cat + .qt-cat { border-top: 1px dashed var(--line); }
.qt-picker.full .qt-group-head { padding-right: 0; margin: 4px 0 6px; }
.qt-cat-name { font-size: 13.5px; font-weight: 700; color: var(--navy-600); }
.qt-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--navy-50); color: var(--navy-800); font-size: 12px; font-weight: 800; }
.qt-chip.on .qt-badge { background: var(--dk-surface, #fff); color: var(--navy-800); }
.qt-chip.zero { color: var(--muted); }
.qt-chip.zero .qt-badge { opacity: .6; }
.qt-chip.zero + .qt-zoom { color: var(--muted); }
.qt-item.open .qt-chip, .qt-item.open .qt-zoom { box-shadow: 0 0 0 3px var(--navy-100); }
.qt-panel { margin: 10px 0 4px; padding: 12px 14px; border: 1.5px solid var(--navy-600); border-radius: 12px; background: var(--dk-surface, #fff); display: grid; gap: 9px; }
.qt-panel-head { display: flex; align-items: baseline; gap: 10px; }
.qt-panel-head b { font-size: 14.5px; color: var(--navy-800); }
.qt-panel-sum { font-size: 12.5px; color: var(--muted); flex: 1; }
.qt-panel-x { border: 0; background: none; font-size: 15px; color: var(--muted); cursor: pointer; padding: 0 2px; }
.qt-panel-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.qt-panel-lb { flex: none; width: 76px; font-size: 13px; font-weight: 700; color: var(--navy-800); }
.qt-panel-row.fixed .qt-fixed { font-size: 13px; color: var(--muted); }
.qt-panel-note { font-size: 12px; color: var(--muted); }
/* 적용 조건 꼬리표 (2026-11-19 — 어법 [판단 근거]는 [밑줄 길이: 절·문장]일 때만): 이름 아래 한 줄, 실선 테두리 · 조건이 안 맞으면 칸 전체를 흐리게 (누를 수 없음) */
.qt-dim-line { flex-basis: 100%; margin-top: -4px; }
.qt-dim-tag { display: inline-block; padding: 0 8px; border: 1px solid var(--acc); border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 1.8; color: var(--acc2); }
.qt-panel-row.qt-dim .qt-panel-lb, .qt-panel-row.qt-dim .qt-seg { opacity: .45; }
.qt-panel-row.qt-dim .qt-seg button { cursor: not-allowed; }
.qt-diff-hint { margin: -4px 0 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }   /* 유형 칸 [선지 난이도] 아래 "↳ 고난도: 이 유형의 정의" */
.qt-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qt-seg button { border: 0; border-right: 1px solid var(--line); background: var(--dk-surface, #fff); font: inherit; font-size: 13px; padding: 6px 11px; cursor: pointer; color: var(--text); }
.qt-seg button:last-child { border-right: 0; }
.qt-seg button.active { background: var(--navy-800); color: #fff; font-weight: 700; }
.qt-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qt-stepper button { width: 32px; height: 30px; border: 0; background: var(--navy-50); font-size: 17px; font-weight: 700; cursor: pointer; color: var(--navy-800); }
.qt-stepper button:disabled { color: var(--disabled); cursor: default; }
.qt-stepper b { min-width: 34px; text-align: center; font-size: 15px; }
.qt-panel-foot { display: flex; gap: 14px; justify-content: flex-end; font-size: 13px; }
.qt-summary { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--navy-50); font-size: 14px; font-weight: 700; color: var(--navy-800); }
.qt-summary:empty { display: none; }
.qt-summary small { font-weight: 500; color: var(--muted); }
.qt-ex-lead { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }   /* 예시 위 한 줄 설명 (순서·삽입 AI 출제 등 — 유형 파일 예시의 note) */
.qt-near { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--dk-surface, #fff4dd); color: #8a5a00; font-size: 13px; }
.qt-tag-opt { background: var(--dk-surface, #fff); border: 1px solid var(--navy-300); }
.qt-ex-sub { margin-top: 12px; }
.qt-ex-explain ul { margin: 4px 0 0; padding-left: 18px; }
@media (hover: none) { .qt-hover { display: none !important; } }
@media (max-width: 560px) {
  .qt-desc-switch { position: static; margin-bottom: 8px; }
  .qt-group-head { padding-right: 0; flex-wrap: wrap; }
  .qt-ex { padding: 10px 12px; }
}

/* ---------- 해설 (교사용, js/common/explain.js) — 모의고사 변형·본문 학습자료 공통 ----------
   글씨는 문제보다 조금 작게(0.88em), 항목 이름은 굵게, [어휘]는 연한 배경 상자 */
.xp { font-size: 0.88em; line-height: 1.6; color: #1b2338; }
.xp-ans { margin-bottom: 2px; }
.xp-a { font-weight: 800; color: #b02a45; font-size: 1.15em; line-height: 1; vertical-align: -0.05em; }   /* 동그라미 숫자(①)는 한글 글꼴에서 작고 가늘게 그려져 "정답" 글자와 맞춤 (2026-10-13) */
.xp-tag { font-size: 0.92em; color: #5b6478; }
.xp-lb { font-weight: 800; color: #1e2d52; margin-right: 2px; }
.xp-sec { margin-top: 3px; }
.xp-ev q { font-family: "Times New Roman", Georgia, serif; font-style: italic; quotes: "“" "”"; }
.xp-ev q + q { margin-left: 4px; }
/* [해설] 근거 문장 한 줄 (2026-11-10 점검 S4): "[근거] 원문" 굵게, 설명은 다음 줄 */
.xp-evl { display: block; margin-bottom: 2px; } .xp-evl q { font-weight: 700; } .xp-evh { margin-right: 4px; }
.xp-ch, .xp-var, .xp-syn { list-style: none; margin: 1px 0 0; padding-left: 0.6em; display: grid; gap: 1px; }
.xp-ch li { display: flex; gap: 5px; align-items: baseline; }
.xp-n { flex: none; min-width: 1.4em; }
.xp-ok { flex: none; font-weight: 800; }
/* 선지 해석 한 줄 = 머리(색) + 본문(--ink2) — 색 경계는 머리/본문 한 곳뿐 (2026-10-07, js/common/explain.js xpChoiceParts)
   머리: ✓ + 선지 해석 = --ok 초록(theme.css) / ✗ + 선지 해석 + "→ 고친 말" = 예전 ✗ 색. 본문: 설명·↔ 패러프레이즈 = --ink2
   [이름] 작은 상자: 글자는 본문 색, 테두리만 머리 색, 바탕 없음. 한글·Word 파일은 원래 검정 한 색이라 상관없음 */
.xp, .xp-ch { --xp-ng: #b02a45; }   /* 틀린 선지 색 = 예전 ✗ 표시 색 그대로 */
.xp-line { --xp-hc: var(--ok, #13703a); } .xp-line.n { --xp-hc: var(--xp-ng); }
.xp-h { color: var(--xp-hc); } .xp-h .xp-ok { margin-right: 5px; }   /* ✓·✗와 선지 해석 사이 (글자 공백 없이 — 예전과 같은 글) */
.xp-b { color: var(--ink2, #1f2937); }
.xp-two .xp-b, .xp-two .xp-lure { display: block; margin-top: 0.4mm; }   /* 선지 해석 아래 줄에 설명 (본문 학습자료 — 2026-10-22) */
.xp-two li + li { margin-top: 1mm; }
.xp-arrow { font-family: "Segoe UI Symbol", "Noto Sans Symbols", sans-serif; font-variant-emoji: text; font-size: 1.25em; line-height: 1; margin: 0 3px; vertical-align: -0.05em; }   /* 원래 표현 ☞ 바꾼 표현 (2026-10-22 선생님) */
.xp-lure { color: var(--muted, #5b6472); font-size: .92em; }   /* 매력적인 오답이 끌리는 이유 (2026-10-12) */
.xp-vp li { display: flex; gap: 5px; align-items: baseline; }   /* 변형 포인트 한 줄에 하나 "• 원문 → 변형" — 꺾인 줄은 • 뒤로 (2026-11-22 explain.js) */
.xp-vp .xp-bul { flex: none; }
.xp-trap { display: inline-block; font-size: 0.86em; font-weight: 800; color: inherit; border: 1px solid var(--xp-hc); border-radius: 3px; padding: 0 4px; margin-right: 3px; }
/* 유형별 풀이 틀 (2026-10-22, js/common/explain.js — 내용 이해 객관식): [해설] 앞 [풀이 순서] 번호 동그라미 = --acc 바탕 흰 숫자, 인쇄는 흑백(검정 테두리).
   그 밖의 해설([해설]·[선지 해석] ✓/✗·함정 종류 상자 …)은 예전 모양 그대로 */
.xp-steps { list-style: none; margin: 2px 0 0; padding-left: 0.6em; display: grid; gap: 2px; }
.xp-steps li { display: flex; gap: 6px; align-items: baseline; }
.xp-sn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.45em; height: 1.45em; border-radius: 50%; background: var(--acc, #0a84d6); color: #fff; font-weight: 800; font-size: 0.85em; line-height: 1; transform: translateY(-0.05em); }
.xp-st b { font-weight: 800; }
@media print { .xp-sn { background: none; color: #000; border: 1px solid #000; } }
/* 답지 구성 B 모의고사형 (2026-11-22, js/common/explain.js xpLayoutSections — 종이 안이라 흑백·인쇄 그대로, 시안 teams/개발팀/보고/답지시안 #B):
   꾸밈 없는 흑백 해설지 — [출제 의도]는 이름 옆에 한 줄, [해석]·[해설]·[선지 해석]·[어휘·어구]는 이름 아래 줄글 · 색 ✓/✗ · 이름 상자 · 회색 상자 없음 */
.xp-B, .xp-B .xp-lb, .xp-B .xp-a { color: #000; }
.xp-B .xp-a { font-size: 1em; vertical-align: baseline; }
.xp-bk > .xp-lb { display: block; }
.xp-bp { line-height: 1.6; }
.xp-bch { list-style: none; margin: 0; padding: 0; }
.xp-bch li { display: flex; gap: 4px; align-items: baseline; line-height: 1.6; }
.xp-bch .xp-n { flex: none; }
.xp-bvoc { line-height: 1.6; }
.xp-bvoc > span { display: inline-block; margin-right: 1.2em; }
.xp-syn code { font-family: "Times New Roman", Georgia, serif; font-weight: 700; color: #1e2d52; background: #e6ebf5; border-radius: 3px; padding: 0 4px; margin-right: 4px; }
.xp-q { color: #5b6478; padding-left: 0.6em; }
.xp .en { font-family: "Times New Roman", Georgia, serif; }
/* 어법·어휘 틀 (2026-10-09 grammar-answer, js/common/explain.js): [해설] 네모·밑줄별 한 줄 + [선지] 한 줄씩 압축.
   공식 라벨 상자 .xp-gp = 테마 색(--xp-th — 워크북 "색 테마"와 같은 값, 기본은 남색) 바탕 + 흰 글자, 인쇄에도 색 그대로 */
.xp-pts, .xp-cc { list-style: none; margin: 1px 0 0; padding-left: 0.6em; display: grid; gap: 1px; }
.xp-pts li, .xp-cc li { display: flex; gap: 5px; align-items: baseline; }
.xp-pl { min-width: 0; }
.xp-pw { color: #5b6478; text-decoration: line-through; }
.xp-gp { display: inline-block; font-size: 0.86em; font-weight: 800; color: #fff; background: var(--xp-th, #1e2d52); border-radius: 3px; padding: 0 4px; margin: 0 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.xp-cc .xp-ok.y { color: var(--ok, #13703a); } .xp-cc .xp-ok.n { color: var(--xp-ng); }
/* 색 테마 다섯 벌 (2026-10-09 workbook-theme → grammar-answer에서 여기로 옮김 — 워크북 종이와 변형 문제 답지 라벨이 같이 씀)
   ✏️ 색값은 여기 한 곳. 고른 테마는 <html data-wb-theme> (워크북 STEP 3에서 고름, 모든 페이지가 site.js로 같은 값을 붙임) */
:root { --wbt-black: #111; --wbt-blue: #2a6cbf; --wbt-orange: #b85a1c; --wbt-green: #2f8550; --wbt-purple: #a8398a; --xp-th: #1e2d52; }
/* 2026-10-14 더함 (차분한 색 — 흑백 복사에서도 읽히게 진하게): ✏️ 색값은 여기 */
:root { --wbt-navy: #1f3a68; --wbt-mint: #17867a; --wbt-lavender: #7b62b8; --wbt-burgundy: #8e2f45; --wbt-charcoal: #3b4048; --wbt-teal: #0f6e80; --wbt-sky: #2a8ac4; --wbt-pink: #c2457a; --wbt-red: #c0392b; --wbt-ochre: #a87d14; --wbt-olive: #6a7d23; --wbt-brown: #8a5a2c; }
html[data-wb-theme="navy"] { --xp-th: var(--wbt-navy); }
html[data-wb-theme="mint"] { --xp-th: var(--wbt-mint); }
html[data-wb-theme="lavender"] { --xp-th: var(--wbt-lavender); }
html[data-wb-theme="burgundy"] { --xp-th: var(--wbt-burgundy); }
html[data-wb-theme="charcoal"] { --xp-th: var(--wbt-charcoal); }
html[data-wb-theme="teal"] { --xp-th: var(--wbt-teal); }
html[data-wb-theme="sky"] { --xp-th: var(--wbt-sky); }
html[data-wb-theme="pink"] { --xp-th: var(--wbt-pink); }
html[data-wb-theme="red"] { --xp-th: var(--wbt-red); }
html[data-wb-theme="ochre"] { --xp-th: var(--wbt-ochre); }
html[data-wb-theme="olive"] { --xp-th: var(--wbt-olive); }
html[data-wb-theme="brown"] { --xp-th: var(--wbt-brown); }
/* 차분한 색 8가지 더 (2026-10-25 추천 색 조합 — 흑백 밝기 0.30~0.43, 흰 종이 대비 4.9 이상: 청회색 90 · 인디고 76 · 포레스트 75 · 세이지 106 · 로즈 101 · 플럼 88 · 샌드 110 · 스톤 102 / 255) */
:root { --wbt-slate: #4a5d78; --wbt-indigo: #39498a; --wbt-forest: #2e5b45; --wbt-sage: #4f7a62; --wbt-rose: #9c4a63; --wbt-plum: #6a4878; --wbt-sand: #8a6a3a; --wbt-stone: #6a655e; }
html[data-wb-theme="slate"] { --xp-th: var(--wbt-slate); }
html[data-wb-theme="indigo"] { --xp-th: var(--wbt-indigo); }
html[data-wb-theme="forest"] { --xp-th: var(--wbt-forest); }
html[data-wb-theme="sage"] { --xp-th: var(--wbt-sage); }
html[data-wb-theme="rose"] { --xp-th: var(--wbt-rose); }
html[data-wb-theme="plum"] { --xp-th: var(--wbt-plum); }
html[data-wb-theme="sand"] { --xp-th: var(--wbt-sand); }
html[data-wb-theme="stone"] { --xp-th: var(--wbt-stone); }
html[data-wb-theme="blue"] { --xp-th: var(--wbt-blue); } html[data-wb-theme="orange"] { --xp-th: var(--wbt-orange); }
html[data-wb-theme="green"] { --xp-th: var(--wbt-green); } html[data-wb-theme="purple"] { --xp-th: var(--wbt-purple); }
.xp-vocab { margin-top: 5px; padding: 4px 8px; border-radius: 5px; background: #f2f4f9; border: 1px solid #e1e6ef; }

/* ---------- 5) 홈 ---------- */
.hero { max-width: 1180px; margin: 0 auto; padding: 40px 24px 8px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.03em; }
.hero p { margin: 0; font-size: 16px; color: var(--muted); }

.home-cards {
  max-width: 1180px; margin: 0 auto; padding: 24px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.home-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--dk-surface, #fff); border: 1.5px solid var(--line); border-radius: 20px; padding: 26px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.home-card:hover { border-color: var(--navy-600); box-shadow: 0 10px 30px rgba(20, 32, 61, .10); transform: translateY(-2px); }
.home-card.featured { grid-column: 1 / -1; background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.home-card.featured .home-card-desc { color: #c9d2e8; }
.home-card.featured .home-icon { background: rgba(255, 255, 255, .12); color: #fff; }
.home-card-top { display: flex; align-items: center; gap: 14px; }
.home-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--navy-100); color: var(--navy-800); flex: none; }
.home-card h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.home-card-desc { margin: 0; color: var(--muted); font-size: 15px; }
.home-card .go { margin-top: auto; font-weight: 700; color: var(--accent-dark); }
.home-card.featured .go { color: var(--accent); }
.home-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.home-subs a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; background: var(--navy-50);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.home-subs a:hover { background: var(--navy-100); }

/* ---------- 6) 준비 중 화면 ---------- */
.soon-page { max-width: 880px; margin: 0 auto; padding: 32px 24px 48px; }
.soon-card { background: var(--dk-surface, #fff); border: 1px solid var(--line); border-radius: 22px; padding: 36px; }
.soon-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.soon-top .home-icon { width: 56px; height: 56px; }
.soon-page h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.soon-desc { font-size: 16px; color: var(--muted); margin: 0 0 24px; }
.soon-features h3 { font-size: 15px; margin: 0 0 10px; color: var(--navy-800); }
.soon-features ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.soon-features li { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--navy-50); }
.soon-features li::before { content: "✓"; color: var(--accent-dark); font-weight: 800; }
.soon-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.soon-siblings { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.soon-siblings h3 { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

/* ---------- 7) 좁은 화면 ---------- */
@media (max-width: 800px) {
  .home-cards { grid-template-columns: 1fr; }
  .home-subs { grid-template-columns: 1fr; }
  .site-header-inner { gap: 6px 16px; padding: 8px 16px; }
  .menu-link { min-height: 44px; padding: 0 10px; font-size: 14.5px; }
}
@media (max-width: 600px) {
  .page { padding: 12px; }
  .seg button { padding: 8px 12px; }
  .select { min-width: 0; width: 100%; }
  .soon-card { padding: 24px 20px; }
}

/* ---------- 8) 인쇄: 메뉴·제목 줄은 인쇄하지 않음 ---------- */
/* ---------- 베타 테스트 (js/common/site.js의 SITE_CONFIG) ---------- */
/* 메뉴 옆 "베타 v0.9.0" */
.site-version { margin-left: -18px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #c9d2e8; white-space: nowrap; }
.site-version b { font-size: 11px; font-weight: 800; color: var(--navy-900); background: var(--accent); border-radius: 999px; padding: 1px 7px; }
/* 오른쪽 아래 [의견 보내기] */
.feedback-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px;
  background: var(--navy-800); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(20, 32, 61, .28);
}
.feedback-btn:hover { background: var(--navy-600); }
/* 모의고사 [지문 등록]의 아래쪽 저장 줄(.save-bar)이 보일 때는 그 위로 올려서 [저장] 버튼을 가리지 않게 */
body:has(#screenAdmin:not([hidden]) .save-bar) .feedback-btn { bottom: 96px; }
/* 처음 접속 안내창 */
.beta-notice { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(20, 32, 61, .45); }
.beta-notice-card { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--dk-surface, #fff); border-radius: var(--radius); padding: 24px 26px 20px; box-shadow: 0 20px 50px rgba(20, 32, 61, .3); }
.beta-notice-card h2 { margin: 0 0 14px; font-size: 19px; color: var(--navy-900); display: flex; align-items: center; gap: 8px; }
.beta-tag { font-size: 12px; font-weight: 800; color: var(--navy-900); background: var(--accent); border-radius: 999px; padding: 2px 9px; }
.beta-notice-card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.6; }
.beta-notice-card li b { color: var(--navy-800); }
.beta-notice-more { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.beta-notice-more a { color: var(--accent-dark); font-weight: 700; }
.beta-notice-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
@media (max-width: 760px) {
  .site-version { margin-left: 0; }
  .feedback-btn { right: 12px; bottom: 12px; padding: 9px 13px; }
}

@media print {
  .no-print, .site-header, .page-head { display: none !important; }
  body { background: #fff; }
}

/* ---------- 문서 로고 카드 + 쪽 위 로고 (js/common/logo.js) — 모의고사 변형·본문 학습자료 공통 ---------- */
.logo-card { display: grid; gap: 10px; }
.logo-card.off .logo-body, .logo-card.off .logo-row { opacity: .45; }
.logo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo-title { font-size: 14.5px; color: var(--navy-800); }
.logo-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.logo-switch input { position: absolute; opacity: 0; pointer-events: none; }
.logo-switch i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--disabled); transition: background .2s; }
.logo-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--dk-surface, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.logo-switch input:checked + i { background: var(--navy-800); }
.logo-switch input:checked + i::after { transform: translateX(14px); }
.logo-switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--navy-100); }
.logo-body { display: flex; gap: 12px; align-items: center; }
.logo-preview { flex: none; width: 110px; height: 52px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.logo-preview img { max-width: 100px; max-height: 44px; object-fit: contain; }
.logo-preview span { font-size: 12px; color: var(--muted); }
.logo-side { min-width: 0; display: grid; gap: 6px; }
.logo-src { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.logo-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.logo-btns [hidden] { display: none; }
/* 내 그림 보관함 창 (js/common/img-lib.js, 2026-10-30) — 디자인 스튜디오(.ss-back z 60) 위에 */
.imlib-modal { z-index: 950; }   /* 첫 방문 안내 풍선(.site-howto-tip 900) 위 · 사용법 영상(1000) 아래 */
.imlib-box { width: min(720px, 100%); border-radius: 10px; }
.imlib-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.imlib-tab { padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink2); font: inherit; font-size: 13px; cursor: pointer; }
.imlib-tab small { font-size: 11px; color: var(--muted); }
.imlib-tab.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.imlib-tab.on small { color: inherit; }
.imlib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.imlib-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.imlib-pic { display: grid; place-items: center; height: 104px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); cursor: pointer; }
.imlib-pic:hover, .imlib-pic:focus-visible { border-color: var(--acc); outline: none; }
.imlib-tile.on .imlib-pic { border: 2px solid var(--acc); }
.imlib-pic img { max-width: 100%; max-height: 88px; object-fit: contain; }
.imlib-name { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imlib-name small { font-size: 11px; color: var(--acc); font-weight: 700; }
.imlib-acts { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.imlib-acts .link { font-size: 11px; color: var(--ink2); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.imlib-empty, .imlib-note { font-size: 13px; color: var(--muted); }
.imlib-note { margin: 16px 0 0; }
@media (max-width: 600px) { .imlib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .imlib-pic { height: 88px; } }
.logo-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.logo-lb { flex: none; width: 34px; font-size: 13px; font-weight: 700; color: var(--navy-800); }
.logo-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.logo-msg { margin: 0; font-size: 12.5px; color: var(--dk-text, #b42318); }
.logo-msg[hidden] { display: none; }
img.doc-logo { display: block; object-fit: contain; pointer-events: none; }

/* ---------- 모의고사 고르기 공통 부품 (js/common/exam-picker.js) — 모든 메뉴가 같은 모양 ----------
   학년 칸 → 연도 줄(최신이 위) → 등록된 달 버튼. 고른 버튼은 남색으로 채움 (워크북 지문 번호 버튼과 같은 모양) */
.exam-picker { display: grid; gap: 12px; }
.xp-grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 520px; }   /* 넓은 화면에서 학년 버튼이 너무 길어지지 않게 */
.xp-grade { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 44px; padding: 6px 4px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 800; font-size: 15px; color: var(--navy-800); cursor: pointer; }
.xp-grade:hover:not(:disabled) { border-color: var(--navy-600); }
.xp-grade.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.xp-grade:disabled { background: #f1f3f7; border-color: #e6e9ef; color: var(--disabled); cursor: not-allowed; }
.xp-grade small { font-size: 11px; font-weight: 600; }   /* "(준비 중)" — 늘 보임 (태블릿·휴대폰에서도) */
.xp-years { display: grid; gap: 8px; }
.xp-year { display: flex; align-items: flex-start; gap: 10px; }
.xp-year-name { flex: none; width: 56px; padding-top: 9px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.xp-months { display: flex; flex-wrap: wrap; gap: 6px; }
/* 2021년 이하 접기 [더보기] (2026-11-11 — js/common/exam-picker.js XP_OLD_MAX) — 작은 글 링크는 --ink2 밑줄 (화면 디자인 규칙) */
.xp-more { justify-self: start; margin-left: 66px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.xp-more small { margin-left: 4px; font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; }
@media (max-width: 480px) { .xp-more { margin-left: 0; } }
.xp-month { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; min-height: 40px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.15; }
.xp-month:hover { border-color: var(--navy-600); }
.xp-month.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.xp-month small { font-size: 10.5px; font-weight: 700; color: var(--accent-dark); }   /* "평가원"·"수능" */
.xp-month.on small { color: var(--navy-300); }
.xp-badge { margin-left: 2px; font-size: 11.5px; font-weight: 800; color: var(--accent-dark); }   /* 담은 지문 수 "6월 ·3" (동형 모의고사) */
.xp-month.on .xp-badge { color: #ffd9b0; }
.xp-empty { margin: 0; font-size: 13.5px; color: var(--muted); }
/* 지문 번호 버튼 (examNumberButtonsHTML — 하나만 고르기, 워크북 지문 번호와 같은 모양) */
.xp-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.xp-num { min-width: 52px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.xp-num:hover { border-color: var(--navy-600); }
.xp-num.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
/* 학년 줄 끝의 따로 떨어진 버튼 ([직접 입력] — 모의고사 변형) + 준비 중 학년 안내 글 */
/* 학년 + [교과서][수능특강][기타][내 자료실]: 단추째 줄 바꿈 — 좁은 칸에서 "수능특/강"처럼 낱말이 끊기지 않게 (2026-10-30) */
.xp-grades.has-extra { display: flex; flex-wrap: wrap; }
.xp-grades.has-extra > .xp-grade { flex: 1 0 auto; min-width: 56px; padding: 6px 8px; white-space: nowrap; word-break: keep-all; }
.xp-grades.has-extra > .xp-sep { flex: 0 0 100%; height: 0; margin: 0; }   /* 학년 줄 다음에 줄을 바꿈 — [교과서]부터는 아랫줄 */
.xp-sep { align-self: stretch; margin: 4px 2px; background: var(--line); }
.xp-extra { font-size: 14px; }
.xp-note { margin: -4px 0 0; max-width: 520px; font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 480px) {   /* 좁은 화면: 연도 이름을 버튼 줄 위로, 버튼은 줄바꿈 (가로 스크롤 없음) */
  .xp-year { flex-direction: column; gap: 4px; }
  .xp-year-name { width: auto; padding-top: 0; }
}

/* =====================================================================
   요청문 카드·도구 (js/common/request.js의 카드 + 워크북 js/workbook/material.js 같은 모양)
   2026-10-05 mock.css에서 옮김 — 모의고사 변형·동형 모의고사·워크북이 같이 씀
   ===================================================================== */
.batch { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; }
.batch.done { border-color: var(--dk-line, #b7e2c4); background: var(--dk-surface, #fafdfb); }
.batch-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.batch-head span { font-size: 13.5px; color: var(--muted); }
.batch-wait { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--dk-surface, #fff4dd); color: #8a5a00; font-size: 13px; }
.batch-head .status { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--navy-100); color: var(--navy-800); }
.batch.done .status { background: var(--dk-surface, #e7f6ec); color: var(--dk-text, #13703a); }
/* 경고가 있는 배치: "확인 필요" (request.js reqStatusText — 성공 표시는 경고가 없을 때만) */
.batch.done.check-warn { border-color: var(--dk-line, #f0d58a); background: var(--dk-surface, #fffdf5); }
.batch.done.check-warn .status { background: var(--dk-surface, #fff3cd); color: #8a6100; }
.batch.done.check-severe { border-color: var(--dk-line, #f2b8b5); background: var(--dk-surface, #fff8f7); }
.batch.done.check-severe .status { background: var(--dk-surface, #fde2e0); color: var(--dk-text, #b42318); }
.batch details { margin-top: 8px; font-size: 13px; color: var(--muted); }
.batch details textarea { margin-top: 6px; }
.batch .answer { margin-bottom: 8px; }
.req-stats { margin: 2px 0 0; padding: 8px 12px; background: var(--navy-50); border-radius: 8px; font-size: 13.5px; }
.req-stats small { color: var(--muted); }
.req-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
/* 지문 배치 안내 (2026-10-30 — request.js reqLayoutHTML: 같은 내용을 한 줄로, 이유는 끝에 한 번) */
.req-layout.req-lay2 { padding: 8px 16px; border-style: solid; font-size: 13px; color: var(--ink2); line-height: 1.6; }
.req-lay2 .req-lay-h { margin: 0 0 8px; }
.req-lay2 .req-lay-h b { color: var(--ink); }
.req-lay2 .req-lay-h small, .req-lay2 small { font-size: 11px; color: var(--muted); }
.req-lay2 > div + div { margin-top: 4px; }
.req-lay2 .req-lay-k { display: inline-block; min-width: 64px; margin-right: 8px; font-weight: 700; color: var(--ink); }
.req-lay2 .req-lay-n { color: var(--muted); }
.req-lay2 .req-lay-why { margin-top: 8px !important; font-size: 11px; color: var(--muted); }
html.ai-mode-api .req-opt-title { display: none; }   /* 변형 문제 "요청문" 제목: API 방식이면 복사할 요청문이 없으니 숨김 (선생님 2026-10-30) */
/* 작업 화면 접기(out-card.js ocLayoutFold — 첫 줄만): 머리 줄 다음 첫 줄을 보이게 */
.req-layout.req-lay2.oc-fold:not(.oc-open) > .req-lay-h + div { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-tools { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.req-tools .row { display: flex; gap: 6px; flex-wrap: wrap; }
.req-bulk summary { cursor: pointer; font-weight: 700; color: var(--navy-800); }
.req-bulk summary small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.req-bulk textarea { width: 100%; min-height: 110px; margin: 8px 0; }

/* 큰 글 나누기 (js/common/text-split.js — 시험지 분석 STEP 3 · 동형 모의고사 STEP 2, 2026-10-09) */
.split-box summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.split-box summary small { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 13px; }
.split-box[open] summary { margin-bottom: 8px; }
.split-box textarea { width: 100%; min-height: 160px; margin: 8px 0; }
.split-box .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.split-review { margin-top: 8px; }
.split-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.split-head small { color: var(--muted); font-size: 13px; }
.split-head .btn { margin-left: auto; }
.split-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.split-item { border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: var(--bg); }
.split-item.flagged { border-color: var(--acc); }
.split-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.split-line small { color: var(--muted); font-size: 13px; }
.split-name { flex: 0 1 280px; min-width: 0; font-weight: 700; }
.split-flag { font-size: 11px; font-weight: 700; color: var(--acc); border: 1px solid var(--acc); border-radius: 6px; padding: 0 8px; }
.split-peek { margin: 8px 0; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.split-dots { color: var(--muted); }
.split-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.split-cut { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.split-cut small { color: var(--muted); font-size: 13px; }
.split-cut ol { margin: 8px 0 0; padding-left: 24px; display: flex; flex-direction: column; gap: 4px; }
.split-first { font-size: 13px; color: var(--muted); }
.split-sent { all: unset; cursor: pointer; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.split-sent:hover, .split-sent:focus { text-decoration: underline; color: var(--acc); }
.split-foot { margin-top: 8px; }

/* 지문 번호 버튼 + 이음 단추 (2026-10-09 textbook-merge-2 — js/common/passage-join.js, 변형 문제 [교과서]·[직접 입력] · 동형 STEP 2 · 시험지 분석 STEP 3) */
.pj-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 0; }
.pj-group { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid transparent; border-radius: 10px; }
.pj-group.joined { border-color: var(--acc); background: var(--accbg); }
.pj-group-head { font-size: 11px; font-weight: 700; color: var(--acc2); padding: 0 4px; }
.pj-group-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0; }
.pj-row .num-item { width: auto; }
.pj-row .num.num-tb { position: relative; display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: auto; min-width: 48px; height: auto; min-height: 48px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.pj-row .num.num-tb.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.pj-row .num.num-tb.pj-static { cursor: default; }
.pj-row .num.num-tb small { margin: 0; font-size: 13px; font-weight: 500; color: inherit; }
.pj-row .num.num-tb small.pj-lab { color: var(--muted); }   /* 읽기 자료 이름 "Further Reading" — 교과서 파일 label 칸 (2026-10-29) */
.pj-row .num.num-tb.on small.pj-lab { color: var(--accbg); }
.pj-row .num.num-tb .num-wc { font-size: 13px; font-weight: 500; opacity: .8; margin-left: -4px; }   /* 단어 수 (2026-10-09 passage-subsplit: 11 → 13px) */
/* 이음 단추 (2026-10-09 passage-subsplit): 번호 버튼과 같은 높이(48px)의 둥근 단추, 테두리 있음 — 떨어져 있으면 "+"(말풍선 "이어 붙이기"), 이어져 있으면 "–"(말풍선 "떼기") */
.pj-join { position: relative; flex: none; align-self: flex-start; width: 32px; height: 48px; margin: 4px 4px 0; padding: 0; border: 1px solid var(--ink2); border-radius: 16px; background: var(--bg); color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.pj-join:hover, .pj-join:focus-visible { border-color: var(--acc); color: var(--acc); outline: none; }
.pj-join.on { margin: 0 4px; border-color: var(--acc); color: var(--acc); }
.pj-join.on:hover, .pj-join.on:focus-visible { background: var(--acc); color: var(--bg); }
/* [직접 나누기] 창 · 원문 보기 창 · 내 자료실 저장·고르기 창 (2026-10-09 passage-subsplit — js/common/subsplit.js · passage-join.js) */
.ss-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 18, 32, .45); }
.ss-box { display: flex; flex-direction: column; gap: 8px; width: min(880px, 100%); max-height: calc(100vh - 32px); padding: 24px; border-radius: 10px; background: var(--bg); box-shadow: 0 16px 48px rgba(11, 18, 32, .25); }
.ss-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.ss-title { font-size: 18px; color: var(--ink); }
.ss-sum { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--acc2); }
.ss-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ss-hint { margin: 0; font-size: 13px; color: var(--muted); }
.ss-list { overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.ss-sent { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 6px; font-size: 15px; line-height: 1.6; color: var(--ink2); cursor: pointer; }
.ss-sent:hover, .ss-sent:focus-visible { background: var(--accbg); outline: none; }
.ss-sent.ss-pfirst { margin-top: 8px; }
.ss-no { flex: none; min-width: 24px; font-size: 11px; font-weight: 700; color: var(--muted); text-align: right; }
.ss-t { font-family: "Times New Roman", Georgia, serif; }
.ss-cut { display: flex; align-items: center; width: 100%; height: 16px; margin: 8px 0 0; padding: 0; border: 0; background: none; cursor: pointer; }
.ss-cut::before, .ss-cut::after { content: ""; flex: 1; border-top: 2px solid var(--acc); }
.ss-cut span { padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--acc); }
.ss-cut:hover::before, .ss-cut:hover::after { border-top-style: dashed; }
.ss-piece-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.ss-piece-head span { font-size: 13px; color: var(--muted); }
.ss-name { width: 120px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 700; color: var(--acc2); background: var(--bg); }
.pj-view-text { overflow: auto; font-family: "Times New Roman", Georgia, serif; font-size: 15px; line-height: 1.7; color: var(--ink2); }
.pj-view-text p { margin: 0 0 8px; }
.pj-save { width: min(560px, 100%); }
.pj-save-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.pj-save-f input { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; }
.pj-lib { width: min(640px, 100%); }
.pj-lib-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; overflow: auto; }
.pj-lib-item { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; font: inherit; cursor: pointer; }
.pj-lib-item:hover, .pj-lib-item:focus-visible { border-color: var(--acc); outline: none; }
.pj-lib-item b { font-size: 15px; color: var(--ink); }
.pj-lib-item span { font-size: 13px; color: var(--muted); }
.pj-ext { margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pj-ext-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 8px; font-size: 13px; color: var(--ink2); }

/* ---------- 인쇄 미리보기 보기 (2026-10-09 preview-spread — js/common/preview-view.js) ----------
   모두 화면(@media screen)에서만 — 인쇄·PDF는 그대로. 칸에는 CSS 변수(--pv-*)만 붙고, 펼침 감싸개(.pv-cell)는 인쇄에서 사라짐 */
.pv-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-toggle button { padding: 4px 16px; font-size: 13px; }
.pv-note { font-size: 11px; color: var(--muted); }
.pv-note[hidden] { display: none; }
@media screen {
  .pv-spread { display: grid !important; grid-template-columns: repeat(2, max-content); justify-content: center; align-items: start; column-gap: 0; row-gap: 24px; overflow: visible !important; }
  .pv-spread .pv-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .pv-spread .pv-cell > :first-child { margin: 0 !important; }
  .pv-spread .pv-left { grid-column: 1; }
  .pv-spread .pv-right { grid-column: 2; }
  .pv-spread .pv-right:not(.pv-first)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 24px; width: 1px; background: var(--line); z-index: 2; }
  .pv-view { position: relative; left: var(--pv-dx, 0px); }
  .pv-no { font-size: 11px; line-height: 16px; color: var(--muted); }
  .pv-fit { width: var(--pv-w) !important; max-width: none !important; transform: scale(var(--pv-s)); transform-origin: top left; margin-left: var(--pv-ml) !important; margin-right: var(--pv-mr) !important; margin-bottom: var(--pv-mb) !important; overflow: visible !important; }
  /* 2026-10-10 (6-1): 펼침이면 STEP 칸을 왼쪽 얇은 띠로 접고 미리보기가 가로 전체 (.pv-fold — preview-view.js). 띠를 누르면 펼쳐짐(그동안 도구 줄 [STEP 접기]) */
  .pv-strip { display: none; }
  .layout.pv-fold, .wb-layout.pv-fold { grid-template-columns: 32px minmax(0, 1fr) !important; max-width: none !important; }
  .layout.pv-fold > .panel, .wb-layout.pv-fold > .wb-panel { display: none !important; }
  .pv-fold > .pv-strip { display: flex; align-items: flex-start; justify-content: center; position: sticky; top: 88px; height: calc(100vh - 112px); min-height: 160px; padding: 16px 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
  .pv-fold > .pv-strip span { writing-mode: vertical-rl; letter-spacing: .1em; }
  .pv-fold > .pv-strip:hover { color: var(--acc); border-color: var(--acc); }
  .layout.pv-fold > .preview, .wb-layout.pv-fold > .wb-preview { max-width: none; }
  .pv-fold-btn[hidden] { display: none; }
  /* (예전) 펼침이면 도구 화면은 STEP 칸 아래로, 미리보기는 화면 폭 전체 — 2026-10-10부터 .pv-wide는 붙지 않음 (위 .pv-fold) */
  .layout.pv-wide, .wb-layout.pv-wide { grid-template-columns: minmax(0, 1fr) !important; }
  /* 도구 줄(인쇄 단추 줄)은 미리보기 칸의 안쪽 여백까지 덮어 가운데 맞춘 종이 묶음보다 짧게 끝나지 않게 (2026-10-09 workbook-theme — 예전엔 1600px에서 오른쪽 끝 약 1557px에서 끊겨 보였음) */
  .layout.pv-wide > .preview > .preview-bar, .wb-layout.pv-wide > .wb-preview > .wb-preview-bar { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .layout.pv-wide > .preview, .wb-layout.pv-wide > .wb-preview { position: static; max-height: none; overflow: visible; width: calc(var(--pv-vw, 100vw) - 32px); max-width: none; margin-left: calc((100% - var(--pv-vw, 100vw)) / 2 + 16px); box-sizing: border-box; }
}
@media print {
  .pv-cell { display: contents !important; }
  .pv-no, .pv-tools { display: none !important; }
}
/* 인쇄 창 설정 안내 띠 (js/common/site.js sitePrintTip, 2026-10-30) — 인쇄 창이 뜰 때 화면 아래 가운데에 한 줄, 인쇄를 막지 않음 · 인쇄물에는 없음 */
/* 2026-11-19: 가운데는 transform 대신 left·right 16px + margin auto — 띠가 화면보다 넓어져도 왼쪽이 잘리지 않음 (선생님 신고 "안내 줄 왼쪽이 잘림") */
.print-tip { position: fixed; left: 16px; right: 16px; margin: 0 auto; bottom: 96px; z-index: 90; display: flex; align-items: center; gap: 16px; width: fit-content; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 16px 24px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; box-shadow: 0 8px 24px -16px rgba(11, 18, 32, .35); font: 15px/1.6 var(--font-sans); color: var(--ink2); }
.print-tip[hidden] { display: none; }
.print-tip b { color: var(--ink); }
.print-tip button { flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.print-tip button:hover { color: var(--acc); }
@media (max-width: 600px) { .print-tip { flex-wrap: wrap; gap: 8px 16px; bottom: 80px; } }
@media print { .print-tip { display: none !important; } }

/* ---------- 내 자료실 · 교과서 [직접 나누기] 줄 (2026-10-09 passage-subsplit) ---------- */
.lib-page { padding-top: 24px; padding-bottom: 64px; }
.lib-sec { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.lib-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.lib-head h2 { margin: 0; font-size: 22px; color: var(--ink); }
.lib-lb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--acc); }
.lib-count { font-size: 13px; color: var(--muted); }
.lib-note, .lib-empty { margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.lib-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lib-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.lib-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lib-main b { font-size: 15px; color: var(--ink); }
.lib-main > span { font-size: 13px; color: var(--muted); }
.lib-pieces, .pj-lib-pieces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pj-lib-static { cursor: default; }
.lib-soon { opacity: .8; }
/* 내 자료실 구역·카드 격자 (2026-10-10 library-reorg — pages/library.html): 지문 자료(직접 입력 지문 · 묶음 나란히) / 문제 세트 / 분석 결과 */
.libz-filter { display: inline-flex; width: auto; margin-bottom: 16px; }
.libz[hidden] { display: none; }
.libz { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.libz-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.libz-col { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.libz-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.libz-sub h3 { margin: 0; font-size: 18px; color: var(--ink); }
.libz-desc { margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.libz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.libz-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 176px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; font: inherit; color: var(--ink2); }
.libz-tile.on { border-color: var(--acc); box-shadow: 0 0 0 3px var(--accbg); }
.libz-tile-main { display: grid; gap: 8px; min-width: 0; }
.libz-tile-main b { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.libz-tile-main > span { font-size: 13px; color: var(--muted); }
.libz-tile .lib-pieces { display: flex; flex-wrap: wrap; gap: 8px; }
.libz-more { font-size: 11px; color: var(--muted); align-self: center; }
.libz-tools { display: flex; gap: 8px; }
.libz-new { cursor: pointer; border-style: dashed; justify-content: center; align-items: center; text-align: center; background: var(--bg); }
.libz-new b { font-size: 15px; color: var(--acc); }
.libz-new span { font-size: 13px; color: var(--muted); }
.libz-new:hover { border-color: var(--acc); }
.libz-dim { opacity: .7; }
.libz-dim b { font-size: 15px; color: var(--ink); }
.libz-dim span { font-size: 13px; color: var(--muted); }
.libz-edit { margin-top: 24px; padding: 16px; border: 1px solid var(--acc); border-radius: 10px; }
@media (max-width: 960px) { .libz-pair { grid-template-columns: 1fr; } }
/* 묶음 고치기 [저장된 지문에서 골라 담기] (js/common/library.js pickerHTML) */
.lib-pick { display: grid; gap: 8px; }
.lib-pick.open { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.lib-pick-group { display: grid; gap: 8px; }
.lib-pick-gname { font-size: 13px; font-weight: 700; color: var(--ink2); }
.lib-pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-pick-chip { font: inherit; font-size: 13px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; }
.lib-pick-chip small { font-size: 11px; color: var(--muted); }
.lib-pick-chip i { font-style: normal; font-weight: 700; margin-right: 8px; }
.lib-pick-chip.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.lib-pick-chip.on small { color: var(--bg); }
.lib-pick-chip:disabled { opacity: .45; cursor: default; }
.tba-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--ink2); background: var(--bg); }
.pk-lib { margin: 4px 0 8px; }
/* 지문 칩 (내 자료실 목록·고르기 창 — 변형 문제 .tb-chip과 같은 모양, mock.css를 읽지 않는 화면에서도) */
.lib-pieces .tb-chip, .pj-lib-pieces .tb-chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink2); border-radius: var(--theme-radius, 6px); padding: 8px 16px; font: inherit; font-size: 13px; cursor: pointer; }
.lib-pieces .tb-chip:hover, .pj-lib-pieces .tb-chip:hover { border-color: var(--acc); }
.lib-pieces .tb-chip small, .pj-lib-pieces .tb-chip small { color: var(--muted); }
/* 고른 지문 수 "4개 중 3개 선택" + [전체 선택] [전체 해제] (외부 지문 칸 · 교과서 탭 안내 줄, 2026-10-09 ext-num-click) */
.pj-count { font-weight: 700; color: var(--acc2); }
.pj-count-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }

/* ---------------------------------------------------------------------
   내 자료실 칸 (2026-10-09 library-unify — js/common/library.js libPanel)
   네 화면(변형 문제·동형·워크북·본문 학습자료)의 고르기 부품 [내 자료실] + 내 자료실 페이지가 같은 모양
   --------------------------------------------------------------------- */
.lib-panel { display: grid; gap: 8px; margin-top: 8px; }
.lib-shelf { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-shelf-btn { font: inherit; font-size: 13px; font-weight: 700; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; }
.lib-shelf-btn small { font-size: 11px; font-weight: 500; color: var(--muted); }
.lib-shelf-btn.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.lib-shelf-btn.on small { color: var(--bg); }
.lib-shelf-new { border-style: dashed; color: var(--ink2); }
/* 고르기만 하는 모양 (네 화면, 2026-10-11 library-hub) — 비었으면 안내 + [자료실로 이동] */
.lib-hid-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }   /* 고르는 목록 끝 "숨긴 묶음 n개 — 내 자료실에서 다시 보이기" (2026-11-12) */
.lib-hid-note a { color: var(--ink2); text-decoration: underline; }
.lib-goto { border: 1px dashed var(--line); border-radius: 10px; padding: 24px; text-align: center; background: var(--bg); }
.lib-goto p { margin: 0 0 16px; font-size: 15px; color: var(--ink2); }
.lib-goto .btn { display: inline-block; text-decoration: none; }
.lib-ro-h { font-size: 15px; color: var(--ink); }
.lib-ro-tools { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.lib-ro-link { color: var(--ink2); text-decoration: underline; }
.lib-cbook { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.lib-cbook .lib-cfield { flex: 1 1 220px; }
.lib-cfield { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.lib-cfield input { font: inherit; font-size: 15px; font-weight: 500; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.lib-clist { display: grid; gap: 8px; }
.lib-citem { border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; background: var(--bg); }
.lib-citem.editing { border-color: var(--acc); }
.lib-citem-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.lib-citem-head span { color: var(--muted); }
.lib-citem-btns { margin-left: auto; display: flex; gap: 4px; }
.lib-citem details { margin-top: 4px; font-size: 13px; }
.lib-citem summary { cursor: pointer; color: var(--ink2); text-decoration: underline; }
.lib-citem ol { margin: 8px 0 0; padding-left: 24px; font-family: var(--font-en); font-size: 13px; line-height: 1.5; }
.lib-arrow { padding: 4px 8px; min-height: 0; }
.lib-arrow:disabled { opacity: .35; cursor: default; }
.lib-cform { display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }
.lib-cform textarea { min-height: 144px; width: 100%; }
.lib-crow, .lib-use { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------------
   미리보기 [글자·간격] 서랍 (2026-10-09 preview-edit, 예전 이름 [모양] — js/common/look.js) · 종이 위 바로 고치기 (js/workbook/edit.js)
   화면에만 — 인쇄에서는 서랍·테두리·점·[원래대로]·안내 줄 모두 숨김
   --------------------------------------------------------------------- */
@media screen {
  html.lk-open body { padding-right: 292px; }   /* 서랍 자리 (종이 칸이 그만큼 좁아지고 미리보기는 칸에 맞게 줄어듦) */
  .lk-drawer { position: fixed; top: 72px; right: 16px; bottom: 16px; z-index: 60; width: 260px; overflow-y: auto; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px -24px rgba(11, 18, 32, .35); display: grid; align-content: start; gap: 16px; }
  .lk-drawer[hidden] { display: none; }
  .lk-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: var(--ink); }
  .lk-close { font: inherit; font-size: 13px; color: var(--ink2); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }
  .lk-hint { margin: 0; font-size: 13px; color: var(--muted); }
  .lk-row { display: grid; gap: 4px; }
  .lk-lb { font-size: 13px; font-weight: 700; color: var(--ink2); }
  .lk-lb small { font-size: 11px; font-weight: 500; color: var(--muted); }
  .lk-row.lk-moved .lk-lb { color: var(--acc); }
  .lk-row.lk-off { opacity: .45; }   /* 짧은 문장 합치기를 끄면 기준 칸 (2026-10-10) */
  .lk-extra { margin-top: 8px; }
  .lk-ctl { display: flex; align-items: center; gap: 4px; }
  .lk-ctl input { width: 64px; height: 32px; padding: 0 8px; text-align: center; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
  .lk-ctl input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--accbg); }
  .lk-ctl small { font-size: 13px; color: var(--muted); margin-left: 4px; }
  .lk-row-slider .lk-ctl input[type=range] { flex: 1; width: auto; min-width: 0; height: 24px; padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--acc); }   /* 막대 칸 (2026-10-14 — Topic 크기·해석지 머리 올리기) */
  .lk-row-slider .lk-ctl small { flex: none; min-width: 72px; }
  .lk-btn { width: 32px; height: 32px; font: inherit; font-size: 11px; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
  .lk-btn:disabled { opacity: .35; cursor: default; }
  .lk-range { font-size: 11px; color: var(--muted); }
  .lk-msg { font-size: 13px; color: var(--warn); }
  .lk-warn { display: block; font-size: 11px; font-weight: 700; color: #8a6100; }   /* 인쇄 때 문제가 될 만한 값 — 막지 않고 노란 한 줄 (2026-10-10 wb-width-fix, 워크북 재료 줄 노랑과 같은 색) */
  .lk-warn[hidden] { display: none; }
  .lk-papers { font-size: 13px; color: var(--ink2); padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
  .lk-papers[hidden] { display: none; }
  .lk-papers span { display: block; margin-top: 4px; }
  .lk-link { font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
  .lk-reset { justify-self: start; }
  .lk-presets { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }   /* [글자·간격] 자주 쓰는 구성 (presets.js, 2026-10-15) */
  .lk-presets .ps-bar, .lk-presets.ps-bar { margin: 0; }
  .pv-tools .btn.lk-toggle.active { background: var(--acc); border-color: var(--acc); color: var(--bg); }   /* 열린 동안 = 세그먼트 고른 모양 */
  /* 바로 고치기 */
  .wb-ed-hover { outline: 1px dashed var(--acc); outline-offset: 1px; cursor: text; }
  /* 비우고 저장한 빈칸 (2026-11-22, util.js edMarkBlank): 화면에서만 점선 칸 — 다시 눌러 [원래대로] 할 수 있게. 인쇄에는 없음 */
  .ed-blank { outline: 1px dashed var(--line); outline-offset: 1px; cursor: text; }
  .ed-blank-in { display: inline-block; min-width: 32px; }
  .ed-blank-w { min-width: 32px; }
  /* 머리말 누르기 (js/common/page-deco.js, 2026-11-19): 변형 문제·동형·학교별 기출 미리보기의 머리말 → 디자인 스튜디오 [머리말] 탭 */
  html:not(.pdf-mode) body:is([data-page="mock"], [data-page="similar"], [data-page="school-exams"]) #sheet .sheet-head:hover { outline: 1px dashed var(--acc); outline-offset: 4px; cursor: pointer; }
  .wb-ed-on { outline: 1.5px solid var(--acc); outline-offset: 1px; background: var(--accbg); }
  .wb-edited { position: relative; }
  .wb-edited::after { content: ''; position: absolute; top: -2px; right: -5px; width: 5px; height: 5px; border-radius: 50%; background: var(--acc); }
  /* 누르면 뜨는 작은 창 (2026-11-01 — edit.js wbEdPop): 머리 이름 · 입력 칸 · [저장][취소][원래대로] · [모두 한 번에 ›][모양 바꾸기 ›] */
  .wb-ed-pop { position: absolute; z-index: 62; width: 320px; display: grid; gap: 8px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px -12px rgba(11, 18, 32, .35); font-size: 13px; color: var(--ink2); }
  .wb-ed-pop-h { font-size: 13px; font-weight: 800; color: var(--ink); }
  .wb-ed-pop input, .wb-ed-pop textarea { width: 100%; box-sizing: border-box; padding: 8px; font: inherit; font-size: 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
  .wb-ed-pop input:focus, .wb-ed-pop textarea:focus { outline: none; border-color: var(--acc); }
  .wb-ed-pop-in { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 8px; }
  .wb-ed-pop-in span { font-size: 13px; color: var(--muted); }
  .wb-ed-pop-note { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
  .wb-ed-pop-btns { display: flex; flex-wrap: wrap; gap: 8px; }
  .wb-ed-pop-links { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
  .wb-ed-pop-links .link { font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
  /* 2026-10-10 workbook-edit-2: [전체]/[이쪽만] · 첫 안내 풍선 · 고치기 안내 줄 · 원문 바뀜 줄 · 단어 추가·빼기 */
  .lk-scope { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .lk-scope[hidden] { display: none; }
  .lk-seg { display: flex; }
  .lk-seg button { flex: 1; height: 32px; font: inherit; font-size: 13px; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); cursor: pointer; }
  .lk-seg button:first-child { border-radius: 6px 0 0 6px; } .lk-seg button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
  .lk-seg button + button { border-left: 0; }
  /* 2026-10-11: [쪽 지정] 칸 · 일부 종류에만 쓰이는 칸의 작은 설명 · 정할 쪽이 없을 때 흐림 */
  .lk-pages { display: grid; gap: 4px; }
  .lk-pages[hidden] { display: none; }
  .lk-pages input { height: 32px; padding: 0 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; }
  .lk-pages small { font-size: 11px; color: var(--ink2); }
  .lk-only { font-size: 11px; font-weight: 500; color: var(--muted); }
  .lk-only[hidden] { display: none; }
  .lk-row.lk-none { opacity: .45; }
  .lk-seg button.on { background: var(--acc); border-color: var(--acc); color: var(--bg); font-weight: 700; }
  .lk-scope-note { font-size: 11px; color: var(--muted); }
  .lk-scope-note b { color: var(--ink2); }
  .lk-tip { position: absolute; z-index: 62; transform: translateX(-50%); padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--bg); background: var(--ink); border-radius: 6px; white-space: nowrap; box-shadow: 0 8px 24px -12px rgba(11, 18, 32, .5); }
  .lk-tip::before { content: ''; position: absolute; left: 50%; top: -6px; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
  .wb-edit-tip, .wb-rereq-line { margin: 0 0 8px; padding: 8px 16px; font-size: 13px; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; }
  .wb-rereq-line b { color: var(--ink); }
  .wb-rereq-line button { margin-left: 8px; font: inherit; font-size: 13px; font-weight: 700; color: var(--acc); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0; }
  .wb-vx { position: absolute; z-index: 61; width: 18px; height: 18px; padding: 0; font: inherit; font-size: 13px; line-height: 16px; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
  .wb-vx:hover { color: var(--warn); border-color: var(--warn); }
  .wb-vx[hidden] { display: none; }
  .wb-vadd { position: absolute; z-index: 61; padding: 2px 8px; font: inherit; font-size: 11px; font-weight: 700; color: var(--acc); background: var(--bg); border: 1px dashed var(--acc); border-radius: 6px; cursor: pointer; white-space: nowrap; }
  .wb-vadd small { font-weight: 500; color: var(--muted); margin-left: 4px; }
  .wb-vadd-box { position: absolute; z-index: 62; display: flex; gap: 4px; padding: 8px; background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; box-shadow: 0 8px 24px -12px rgba(11, 18, 32, .35); }
  .wb-vadd-box input { width: 140px; height: 28px; padding: 0 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; }
  .wb-vadd-box input:focus { outline: none; border-color: var(--acc); }
  .wb-vadd-box small { align-self: center; font-size: 11px; color: var(--muted); }
}
@media print {
  .lk-drawer, .wb-ed-pop, .lk-tip, .wb-edit-tip, .wb-rereq-line, .wb-vx, .wb-vadd, .wb-vadd-box { display: none !important; }
  .wb-ed-hover, .wb-ed-on { outline: none !important; background: none !important; }
  .wb-edited::after { display: none !important; content: none !important; }
  html.lk-open body { padding-right: 0 !important; }
}

/* ---------- 회원 관리 (pages/admin.html — 2026-10-10 server-store) ---------- */
.adm-card { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.adm-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.adm-auto { margin: 0; font-size: 13px; color: var(--ink2); }
.adm-auto b { margin-right: 8px; padding: 0 8px; border: 1px solid var(--acc); border-radius: 6px; color: var(--acc); font-size: 11px; line-height: 20px; display: inline-block; }   /* 자동 결제 회원 표시 (2026-11-14) */
.adm-card select, .adm-perk select { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; color: var(--ink2); background: var(--bg); }   /* 체험 회원 · 혜택 끝 날 n개월 (2026-11-11) */
.adm-perk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.adm-perk label { display: inline-flex; align-items: center; gap: 8px; }
.adm-card input { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; color: var(--ink2); background: var(--bg); min-width: 0; }
.adm-schools { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.adm-sub { font-size: 13px; color: var(--muted); }
.adm-school { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.adm-school input:first-child { flex: 2 1 240px; }
.adm-school input:nth-child(2) { flex: 1 1 160px; }
.adm-card-tools { display: flex; justify-content: flex-end; }
.adm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.adm-msg { font-size: 13px; color: var(--ink2); }
.adm-msg.adm-warn { color: var(--warn); font-weight: 700; }

/* 요청문 번호 (2026-10-10 prompt-version — js/common/prompt-version.js): 작은 글씨 "요청문 v13", 누르면 아래 상자. 화면에만 */
.pver-wrap { position: relative; display: inline-block; vertical-align: baseline; }
button.pver { font: inherit; font-size: 11px; line-height: 1.4; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; cursor: pointer; }
button.pver:hover, button.pver[aria-expanded="true"] { color: var(--acc); border-color: var(--acc); }
button.pver.old { color: var(--ink2); }
.pver-box { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: min(420px, 80vw); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 18, 32, .08); padding: 16px; font-size: 13px; line-height: 1.6; color: var(--ink2); text-align: left; white-space: normal; font-weight: 400; }
.pver-box p { margin: 0 0 8px; }
.pver-box .pver-t small, .pver-box li small { color: var(--muted); }
.pver-box .pver-s { color: var(--ink); font-weight: 700; }
.pver-box ul { margin: 0 0 8px; padding-left: 16px; }
.pver-box li { margin: 0 0 8px; }
.pver-line { font-size: 13px; color: var(--muted); margin: 8px 0; }
.lib-latest { font-size: 13px; color: var(--ink2); display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
@media print { .pver-wrap, .pver-box, .pver-line { display: none !important; } }

/* 담당 학교·학년 고르기 (2026-10-10 school-panel — js/common/school-panel.js): STEP 1 위 카드, 고른 단추만 --acc */
.school-pick { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 24px; margin: 0 0 16px; }
.school-pick .sp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 15px; color: var(--ink); }
.school-pick .sp-lb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--acc); }
.school-pick .sp-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.school-pick .sp-btn { font: inherit; font-size: 13px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink2); cursor: pointer; }
.school-pick .sp-btn span { color: var(--muted); }
.school-pick .sp-btn:hover { border-color: var(--acc); }
.school-pick .sp-btn.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.school-pick .sp-btn.on span { color: var(--bg); }
.school-pick .sp-none { margin: 0; font-size: 13px; color: var(--muted); }
.school-pick .sp-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
@media print { .school-pick { display: none !important; } }

/* ---------- 유형별 비틀기 (2026-10-10 type-options — js/common/twist.js) ----------
   칸 네 개(선지 길이·빈칸 방식·삽입 문장·어휘 방식) + 둥근 i 설명 풍선 + 미리보기 위 설정 요약 줄. 화면에서만 (인쇄 안 됨) */
.tw-box { display: grid; gap: 16px; }
.tw-box.tw-wide { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tw-row { display: grid; gap: 8px; position: relative; }   /* 풍선은 칸 폭에 맞춰 (오른쪽 칸 밖으로 넘치지 않게) */
.tw-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); font-weight: 700; }
.tw-i-wrap { display: inline-flex; }
.tw-i { width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--muted);
  font: 700 11px/16px var(--font-sans); text-align: center; cursor: pointer; }
.tw-i:hover, .tw-i[aria-expanded="true"] { border-color: var(--acc); color: var(--acc); }
.tw-pop { position: absolute; z-index: 40; top: 24px; left: 0; right: 0; min-width: 240px; padding: 16px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 12%, transparent); font-weight: 400; color: var(--ink2); }
.tw-pop[hidden] { display: none; }
.tw-info { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.tw-ex, .tw-pat { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 11px; line-height: 1.5; }
.tw-ex b { color: var(--muted); font-weight: 700; }
.tw-en { font-family: var(--font-sans); color: var(--ink); }
.tw-arrow { color: var(--acc); font-weight: 700; }
.tw-tail { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.tw-pat-h { margin: 8px 0 8px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tw-pat li::before { content: "– "; color: var(--muted); }
.tw-note { margin: 0; }
.sim-twist { margin: 16px 0; padding: 16px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.sim-twist-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.tw-sum { font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.tw-sum::before { content: "비틀기: "; }
@media print { .tw-sum, .tw-pop, .tw-box, .sim-twist { display: none !important; } }
.lib-link { font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }   /* 내 자료실 고치기 칸 [닫기] (2026-10-10 library-reorg) */

/* 교과서 고르기 공통 부품 (2026-10-11 textbook-everywhere — js/common/tb-picker.js: 동형 STEP 2 · 워크북 STEP 1 · 본문 학습자료 STEP 2, 변형 문제 [교과서] 탭과 같은 모양) */
.tbp { display: grid; gap: 8px; }
.tbp-lbl { font-size: 13px; font-weight: 700; color: var(--ink2); margin-top: 8px; }
.tbp .tb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tbp .tb-chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink2); border-radius: var(--theme-radius, 6px); padding: 8px 16px; font: inherit; font-size: 13px; cursor: pointer; }
.tbp .tb-chip:hover:not(:disabled) { border-color: var(--acc); }
.tbp .tb-chip:disabled { opacity: .45; cursor: default; }
.tbp .tb-chip.on { background: var(--acc); border-color: var(--acc); color: var(--bg); font-weight: 700; }
.tbp .tb-chip small { font-size: 11px; color: var(--muted); margin-left: 4px; }
.tbp .tb-chip.on small { color: var(--bg); }
.tbp-nums { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tbp-num { display: grid; gap: 4px; text-align: left; min-width: 120px; max-width: 240px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--theme-radius, 6px); background: var(--bg); font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.tbp-num:hover { border-color: var(--acc); }
.tbp-num.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.tbp-num small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbp-num.on small { color: var(--bg); }

/* 내 자료실 고르기 칸 · 고르기 창 (2026-10-11 library-pick — 시안 docs/design/library_pick_mock.png, js/common/library.js renderPick·libPickOpen) */
.lib-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lib-pk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lib-pk > * { min-width: 0; }
.lib-pk-h { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.lib-pk-h2 { display: flex; align-items: center; gap: 8px; }
.lib-pk-all { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink2); cursor: pointer; }
.lib-pk-cur { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.lib-pk-cur > div { flex: 1; min-width: 0; }
.lib-pk-cur b { display: block; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-pk-cur small { font-size: 13px; color: var(--muted); }
.lib-pk-fic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accbg); color: var(--acc); flex: none; }
.lib-pk-none { display: grid; justify-items: center; gap: 16px; padding: 24px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; background: var(--bg); }
.lib-pk-none p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.7; }
.lib-pk-rows { display: grid; gap: 8px; }
.lib-pk-row { display: grid; grid-template-columns: auto 24px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
div.lib-pk-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
label.lib-pk-row { cursor: pointer; }
.lib-pk-row.on { border-color: var(--acc); background: var(--accbg); }
.lib-pk-row b { display: block; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-pk-row small { display: block; font-size: 13px; color: var(--muted); }
.lib-pk-pic { color: var(--muted); display: grid; }
.lib-pk input[type=checkbox], .lpm input[type=radio] { width: 18px; height: 18px; accent-color: var(--acc); margin: 0; }
.lib-pk-use { justify-self: start; }
.lib-pk-hint { margin: 0; }
.lib-pk-other { height: 48px; border: 1px solid var(--acc); border-radius: 6px; background: var(--bg); color: var(--acc); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.lib-pk-lnk { margin: 0; text-align: center; font-size: 13px; }
.lib-pk-lnk a { color: var(--ink2); }
.lib-pk-note { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; color: var(--muted); }
body.lpm-on { overflow: hidden; }
.lpm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(11, 18, 32, .45); }
.lpm[hidden] { display: none; }
.lpm-box { width: min(960px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 16px; background: var(--bg); border-radius: 10px; padding: 24px 24px 0; box-shadow: 0 8px 32px rgba(11, 18, 32, .2); }
.lpm-h { display: flex; align-items: flex-start; }
.lpm-h h2 { margin: 0; font-size: 22px; color: var(--ink); }
.lpm-h p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.lpm-x { margin-left: auto; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.lpm-tabs { display: flex; border-bottom: 1px solid var(--line); }
.lpm-tabs button { display: flex; gap: 8px; align-items: center; height: 48px; padding: 8px 24px; border: 1px solid var(--line); border-bottom: 0; background: var(--bg); font: inherit; font-size: 15px; font-weight: 700; color: var(--ink2); cursor: pointer; }
.lpm-tabs button + button { border-left: 0; }
.lpm-tabs button:first-child { border-radius: 6px 0 0 0; }
.lpm-tabs button:last-child { border-radius: 0 6px 0 0; }
.lpm-tabs button.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.lpm-tabs button small { font-size: 13px; font-weight: 500; }
.lpm-tools { display: flex; gap: 8px; }
.lpm-srch { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.lpm-srch input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); }
.lpm-tools select { height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; font-size: 13px; color: var(--ink2); }
.lpm-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 440px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lpm-folders { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; padding: 8px 0; border-right: 1px solid var(--line); }   /* 칸 폭 200px 안에 — 긴 폴더 이름은 …으로, 숫자는 칸 안 오른쪽 끝에 (2026-10-31 선생님 신고: 숫자가 칸 선 밖으로) */
.lpm-folders button { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 8px 16px; border: 0; border-left: 2px solid transparent; background: none; font: inherit; font-size: 15px; color: var(--ink2); text-align: left; cursor: pointer; }
.lpm-folders button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpm-folders button small { flex: none; margin-left: auto; font-size: 13px; color: var(--muted); }
.lpm-folders button.on { background: var(--accbg); border-left-color: var(--acc); color: var(--acc); font-weight: 700; }
.lpm-sep { margin: 8px 16px; border-top: 1px solid var(--line); }
.lpm-fh { padding: 8px 16px 0; font-size: 11px; color: var(--muted); }
.lpm-fnone { margin: 8px 16px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.lpm-main { display: flex; flex-direction: column; min-width: 0; }
.lpm-list { flex: 1; display: grid; gap: 8px; align-content: start; padding: 16px; }
.lpm-row { border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.lpm-row.on { border-color: var(--acc); background: var(--accbg); }
.lpm-bun-h, .lpm-p { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; }
.lpm-fic { color: var(--acc); display: grid; }
.lpm-t b { display: block; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpm-t small { display: block; font-size: 13px; color: var(--muted); }
.lpm-tog { border: 0; background: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 0 8px; }
.lpm-ps { display: grid; gap: 4px; padding: 0 16px 16px 72px; }
.lpm-ps div { display: grid; grid-template-columns: 20px 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 6px; background: var(--bg); font-size: 13px; color: var(--ink2); }
.lpm-ps .lpm-pn { min-width: 0; overflow-wrap: anywhere; }   /* 과·번호가 말줄임표로 사라지지 않게 줄바꿈 (2026-10-30) */
.lpm-ps .lpm-pn em { display: block; font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpm-ps small { color: var(--muted); }
.lpm-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lpm-tags i { font-style: normal; font-size: 11px; line-height: 20px; padding: 0 8px; border-radius: 6px; background: var(--bg2); color: var(--ink2); }
.lpm-tags i.none { color: var(--muted); }
#lpmHid .lib-hid-note { margin: 0; padding: 0 16px 8px; }   /* 고르기 창 안 숨긴 묶음 줄 — 아래 줄과 같은 왼쪽 여백 (2026-11-12) */
.lpm-bar { display: flex; gap: 8px; align-items: center; padding: 8px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.lpm-go { border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.lpm-pg { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lpm-pg button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; }
.lpm-pg button:disabled { opacity: .4; cursor: default; }
.lpm-empty { padding: 48px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.lpm-foot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 16px 24px; margin: 0 -24px; border-top: 1px solid var(--line); background: var(--bg); }
.lpm-foot span { flex: 1; font-size: 15px; color: var(--ink); }
.lpm-foot span b { color: var(--acc); }
@media (max-width: 800px) {
  .lpm-body { grid-template-columns: 1fr; }
  .lpm-folders { display: flex; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .lpm-sep, .lpm-fh, .lpm-fnone { display: none; }
  .lpm-tabs button { padding: 8px 16px; }
}

/* 자동 저장 표시 (2026-10-13 — 저장 버튼 옆, 화면만) */
.auto-saved { margin-left: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; align-self: center; }

/* 사용 횟수 안내 (2026-10-13 quota — js/common/quota.js): 이번 달 횟수를 다 쓰면 화면 아래 가운데 */
.quota-block { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9000; max-width: min(560px, calc(100vw - 32px));
  background: var(--bg); border: 1px solid var(--warn); border-left-width: 4px; border-radius: 10px; padding: 16px 24px; box-shadow: 0 8px 24px rgba(11, 18, 32, .12);
  font-size: 15px; line-height: 1.6; color: var(--ink2); }
.quota-block[hidden] { display: none; }
.quota-block b { color: var(--warn); }
.quota-block a { color: var(--acc); font-weight: 700; margin-right: 8px; }
.quota-block .btn { vertical-align: middle; }
@media print { .quota-block { display: none !important; } }

/* 회원 관리 — 이번 달 사용 현황 표 (2026-10-13 quota, pages/admin.html) */
.adm-use-wrap { overflow-x: auto; }
.adm-use { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg); }
.adm-use th, .adm-use td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; white-space: nowrap; }
.adm-use th { font-size: 11px; color: var(--muted); font-weight: 700; }
.adm-use td.num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-use small { color: var(--muted); font-size: 11px; }
.adm-use tr.adm-use-out td { color: var(--warn); font-weight: 700; }
/* 회원 관리 코인 내역 (2026-11-05 오류 목록 17번 — pages/admin.html coinOpen) */
.adm-coin-btn { margin-left: 8px; }
.adm-coin-btn.on { border-color: var(--acc); color: var(--acc); }
.adm-use tr.adm-coin-row > td { background: var(--bg2); padding: 16px; white-space: normal; }
.adm-coin-h { margin: 0 0 8px; font-size: 13px; }
.adm-coin .adm-use { width: auto; margin-bottom: 16px; }
.adm-coin-list { max-height: none; }

/* 사용 횟수 '완료 시 n회 차감' (2026-10-13 차감예정 — js/common/quota.js quotaNote): 요청문 수 줄 바로 아래 */
.quota-note { margin: 8px 0 16px; padding: 8px 16px; border-left: 3px solid var(--acc); background: var(--accbg); border-radius: 6px; font-size: 13px; line-height: 1.6; color: var(--ink2); }
.quota-note[hidden] { display: none; }
.quota-note b { color: var(--ink); font-size: 15px; }
.quota-note-lb { display: inline-block; margin-right: 8px; font-size: 11px; font-weight: 700; color: var(--acc); }
.quota-note-old, .quota-note-left { color: var(--muted); }
.quota-note-why { display: block; font-size: 11px; color: var(--muted); }
@media print { .quota-note { display: none !important; } }

/* 차감 위치 (2026-10-13 차감위치): 잔여 횟수가 모자랄 때 · 셈이 끝난 뒤 미리보기 위 한 줄 */
.quota-note.quota-note-short { border-left-color: var(--warn); background: var(--bg); border: 1px solid var(--warn); border-left-width: 3px; }
.quota-note.quota-note-short b { color: var(--warn); }
.quota-note a { color: var(--acc); font-weight: 700; margin-left: 8px; }
.mk-side-foot .quota-note { margin: 8px 0; }
.quota-done { margin: 0 0 8px; padding: 8px 16px; border-radius: 6px; background: var(--accbg); color: var(--ink2); font-size: 13px; font-weight: 700; }
.quota-done[hidden] { display: none; }
@media print { .quota-done { display: none !important; } }

/* [글자·간격] 서랍: 모든 종이 칸과 종류별 칸 사이 실선 (2026-10-14) */
.lk-sep { margin: 8px 0 0; padding-top: 12px; border-top: 2px solid var(--line); }
.lk-sep[hidden] { display: none; }
.lk-sep span { font-size: 11px; font-weight: 700; color: var(--muted); }

/* 돋보기: 바뀐 예시가 없는 비틀기 설명 (2026-10-14) */
.qt-ex-twist { margin: 8px 0 0; padding: 8px 16px; border-left: 3px solid var(--acc); background: var(--accbg); font-size: 13px; color: var(--ink2); }
.qt-ex-twist b { color: var(--ink); }

/* 문서 꾸미기 — 변형 문제·동형·본문 학습자료 (2026-10-14, js/common/page-deco.js) */
.pd-sec { display: grid; gap: 8px; margin-top: 16px; }
.pd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--ink2); }
.pd-lb { min-width: 64px; font-weight: 700; color: var(--ink); }
.pd-seg { flex-wrap: wrap; }
.pd-name { color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-hint { margin: 0; font-size: 13px; color: var(--muted); }
.pd-foot { display: grid; gap: 4px; }
.sheet-page-no.pd-no-r, .pk-foot.pd-no-r { left: auto !important; right: 15mm !important; text-align: right !important; }
.sheet-page-no.pd-no-l, .pk-foot.pd-no-l { right: auto !important; left: 15mm !important; text-align: left !important; }
.pd-no-serif { font-family: 'Times New Roman', 'Nanum Myeongjo', 'Batang', serif !important; font-weight: 700; letter-spacing: .06em; }
.pd-no-heavy { font-family: 'Arial Black', 'Pretendard', sans-serif !important; font-weight: 900; }
.pd-logo { position: absolute; line-height: 0; }
.pd-foot-img { position: absolute; bottom: 4mm; right: 15mm; line-height: 0; }
.pd-foot-img.left { right: auto; left: 15mm; }
.pd-foot-img[style*="top"] { bottom: auto; right: auto; }
.pd-foot-img img { display: block; object-fit: contain; }
@media screen {
  .pd-logo, .pd-foot-img { cursor: move; touch-action: none; }
  .pd-logo:hover, .sheet-page img.doc-logo:hover, .pk-page img.doc-logo:hover, .pd-foot-img:hover, .pd-dragging { outline: 1px dashed var(--acc); outline-offset: 1mm; }
}
.wb-pno-pill { display: inline-block; min-width: 7mm; padding: 0.4mm 2.4mm; border-radius: 3mm; background: #333; color: #fff; text-align: center; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media screen { .sheet-page img.doc-logo, .pk-page img.doc-logo { pointer-events: auto; cursor: move; touch-action: none; } }   /* 문서 꾸미기: 끌어 옮길 수 있는 로고만 (2026-10-14) */

/* ==============================================================
   쪽 번호 모양 · 쪽 번호 스타일 창 (2026-10-14 — js/common/pno-style.js)
   ===================================================================== */
.pno-x { display: inline-block; line-height: 1.2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pno-circ { min-width: 1.7em; height: 1.7em; line-height: 1.55em; border: 1.2px solid currentColor; border-radius: 50%; text-align: center; }
.pno-pill { display: inline-block; min-width: 1.7em; height: 1.7em; line-height: 1.7em; padding: 0; border-radius: 50%; background: #333; color: #fff; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pno-cap { min-width: 2.6em; padding: 0 .6em; border: 1.2px solid currentColor; border-radius: 1em; text-align: center; }
.pno-line { display: inline-flex; align-items: center; gap: .5em; }
.pno-line i { display: inline-block; width: 1.4em; border-top: 1.2px solid currentColor; }
.pno-under { padding: 0 .5em .1em; border-bottom: 1.2px solid currentColor; }
.pno-corner { padding: .5em .3em .1em 1.4em; background: linear-gradient(135deg, transparent 50%, #e2e2e2 50%); font-size: .85em; }
.pno-bar { padding: 0 .5em; border-left: 1.2px solid currentColor; border-right: 1.2px solid currentColor; }
.pno-f-serif { font-family: 'Times New Roman', 'Nanum Myeongjo', 'Batang', serif; font-weight: 700; }
.pno-f-heavy { font-family: 'Arial Black', 'Pretendard', sans-serif; font-weight: 900; }
.pno-cur { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 32px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 13px; }
.pno-cur-off { color: var(--muted); }
.btn.pno-open { border-color: var(--acc); color: var(--acc); background: var(--bg); }

.pno-back { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(11, 18, 32, .32); }
.pno-modal { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border-radius: 10px; background: var(--bg); color: var(--ink); box-shadow: 0 16px 48px rgba(11, 18, 32, .2); display: grid; gap: 16px; }
.pno-modal h2 { margin: 0; font-size: 22px; }
.pno-sub { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
.pno-close { position: absolute; top: 16px; right: 16px; border: 0; background: none; font-size: 18px; color: var(--ink2); cursor: pointer; }
.pno-sec { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.pno-sec.off { opacity: .45; }
.pno-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.pno-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--acc); color: #fff; font-size: 13px; }
.pno-seg { justify-self: start; }
.pno-seg button { min-width: 96px; }
.pno-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pno-card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 16px 8px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.pno-card:hover, .pno-card:focus { border-color: var(--acc); outline: none; }
.pno-card.on { border-color: var(--acc); background: var(--accbg); }
.pno-card small { font-size: 11px; color: var(--muted); }
.pno-card-v { display: flex; align-items: center; justify-content: center; min-height: 32px; font-size: 18px; font-weight: 700; }
.pno-radio { position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); }
.pno-card.on .pno-radio { border: 4px solid var(--acc); }
.pno-prev { display: grid; gap: 8px; padding: 16px; border-radius: 10px; background: var(--bg2); }
.pno-prev b { font-size: 13px; }
.pno-prev-box { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #111; font-size: 15px; }
.pno-prev-box.pos-r { justify-content: flex-end; }
.pno-prev-box.pos-l { justify-content: flex-start; }
/* 홀수 쪽·짝수 쪽 위치 두 줄 + 미리보기 두 칸 (2026-11-04) */
.pno-posrow { display: flex; align-items: center; gap: 16px; }
.pno-posrow + .pno-posrow { margin-top: 8px; }
.pno-posk { flex: none; width: 56px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.pno-prev-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pno-prev-two .pno-prev-box { position: relative; padding-top: 16px; }
.pno-prev-k { position: absolute; top: 4px; left: 8px; font-size: 11px; color: var(--muted); }
.pno-prev-off { color: var(--muted); font-size: 13px; }
.pno-foot { display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.pno-gap { flex: 1; }
.pno-reset { border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) { .pno-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 문서 꾸미기 카드 — 변형 문제·동형·본문 학습자료 왼쪽 (2026-10-14 — js/common/page-deco.js pdCardMount)
   안의 줄은 워크북 [문서 꾸미기]와 같은 class라 css/workbook.css가 없는 화면에도 같은 모양이 되게 여기 한 벌 */
.pd-card { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pd-card .step-head { margin: 0; }
.pd-card > .hint { margin: 0; font-size: 13px; color: var(--muted); }
.pd-card .wb-opts { display: grid; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pd-card .wb-opts .hint { margin: 0; font-size: 13px; color: var(--muted); }
.pd-card .wb-theme-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 4px 0; }
.pd-card .wb-theme-lb { flex: none; min-width: 64px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.pd-card .wb-foot-box, .pd-card .wb-foot-blk, .pd-card .wb-pno-box { display: grid; gap: 8px; }
.pd-card .wb-foot-blk + .wb-foot-blk { padding-top: 8px; border-top: 1px dashed var(--line); }
.pd-card .wb-foot-scale { flex: 1 1 140px; min-width: 0; accent-color: var(--acc); }
.pd-card .wb-logo-scale-val { flex: none; min-width: 72px; font-size: 13px; color: var(--muted); }
.pd-card .wb-foot-name { font-size: 13px; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-card .wb-foot-pages label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); margin-right: 16px; cursor: pointer; }
.pd-card .wb-foot-add { justify-self: start; font-size: 13px; }
.pd-card .pd-logo-slot > .opt { margin: 0; padding: 0; border: 0; background: none; }
.pd-card { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.pd-card .pd-logo-slot { min-width: 0; }
.pd-card .pd-logo-slot .seg, .pd-card .pd-logo-slot .tabs { flex-wrap: wrap; }
.pd-card .wb-logo-drag-hint { white-space: normal; }
/* AI로 만들기 — API 방식 (2026-10-14 api-auth, js/common/ai-api.js): 요청문 보기·복사·claude.ai·답 칸·넣기 단추는 숨기고 [AI로 만들기] 하나 (화면만) */
.ai-hide { display: none !important; }
.ai-mode-api .req-bulk, .ai-mode-api .req-note { display: none !important; }
.ai-make { margin-left: 0; }
.ai-make-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 16px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; background: var(--accbg); }
.ps-bar { margin: 0 0 16px; }   /* 자주 쓰는 구성 (js/common/presets.js — 변형 문제 .qt-presets2와 같은 모양, 2026-10-15) */
.ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps-lb { font-size: 13px; color: var(--muted); margin-right: 8px; }
.ps-none { font-size: 13px; color: var(--muted); }
.ps-pre { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); overflow: hidden; }
.ps-pre button { border: 0; background: none; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); cursor: pointer; }
.ps-pre button:hover { background: var(--accbg); color: var(--acc); }
.ps-pre .ps-x { padding: 8px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 400; }
.ps-add { padding: 8px 16px; border: 1px dashed var(--line); border-radius: 6px; background: var(--bg); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); cursor: pointer; }
.ps-add:hover { border-color: var(--acc); color: var(--acc); }
.ps-save { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ps-save input { flex: 1; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.ps-msg { margin-top: 8px; font-size: 13px; color: var(--ink2); }
.ps-pre button:focus-visible, .ps-add:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media print { .ps-bar { display: none !important; } }
.ai-make-bar small { font-size: 13px; color: var(--ink2); }
.ai-bulk-st { flex-basis: 100%; font-size: 13px; color: var(--ink2); }   /* [모두 만들기] 진행 줄 — 지문마다 완료·만드는 중·실패 (ai-api.js aiBulkDraw) */
.ai-bulk-st:empty { display: none; }
.ai-bulk-st b { color: var(--ink); }
.ai-api-box { margin: 8px 0; padding: 8px 16px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; background: var(--bg); font-size: 13px; line-height: 1.6; color: var(--ink2); }
.ai-api-box[hidden] { display: none; }
.ai-api-box b { color: var(--ink); }
.ai-api-box small { color: var(--muted); }
.ai-api-box.ok { background: var(--accbg); }
.ai-api-box.err { border-left-color: var(--warn); }
.ai-api-box.err b { color: var(--warn); }
.ai-api-box .btn { margin-left: 4px; }
/* 만드는 중 카드 — 여우 마크가 통통 · 남은 시간 · 막대 (ai-api.js aiLoadFill, 2026-10-15 선생님 시안을 사이트 색으로) */
.ai-api-box.run { padding: 16px; background: var(--accbg); border-left-color: var(--acc); }
.ai-load { display: flex; gap: 16px; align-items: center; }
.ai-fox { width: 48px; height: 48px; object-fit: contain; flex: none; animation: ai-bob .9s ease-in-out infinite; }
@keyframes ai-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .ai-fox { animation: none; } }
/* 3D 퀘스 (2026-10-27 — 시안 A + C, ai-api.js AI_QUES): 단계마다 그림 3장 중 하나 · 끄덕임 · 종이 넘김
   2026-10-28 선생님 "배경이 나오니 너무 그림 같다" → 배경 없는 그림(-cut.webp, 478×640)만 서 있게: 네모 칸·바탕 없음 · 발밑 옅은 그림자 · 움직임은 CSS
   work·wave = 온몸(발끝이 그림 높이 93%) → 발이 그림자 위에 오게 / read = 가슴까지 → 아래를 흐리게, 그림자 없음
   2026-10-29 움직이는 그림(-anim.webp, 360×562 온몸 — ai-api.js aiQuesAnim): 그림이 스스로 움직여서 CSS 끄덕임·종이 넘김·그림자 움직임은 뺌, 그림자는 남김
     세 장면 모두 온몸 → 읽기 장면도 아래 흐림 없이 그림자 위에 섬 (누르기 전 작은 칸 .still은 예전 얼굴 그림 그대로)
     data-f: cut = -cut 정지 그림(478×640, 발끝 93%) · body/anim = 온몸 틀(발끝 98%) — 바꿔 끼울 때 키·발 위치가 같게 크기를 맞춤 (cut 148px ≈ anim 130px + 아래 8px) */
.ai-ques { position: relative; flex: none; width: 104px; height: 128px; }
.ai-ques.still { width: 64px; height: 80px; }
.ai-ques::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 64px; height: 12px; margin-left: -32px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(11, 18, 32, .2), rgba(11, 18, 32, 0) 70%); transition: opacity .4s; }
.ai-ques.still::after { width: 40px; height: 8px; margin-left: -20px; bottom: 1px; }
.ai-ques-img { position: absolute; left: 50%; bottom: 0; height: 148px; width: auto; max-width: none; transform: translateX(-50%); opacity: 0; transition: opacity .4s; }
.ai-ques-img[data-f="body"], .ai-ques-img[data-f="anim"] { height: 130px; bottom: 8px; }
.ai-ques.still .ai-ques-img { height: 92px; }
.ai-ques.still .ai-ques-img[src*="ques-read"] { height: 78px; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
.ai-ques-img.on { opacity: 1; }
.ai-ques-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px; padding: 0; list-style: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.ai-ques-steps[hidden] { display: none; }
.ai-ques-steps li { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.ai-ques-steps li.on { border-color: var(--acc); background: var(--acc); color: var(--bg); }
.ai-ques-steps li.done { border-color: var(--acc); color: var(--acc2); }
.ai-ques-wave { width: 40px; height: 40px; object-fit: cover; object-position: 50% 8%; vertical-align: middle; margin-right: 8px; }   /* 끝 화면 — 배경 없는 손 흔드는 퀘스 얼굴·어깨 (2026-10-28) */
@media (max-width: 480px) { .ai-ques:not(.still) { width: 72px; height: 104px; } .ai-ques:not(.still) .ai-ques-img { height: 116px; } .ai-ques:not(.still) .ai-ques-img[data-f="body"], .ai-ques:not(.still) .ai-ques-img[data-f="anim"] { height: 102px; bottom: 8px; } .ai-ques:not(.still)::after { width: 48px; margin-left: -24px; } }   /* 휴대폰 — 글 칸이 좁아지지 않게 퀘스를 작게 */
@media (prefers-reduced-motion: reduce) { .ai-ques-img { transition: none; } }   /* 움직이는 그림은 받지 않음 (ai-api.js aiQuesCalm) */
.ai-load-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ai-load-t { font-size: 15px; color: var(--acc2) !important; }
.ai-load-s { font-size: 13px; color: var(--ink2) !important; }
.ai-load-n { align-self: flex-start; margin-top: 4px; padding: 0 8px; border: 1px solid var(--acc); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--acc2); }
.ai-load-n[hidden], .ai-load-bar[hidden], .ai-load-long[hidden] { display: none; }
.ai-load-bar { height: 6px; margin-top: 4px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.ai-load-bar i { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 999px; transition: width 1s linear; }
.ai-load-long { font-size: 13px; color: var(--ink2) !important; }
.ai-done-ck { font-weight: 900; color: var(--acc); }
@media print { .ai-make, .ai-make-bar, .ai-api-box { display: none !important; } }
/* 본문 학습자료 API 방식 한 칸 (ai-api.js aiPkDraw, 2026-10-15): 지문 칩·할 일 순서·요청문 카드는 화면에서만 숨김 (엔진이 그대로 누름) */
html.ai-mode-api body[data-page="passage"] :is(#pkmTabsReq, #pkmTodo, #pkmNext, #pkmNextBottom, .pk-req, .ai-make-bar),
html.ai-mode-api body[data-page="passage"] [data-pkstep="3"] > .hint { display: none !important; }
.pk-ai { margin: 0 0 16px; padding: 24px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; background: var(--bg); font-size: 15px; color: var(--ink2); }
.pk-ai.run, .pk-ai.ok { background: var(--accbg); }
.pk-ai.err { border-left-color: var(--warn); }
.pk-ai p { margin: 0 0 8px; }
.pk-ai small { font-size: 13px; color: var(--ink2); }
.pk-ai b { color: var(--ink); }
.pk-ai-idle { display: flex; gap: 16px; align-items: center; }
.ai-fox.still { animation: none; }
.ai-fox.ai-fox-3d { width: 64px; height: 64px; animation: none; }   /* 3D 퀘스 (움직이는 그림이라 CSS 끄덕임은 뺌 — 2026-11-01) */
.pk-ai-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pk-ai-list { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.pk-ai-list li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.pk-ai-list li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-ai .pk-ai-ok { color: var(--acc2); }
.pk-ai .pk-ai-err, .pk-ai-errline b { color: var(--warn); }
@media print { .pk-ai { display: none !important; } }

/* 회원 관리 — 사이트 설정 (2026-10-14 api-auth, js/common/admin-site.js) */
.adm-set { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.adm-set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--ink2); }
.adm-set-row > b { min-width: 120px; font-size: 15px; color: var(--ink); }
.adm-set-row small { flex-basis: 100%; margin-left: 136px; font-size: 11px; color: var(--muted); }
.adm-set-row input { width: 96px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.adm-set-now strong { color: var(--acc); }
.adm-set-msg { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
/* 문서 꾸미기 색 테마 (js/common/page-deco.js pdColorHTML — 2026-10-15): 동그라미 17개 (워크북 색 테마와 같은 값) */
.pd-card .pd-sw-row { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 200px; }
.pd-card .pd-color .wb-sw { width: 24px; height: 24px; padding: 2px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.pd-card .pd-color .wb-sw i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.pd-card .pd-color .wb-sw.active { border-color: var(--acc); }
.pd-card .pd-color .wb-pal-sel { font-size: 13px; color: var(--muted); }
/* 문서 꾸미기 아코디언 (js/common/page-deco.js — 2026-10-15, 워크북 문서 꾸미기와 같은 모양) */
.pd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pd-card-head > .step-head { flex: none; }
.pd-card-head > .step-head h2 { white-space: nowrap; }   /* "문서 꾸미기" 한 줄 — 단추가 많으면 단추가 다음 줄로 (2026-11-05 선생님 "문서 꾸미기 일자로") */
.pd-accs { display: grid; gap: 8px; }
.pd-acc { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pd-acc > summary { display: flex; align-items: center; gap: 8px; padding: 16px; cursor: pointer; list-style: none; font-size: 15px; color: var(--ink); }
.pd-acc > summary::-webkit-details-marker { display: none; }
.pd-acc > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink2); border-bottom: 1.5px solid var(--ink2); transform: rotate(45deg); margin-left: 8px; }
.pd-acc[open] > summary::after { transform: rotate(-135deg); }
.pd-acc-sum { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pd-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.pd-acc-body { display: grid; gap: 8px; padding: 0 16px 16px; }
.pd-sw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-sw-row .wb-sw { width: 32px; height: 32px; padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.pd-sw-row .wb-sw i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.pd-sw-row .wb-sw.active { border-color: var(--acc); }
.pd-sw-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.pd-sw-foot .link { color: var(--ink2); text-decoration: underline; background: none; border: 0; cursor: pointer; font-size: 13px; }
.pd-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pd-seg button { border: 0; background: var(--bg); padding: 4px 8px; font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.pd-seg button + button { border-left: 1px solid var(--line); }
.pd-seg button.on { background: var(--acc); color: #fff; }
.pd-acc .hint { margin: 0; font-size: 13px; color: var(--muted); }
.pd-acc-body .hw-row { border-top: 0; padding-top: 0; }
/* [글자·간격] [같은 종류의 쪽도 함께] 스위치 (js/common/look.js — 2026-10-15): 누르면 동그라미가 오른쪽으로 */
.lk-same { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.lk-same[hidden] { display: none; }
.lk-same input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lk-sw { position: relative; width: 32px; height: 18px; border-radius: 999px; background: var(--line); transition: background .15s; flex: none; }
.lk-sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.lk-same input:checked + .lk-sw { background: var(--acc); }
.lk-same input:checked + .lk-sw::after { left: 16px; }
.lk-same input:focus-visible + .lk-sw { outline: 2px solid var(--acc); outline-offset: 2px; }
.lk-over { display: block; margin-top: 8px; color: var(--warn); font-size: 13px; }
.lk-over[hidden] { display: none; }
/* API 방식 한 칸 — 변형 문제·동형·워크북 (js/common/ai-api.js aiOneDraw, 2026-10-15 선생님 요청 "요청문은 나올 필요 없다"):
   요청문 카드·요청문 수 줄은 화면에서만 숨김 (엔진은 그 카드를 그대로 누름), [퀘스핀으로 만들기] 칸 하나만 */
html.ai-mode-api.ai-one .batch, html.ai-mode-api.ai-one .req-stats, html.ai-mode-api.ai-one .req-note { display: none !important; }
/* 복사 방식 안내 글("요청문마다 복사하기 → claude.ai …")·"요청문 n개 중 k개 완료"도 API 방식에서는 숨김 (2026-10-15) */
html.ai-mode-api .req-copy-hint, html.ai-mode-api.ai-one #batchProgress { display: none !important; }
html.ai-mode-api.ai-one .ai-make-bar { display: grid; gap: 8px; }
html.ai-mode-api.ai-one .ai-make-bar .ai-make-all { justify-self: start; }
.ai-bulk-st.ai-api-box { margin-top: 8px; }
/* [퀘스핀으로 만들기] 칸 안의 진행·완료 줄은 카드 안 카드로 보이지 않게 — 테두리·바탕 없이 위 구분선 하나 (2026-10-29) */
.ai-make-bar .ai-bulk-st.ai-api-box { margin: 8px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.pd-cs { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink2); }
.pd-cs label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pd-cs input { accent-color: var(--acc); }

/* 종이 배경 색상 (2026-10-15 — js/common/paper-bg.js): 흰색이면 속성 없음 = 예전 종이. 종이 바탕만, 글자·박스는 그대로 */
html[data-paper-bg] :is(.wb-page, .sheet-page, .pk-page) { background-color: var(--paper-bg) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* 배경 색상 칸 (화면) */
.pb-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.pb-prev { flex: none; width: 56px; height: 56px; border-radius: 6px; border: 1px solid var(--line); background: linear-gradient(var(--pb-prev), var(--pb-prev)), repeating-conic-gradient(#e9ecf0 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.pb-say { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-sw { width: 32px; height: 32px; padding: 3px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.pb-sw i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .08); }
.pb-sw.active { border: 2px solid var(--acc); padding: 2px; }
.pb-sw i.pb-theme { background-image: linear-gradient(135deg, transparent 45%, #fff 45% 55%, transparent 55%); }
.pb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 13px; }
.pb-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.pb-more { margin-top: 16px; } .pb-more-h { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.pb-alpha { display: flex; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; }
.pb-alpha input { flex: 1; accent-color: var(--acc); } .pb-alpha b { min-width: 40px; text-align: right; }
.pb-dot { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 50%; border: 1px solid var(--line); vertical-align: -1px; }
.wb-psgc-row { align-items: flex-start; flex-wrap: wrap; }

/* 로고 크기 [−] 막대 [+] (2026-10-15 — js/common/logo.js logoScaleRowHTML) */
.logo-sc { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.logo-sc input[type="range"] { flex: 1; min-width: 80px; accent-color: var(--acc); }
.logo-sc-b { flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: 700 15px/1 var(--font-sans); cursor: pointer; }
.logo-sc-b:hover, .logo-sc-b:focus-visible { border-color: var(--acc); color: var(--acc); }

/* ---------- 쪽 번호 45가지 (2026-10-16 디자인 스튜디오 — 목록 js/common/pno-style.js PNO_FMTS) ---------- */
.pno-sp { letter-spacing: .14em; font-size: .92em; }
.pno-sq { display: inline-block; min-width: 5.4mm; padding: 0.4mm 1.2mm; background: var(--pno-c, #333); color: #fff; border-radius: 0.6mm; text-align: center; }
.pno-sqo { display: inline-block; min-width: 5.4mm; padding: 0.2mm 1.2mm; border: 1px solid currentColor; border-radius: 0.6mm; text-align: center; }
.pno-circo { display: inline-flex; align-items: center; justify-content: center; width: 6.4mm; height: 6.4mm; border: 3px double currentColor; border-radius: 50%; }
.pno-pillo { display: inline-block; padding: 0.2mm 3mm; border: 1px solid currentColor; border-radius: 999px; }
.pno-tag { display: inline-block; padding: 0.3mm 2.4mm 0.3mm 1.6mm; background: var(--pno-c, #333); color: #fff; border-radius: 0 999px 999px 0; }
.pno-pillnn { display: inline-flex; align-items: center; gap: 1.4mm; padding: 0.2mm 2.6mm; border: 1px solid currentColor; border-radius: 999px; } .pno-pillnn i { width: 1px; height: 0.9em; background: currentColor; opacity: .5; }
.pno-linel { display: inline-flex; align-items: center; gap: 2mm; } .pno-linel i { width: 12mm; height: 1px; background: currentColor; }
.pno-liner { display: inline-flex; align-items: center; gap: 2mm; } .pno-liner i { width: 12mm; height: 1px; background: currentColor; }
.pno-over { display: inline-block; padding: 0.6mm 3mm 0; border-top: 1px solid currentColor; }
.pno-dul { display: inline-block; padding: 0 2mm 0.4mm; border-bottom: 3px double currentColor; }
.pno-barl { display: inline-block; padding-left: 2mm; border-left: 1.4px solid currentColor; }
.pno-diam::before { content: ""; display: inline-block; width: 1.6mm; height: 1.6mm; margin-right: 1.6mm; background: currentColor; transform: rotate(45deg); vertical-align: 0.15em; }
.pno-fold { display: inline-block; min-width: 6mm; padding: 0.4mm 2mm; text-align: center; background: linear-gradient(225deg, transparent 2mm, color-mix(in srgb, currentColor 14%, #fff) 2mm); }
.pno-stack { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 800; } .pno-stack small { font-size: 0.55em; letter-spacing: .14em; font-weight: 600; }
.pno-big { font-size: 1.7em; font-weight: 800; line-height: 1; }
.pno-dotline { display: inline-flex; align-items: center; gap: 2mm; } .pno-dotline i { width: 9mm; border-top: 1.4px dotted currentColor; }

/* 나만의 교재 편집 띠 (2026-10-16 book-builder — js/book/book-link.js): 교재 항목을 원본 화면에서 편집할 때 맨 위 */
.bk-editbar { position: sticky; top: 0; z-index: 60; background: var(--accbg); border-bottom: 1px solid var(--acc); }
.bk-editbar-in { max-width: var(--box, 1360px); margin: 0 auto; padding: 8px var(--box-pad, 24px); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bk-editbar-lb { font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: 2.5px; color: var(--acc); font-weight: 700; }
.bk-editbar-t { flex: 1 1 320px; font-size: 13px; color: var(--ink2); }
.bk-editbar-b { display: flex; gap: 8px; }
.bk-editbar-msg { max-width: var(--box, 1360px); margin: 0 auto; padding: 0 var(--box-pad, 24px) 8px; font-size: 13px; color: var(--warn); font-weight: 700; }
@media print { .bk-editbar { display: none !important; } }
/* ---------------------------------------------------------------------
   문서 꾸미기 디자인 스튜디오 (2026-10-16 — js/common/deco-studio.js · 본문 학습자료·변형 문제·동형 모의고사, 워크북 스튜디오와 같은 모양)
   --------------------------------------------------------------------- */
.pd-card-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.pd-studio-btn { border-color: var(--acc); color: var(--acc2); font-weight: 700; }
.pds-back { position: fixed; inset: 0; z-index: 950; display: flex; padding: 24px; background: rgba(11, 18, 32, .45); }
.pds-back[hidden] { display: none; }
body.pds-on { overflow: hidden; }
.pds { position: relative; display: flex; flex-direction: column; width: min(1500px, calc(100vw - 48px)); height: calc(100vh - 48px); margin: auto; background: var(--bg); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.25); overflow: hidden; }
.pds-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 24px 12px; border-bottom: 1px solid var(--line); }
.pds-top h2 { margin: 2px 0 4px; font-size: 22px; color: var(--ink); } .pds-top p { margin: 0; font-size: 13px; color: var(--muted); }
.pds-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; color: var(--acc); }
.pds-x { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 18px; color: var(--ink2); cursor: pointer; }
.pds-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.pds-main { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; border-right: 1px solid var(--line); }   /* 2026-11-18 시안 B: 왼쪽 목록 | 카드 */
.pds-left { min-height: 0; overflow: auto; padding: 24px; }
.pds-opts { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-bottom: 16px; font-size: 13px; color: var(--ink2); }
.pds-opts-h { font-weight: 700; color: var(--ink); }
.pds-opts .pd-cs { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.pds-hint { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.pds-cats { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.pds-chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink2); font-size: 13px; cursor: pointer; }
.pds-chip.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.pds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 16px; align-content: start; }
.pds-grid-sm { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); }
.pds-grid-lg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pds-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; font: inherit; color: var(--ink2); cursor: pointer; min-width: 0; }
.pds-card:hover { border-color: var(--acc); }
.pds-card.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; color: var(--ink); }
.pds-card.on .pds-card-h b { color: var(--acc2); }
.pds-ck { margin-left: auto; font-size: 11px; color: var(--acc2); font-weight: 700; }
.pds-card .pds-radio, .pds-card .pds-ck { display: none; }   /* 시안 B: 동그라미·"사용 중" 없이 테두리만 */
.pds-card-h { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 13px; color: var(--ink); }
.pds-card-h:has(.qs-nav-scope) { flex-wrap: wrap; row-gap: 4px; }   /* [글꼴] 카드 "실제 학교 시험지 글꼴" 꼬리표 (js/common/sheet-fonts.js SF_SCHOOL, 2026-11-19) */
.pds-card-h .qs-nav-scope { margin-top: 0; }
.pds-card small { padding: 0 8px; font-size: 11px; color: var(--muted); }
.pds-pic { display: block; position: relative; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; min-height: 64px; }
.pds-swatch { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; }
.pds-mini { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: #222; }
.pds-mini-t { font-weight: 800; padding-bottom: 4px; padding-right: 24px; }
.pds-mini-i { display: flex; align-items: center; gap: 6px; }
.pds-mini-no { font-weight: 800; font-size: 11px; line-height: 1; padding: 0 2px; }
.pds-mini-box { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.pds-mini-l { height: 4px; border-radius: 2px; background: #e8eaee; } .pds-mini-l.s { width: 60%; }
.pds-pno { display: flex; align-items: center; justify-content: center; height: 48px; font-size: 15px; color: #333; }
.pds-fs { display: block; font-size: 18px; color: #222; line-height: 1.4; }
.pds-card .hw-sample { pointer-events: none; }
.pds-dom { max-width: 560px; }
.pds-dom > * { margin-bottom: 16px; }
.pds-dom .pd-acc-body { display: block; padding: 0; }
.pds-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; padding: 12px 24px 16px 16px; background: var(--bg2); }
.pds-side-h b { font-size: 15px; color: var(--ink); } .pds-side-h small { margin-left: 8px; font-size: 11px; color: var(--muted); }
.pds-real-col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.pds-real { position: relative; overflow: hidden; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 8%, transparent); }
.pds-real-in > * { margin: 0 !important; box-shadow: none !important; }
.pds-nopaper { margin: 0; padding: 24px; font-size: 13px; color: var(--muted); }
.pds-nav { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; color: var(--muted); }
.pds-nav button { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; width: 28px; height: 24px; cursor: pointer; color: var(--ink2); }
.pds-nav button:disabled { opacity: .35; cursor: default; }
.pds-sum { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.pds-sum button { font: inherit; font-size: 11px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 2px 8px; cursor: pointer; color: var(--ink2); }
.pds-sum button b { color: var(--ink); }
.pds-sum button.on { border-color: var(--acc); background: var(--accbg); }
.qs-foot-btns, .pds-foot > span:last-child { display: inline-flex; align-items: center; gap: 8px; }   /* 디자인 스튜디오 아래 오른쪽: [기본값으로] [다 골랐어요] — 모든 스튜디오 같은 자리 (2026-11-18) */
.pds-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 24px; border-top: 1px solid var(--line); }
.pds-parts .hw-row > .hw-line:nth-child(-n+5), .pds-parts .hw-row > p.hint:first-of-type { display: none; }
@media (max-width: 600px) { .pds-side { max-height: 30vh !important; } .pds-foot .pds-hint { display: none; } .pds-foot { justify-content: flex-end; } }   /* 휴대폰: 카드 칸을 넓게 (2026-11-18) */
@media (max-width: 1000px) { .pds-body { grid-template-columns: 1fr; } .pds-side { order: -1; max-height: 40vh; } .pds-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } .pds-left { padding: 16px; } }
@media print { .pds-back { display: none !important; } }
/* ---------- 디자인 스튜디오 왼쪽 목록 (2026-11-18 시안 B — js/common/fav.js qsNavHTML) ----------
   넓은 화면: 묶음 라벨 + 항목(이름 · 지금 값) 세로 목록 / 좁은 화면(1000px 아래): 위 묶음 탭 + 그 묶음의 항목만 가로로 */
.qs-nav { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 16px 8px; background: var(--bg); border-right: 1px solid var(--line); }
.qs-nav-gs { display: none; }
.qs-nav-l { display: flex; flex-direction: column; }
.qs-nav-g { margin: 8px 0 0; padding: 8px 16px 4px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); }
.qs-nav-g:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.qs-nav-i { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; flex: none; padding: 5px 16px; line-height: 1.5; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-align: left; cursor: pointer; }
.qs-nav-i span { flex: none; white-space: nowrap; }
.qs-nav-pre { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); }
.qs-nav-scope { display: block; width: fit-content; margin-top: 4px; padding: 0 6px; border: 1px solid var(--acc); border-radius: 6px; font-size: 11px; font-style: normal; font-weight: 500; line-height: 18px; color: var(--acc2); }   /* 탭 이름 아래 실선 꼬리표 — 그 탭이 한 종류에만 걸릴 때 (워크북 [덧붙이기] = 본문 해석지, 2026-11-19 선생님) */
.qs-nav-scope.qs-nav-dot { border-style: dashed; }   /* 점선 꼬리표 — 일부 쪽에만 걸리는 항목 (본문 학습자료 디자인 스튜디오: 한 쪽 정리 → P2-3 · 로직 플로우 → P2-4 …, 2026-11-20 선생님) */
.qs-nav-box { display: flex; flex-direction: column; margin: 16px 0 8px; padding: 8px 0; border: 1px solid var(--acc); border-radius: 10px; }   /* 실선 상자 — 이웃한 항목 여럿이 한 곳에만 걸릴 때 (워크북 본문 해석지 · Topic · 덧붙이기, 2026-11-22 선생님) */
.qs-nav-bx { position: relative; align-self: flex-start; margin: -16px 0 0 16px; padding: 0 8px; background: var(--bg); font-size: 11px; font-weight: 700; line-height: 16px; color: var(--acc2); }
@media (max-width: 1000px) { .qs-nav-box { display: contents; } .qs-nav-bx { display: none; } }
.qs-nav-i small { flex: 1; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 400; color: var(--muted); }
.qs-nav-i:hover { background: var(--bg2); }
.qs-nav-i.on { background: var(--accbg); color: var(--acc); font-weight: 700; }
.qs-nav-i.on small { color: var(--acc2); }
@media (max-width: 1000px) {
  .qs-nav { gap: 8px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .qs-nav-gs { display: flex; gap: 8px; overflow-x: auto; }
  .qs-nav-gs button { flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
  .qs-nav-gs button.on { background: var(--acc); border-color: var(--acc); color: var(--bg); font-weight: 700; }
  .qs-nav-l { flex-direction: row; gap: 8px; overflow-x: auto; }
  .qs-nav-g, .qs-nav-i:not(.in), .qs-nav-i small { display: none; }
  .qs-nav-i { width: auto; }
}

.pds-grid-lg .pds-pic { height: 190px; padding: 0; }
.pds-grid-lg .pds-pic .hw-sample { transform: scale(.44); }

/* 문서 꾸미기 "문장 번호" 칸 (page-deco.js pdRnHTML, 2026-10-16) */
.pd-rn-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-right: 6px; border-radius: 999px; font-size: 11px; font-weight: 800; vertical-align: middle; }
.pd-rn-txt { margin-right: 8px; font-size: 13px; font-weight: 800; vertical-align: middle; }   /* 문장 번호 "01" 글자 미리 보기 (2026-10-19) */
.pd-rn-sample { display: inline-flex; gap: 4px; }
.pd-rn-def { border: 1px solid var(--line); background: var(--bg); color: var(--ink2); border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; margin-right: 8px; }
.pd-rn-def.on { border-color: var(--acc); color: var(--acc); font-weight: 700; }
.pd-rn-pal { margin: 0 0 8px; }

.ai-qc-note { margin-top: 8px; padding: 8px 16px; border-left: 3px solid var(--warn); font-size: 13px; color: var(--ink2); }
.ai-qc-note b { color: var(--warn); }

/* 하던 작업 물어보기 창 (2026-10-19 — util.js freshAsk, 단어장 .vst-ask와 같은 모양) */
.fresh-ask { position: fixed; inset: 0; z-index: 950; background: rgba(11, 18, 32, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fresh-ask-in { width: min(480px, 100%); background: var(--bg); border-radius: 10px; padding: 24px; box-shadow: 0 8px 32px rgba(11, 18, 32, .2); }
.fresh-ask-in h2 { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.fresh-ask-in p { font-size: 15px; color: var(--ink2); margin: 0 0 8px; }
.fresh-ask-in .fresh-ask-sub { font-size: 13px; color: var(--muted); }
.fresh-ask-list { margin: 0 0 8px; padding-left: 16px; font-size: 15px; color: var(--ink2); max-height: 240px; overflow: auto; }   /* 이미 만든 자료 목록 (2026-10-20 reuse) */
.fresh-ask-list li { margin: 0 0 4px; }
.fresh-ask-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* 요청문은 관리자에게만 (2026-10-20 — js/common/ai-api.js): 이 탭에서 설정(/api/config)을 아직 모를 때는 요청문 칸을 잠깐 가림
   (회원에게 요청문 카드가 한순간도 보이지 않게 — 설정이 오면 바로 풀림, 서버가 없는 곳은 곧바로 풀림) */
html.ai-cfg-wait :is(section, .step, .card, .batch, .pk-req, details):has(a[href^="https://claude.ai"]) { visibility: hidden; }
/* [퀘스핀으로 만들기] 옆: 결제 전("사용 횟수가 없습니다")·다 씀 안내 */
.ai-make-bar small.ai-q-msg b { color: var(--ink); }
.ai-make-bar small.ai-q-msg a, .pk-ai-idle p a { color: var(--acc); font-weight: 700; margin-left: 4px; }
/* 시험지 분석 "Claude로 옮겨 적기"(요청문 복사 → claude.ai에 파일 첨부)는 관리자에게만 — 회원은 PDF·사진 올리기(글자 인식)로 (2026-10-20) */
html.ai-member .claude-help { display: none !important; }
/* 단어장 "직접 AI에게 요청하기"(요청문 복사 · claude.ai · 답 넣기)도 관리자에게만 (2026-10-20) */
html.ai-member :is(.vc-gen-opt:has([data-gen-copy]), .vc-gen-paste) { display: none !important; }
/* "요청문"이라는 말도 회원 화면에서 숨김 (2026-10-20): 워크북 AI 재료 줄의 "(요청문 n)" · 답을 만든 요청문 번호 표시("요청문 v13") */
html.ai-mode-api .wb-req-ref, html.ai-member :is(.pver-wrap, #sheetPver) { display: none !important; }
/* 회원 관리 "결제" (2026-10-20 — js/common/admin-pay.js) */
.adm-pay-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.adm-msg.adm-pay-err { color: var(--warn); font-weight: 700; }
.adm-pay-test { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; }   /* 시험 결제 표시 (2026-11-09) */
.adm-pay-mem { border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px; margin: 0 0 8px; background: var(--bg); }
.adm-pay-mem summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 15px; padding: 8px 0; }
.adm-pay-mem summary span { color: var(--ink2); font-size: 13px; }
.adm-pay-mem summary small { color: var(--muted); font-size: 11px; margin-left: auto; }
.adm-pay-mem td small { color: var(--muted); font-size: 11px; }

/* 회원 관리 — 이메일 계정 만들기 (2026-10-20 admin-account, js/common/admin-site.js) */
.adm-mk { border: 1px solid var(--line); border-radius: 10px; padding: 16px 24px; margin: 0 0 16px; background: var(--bg); }
.adm-mk > summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.adm-mk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; margin: 8px 0 16px; }
.adm-mk-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.adm-mk-row input { font: inherit; font-size: 15px; color: var(--ink); padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }

/* PDF 내려받기 만드는 동안 덮개 (js/common/pdf-save.js pdfCover — 2026-10-20): 인쇄 모양으로 바뀌는 화면을 가리고 진행을 보여 줌 */
.pdf-cover { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: var(--bg2, #f5f7fa); }
.pdf-cover-card { display: flex; gap: 16px; align-items: center; width: min(440px, calc(100vw - 32px)); padding: 24px; background: var(--bg, #fff); border: 1px solid var(--line, #e4e8ee); border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 18, 32, .08); }
.pdf-cover-card .ai-fox.ai-fox-3d { width: 88px; height: 88px; }   /* 3D 퀘스 (2026-11-01) */
.pdf-cover-main { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink2, #1f2937); word-break: keep-all; }
.pdf-cover-main b { font-size: 15px; color: var(--ink, #0b1220); }
.pdf-cover-main small { font-size: 13px; color: var(--muted, #5b6472); }
.pdf-cover-bar { height: 6px; border-radius: 6px; background: var(--accbg, #e8f3fc); overflow: hidden; }
.pdf-cover-bar i { display: block; height: 100%; width: 0; background: var(--acc, #0a84d6); transition: width .3s; }

/* 문항 하나만 다시 만들기 (2026-10-21 — js/common/redo.js): 미리보기 문항 위 떠 있는 단추 · 미리보기 위 목록 · 창 (화면만, 인쇄 제외) */
.redo-hover { position: absolute; z-index: 60; font: 600 13px/1 var(--font-sans); color: var(--acc); background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; padding: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(11, 18, 32, .12); }
.redo-bar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 8px 16px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; font-size: 13px; color: var(--ink2); }
.redo-bar-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.redo-bar-h > b { color: var(--ink); }
.redo-bar-h [data-redo-many] { margin-left: auto; white-space: nowrap; }
.redo-bar-h [data-redo-many]:not(:disabled) { border-color: var(--acc); color: var(--acc); }
/* 목록 한 줄 = 체크 · 문항 이름 · 이유 · 단추 (2026-10-22 — 단추가 두 줄로 꺾이지 않게, 긴 이름·이유는 …) */
.redo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.redo-item { display: grid; grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.redo-item:first-child { border-top: 0; }
.redo-ck { display: flex; align-items: center; cursor: pointer; }
.redo-name { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.redo-why { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.redo-why b { color: var(--acc); font-weight: 700; }
.redo-btns { display: flex; gap: 8px; white-space: nowrap; }
.redo-btns .btn { white-space: nowrap; }
.redo-many { margin: 0 0 8px; padding-left: 18px; font-size: 13px; color: var(--ink2); max-height: 180px; overflow: auto; }
.redo-many small { color: var(--muted); }
.redo-found { font-size: 13px; color: var(--ink2); margin: 0 0 8px; }
@media (max-width: 800px) { .redo-item { grid-template-columns: auto minmax(0, 1fr) auto; } .redo-why { display: none; } }
.redo-tip { color: var(--muted); flex-basis: 100%; }
/* 바꾼 문항 순서 (2026-10-29 — redo.js qMove): 제목 · [처음 순서로] · 같은 정답이 이어진 곳 한 줄 */
.redo-ord { color: var(--ink); font-weight: 700; }
.redo-same { color: var(--ink2); }
.redo-modal .fresh-ask-in { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.redo-lb { font-weight: 700; margin-top: 16px !important; }
.redo-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.redo-rs { font: 500 13px/1 var(--font-sans); padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink2); cursor: pointer; }
.redo-rs.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.redo-own, .redo-answer { width: 100%; margin-top: 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; box-sizing: border-box; }
.redo-copy { margin-top: 8px; }
.redo-copy .row { display: flex; gap: 8px; }
.redo-state { margin-top: 16px; }
.redo-hover { display: flex; gap: 0; padding: 0; }
.redo-hover[hidden] { display: none; }
/* 2026-10-30 선생님 "너무 많아서 보기 힘들다 · 글자를 조금 더 작게": 11px · 셋 + [더보기] 한 줄 — 문항 폭보다 넓으면 글자를 …로 (redo.js가 max-width를 문항 폭으로) */
.redo-hover { font-size: 11px; flex-wrap: nowrap; box-sizing: border-box; }
.redo-hover > button { font: inherit; color: var(--acc); background: transparent; border: 0; padding: 4px 8px; cursor: pointer; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.redo-hover > button:first-child { border-radius: 5px 0 0 5px; }
.redo-hover > button:last-of-type { border-radius: 0 5px 5px 0; }
.redo-hover > button + button:not([hidden]) { border-left: 1px solid var(--acc); }
.redo-hover button[hidden] { display: none; }
.redo-hover button:hover, .redo-hover button:focus-visible { background: var(--accbg); }
.redo-more { position: absolute; top: calc(100% + 4px); right: -1px; display: flex; flex-direction: column; min-width: 112px; padding: 4px 0; background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; box-shadow: 0 2px 8px rgba(11, 18, 32, .12); }
.redo-more[hidden] { display: none; }
.redo-more button { font: inherit; color: var(--acc); background: transparent; border: 0; padding: 8px; text-align: left; white-space: nowrap; cursor: pointer; }
.redo-hover button[aria-pressed="true"] { font-weight: 800; }
/* 관심 문제 별 (2026-10-26 — 화면만: no-print · PDF 내려받기 중 숨김, 한글·Word에는 안 들어감) */
#sheet .q-fav { position: absolute; left: -16px; top: 2px; font: 700 13px/1 var(--font-sans); color: var(--acc); pointer-events: none; }
html.pdf-mode .q-fav { display: none !important; }
/* 문항 순서 바꾸기 (2026-10-30): [문항 순서 바꾸기]를 누른 동안 모든 문항 머리 오른쪽 위에 [위로]·[아래로] — 화면만 (인쇄·PDF에 없음) */
.redo-ord-h small { color: var(--muted); font-size: 13px; }
/* 순서 목록 창 머리 설명 — 세 줄 짧게 (2026-10-30, 미리보기 위 긴 안내를 여기로) */
.qo-help { margin: 8px 0 16px; padding-left: 18px; font-size: 13px; color: var(--ink2); line-height: 1.7; }
body.q-order-on #sheet section.q { position: relative; }
#sheet .q-omv { position: absolute; right: 0; top: -2px; z-index: 5; display: inline-flex; gap: 4px; }
#sheet .q-omv button { font: 600 11px/1 var(--font-sans); color: var(--acc); background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
#sheet .q-omv button:hover:not(:disabled), #sheet .q-omv button:focus-visible { background: var(--acc); color: var(--bg); }
#sheet .q-omv button:disabled { color: var(--muted); border-color: var(--line); cursor: default; opacity: .6; }
html.pdf-mode .q-omv { display: none !important; }
@media print { .q-omv { display: none !important; } }
.q-fav-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 90; font: 600 13px/1.4 var(--font-sans); color: var(--bg); background: var(--ink); border-radius: 6px; padding: 8px 16px; box-shadow: 0 2px 8px rgba(11, 18, 32, .12); }
.q-fav-toast[hidden] { display: none; }
.q-fav-toast b { display: block; font-weight: 700; }
.q-fav-toast .q-fav-sub { display: block; margin-top: 2px; font-weight: 400; font-size: 13px; opacity: .8; }
/* 다시 만들기 창 A안 (2026-10-22): 지금 문항 작게 + 이유 카드 + 차감 줄 */
.redo-paper { border: 1px solid var(--line); border-radius: 6px; padding: 16px; background: var(--bg); font: 13px/1.6 'Times New Roman', serif; color: #111; }
.redo-modal .redo-paper { margin: 8px 0 0; max-height: 200px; overflow: auto; }
.redo-paper-st { font: 700 13px/1.5 var(--font-sans); color: var(--ink); margin-bottom: 8px; }
.redo-paper-psg { color: var(--ink2); margin-bottom: 8px; }
.redo-paper-ch { list-style: none; margin: 0; padding: 0; }
.redo-paper-ch li { margin: 2px 0; }
.redo-paper-ch li.ans span { background: var(--accbg); color: var(--acc2); font-weight: 700; border-radius: 4px; padding: 0 4px; }
.redo-paper-key { font: 600 11px/1.4 var(--font-sans); color: var(--muted); margin-top: 8px; }
.redo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.redo-card { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--bg); cursor: pointer; font-family: var(--font-sans); }
.redo-card b { display: block; font-size: 15px; color: var(--ink); }
.redo-card span { font-size: 13px; color: var(--muted); }
.redo-card:hover { border-color: var(--acc); }
.redo-card.on { border-color: var(--acc); background: var(--accbg); }
.redo-card.on b { color: var(--acc2); }
.redo-cost { margin-top: 16px !important; padding: 8px 16px; background: var(--bg2); border-radius: 6px; font-size: 13px !important; }
@media (max-width: 600px) { .redo-cards { grid-template-columns: 1fr; } }
/* 직접 고치기 B안 (2026-10-22): 왼쪽 [문항]/[해설] 탭 · 오른쪽 미리보기 */
.qe-modal .fresh-ask-in { width: min(960px, 100%); }
/* 문항 순서 목록 창 (js/common/redo.js qOrderOpen, 2026-10-30) — 줄 모양은 변형 문제 "문제 순서" 칸(.qt-ord-it·.qt-mv-h·.qt-mv-ud, css/mock.css)을 그대로 */
.qo-modal .fresh-ask-in { width: min(720px, 100%); display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: hidden; }
.qo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 8px; }
.qo-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.qo-list { flex: 1 1 auto; min-height: 120px; overflow: auto; display: grid; gap: 8px; align-content: start; margin: 0; padding: 8px; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.qo-list .qo-it { grid-template-columns: 16px minmax(0, 1fr) auto; }
.qo-qs { display: grid; gap: 8px; min-width: 0; }
.qo-q { display: grid; grid-template-columns: 48px auto minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; }
.qo-no { width: 48px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: 700 15px var(--font-sans); text-align: center; color: var(--ink); }
.qo-no:focus { outline: none; border-color: var(--acc); }
.qo-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ink); }
.qo-src { font-size: 13px; color: var(--muted); white-space: nowrap; }
.qo-tag { font-size: 11px; color: var(--muted); }
.qo-blk { display: flex; align-items: baseline; gap: 8px; padding: 8px 8px 0; cursor: grab; }
.qo-blk b { flex: none; font-size: 15px; color: var(--ink); white-space: nowrap; }
.qo-blk small { min-width: 0; font-size: 13px; color: var(--muted); }
.qo-blk.dragging { opacity: .5; }
.qo-blk.drag-over { box-shadow: inset 0 -2px 0 var(--acc); }
.qo-same { display: block; margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
.qo-note { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink2); }
#qOrderModal .qo-tools .btn.on, #qOrderModal .qo-tools .btn.on:hover { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.qo-modal .fresh-ask-btns { align-items: center; }
.qo-inline { margin-right: auto; font-size: 13px; }
@media (max-width: 600px) { .qo-q { grid-template-columns: 48px minmax(0, 1fr); } .qo-src { grid-column: 2; } .qo-count { margin-left: 0; width: 100%; } }
.qe-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.qe-tabs { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.qe-tabs button { flex: 1; border: 0; background: var(--bg); padding: 8px 0; font: 600 13px var(--font-sans); color: var(--ink2); cursor: pointer; }
.qe-tabs button + button { border-left: 1px solid var(--line); }
.qe-tabs button.on { background: var(--acc); color: var(--bg); }
.qe-lb { font: 700 13px var(--font-sans) !important; color: var(--ink) !important; margin: 16px 0 8px !important; }
.qe-lb small { font-weight: 400; color: var(--muted); margin-left: 8px; }
.qe-key { flex: 0 0 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font: 600 15px var(--font-sans); color: var(--ink2); cursor: pointer; }
.qe-key:hover { border-color: var(--acc); }
.qe-key.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.qe-keys { display: flex; gap: 8px; }
.qe-row .qe-in { flex: 1; }
.qe-xc { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.qe-xc-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.qe-ok-t { color: #13703a; font-weight: 700; }
.qe-no-t { color: #b02a45; font-weight: 700; }
.qe-right { position: sticky; top: 0; align-self: start; }
.qe-live-lb { font: 600 11px var(--font-sans) !important; color: var(--muted) !important; margin: 0 0 8px !important; }
.qe-live .redo-paper { max-height: calc(100vh - 260px); overflow: auto; }
.qe-xl { margin: 8px 0 0 !important; font: 13px/1.6 var(--font-sans) !important; color: var(--ink2) !important; }
.qe-why { color: var(--muted); }
.qe-none { color: var(--muted); font-size: 13px; }
.qe-count { margin-right: auto; align-self: center; font-size: 13px; color: var(--acc2); }
@media (max-width: 800px) { .qe-two { grid-template-columns: 1fr; } .qe-right { position: static; } }
.qe-in { min-height: 0; height: auto; resize: vertical; line-height: 1.5; width: 100%; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 8px; box-sizing: border-box; font-family: inherit; }
.qe-row { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.qe-n { flex: 0 0 24px; font-weight: 700; color: var(--ink); padding-top: 8px; }
.qe-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.qe-ok { flex: 0 0 auto; font-size: 13px; color: var(--ink2); padding-top: 8px; white-space: nowrap; }
/* 큰 자료 빠르게 (2026-10-21 선생님 — 20지문 본문 학습자료 520쪽·워크북 130쪽에서 화면이 멈춤):
   미리보기 종이 중 화면 밖의 쪽은 브라우저가 글자 배치·그리기를 건너뜀 (화면에 다가오면 그때 그림) — 쪽 크기는 A4 그대로 자리를 잡아 스크롤 위치가 바뀌지 않음.
   화면에서만 (인쇄는 @media print라 상관없음), PDF 내려받기로 쪽을 그림으로 바꾸는 동안(html.pdf-mode)은 끔. 종이 HTML은 그대로 */
@media screen {
  html:not(.pdf-mode) :is(#wbBook > .wb-page, #wbBook > .pv-cell > .wb-page, #sheets .pk-page, #sheets .wb-page, #sheet .sheet-page) {
    content-visibility: auto; contain-intrinsic-size: auto 210mm auto 297mm;
  }
}

/* 옵션 카드 창 (2026-10-22 — question-types.js qtOptCardsOpen): 옵션 이름 = [예시] 단추, 값마다 실제 문제 모양 카드 */
.qt-lb-zoom { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); }
.qt-lb-ex { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 11px; font-weight: 500; color: var(--ink2); }   /* 출력 설정 [예시] 단추(.oz-btn)와 같은 모양 */
.qt-lb-ex svg { width: 11px; height: 11px; }
.qt-lb-zoom:hover .qt-lb-ex, .qt-lb-zoom:focus-visible .qt-lb-ex { color: var(--acc); border-color: var(--acc); }
.qtc .qtc-box { width: min(1240px, calc(100vw - 32px)); max-width: none; }
.qtc-lead { font-size: 13px; color: var(--ink2); margin: 0 0 16px; }
.qtc-lead b { color: var(--ink); }
.qtc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.qtc-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--bg); cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.qtc-card:hover, .qtc-card:focus-visible { border-color: var(--acc); outline: none; }
.qtc-card.on { border: 2px solid var(--acc); padding: 15px; background: var(--accbg); }
.qtc-card.off { opacity: 0.5; cursor: not-allowed; }
.qtc-name { display: flex; align-items: baseline; gap: 8px; }
.qtc-name b { font-size: 15px; color: var(--ink); }
.qtc-name small { font-size: 11px; color: var(--acc); font-weight: 700; }
.qtc-desc { margin: 0; font-size: 13px; color: var(--ink2); }
.qtc-paper { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; font-size: 13px; max-height: 340px; overflow: auto; }
.qtc-paper .qt-ex-passage { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.qtc-ans { margin: 0; font-size: 13px; color: var(--ink); }
.qtc-note { margin: 0; font-size: 11px; color: var(--muted); }
.qtc-foot { margin: 16px 0 0; font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
/* 정답 선지 강조 — 값마다 무엇이 달라지는지 한눈에 */
.qtc-paper[data-ans="1"] .qt-ex-choices li:nth-child(1), .qtc-paper[data-ans="2"] .qt-ex-choices li:nth-child(2), .qtc-paper[data-ans="3"] .qt-ex-choices li:nth-child(3),
.qtc-paper[data-ans="4"] .qt-ex-choices li:nth-child(4), .qtc-paper[data-ans="5"] .qt-ex-choices li:nth-child(5) { color: var(--acc); font-weight: 700; }

/* 옵션 · 예시 큰 창 (2026-11-11 선생님 2안 — js/common/question-types.js qtStudioDraw): 왼쪽 옵션 · 오른쪽 예시, 칸마다 따로 스크롤
   색은 테마 변수만 · 글자 22/15/13/11 · 간격 8의 배수 · 모서리 10px(창 안 카드)·6px(단추) */
.qts { z-index: 55; }
.qtc { z-index: 60; }   /* 옵션 이름 [예시] 카드 창은 큰 창 위에 */
.qts .qts-box { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); border-radius: 10px; }
.qts .modal-head { padding: 16px 24px; }
.qts .modal-head h2 { font-size: 22px; font-weight: 800; color: var(--ink); }
.qts .modal-head h2 small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.qts-body { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; min-height: 0; flex: 1; height: min(760px, calc(100vh - 120px)); }
.qts-l, .qts-r { overflow: auto; padding: 24px; min-height: 0; }
.qts-l { border-right: 1px solid var(--line); background: var(--bg2); }
.qts-r { background: var(--bg); }
.qts-lb { margin: 0 0 8px; font-size: 11px; font-weight: 700; color: var(--acc); }
.qts-sum { margin-left: 8px; font-weight: 500; color: var(--muted); }
.qts-desc { margin: 0 0 16px; font-size: 13px; color: var(--ink2); line-height: 1.6; }
.qts-zero { color: var(--ink); font-weight: 700; }
/* 왼쪽 옵션 칸 = 화면의 옵션 칸 그대로 (.qt-panel) — 창 머리가 이름·닫기를 대신하므로 칸 머리는 숨김 */
.qts .qt-panel { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); gap: 16px; }
.qts .qt-panel-head { display: none; }
.qts .qt-panel-row { flex-wrap: wrap; }
.qts .qt-panel-foot { padding-top: 8px; border-top: 1px solid var(--line); }
.qts .modal-close, .qts .qt-stepper button { font-size: 15px; }   /* 글자 단계 맞춤 (창 안에서만) */
.qts .qt-panel-note { font-size: 11px; }
.qts .qt-diff-hint { font-size: 13px; }
/* 오른쪽 예시 */
.qts-near { margin: 0 0 16px; padding: 8px 16px; border-left: 3px solid var(--acc); background: var(--bg); font-size: 13px; color: var(--ink2); }
.qts-paper { border: 1px solid var(--line); border-radius: 10px; padding: 24px; box-shadow: 0 1px 2px rgba(11, 18, 32, .05); }
.qts-foot { margin: 16px 0 0; font-size: 11px; color: var(--muted); }
/* 큰 창 안 "모양은 디자인 스튜디오에서" 한 줄 (2026-11-12 — js/common/opt-studio.js osDesignLineHTML: 변형 문제 옵션 창 · 워크북 옵션 창) */
.os-pvnote { margin: 0 0 8px; font-size: 13px; color: var(--ink2); }   /* 미리보기 위 안내 한 줄 (opt-studio.js r.note — 워크북 종류 큰 창의 예시 그림, 2026-11-12) */
.os-design { margin: 16px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.os-design a { color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* 옵션 큰 창 공통 부품 (js/common/opt-studio.js, 2026-11-12) — 틀은 위 .qts, 오른쪽 실제 종이를 칸 폭에 맞춰 줄임 */
.os .qt-panel-row + .os-sub { margin: -8px 0 0 88px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.os-note { font-size: 13px; color: var(--muted); }
.os .qt-seg.os-multi { border: 0; border-radius: 0; overflow: visible; gap: 8px; }
.os .qt-seg.os-multi button { border: 1px solid var(--line); border-radius: 6px; }
.os .qt-seg.os-multi button:last-child { border-right: 1px solid var(--line); }
.os .qt-seg.os-multi button.active { border-color: var(--acc); }
.os-warn { margin: 16px 0 0; padding: 8px 16px; border-left: 3px solid var(--acc); background: var(--bg); font-size: 13px; font-weight: 700; color: var(--ink2); line-height: 1.6; }
.os-pv { padding: 16px; border-radius: 10px; background: var(--bg2); overflow: hidden; }
.os-pvbox { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.os-pvbox.os-two { flex-direction: row; align-items: flex-start; justify-content: center; }
/* 화면 거의 가득 창 (opt-studio.js cfg.full — 워크북 [예시]·본문 해석지 창, 2026-11-18 본부): 종이는 칸 폭에 맞춤, 누르면 그 쪽만 칸 폭 가득 */
.qts.os-full .qts-box { width: calc(100vw - 32px); height: calc(100vh - 32px); max-height: none; }
.qts.os-full .qts-body { height: auto; flex: 1; }
.qts.os-full .os-pvbox > * { cursor: zoom-in; }
.qts.os-full .os-pvbox.os-zoomed > * { cursor: zoom-out; }
.qts.os-full .os-pv { overflow: visible; }
.qts.os-full .os-pvbox.os-zoomed { flex-direction: column; align-items: flex-start; justify-content: flex-start; flex-wrap: nowrap; width: auto !important; }
.os-pvbox.os-two.os-narrow { flex-direction: column; align-items: center; width: auto; }   /* 휴대폰 폭: 한 줄에 한 쪽 (opt-studio.js osFit) */
.os-pvbox > * { flex: none; margin: 0 !important; box-shadow: 0 1px 4px rgba(11, 18, 32, .12); }
.os-empty { margin: 0; padding: 48px 16px; text-align: center; font-size: 13px; color: var(--muted); }
/* 정답 · 해설 (큰 창 안에서만 — 인쇄 해설 .xp는 그대로) */
.qtx { --qtx-ng: #b02a45; margin-top: 16px; border-top: 1px solid var(--line); }   /* 틀린 선지 = 예전 ✗ 색 (디자인 규칙 예외 — 해설 선지 줄 머리만) */
.qtx-row { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.qtx-lb { font-size: 11px; font-weight: 700; color: var(--acc); padding-top: 2px; }
.qtx-ans { font-size: 15px; font-weight: 800; color: var(--acc); }
.qtx-body { display: grid; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink2); }
.qtx-body p { margin: 0; }
.qtx-ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.7; color: var(--ink2); }
.qtx-lv { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; line-height: 1.8; }
.qtx-tag { display: inline-block; margin: 0 2px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--ink); line-height: 1.7; background: var(--bg); }
.qtx-tag-k { margin: 0 8px 0 0; }
.qtx-ch { display: grid; gap: 2px; padding: 8px 0 8px 16px; border-left: 2px solid var(--line); }
.qtx-ch .qtx-h { font-weight: 700; }
.qtx-ch.y .qtx-h { color: var(--ok); }
.qtx-ch.n .qtx-h { color: var(--qtx-ng); }
.qtx-ch.y .qtx-tag { border-color: var(--ok); }
.qtx-ch.n .qtx-tag { border-color: var(--qtx-ng); }
.qtx-b { color: var(--ink2); }
.qtx-sumline { padding-top: 8px; }
.qtx-more summary { cursor: pointer; font-size: 13px; color: var(--ink2); text-decoration: underline; list-style: none; }
.qtx-more summary::-webkit-details-marker { display: none; }
.qtx-more summary small { color: var(--muted); font-size: 11px; }
.qtx-more[open] summary { margin-bottom: 8px; }
.qtx-more[open] { display: grid; gap: 8px; }
@media (max-width: 760px) {
  .qts .qts-box { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .qts-body { grid-template-columns: minmax(0, 1fr); height: auto; overflow: auto; }   /* minmax(0, …): 종이(794px)가 칸을 넓히지 않고 칸 폭에 맞춰 줄어들게 (2026-11-18 — 휴대폰에서 창 글이 오른쪽으로 잘렸음) */
  .qts-l, .qts-r { overflow: visible; padding: 16px; }
  .qts-l { border-right: 0; border-bottom: 1px solid var(--line); }
  .qtx-row { grid-template-columns: 1fr; gap: 8px; }
}
/* 묶음 안 구역 칩 (2026-10-22 bundle-section — js/common/library.js libSecChipsHTML): [전체 n] [1차 범위 n] … 고른 것만 --acc */
.lib-secs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.lib-secs-h { font-size: 11px; color: var(--muted); margin: 0 4px 0 0; }
.lib-sec { margin: 0; font: inherit; font-size: 13px; line-height: 1.4; padding: 4px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink2); cursor: pointer; }
.lib-sec small { font-size: 11px; color: var(--muted); margin-left: 4px; }
.lib-sec:hover { border-color: var(--acc); }
.lib-sec.on { background: var(--acc); border-color: var(--acc); color: var(--bg); }
.lib-sec.on small { color: inherit; opacity: .85; }
.lib-sec.drop { border-color: var(--acc); background: var(--accbg); }
.lib-sec-note { margin: 8px 0 0; }
.lpm-bun .lib-secs { margin: 0; padding: 0 16px 16px 72px; }
/* 수업 완료 (2026-10-22 lesson-done — 선생님이 고른 시안 A + B, docs/design/lesson_done_mock.html · js/common/library.js libStampHTML·libDoneProgHTML)
   A: 네모 체크(--acc) · 회색 줄 · 기울어 찍히는 도장 · 고르는 곳 도장 꼬리표 / B: 막대 위를 걷는 여우 · 남은 지문 n개 · 구역별 수
   움직임 줄이기 설정이면 멈춤, 도장·여우는 화면에만 (인쇄 안 함) */
.lib-done-cb { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.lib-done-cb input { margin: 0; width: 18px; height: 18px; accent-color: var(--acc); border-radius: 4px; cursor: pointer; }
.lib-done-cb.on { color: var(--acc2); font-weight: 700; }
.lib-stamp { display: inline-block; margin-left: 8px; border: 2px solid var(--acc); border-radius: 6px; padding: 0 8px; background: var(--bg); color: var(--acc); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; white-space: nowrap; rotate: -8deg; opacity: .92; vertical-align: middle; }
.lib-stamp-day { display: block; margin: 0 auto; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 500; line-height: 14px; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.lib-stamp-day:hover, .lib-stamp-day:focus-visible { color: var(--acc2); }
.lib-stamp-date { display: block; margin: 2px 0 0; padding: 0 4px; font: inherit; font-size: 11px; color: var(--ink2); border: 1px solid var(--acc); border-radius: 4px; background: var(--bg); }
.lib-stamp:has(.lib-stamp-date) { rotate: 0deg; position: relative; }
.lib-stamp .lib-stamp-date { position: absolute; right: -2px; top: calc(100% + 4px); z-index: 5; margin: 0; padding: 4px 8px; font-size: 13px; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.lib-stamp.fresh { animation: libStampIn .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes libStampIn { from { opacity: 0; scale: 2.2; rotate: -24deg; } to { opacity: .92; scale: 1; rotate: -8deg; } }
.lib-done-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border: 1.5px solid var(--acc); border-radius: 4px; font-size: 11px; font-style: normal; font-weight: 800; line-height: 16px; color: var(--acc); background: var(--bg); rotate: -4deg; vertical-align: middle; white-space: nowrap; }
.lib-done-prog { margin: 0 0 16px; }
.lib-done-track { position: relative; padding-top: 56px; }
.lib-done-fox { position: absolute; top: 0; translate: -50% 0; transition: left .6s ease; pointer-events: none; }
.lib-done-fox img { display: block; height: 52px; width: auto; animation: libFoxHop 1.2s ease-in-out infinite; }
.lib-done-fox.goal img { animation: none; }
@keyframes libFoxHop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
.lib-done-bar { display: block; position: relative; height: 12px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.lib-done-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accbg), var(--acc)); border-radius: 8px; transition: width .6s ease; }
.lib-done-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 13px; color: var(--ink2); }
.lib-done-line b { color: var(--acc2); }
.lib-done-left { font-size: 11px; color: var(--acc2); background: var(--accbg); border-radius: 10px; padding: 0 8px; line-height: 20px; }
.lib-done-sec { font-size: 11px; color: var(--muted); }
.lib-done-todo { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 auto; font-size: 13px; color: var(--ink2); cursor: pointer; }
.lib-done-todo input { margin: 0; accent-color: var(--acc); }
@media (prefers-reduced-motion: reduce) { .lib-stamp.fresh, .lib-done-fox img { animation: none; } .lib-done-fox, .lib-done-bar i { transition: none; } }
@media print { .lib-stamp, .lib-done-fox, .lib-done-tag, .lib-done-prog { display: none !important; } }
/* 수업 완료 꼬리표 자리 (2026-10-25): 고르는 곳 지문 줄 이름 칸은 이름(.lib-nm)만 "…"로 줄이고 꼬리표는 늘 보이게 (library.js libNameTagHTML) */
:has(> .lib-nm) { display: flex; align-items: center; min-width: 0; }
.lib-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-nm + .lib-done-tag { flex: none; }
/* [수업 완료 체크] 켜기·끄기 (2026-10-22 — js/common/library.js libDoneSwitchHTML): 켜면 --acc, 끄면 회색 */
.lib-done-head { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.be-done-note { order: -1; font-size: 13px; color: var(--muted); }
.lib-done-sw { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.lib-done-knob { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--line); transition: background .2s; flex: none; }
.lib-done-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: left .2s; }
.lib-done-sw.on .lib-done-knob { background: var(--acc); }
.lib-done-sw.on .lib-done-knob::after { left: 18px; }
@media (prefers-reduced-motion: reduce) { .lib-done-knob, .lib-done-knob::after { transition: none; } }
@media print { .lib-done-head { display: none !important; } }

/* 교과서 구획이 바뀐 묶음 안내 (2026-10-24 tb-sections — js/common/library.js libTbNoticeHTML) */
.lib-tbn { display: grid; gap: 8px; margin: 8px 0 16px; }
.lib-tbn-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 8px 16px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; font-size: 13px; color: var(--ink2); }
.lib-tbn-row.done { border-left-color: var(--line); color: var(--muted); }
.lib-tbn-row .btn { flex: none; }

/* [작업 완료] (2026-10-24 — js/common/job-done.js): 출력 설정 카드 아래 한 줄 + 저장 확인 창 */
.job-done { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; padding: 16px 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.job-done-t { font-size: 13px; color: var(--muted); }
.job-done-btn { flex: none; border-color: var(--acc); color: var(--acc); font-weight: 700; }
.job-done-ov { position: fixed; inset: 0; z-index: 200; background: rgba(11, 18, 32, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.job-done-m { background: var(--bg); border-radius: 10px; padding: 24px; max-width: 480px; width: 100%; box-shadow: 0 8px 32px rgba(11, 18, 32, .2); font-size: 15px; color: var(--ink); }
.job-done-m p { margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
.job-done-m .job-done-s { color: var(--muted); }
.job-done-bs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.job-done-bs .btn.cta { background: var(--acc); border-color: var(--acc); color: #fff; box-shadow: none; }

/* 켜고 끄는 칸 = 옆으로 미는 스위치 (2026-10-25 선생님 — 문서 꾸미기 색 적용 칸 등. 값·저장은 그대로 체크 상자, 모양만)
   변형 문제·동형·본문 학습자료: 색을 입힐 곳(.pd-cs) · 하단 그림 놓는 쪽 · 머리말·지문 머리 표시(.hs-on) · 배경 줄·모눈 / 워크북: 색 적용 범위(.wb-theme-scope) · 하단 그림 놓는 쪽 */
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 32px; height: 18px; margin: 0 4px 0 0;
  border-radius: 999px; background: var(--line); border: 0; cursor: pointer; transition: background .15s ease; vertical-align: middle;
}
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg, #fff); box-shadow: 0 1px 2px rgba(11, 18, 32, .25); transition: transform .15s ease;
}
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]:checked { background: var(--acc); }
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]:checked::before { transform: translateX(14px); }
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
:is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
@media (prefers-reduced-motion: reduce) { :is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"], :is(.pd-cs, .wb-theme-scope, .cs-all-h, .hs-on, .wb-foot-pages, .hw-guide) input[type="checkbox"]::before { transition: none; } }

/* ---------- 추천 색 조합 (js/common/palettes.js, 2026-10-25) ---------- */
.pal-row { margin: 0 0 8px; }
.pal-row-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 16px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; text-align: left; font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.pal-row-btn:hover { border-color: var(--acc); }
.pal-row-btn b { font-size: 15px; color: var(--ink); white-space: nowrap; }
.pal-row-btn .pal-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-row-btn .pal-now small { color: var(--muted); font-size: 11px; }
.pal-row-btn .pal-none { color: var(--muted); }
.pal-row-btn .pal-go { color: var(--acc); white-space: nowrap; }
.pal-row-btn .pal-strip { width: 64px; height: 16px; flex: none; }
.pal-strip { display: flex; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.pal-strip i { flex: 1; }
.pal-modal { position: fixed; inset: 0; z-index: 3000; background: color-mix(in srgb, var(--ink) 40%, transparent); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pal-dlg { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--bg); border-radius: 10px; padding: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, .18); }
.pal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pal-head h2 { margin: 0; font-size: 18px; color: var(--ink); }
.pal-tools { display: inline-flex; gap: 8px; }
.pal-dlg > .hint { margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.pal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pal-tabs button { height: 32px; padding: 0 16px; border: 1px solid var(--line); background: var(--bg); border-radius: 16px; font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.pal-tabs button.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.pal-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: auto; min-height: 0; flex: 1; padding: 2px; }
.pal-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); text-align: left; font: inherit; cursor: pointer; }
.pal-card:hover { border-color: var(--muted); }
.pal-card.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--accbg); }
.pal-card .pal-strip { height: 32px; border-radius: 6px; }
.pal-card b { display: block; margin-top: 8px; font-size: 13px; color: var(--ink); }
.pal-card small { font-size: 11px; color: var(--muted); }
.pal-ask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 8px 16px; border-left: 3px solid var(--acc); background: var(--accbg); border-radius: 0 6px 6px 0; font-size: 13px; }
.pal-ask span { flex: 1; min-width: 200px; }
.pal-ask-done { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.pal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.pal-foot b { color: var(--ink); }
@media (max-width: 480px) { .pal-list { grid-template-columns: 1fr; } }

.pal-st-now { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.pal-st-now b { color: var(--ink); }
.pal-st-list { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ---------- 내보내기 메뉴 (2026-10-29 css/mock.css에서 옮김 — 변형 문제·동형 출력 카드 js/common/out-card.js + 워크북 출력 카드 js/workbook/workbook.js wbExp…) ----------
   [내보내기 ▾] 단추 + 떠 있는 메뉴 · 예전 단추는 숨은 칸(.ob-hold)에 id 그대로 */
.ob-exp { position: relative; }
.ob-caret { display: inline-block; width: 0; height: 0; margin-left: 8px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; vertical-align: middle; }
.ob-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 280px; padding: 8px; background: var(--dk-surface, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 18, 32, .14); }
.ob-menu[hidden] { display: none; }
.ob-mh { padding: 8px 8px 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.ob-mi { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; padding: 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-align: left; cursor: pointer; }
.ob-mi small { font-size: 11px; color: var(--muted); }
.ob-mi:hover:not(:disabled), .ob-mi:focus-visible { background: var(--bg2); outline: none; }
.ob-mi:disabled { opacity: .45; cursor: default; }
.ob-hold[hidden] { display: none !important; }
.ob-menu.ob-menu-up { top: auto; bottom: calc(100% + 8px); }
/* ---------- 출력 설정 카드 한 모양 (2026-11-18 선생님 "섞으면 좋을 것 같은데 / 깔끔하게" — 기준 변형 문제 .ob-card) ----------
   맨 윗줄: "출력 설정" + 한 줄 안내 | [내 자료실에 저장] · [내보내기 ▾] · [인쇄 · PDF](주 단추 하나)
   줄 "무엇을"(화면마다) · 줄 "보기"([한 쪽/펼침] · [글자·간격] — 단어장은 쪽 넘기기·크기) · 줄 "지면"(지금 설정 한 줄 + [디자인 스튜디오에서 바꾸기])
   변형 문제·동형·학교별 기출(.ob-card) · 본문 학습자료(.pk-ob) · 워크북(.wb-ob) · 단어장(.vc-pvbar) — 카드 상자는 .ob-std */
.ob-std { padding: 16px 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.ob-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ob-ttl { flex: 1 1 0; min-width: 120px; }   /* 단추 줄 옆에 남는 만큼 (안내는 …로 줄어듦) */
.ob-ttl h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); }
.ob-ttl p { margin: 4px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 안내는 한 줄 (좁으면 …, 휴대폰 폭에서는 숨김) */
.ob-go { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-go .btn { white-space: nowrap; }
.ob-row { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-top: 16px; }
.ob-row > [hidden] { display: none !important; }
.ob-k { width: 56px; flex: none; font-size: 13px; color: var(--muted); }
.ob-row .pv-tools { margin: 0; }
.ob-sumline { margin-top: 16px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
.ob-sum { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 지금 설정 한 줄 */
.ob-std .ob-grid .ob-lb:has(+ [hidden]) { display: none; }
/* 디자인 스튜디오 "지면" 탭 (js/common/deco-studio.js — 출력 카드 숨은 칸의 .ob-grid를 빌려 옴 · 2026-11-18 css/mock.css에서 옮김) */
.pds-layout .ob-grid { display: grid; grid-template-columns: max-content auto; gap: 16px 24px; align-items: center; justify-content: start; }
.pds-layout .ob-lb { font-size: 13px; color: var(--ink2); font-weight: 700; white-space: nowrap; }
.pds-layout .ob-lb:has(+ [hidden]) { display: none; }
.pds-layout .tabs { flex-wrap: nowrap; width: max-content; }
.pds-layout .tabs button, .pds-layout .seg button { padding: 8px 16px; font-size: 13px; }
.pds-layout-hint { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .ob-k { width: auto; } }
@media (max-width: 640px) {
  .ob-ttl p { display: none; }
  .ob-std { padding: 16px; }
  /* 휴대폰: 주 단추 [인쇄 · PDF]가 혼자 아래로 밀리지 않게 — 맨 위 한 줄 꽉, 보조 단추는 그 아래 둘씩 */
  .ob-go { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .ob-go > .cta, .ob-go > .btn.cta { grid-column: 1 / -1; order: -1; }
  .ob-go > .btn, .ob-go .ob-exp > .btn { width: 100%; justify-content: center; }
  .ob-k { width: 100%; }
  .ob-sumline { flex-wrap: wrap; }
  .ob-sum { flex: 1 1 100%; white-space: normal; }
}
/* ---------- 떠 있는 출력 띠 (2026-10-24 css/mock.css에서 2026-10-29 옮김 — 카드가 화면 밖일 때 미리보기 칸 아래 가운데, js/common/out-float.js · 변형 문제·동형·본문 학습자료·워크북) ---------- */
.ob-float { position: fixed; bottom: 24px; left: 50%; z-index: 45; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 8px 0 16px; background: var(--dk-surface, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(11, 18, 32, .14); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; white-space: nowrap; max-width: calc(100vw - 32px); }
.ob-float[hidden] { display: none; }
.ob-float.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ob-float-what { font-size: 13px; font-weight: 700; color: var(--ink); margin-right: 8px; }
@media (max-width: 860px) { .ob-float-what { display: none; } .ob-float { padding-left: 8px; } }
/* 띠에서 [내 자료실에 저장]을 누른 결과 (js/common/out-float.js ofSaveEcho, 2026-11-30) — 띠 바로 위 가운데, 잠깐 보였다 사라짐 */
.of-toast { position: fixed; bottom: 88px; left: 50%; z-index: 46; transform: translate(-50%, 8px); max-width: calc(100vw - 32px); padding: 8px 16px; background: var(--bg); border: 1px solid var(--acc); border-left-width: 4px; border-radius: 6px; box-shadow: 0 4px 16px rgba(11, 18, 32, .12); font-size: 13px; color: var(--ink2); opacity: 0; transition: opacity .25s ease, transform .25s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.of-toast b { color: var(--acc2); }
.of-toast.warn { border-color: var(--warn); } .of-toast.warn b { color: var(--warn); }
.of-toast.on { opacity: 1; transform: translate(-50%, 0); }
.of-toast[hidden] { display: none; }
@media print { .of-toast { display: none !important; } }
/* 띠 맨 앞 [고른 것 ▾] (2026-11-15 이다연 선생님 — js/common/out-card.js ocFloatMount): 보조 단추 모양 · 메뉴는 위로 왼쪽 맞춤 · 지금 고른 것은 --acc 글자 · 좁은 화면은 짧은 이름 */
.ob-float-wbtn { font-weight: 700; color: var(--ink); }
.ob-float-wbtn .ob-fw-short { display: none; }
.ob-menu.ob-menu-left { right: auto; left: 0; width: 240px; }
.ob-mi.on, .ob-mi.on small { color: var(--acc); font-weight: 700; }
.ob-float:has(.ob-float-wbtn) { padding-left: 8px; }
@media (max-width: 860px) { .ob-float-wbtn .ob-fw-long { display: none; } .ob-float-wbtn .ob-fw-short { display: inline; } }
@media (prefers-reduced-motion: reduce) { .ob-float { transition: none; transform: translate(-50%, 0); } }
@media print { .ob-float { display: none !important; } }
.ob-mhr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* 고른 지문의 학교 기출 보기 링크 (js/common/sx-find.js, 2026-11-05) — 묶음 권유 한 줄 아래 · 고른 지문 칸 바로 위, 오른쪽 끝 작은 글 링크 */
.sxf-box { margin: 0 0 8px; text-align: right; font-size: 13px; }
.sxf-box[hidden] { display: none; }
.sxf-link { color: var(--ink2); text-decoration: underline; }
.sxf-link:hover { color: var(--acc); }

/* 묶음 권유 한 줄 · 저장 창 (js/common/bundle-nudge.js, 2026-11-02) — 고른 지문 칸 바로 위 */
.bn-box { margin: 0 0 16px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; }
.bn-line { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--ink2); }
.bn-line b { color: var(--ink); }
.bn-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; }
.bn-acts .link { color: var(--ink2); text-decoration: underline; }
.bn-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 18, 32, .35); }
.bn-modal[hidden] { display: none; }
.bn-dlg { width: min(440px, 100%); padding: 24px; background: var(--bg); border-radius: 10px; box-shadow: 0 8px 32px rgba(11, 18, 32, .18); }
.bn-dlg h3 { margin: 0 0 16px; font-size: 18px; color: var(--ink); }
.bn-lab { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.bn-dlg input { width: 100%; box-sizing: border-box; padding: 8px 16px; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.bn-dlg input:focus { outline: none; border-color: var(--acc); }
.bn-sub { margin: 8px 0 24px; font-size: 13px; color: var(--muted); }
.bn-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* 디자인 스튜디오 별표 (2026-11-04 — js/common/fav.js): 카드 오른쪽 위 ☆/★ — 별표 카드는 목록 맨 앞 */
:is(.pds-card, .wb-gal-card, .vcs-fcard, .vc-tile, .pal-card, .hs-card, .wbf-card, .hw-card, .hw-fcard, .pno-card, .bk-fcard):has(> .qs-fav) { position: relative; }
.qs-fav { position: absolute; bottom: 4px; right: 4px; z-index: 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font: 700 15px/1 var(--font-sans); cursor: pointer; opacity: .55; }
.qs-fav:hover, .qs-fav:focus-visible, :hover > .qs-fav { opacity: 1; }
.qs-fav.on { opacity: 1; color: var(--acc); border-color: var(--acc); }

/* 지문 찾기 칸 (2026-11-10 — js/common/psg-find-ui.js): 지문 고르는 화면 위 — 영어 낱말을 칠 때마다 큰 숫자가 줄고, 찾은 줄을 누르면 그 지문이 골라짐 (내 자료실 [지문 찾기]와 같은 모양) */
.pfu { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.pfu-in { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); transition: border-color .15s; }
.pfu-in:focus-within { border-color: var(--acc); }
.pfu-lb { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.pfu-q { flex: 1 1 auto; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.pfu-q::placeholder { color: var(--muted); font-size: 13px; }
.pfu-panel { padding: 16px; border-radius: 10px; background: var(--bg2); }
.pfu-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pfu-lab { font-size: 13px; color: var(--muted); }
.pfu-n { font-size: 15px; font-weight: 700; color: var(--ink); }
.pfu-n b { font-size: 42px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1; }
.pfu[data-mode="narrow"] .pfu-n b { color: var(--acc); }
.pfu-msg { margin-left: auto; font-size: 13px; color: var(--ink2); }
.pfu-bar { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pfu-bar i { display: block; width: 100%; height: 100%; border-radius: 999px; background: var(--acc); transition: width .3s cubic-bezier(.2, .8, .2, 1); }
.pfu[data-mode="empty"] .pfu-bar i { background: var(--muted); }
.pfu-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pfu-rows:empty { display: none; }
.pfu-same { margin: 0; padding: 8px 16px; border-left: 2px solid var(--acc); background: var(--bg); font-size: 13px; color: var(--ink2); }   /* 같은 글 두 곳 (2026-11-10 점검 운영팀 보완 4) */
.pfu-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: center; width: 100%; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; text-align: left; color: var(--ink2); cursor: pointer; }
.pfu-row:hover, .pfu-row:focus-visible { border-color: var(--acc); }
.pfu-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.pfu-name b { font-size: 15px; color: var(--ink); }
.pfu-name small { font-size: 11px; color: var(--muted); }
.pfu-go { font-size: 13px; font-weight: 700; color: var(--acc); white-space: nowrap; }
.pfu-row.on .pfu-go { color: var(--ink); }
.pfu-snip { grid-column: 1 / -1; font-size: 13px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.pfu-snip em { font-style: normal; font-weight: 700; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pfu-bar i { transition: none; } }
@media print { .pfu { display: none !important; } }

/* 퀘스코인 드는 화면의 안내 줄 (2026-11-11 선생님 "단어장·학교별 기출에 퀘스코인 설명이 없다" — 문제은행 .bk-rules와 같은 모양, 단어장·학교별 기출) */
.qs-coin-rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.qs-coin-rules li { position: relative; padding-left: 16px; line-height: 1.8; }
.qs-coin-rules li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }
.qs-coin-rules b { color: var(--ink2); font-weight: 700; }
/* "퀘스코인이 뭔가요?" 펼침 (2026-11-10 — js/common/site.js siteCoinWhatHTML) */
.qs-coin-what { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.qs-coin-what summary { cursor: pointer; color: var(--ink2); text-decoration: underline; width: fit-content; list-style: none; }
.qs-coin-what summary::-webkit-details-marker { display: none; }
.qs-coin-video { margin-left: 8px; padding: 0 8px; font: inherit; font-size: 13px; color: var(--acc); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; text-decoration: none; vertical-align: baseline; }
.qs-coin-video span { margin-right: 4px; font-size: 11px; }
.qs-coin-video:hover { border-color: var(--acc); }
.qs-coin-what ul { margin: 8px 0 0; padding: 8px 16px 8px 32px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; line-height: 1.8; }

/* 하단 글 — 쪽 번호 옆 짧은 글 + 로고 (js/common/pno-style.js pnoFootApply, 2026-11-12)
   종이 안: 번호 칸 안에 붙음 · 글자는 번호보다 작고 보통 굵기 · 색은 번호 색 그대로(흑백 인쇄)
   처음 값(비어 있음)이면 붙지 않음 → 예전 인쇄 결과 그대로 */
.pno-ft { display: inline-flex; align-items: center; gap: 1.6mm; white-space: nowrap; vertical-align: middle; font-family: 'Pretendard', 'Noto Sans KR', sans-serif; font-size: .82em; font-weight: 500; letter-spacing: 0; }
.pno-ft-r { margin-right: 2mm; }
.pno-ft-l { margin-left: 2mm; }
.pno-ft-bar { display: inline-block; width: .3mm; height: 2.8mm; background: currentColor; opacity: .45; }
.pno-ft-logo { height: 3.6mm; width: auto; max-width: 24mm; object-fit: contain; }
/* 고르는 칸 (쪽 번호 스타일 창 · 디자인 스튜디오 [쪽 번호]) */
.pno-ftrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pno-ftk { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.pno-ft-in { flex: 1; min-width: 160px; padding: 8px; font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.pno-ft-logo-btn { flex: none; padding: 8px 16px; font: inherit; font-size: 13px; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.pno-ft-logo-btn.active { background: var(--acc); border-color: var(--acc); color: var(--bg); font-weight: 700; }
.pno-ft-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.pds-ft { padding: 0 0 16px; }
.ss-set.ss-ft { display: block; width: 100%; }

/* ===== 2026-11-18 본부: 문서 꾸미기 카드 정리 · [자주 쓰는 구성] 메뉴 · 출력 카드 "+ 칸 추가" =====
   (js/common/page-deco.js pdCardMount · js/common/presets.js menu 모양 · js/common/deco-presets.js · js/common/ob-pull.js) — 화면 틀만, 종이와 무관 */
.pd-card .pd-cardsum { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.pd-card .pd-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.pd-card .pd-pre { min-width: 0; }
.pd-card .pd-pre .ps-bar, .pd-card .pd-pre.ps-bar, #wbDeco .wb-pre.ps-bar { margin: 0; }
#wbDeco .wb-pre { margin: 8px 0 0; }
.ps-bar-m { position: relative; }
.ps-link { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ps-link:hover { color: var(--acc); }
.ps-link:focus-visible, .ps-dd-btn:focus-visible, .ps-dd-menu button:focus-visible, .obp-add:focus-visible, .obp-x:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ps-dd { position: relative; }
.ps-dd-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 8px; min-width: 264px; max-width: min(360px, 86vw); padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 18, 32, .08); }
.ps-dd-menu[hidden] { display: none; }
.ps-dd-i { display: flex; align-items: center; gap: 8px; }
.ps-dd-name { flex: 1; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ps-dd-name:hover { border-color: var(--acc); color: var(--acc); }
.ps-dd-s { flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ps-dd-s:hover { color: var(--ink); }
.ps-dd-add { justify-self: start; padding-top: 8px; }
.ps-bar-m .ps-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ps-bar-m .ps-save[hidden] { display: none; }
.ps-bar-m .ps-save input { flex: 1 1 160px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.ps-bar-m .ps-msg { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ob-sumline { position: relative; }
.obp-add { flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.obp-add:hover { color: var(--acc); }
.obp-add[hidden] { display: none; }
.obp-pop { position: absolute; left: 72px; top: calc(100% + 8px); z-index: 40; display: grid; gap: 8px; width: min(320px, 86vw); padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 18, 32, .08); }
.obp-pop-h { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.obp-pop-i { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.obp-pop-i input { accent-color: var(--acc); }
.obp-pop-s { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.obp-row .obp-tabs { display: inline-flex; flex-wrap: wrap; }
.obp-x { flex: none; margin-left: auto; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.obp-x:hover { color: var(--ink); }
@media (max-width: 860px) { .obp-pop { left: 0; } }
@media print { .obp-row, .obp-pop, .obp-add { display: none !important; } }
/* 문서 꾸미기 카드 "+ 칸 추가" (2026-11-19 본부 — js/common/deco-pull.js, 넣고 빼기는 위 .obp-* 그대로): 탭 이름 · ‹ 지금 값 › · [빼기] */
.dcp-addline { position: relative; display: flex; align-items: center; }
.dcp-addline .obp-pop, .wb-studio-line .obp-pop { left: 0; }
.wb-studio-line { position: relative; }
.dcp-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dcp-row .ob-k { width: 64px; }
.dcp-v { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.dcp-step { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; font-size: 15px; line-height: 1; color: var(--ink2); cursor: pointer; }
.dcp-step:hover { border-color: var(--acc); color: var(--acc); }
.dcp-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink2); text-align: center; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.dcp-name:hover { color: var(--acc); }
.dcp-step:focus-visible, .dcp-name:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.obp-pop-s.obp-pop-warn { color: var(--ink); font-weight: 700; padding-left: 8px; border-left: 2px solid var(--acc); }
#wbDeco .dcp-row { margin: 0 0 8px; padding: 0 16px; }
@media print { .dcp-addline { display: none !important; } }
.pd-card .pd-sum-i { white-space: nowrap; }
/* 문서 꾸미기 카드 "디자인" 줄 (2026-11-20 선생님 "워크북 형식이 딱 좋다 · 다 통일감 있게" — 워크북 STEP 4 .wb-studio-line과 같은 모양):
   회색 칸 = 이름 "디자인" · 요약 한 줄(넘치면 …, 전체 글은 title) · [+ 칸 추가] / 아래 줄 전체 폭 [디자인 스튜디오] → 꺼낸 칸 → [+ 지금 설정 저장] */
.pd-card .pd-studio-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
.pd-card .pd-line-k { flex: none; width: 48px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.pd-card .pd-studio-line .pd-cardsum { flex: 1; min-width: 0; font-size: 13px; line-height: inherit; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-card .pd-studio-line > .pd-studio-btn { flex: 1 0 100%; border-color: var(--line); color: var(--ink2); font-weight: inherit; }   /* 워크북 [디자인 스튜디오]와 같은 보조 단추 */
.pd-card .pd-studio-line .obp-pop { left: 0; }
.pd-card .dcp-row { padding: 0 16px; }

/* 색을 입힐 곳 [전체 적용] + 골라서 끄기 (2026-11-18 본부 — js/common/cs-all.js) */
.cs-all { display: flex; flex-direction: column; gap: 8px; }
.cs-all-h { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--ink2); }
.cs-all-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cs-all-sw b { color: var(--ink); font-weight: 700; }
.cs-more { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.cs-list { padding-left: 8px; border-left: 1px solid var(--line); }
.cs-list[hidden], .wb-theme-scope.cs-all > .cs-list[hidden] { display: none; }
.wb-theme-scope.cs-all > .cs-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media print { .cs-all-h { display: none; } }

/* 디자인 스튜디오 가리켜 보기 · ○○만 적용 꼬리표 (2026-11-18 본부 — js/common/point-view.js) */
#pdStudio .ob-lb[data-ptv-scope]::after { content: attr(data-ptv-scope); display: block; width: fit-content; margin-top: 4px; padding: 0 6px; border: 1px dashed var(--acc); border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 18px; color: var(--acc2); }   /* 줄 이름 아래 점선 꼬리표 (2026-11-18 선생님) */
.ptv-box { position: absolute; z-index: 2; border: 2px solid var(--acc); border-radius: 6px; background: color-mix(in srgb, var(--acc) 8%, transparent); pointer-events: none; }
.ptv-tag { position: absolute; left: -2px; bottom: 100%; margin-bottom: 2px; padding: 2px 8px; border-radius: 6px; background: var(--acc); color: var(--bg); font-size: 11px; font-weight: 700; white-space: nowrap; }
.ptv-tag.ptv-in { bottom: auto; top: 0; margin: 0; border-radius: 0 0 6px 0; }
.ptv-none { position: absolute; z-index: 2; left: 8px; right: 8px; top: 8px; padding: 8px 16px; border: 1px solid var(--acc); border-radius: 6px; background: var(--bg); font-size: 13px; color: var(--ink2); pointer-events: none; }
.ptv-none b { color: var(--acc); margin-right: 4px; }
.ptv-none .ptv-sample { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }   /* 지문 머리 견본 (2026-11-19) */
@media print { .ptv-box, .ptv-none { display: none; } }
.xp-trans { position: relative; }   /* [해석] 빼기 (2026-11-22 — 화면에만, js/common/explain.js xpTransMark·xpTransPh): 해석 칸에 마우스를 올리면 점선 + 위에 단추 둘, 빠진 자리엔 작은 줄 */
.xp-trans:hover, .xp-trans.open, .xp-trans:focus-within { outline: 1px dashed var(--acc); outline-offset: 4px; border-radius: 6px; }
.xp-trans-bar { display: none; position: absolute; right: 0; top: -32px; z-index: 5; gap: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.xp-trans:hover > .xp-trans-bar, .xp-trans.open > .xp-trans-bar, .xp-trans:focus-within > .xp-trans-bar { display: inline-flex; }
.xp-trans-bar button { padding: 4px 8px; border: 0; background: var(--bg); font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer; }
.xp-trans-bar button:first-child { background: var(--acc); color: var(--bg); font-weight: 700; }
.xp-trans-ph { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; padding: 8px; border: 1px dashed var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); }
.xp-trans-ph button { padding: 0; border: 0; background: none; font: inherit; color: var(--ink2); text-decoration: underline; cursor: pointer; }
.ptv-flash { outline: 2px solid var(--acc); outline-offset: 4px; border-radius: 6px; transition: outline-color .3s; }   /* 스튜디오 밖 이름표 → 큰 미리보기 그 자리 잠깐 (point-view.js ptvMainGo) */
@media print { .ptv-flash { outline: none; } }

/* 관리자 [지금 결제] 미리보기 창 (2026-11-24) */
.adm-paynow { position: fixed; inset: 0; z-index: 1300; background: rgba(11, 18, 32, .5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.adm-paynow-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 48px rgba(11, 18, 32, .3); width: min(720px, 100%); max-height: 100%; overflow: auto; padding: 24px; }
.adm-paynow-box h3 { margin: 0 0 16px; font-size: 22px; }
.adm-paynow-box th { text-align: left; white-space: nowrap; vertical-align: top; width: 112px; color: var(--muted); font-weight: 500; }
.adm-paynow-stop { margin: 16px 0 0; padding-left: 24px; font-weight: 700; color: var(--warn); }
.adm-paynow-btns { display: flex; gap: 8px; margin-top: 24px; justify-content: flex-end; }
.adm-paynow-msg { margin: 8px 0 0; min-height: 24px; font-size: 13px; }
.adm-paynow-box .adm-pay-err { color: var(--warn); font-weight: 700; }
.adm-paynow-box table { width: 100%; table-layout: fixed; }
.adm-paynow-box td { white-space: normal; overflow-wrap: anywhere; }

/* 동형 [다시 만들기] 아래 두 줄 메뉴 · 창 없이 다시 만들 때의 안내 칸 · "방금 다시 만듦" (2026-11-25 — js/common/redo.js, 화면만) */
.redo-hover > button[data-redo-open].on { background: var(--acc); color: var(--bg); }
.redo-sub { position: absolute; top: 100%; display: flex; flex-direction: column; min-width: 264px; background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; box-shadow: 0 2px 8px rgba(11, 18, 32, .12); z-index: 1; }
.redo-sub[hidden] { display: none; }
.redo-sub button { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font: 13px/1.4 var(--font-sans); color: var(--ink); background: transparent; border: 0; padding: 8px 16px; text-align: left; white-space: nowrap; cursor: pointer; }
.redo-sub button + button { border-top: 1px solid var(--line); }
.redo-sub button b { font-weight: 700; }
.redo-sub button small { font-size: 11px; color: var(--muted); }
.redo-sub button:hover:not(:disabled), .redo-sub button:focus-visible { background: var(--accbg); }
.redo-sub button:disabled { cursor: default; }
.redo-sub button:disabled b { color: var(--muted); }
.redo-quick { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); box-sizing: border-box; padding: 16px 24px; background: var(--bg); border: 1px solid var(--acc); border-radius: 10px; box-shadow: 0 2px 8px rgba(11, 18, 32, .12); font: 13px/1.5 var(--font-sans); color: var(--ink2); }
.redo-quick[hidden] { display: none; }
.redo-quick b { color: var(--ink); font-size: 15px; }
.redo-quick span { color: var(--muted); }
.redo-quick > i { display: block; height: 4px; border-radius: 6px; background: linear-gradient(90deg, var(--accbg) 0 30%, var(--acc) 50%, var(--accbg) 70% 100%); background-size: 200% 100%; animation: redoQuickMove 1.6s linear infinite; }
.redo-quick.err > i { display: none; }
@keyframes redoQuickMove { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .redo-quick > i { animation: none; } }
.redo-quick > div { display: flex; gap: 8px; justify-content: flex-end; }
.redo-quick.err b { font-weight: 800; }
#sheet section.q.q-redone-on { position: relative; outline: 2px solid var(--acc); outline-offset: 6px; border-radius: 6px; }
#sheet .q-redone { position: absolute; right: 0; top: -16px; font: 700 11px/1.5 var(--font-sans); color: var(--acc2); background: var(--accbg); border-radius: 4px; padding: 0 8px; pointer-events: none; }
html.pdf-mode #sheet .q-redone { display: none !important; }
html.pdf-mode #sheet section.q.q-redone-on { outline: 0; }
@media print { #sheet .q-redone { display: none !important; } #sheet section.q.q-redone-on { outline: 0; } }
.msg.pk-savewarn { position: fixed; z-index: 970; left: 16px; bottom: 16px; max-width: 480px; margin: 0; display: block; box-shadow: 0 8px 24px rgba(11, 18, 32, .18); }   /* 내 자료실 자동 저장 실패 알림 (2026-11-27) */
