/* 클린뷰어 웹 보기 — 밝은/어두운 화면 둘 다(§2-L) · 폰 너비에서 가로로 안 넘치게(§2-UI) · 누르는 자리 48px(§2-ACC) */
:root {
  --bg: #e9eaee; --card: #ffffff; --text: #1e293b; --sub: #475569; --muted: #64748b;
  --line: #e2e8f0; --line-strong: #64748b; /* 11-08 7 자체검사 — 옅은 단추 테두리(--line 은 바탕 #e9eaee 와 대비 약 1:1 이라 단추가 안 보였다 · 이건 3.9:1) */ --bar: #ffffff; --accent: #104dfd; --accent-text: #ffffff; --hl: rgba(255, 196, 0, .45); --link-text: #1d4ed8;
  --sc-skip-bg: var(--accent); --sc-skip-fg: var(--accent-text);
}
@media (prefers-color-scheme: dark) {
  :root {
    /* 11-16 어두운 한 벌(회의 261116_리디자인시안 결정 3 · 웹·앱 같은 값) — Night #0B1226 · 카드 #141D36 · 선 #2A3556(면 구분 장식선 · 글자 아님) · 글 #E8EEFF
       강조 #9DB8FF(바탕 9.51 · 카드 8.53 · 옛 #6b95ff 6.53) · 채운 단추 = 강조 면 + Night 글자(6.58↑) · #3A6DFF·흰 글 단추는 안 씀(4.26/4.36 미달) */
    --bg: #0b1226; --card: #141d36; --text: #e8eeff; --sub: #cbd5e1; --muted: #94a3b8;
    --line: #2a3556; --bar: #0b1226; --accent: #9db8ff; --accent-text: #0b1226; --hl: rgba(255, 196, 0, .55); --link-text: #9db8ff;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--text); display: flex; flex-direction: column; line-height: 1.6; /* 한글 행간 — 안 적으면 영문 기준으로 빽빽(화면 글자 측정이 잡음) */
  word-break: keep-all; overflow-wrap: anywhere;
}
/* 11-10 일본어(장부 1110aa-2 · 회의 261110_일본어2차) — 한국어 글꼴이 앞이면 한자가 한국식 모양으로 나온다(같은 코드 점) · 일본어는 띄어쓰기가 없어 keep-all 이면 줄이 안 나뉜다 */
:lang(ja) body { font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif; word-break: normal; line-break: strict; }

a { color: var(--link-text); }
[hidden] { display: none !important; }

.bar, .search, .tools {
  display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--bar);
  border-bottom: 1px solid var(--line); min-height: 56px;
  flex-shrink: 0; /* 몸통이 세로로 늘어서 본문이 길면 막대가 56px 로 눌려 폰의 둘째 줄(파일 이름)이 반쯤 가려졌다(10-08 재서 찾음 · 운영도 같았다) */
}
.tools { border-bottom: 0; border-top: 1px solid var(--line); padding-bottom: calc(4px + env(safe-area-inset-bottom)); overflow-x: clip; }
/* overflow-x: clip(11-20 · qa-1029-i ① 진단 셋째) — 단추가 한 줄을 넘치면 폰 브라우저가 화면 폭을 412→484 로 넓혀 도구줄도 같이 넓어져 「안 넘침」 으로 읽혔고,
   폭이 바뀌어 PDF 를 다시 그려 쓰던 양식 칸이 새로 만들어졌다 → 넘친 단추가 화면 폭을 못 넓히게 자르고, 넘침 판정은 view.js fitTools 가 단추 끝 자리로 한다 */
/* 눌러서 막대 숨기기(10-11 · 폰) — 막대를 지우지 않고 화면 밖으로 민다(자판 Tab·낭독기로 오면 view.js 가 다시 보인다) · 본문은 그만큼 넓어진다 */
body.bars-hidden .bar, body.bars-hidden .tools { position: fixed; left: 0; right: 0; z-index: 40; transition: transform .2s ease; }
body.bars-hidden .bar { top: 0; transform: translateY(-110%); }
body.bars-hidden .tools { bottom: 0; transform: translateY(110%); }
body.bars-hidden .read-bar, body.bars-hidden .sum-bar { bottom: calc(8px + env(safe-area-inset-bottom)); } /* 진행 중인 띠는 막대가 비운 자리로 내려와 그대로 보인다 */
body.bars-hidden[data-reading] #autoBar, body.bars-hidden[data-reading] #richSelBar { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.bars-hidden .toast { bottom: calc(12px + env(safe-area-inset-bottom)); }
body.bars-hidden .to-top { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { body.bars-hidden .bar, body.bars-hidden .tools { transition: none; } }
@media print { body.bars-hidden .bar, body.bars-hidden .tools { display: none; } }
.brand { font-weight: 800; font-size: 1rem; text-decoration: none; padding: 12px 8px; color: var(--text); white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 22px; flex: none; } /* 정식 로고 그림(11-01 · scripts/make-icons.py 가 만듦) */ /* 파일 이름이 길어도 쪼개지지 않게(사진으로 발견) */
.name { font-size: 0.875rem; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.grow { flex: 1 1 auto; }
.count { font-size: 0.875rem; color: var(--sub); min-width: 48px; text-align: center; white-space: nowrap; }

button.icon {
  width: 48px; height: 48px; border: 0; background: transparent; color: var(--text); border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
button.icon:hover, button.icon:focus-visible { background: var(--line); } /* 테두리는 아래 :focus-visible 공통 규칙 — 전엔 지워서 옅은 바탕만 바뀌었다 */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 1rem; cursor: pointer; flex: none;
  border: 0; /* 11-04 — 채운 <button class="btn"> 33개에 브라우저 기본 입체 테두리가 그려졌다(사진 design-live-view-375-light 큰 열기 단추) · 테두리 있는 .btn.plain 은 아래 규칙이 이긴다 */
}
.btn { position: relative; }
.btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.btn:focus-within { outline: 3px solid var(--text); outline-offset: 2px; }

.search input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; font-size: 1rem; /* 16px 미만이면 아이폰이 확대해 버린다 */
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text);
}

main { flex: 1 1 auto; overflow: auto; position: relative; }
.welcome { max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.welcome h1 { font-size: 1.75rem; margin-bottom: 12px; }
.welcome p { font-size: 1rem; color: var(--sub); line-height: 1.7; margin-bottom: 12px; }
.welcome .promise { color: var(--text); }
.welcome .small { font-size: 0.9375rem; } /* 11-08 시안 A — 안내 글 15px(증명서 42348461846 바닥 위반 「360 폭 안내 글 12~13px」 · 전엔 14px) */
/* 보기 홈 탭 = 시안 A-Clear 01 홈 그대로(11-19 · 장부 1119tb-1 · 쪽지 o0ek7d) — 카드·알약·바로가기·이어서 보기·최근 문서 꾸밈은 aclear.css 한 곳(첫 화면 / 과 같은 파일)
   이 파일에는 보기 화면에만 있는 것: 홈일 때 바탕·머리 막대 모양 · 옛 요소(약속·받은 곳·놓기·형식 줄)의 자리 · 색은 :root 변수만 */
#tabHome { text-align: left; }
/* --home-tint 는 찍기 종류 고른 타일·아래 탭 알약이 쓴다(옛 홈 판 색 · 값 그대로) */
:root { --home-tint: #dde7ff; }
/* 11-11 판 색은 앱의 다른 색(--text·--link-text)과 같은 규칙 하나로만 바꾼다 — data-theme 에도 따로 반응하게 했더니 판만 어두워지고 글자는 밝은 색으로 남아 대비 1.03(build-guard G1-contrast 실행 42873729553) */
@media (prefers-color-scheme: dark) { :root { --home-tint: #1b2a4d; --line-strong: #94a3b8; } }
/* 홈 탭이 보일 때만 — 바탕은 시안 바탕(--ac-canvas) · 머리 막대는 시안 머리(선 없음 · 로고 28 · 「클린뷰어」 20 굵게 · 오른쪽 둥근 흰 아이콘 단추) · 좌우 여백 20 */
body:has(#welcome:not([hidden]) > #tabHome:not([hidden])) { --bg: var(--ac-canvas); --bar: var(--ac-canvas); }
body:has(#welcome:not([hidden]) > #tabHome:not([hidden])) .bar { border-bottom-color: transparent; padding: 8px 12px; gap: 8px; }
body:has(#welcome:not([hidden]) > #tabHome:not([hidden])) .bar .brand { font-size: 1.25rem; font-weight: 800; color: var(--ac-text); padding: 8px; }
body:has(#welcome:not([hidden]) > #tabHome:not([hidden])) .bar .brand-mark { width: 28px; height: 28px; }
body:has(#welcome:not([hidden]) > #tabHome:not([hidden])) .bar button.icon { width: 44px; height: 44px; border: 1px solid var(--ac-line); border-radius: 999px; background: var(--ac-card); color: var(--ac-text); box-shadow: var(--ac-shadow); }
.welcome:has(> #tabHome:not([hidden])) { padding: 8px 20px 32px; }
/* 약속 한 줄(카드 아래) · 굵은 세 줄이 제목보다 무거워 보였다(사진 11-10) — 문장 글자는 그대로(D-25·D-30) */
#tabHome .ac-promise { margin: 0 0 20px; font-size: .8125rem; line-height: 1.6; color: var(--ac-sub); }
#tabHome .promise-text { flex: 1; min-width: 0; }
#tabHome .promise strong { display: inline; font-weight: 400; color: var(--ac-text); }
/* 시안 아래 — 받은 곳 · 놓기 · 붙여 넣기 · 형식 줄(옛 요소 그대로 · 자리만) */
#tabHome .home-from { margin: 0 0 12px; text-align: left; }
#tabHome .home-from summary { color: var(--text); font-weight: 600; }
#tabHome .home-from .from-pick { justify-content: flex-start; }
#tabHome .home-from .from-pick .btn { min-height: 44px; }
#tabHome .drop { margin: 12px 0 0; }
#tabHome .paste-hint { margin: 8px 0 0; }
#tabHome .open-formats { margin: 12px 0 0; }
#tabHome .open-formats .link-btn { padding: 0; text-align: left; } /* 글자 200% 에서 꺾인 줄이 가운데로 모였다(증명서 사진 42843670855) */
#tabHome .resume-clear { margin: 4px 0 0; text-align: right; }
#tabHome .ac-empty .sample-entry { justify-content: center; }
#tabHome .ac-empty .btn.plain { min-height: 44px; border-color: var(--ac-brand); color: var(--ac-brand); background: transparent; } /* 테두리도 대표색 — 옅은 선은 흰 카드 위에서 단추 경계가 안 보인다 */
/* 앱 안 웹(.in-app)은 받은 곳을 숨긴다(아래 .in-app .from-where) — 그곳을 누르는 바로가기 둘도 같이 */
.in-app .ac-quick > li:has(> .ac-q[data-quick="kakao"]), .in-app .ac-quick > li:has(> .ac-q[data-quick="mail"]) { display: none; }
.in-app .ac-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-more { margin: 32px 0 0; border-top: 1px solid var(--line); }
.home-more > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; }
.home-more > summary::-webkit-details-marker { display: none; }
/* 접힘인 것을 그림으로도(펼치면 뒤집힘) — 글자색 변수만 */
.home-more > summary::after { content: ""; flex: none; margin-left: auto; width: 20px; height: 20px; background: var(--sub); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.home-more[open] > summary::after { transform: rotate(180deg); }
.home-more > p, .home-more > details { margin: 8px 0 12px; }
.home-more .formats-more, .home-more .from-where { text-align: left; }
.home-more .from-pick, .home-more .sample-office { justify-content: flex-start; }
.home-more .sample-more { margin-top: 4px; }
/* 두 문서 글 비교(10-07) — 색만으로 말하지 않는다: 문단 이름표 + 줄 긋기(뺀 글)·밑줄(더한 글) */
.compare-entry { margin-top: 4px; }
.compare .cmp-head { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.compare .cmp-files { margin: 0; color: var(--sub); overflow-wrap: anywhere; }
.compare .cmp-sum { margin: 8px 0 0; font-weight: 700; color: var(--text); }
.compare .cmp-warn { margin: 8px 0 0; color: var(--text); }
.compare p { margin: 0 0 8px; overflow-wrap: anywhere; }
.compare .cmp-same { color: var(--sub); }
.compare .cmp-del, .compare .cmp-add, .compare .cmp-change { padding: 8px 12px; border-radius: 8px; border-left: 4px solid; color: var(--text); }
.compare .cmp-del { background: var(--cmp-del-bg); border-color: var(--cmp-del); }
.compare .cmp-add { background: var(--cmp-add-bg); border-color: var(--cmp-add); }
.compare .cmp-change { background: var(--card); border-color: var(--sub); border: 1px solid var(--line); border-left: 4px solid var(--sub); }
.compare .cmp-tag { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 8px; font-size: .8125rem; font-weight: 700; background: var(--line); color: var(--text); }
.compare del { text-decoration: line-through; text-decoration-thickness: 2px; background: var(--cmp-del-bg); color: var(--text); }
.compare ins { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; background: var(--cmp-add-bg); color: var(--text); }
/* 바뀐 문단 속 낱말 — 「1」 지움과 「2」 더함이 붙어 「12,000만원」 으로 읽혔다(사진) → 작은 칸 + 사이에 화살표 */
.compare .cmp-change del, .compare .cmp-change ins { padding: 0 4px; border-radius: 8px; }
.compare .cmp-pair.keep { white-space: nowrap; }
.compare .cmp-arrow { margin: 0 4px; color: var(--sub); }
.compare .cmp-fold { margin: 0 0 8px; }
.compare .cmp-fold > summary { min-height: 44px; display: flex; align-items: center; color: var(--sub); cursor: pointer; }
:root { --cmp-del: #c62828; --cmp-del-bg: #fdecea; --cmp-add: #2e7d32; --cmp-add-bg: #e7f5e9; }
@media (prefers-color-scheme: dark) { :root { --cmp-del: #ef9a9a; --cmp-del-bg: #4a1f1f; --cmp-add: #a5d6a7; --cmp-add-bg: #1e3b22; } } /* 이 사이트는 기기 설정만 따른다(맨 위 :root 와 같게) */
/* 최근 연 문서(10-07) — 켠 사람만 · 줄 전체가 「열기」 · 휴지통은 따로(44px) */
.recent { margin: 24px 0 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.recent h2 { font-size: 1.25rem; margin-bottom: 8px; }
.recent-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--text); cursor: pointer; }
.recent-toggle input { width: 22px; height: 22px; flex: none; }
.recent-list { list-style: none; padding: 0; margin: 8px 0 0; }
.recent-list li { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.recent-open { flex: 1 1 auto; min-width: 0; min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.recent-open:hover, .recent-open:focus-visible { background: var(--line); }
.recent-name { font-weight: 600; overflow-wrap: anywhere; }
/* 첫 쪽 미리보기 그림(PO-03) — 켰을 때만 · 48×64 · 둥글기 6 · 없으면 형식 이름 */
.recent-open.with-thumb { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
.recent-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recent-thumb { flex: 0 0 48px; width: 48px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.recent-ext { font-size: .8125rem; font-weight: 700; color: var(--sub); }
.recent-meta { font-size: .875rem; color: var(--sub); font-variant-numeric: tabular-nums; }
.recent-del, .recent-star { flex: none; }
/* 경고 글자색(10-29 · 88 후보 1) — 화면 틀은 기기 설정(prefers-color-scheme)을 따르는데 채운 별은 문서 「어둡게」(body.dark)를 따라
   밝은 카드 위 옅은 노랑 · 어두운 카드 위 진한 주황이 나왔다 → 틀 색과 같은 조건으로 한 변수에 */
:root { --warn-ink: #b45309; } /* 흰 바탕 대비 5.0 */
@media (prefers-color-scheme: dark) { :root { --warn-ink: #fbbf24; } }
.recent-star[aria-pressed="true"] { color: var(--warn-ink); }
.drop {
  border: 2px dashed var(--muted); border-radius: 12px; padding: 40px 16px; text-align: center; color: var(--sub); /* 글자는 한 단계 진하게 — muted 는 이 바탕에서 3.96:1(대비 시험이 잡음) */
  margin: 16px 0; font-size: 1rem;
}
.drop.over, body.dragging .drop { border-color: var(--accent); color: var(--link-text); }

.status { max-width: 640px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.status h2 { font-size: 1.25rem; margin-bottom: 8px; }
.status p { font-size: 1rem; color: var(--sub); line-height: 1.7; margin-bottom: 16px; }
/* 상태 틀(11-08 · 약식 회의 261108 시안 A·B 「빈·기다림·오류 같은 틀」) — 작은 그림 + 한 줄 + 단추 · 기다림(누를 것이 없는 상태)은 도는 그림 · 못 연 화면(#btnPickOther)은 느낌표 그림
   그림은 꾸밈이라 글자색 변수(--sub)로만 · 묻는 화면(단추·칸이 있는데 오류가 아닌 것 — 두 번째 문서 고르기·비밀번호)은 그림 없음(기다림으로 보이면 거짓 · §2-T) · 숫자는 그리지 않는다 */
.status:not(:has(button, input, a))::before, .status:has(#btnPickOther)::before {
  content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 16px; background: var(--sub);
  -webkit-mask: var(--st-icon) center / contain no-repeat; mask: var(--st-icon) center / contain no-repeat;
}
.status { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'/%3E%3C/svg%3E"); }
.status:has(#btnPickOther) { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E"); }
.status:not(:has(button, input, a))::before { animation: cv-st-spin 1.2s linear infinite; }
/* PS13 사진 오류 3종(문서함 #1227 · 시안 PS13) — 72 그림 칸(옅은 주색 면 · 주색 그림) + 한 줄 + 이름·까닭 + 채운 단추 1 · 못 여는 형식(view.js photoFail) · 폴더 허락 없음(#folderLost) */
.status.pv-err::before, .status.pv-err:has(#btnPickOther)::before { display: none; } /* :has(#btnPickOther) 가 id 만큼 세서 옛 느낌표가 그림 칸 위에 남았다(web-pc 45122129815 q1123-ps13 사진) */
.pv-err-ic { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 16px; background: var(--home-tint, var(--card)); color: var(--link-text); }
.status.pv-err h2 { font-size: 1.0625rem; font-weight: 700; }
.status.pv-err p { overflow-wrap: anywhere; }
.status.pv-err .btn { min-width: 220px; justify-content: center; margin: 0 4px 8px; }
#folderLost .pv-err-ic { margin-top: 24px; }
/* 사진 여는 중 — 둥근 칸 둘레로 고리가 돈다(움직임 줄이기면 멈춘 고리) · 전엔 빈·오류와 같은 네모 그림이라 진행 중인지 모양으로 안 보였다(사전 46413058757) */
.pv-err-ic.pv-busy { position: relative; border-radius: 999px; }
.pv-err-ic.pv-busy::after { content: ""; position: absolute; inset: -8px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 999px; animation: cv-st-spin 1.2s linear infinite; }
.pv-stop { animation: pv-late 1ms .4s both; }
body.pv-state .pv-err-ic { background: var(--bar); } /* 밝은 홈 물빛(--home-tint)이 어두운 바탕에 흰 네모로 뜨지 않게 — 사진 막대와 같은 면 */
@keyframes pv-late { from { visibility: hidden; } to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .pv-err-ic.pv-busy::after { animation: none; } }
#folderLost { text-align: center; }
@keyframes cv-st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status::before { animation: none !important; } }

.doc { padding: 8px 0 24px; }
.page { position: relative; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.page canvas { display: block; width: 100%; height: 100%; }
/* PDF 여백 잘라 보기(10-11) — 쪽 상자는 쪽 전체 크기, 여백은 clip-path 로 가린다(view.js layout) · 가린 부분이 화면 밖으로 가로 넘침을 만들지 않게 */
#doc.crop-clip { overflow-x: clip; }
body.dark .page canvas, body.dark .img { filter: invert(1) hue-rotate(180deg); }
/* XPS 쪽(10-13 스물다섯째 ⑥) — PDF 쪽처럼 어두운 화면에선 뒤집어 어둡게(전엔 혼자 흰 종이라 눈부신 블록이었다) · 「종이는 원래 색」 토글이면 끈다 */
body.dark .xps-page { filter: invert(1) hue-rotate(180deg); }
.img { display: block; max-width: 100%; margin: 0 auto; }
/* 사진 상자 — 사진 크기에 꼭 맞게(글자 층이 사진 위에 정확히 얹히도록) */
.imgbox { position: relative; display: table; margin: 0 auto; }

/* PDF.js 글자 층 — 보이지 않지만 고르고 복사할 수 있다. 아래 .textLayer 규칙은 pdfjs-dist 6.3.289 web/pdf_viewer.css 에서
   그대로 옮긴 것(Apache-2.0) — 위치 계산이 이 규칙에 기대므로 손으로 바꾸지 않는다 */
.textLayer{
  color-scheme:only light;

  position:absolute;
  text-align:initial;
  inset:0;
  overflow:clip;
  opacity:1;
  line-height:1;
  letter-spacing:normal;
  word-spacing:normal;
  -webkit-text-size-adjust:none;
     -moz-text-size-adjust:none;
          text-size-adjust:none;
  forced-color-adjust:none;
  transform-origin:0 0;
  caret-color:CanvasText;
  z-index:0;

  &.highlighting{
    touch-action:none;
  }

  :is(span, br){
    color:transparent;
    position:absolute;
    white-space:pre;
    cursor:text;
    transform-origin:0% 0%;
    -webkit-user-select:text;
       -moz-user-select:text;
            user-select:text;
  }
  --min-font-size:1;
  --text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv:calc(1 / var(--min-font-size));

  > :not(.markedContent),
  .markedContent span:not(.markedContent){
    z-index:1;

    --font-height:0;
    font-size:calc(var(--text-scale-factor) * var(--font-height));

    --scale-x:1;
    --rotate:0deg;
    transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
  }

  .markedContent{
    display:contents;
  }

  span[role="img"]{
    -webkit-user-select:none;
       -moz-user-select:none;
            user-select:none;
    cursor:default;
  }

  .highlight{
    --highlight-bg-color:rgb(180 0 170 / 0.25);
    --highlight-selected-bg-color:rgb(0 100 0 / 0.25);
    --highlight-backdrop-filter:none;
    --highlight-selected-backdrop-filter:none;

    @media screen and (forced-colors: active){
      --highlight-bg-color:transparent;
      --highlight-selected-bg-color:transparent;
      --highlight-backdrop-filter:var(--hcm-highlight-filter);
      --highlight-selected-backdrop-filter:var(
        --hcm-highlight-selected-filter
      );
    }

    margin:-1px;
    padding:1px;
    background-color:var(--highlight-bg-color);
    backdrop-filter:var(--highlight-backdrop-filter);
    border-radius:8px;

    &.appended{
      position:initial;
    }

    &.begin{
      border-radius:8px 0 0 8px;
    }

    &.end{
      border-radius:0 8px 8px 0;
    }

    &.middle{
      border-radius:0;
    }

    &.selected{
      background-color:var(--highlight-selected-bg-color);
      backdrop-filter:var(--highlight-selected-backdrop-filter);
      scroll-margin-top:48px;
    }
  }

  ::-moz-selection{
    background:rgba(0 0 255 / 0.25);
    background:color-mix(in srgb, AccentColor, transparent 50%);
    color:transparent;
  }

  ::selection{
    background:rgba(0 0 255 / 0.25);
    background:color-mix(in srgb, AccentColor, transparent 50%);
    color:transparent;
  }

  &.selectionRendering{
    ::-moz-selection{
      background:transparent;
      color:transparent;
    }
    ::selection{
      background:transparent;
      color:transparent;
    }
  }
  br::-moz-selection{
    background:transparent;
  }
  br::selection{
    background:transparent;
  }

  .endOfContent{
    display:block;
    position:absolute;
    inset:100% 0 0;
    z-index:0;
    cursor:default;
    -webkit-user-select:none;
       -moz-user-select:none;
            user-select:none;
  }

  &.selecting .endOfContent{
    top:0;
  }
}

.textLayerImages{
  position:absolute;
  inset:0;
  -webkit-user-select:none;
     -moz-user-select:none;
          user-select:none;

  canvas{
    position:absolute;
    transform-origin:0% 0%;
  }
}
.textLayer ::selection { background: rgba(47, 107, 255, .35); }
/* 찾은 글자만 칠하는 표시 — <mark> 라서 PDF.js 의 span 위치 규칙을 타지 않고 조각 안에서 제자리에 흐른다 */
.textLayer mark.hl { background: var(--hl); color: transparent; border-radius: 8px; }

.textdoc {
  margin: 0 auto; max-width: 960px; padding: 12px 16px; background: var(--card); color: var(--text);
  font-family: ui-monospace, "D2Coding", Consolas, monospace; font-size: calc(0.875rem * var(--zoom, 1)); line-height: calc(1.6 * var(--lh, 1));
  white-space: pre-wrap; word-break: break-all;
}
.textdoc mark { background: var(--hl); color: inherit; }
/* JSON 색(10-13 스물다섯째 ⑬) — 이름·글·수·참거짓·null. 밝은·어두운 화면 둘 다 바탕(--card)과 대비가 넉넉하게(§2-L) */
.jsondoc .json-key { color: #0b5cad; font-weight: 600; }
.jsondoc .json-str { color: #1a7f37; }
.jsondoc .json-num { color: #9a3412; }
.jsondoc .json-bool { color: #8250df; }
.jsondoc .json-null { color: var(--sub); }
@media (prefers-color-scheme: dark) {
  :root .jsondoc .json-key { color: #79c0ff; }
  :root .jsondoc .json-str { color: #7ee787; }
  :root .jsondoc .json-num { color: #ffa657; }
  :root .jsondoc .json-bool { color: #d2a8ff; }
}

/* 한글(HWPX) — 글자·표·그림만. 쪽 모양은 옮기지 않는다(화면 위 안내에 적었다) */
.rich-notice {
  max-width: 800px; margin: 0 auto 8px; padding: 8px 16px; font-size: 0.875rem; color: var(--sub); line-height: 1.6;
}
.rich {
  max-width: 800px; margin: 0 auto; padding: 24px 16px; background: var(--card); color: var(--text);
  font-size: calc(1rem * var(--zoom, 1)); line-height: calc(1.7 * var(--lh, 1)); white-space: pre-wrap; tab-size: 4;
}
.rich p { min-height: 1em; }
.rich p.empty { min-height: .8em; }
.rich hr { border: 0; border-top: 1px dashed var(--line); margin: 24px 0; }
.rich-tblwrap { overflow-x: auto; margin: 8px 0; }
.rich-tbl { border-collapse: collapse; min-width: 50%; font-size: .875em; }
.rich-tbl td { border: 1px solid var(--muted); padding: 4px 8px; vertical-align: top; }
/* 큰 CSV — 2,000줄씩 쪽 넘기기. 쪽마다 머리줄을 다시 보인다 */
.csv-pager { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 8px 0; }
.csv-pager .btn { min-height: 44px; min-width: 64px; }
.csv-pager .btn:disabled { opacity: .4; cursor: default; } /* 누를 수 없는 쪽 — 누를 수 있는 단추처럼 보이지 않게(§2-T) */
/* 암호 걸어 저장(10-06) — 암호 칸 44px · 폰 폭 안에 */
#lockForm input[type=password] { font: inherit; font-size: 1rem; padding: 10px 12px; min-height: 44px; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
/* 엑셀 정렬·거르기(10-06 · 보기만) — 단추 44px · 폰 폭에선 줄을 바꿔 들어간다 */
.sheet-tools { margin: 8px 0; }
.sheet-tools-toggle { min-height: 44px; }
.sheet-tools-panel { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: grid; gap: 8px; }
.sheet-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sheet-tools-row .btn { min-height: 44px; }
.sheet-tools-row .btn[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
.sheet-tools-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sheet-tools-field select, .sheet-tools-field input { min-height: 44px; min-width: 0; max-width: 100%; font: inherit; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.sheet-tools-sum:empty { display: none; }
.sheet-tools-sum { color: var(--sub); font-size: .875rem; }
@media print { .sheet-tools { display: none; } }
.csv-range { color: var(--sub); font-size: .875rem; font-variant-numeric: tabular-nums; text-align: center; }
.rich-tbl tr.csv-head th { border: 1px solid var(--muted); padding: 4px 8px; background: var(--line); color: var(--sub); font-weight: 400; text-align: left; }
.rich-box { border-left: 3px solid var(--line); padding-left: 12px; margin: 8px 0; }
.rich-fig { margin: 8px 0; }
.rich-img { display: block; max-width: 100%; height: auto; background: var(--line); }
/* 한글 XML 그림 채운 도형·묶음 개체(10-19 O) — 크기는 원본 폭(px)·가로세로 비율 · 화면보다 넓으면 줄인다 · 묶음 안 그림은 묶음 크기 비율 자리에 */
.hml-shape { margin: 8px 0; max-width: 100%; width: fit-content; }
.hml-shape > .hml-fill, .hml-group { max-width: 100%; }
.hml-group { position: relative; overflow: hidden; }
.hml-group > .hml-part { position: absolute; margin: 0; }
.hml-gpic .rich-img { width: 100%; height: 100%; object-fit: fill; }
.hml-fill-miss { background: var(--line); outline: 1px dashed var(--muted); }
/* 떠 있는 그림(옛 워드·RTF · 10-18) — 원본처럼 왼쪽·오른쪽에 띄우고 글이 둘레로 흐른다. 글 폭이 그림의 두 배가 안 되면 docshare.watchFloats 가 띄우지 않는다(한 줄 차지) */
.rich-fig.rich-float-l { float: left; clear: left; max-width: 50%; margin: 4px 16px 8px 0; }
.rich-fig.rich-float-r { float: right; clear: right; max-width: 50%; margin: 4px 0 8px 16px; }
.rich-floatend { clear: both; }
/* 떠 있는 글상자 안 글(옛 워드·RTF · 10-18) — 걸린 문단 자리에 테두리 상자로 */
.rich-txbx { display: block; border: 1px solid var(--muted); border-radius: 8px; padding: 8px 12px; margin: 8px 0; overflow-wrap: anywhere; }
/* 원본 자리·크기(10-18) — 글 폭이 원본 상자 폭의 두 배 이상이면 원본 비율 폭(--bw) · 감싸기면 왼쪽·오른쪽에 띄운다(docshare.textBox·watchFloats). 높이는 글에 맞춰 늘어난다 */
.rich-txbx.rich-txbx-sized { width: var(--bw); max-width: 100%; }
.rich-txbx.rich-txbx-sized[data-align="r"] { margin-left: auto; }
.rich-txbx.rich-float-l { float: left; clear: left; max-width: 50%; margin: 4px 16px 8px 0; }
.rich-txbx.rich-float-r { float: right; clear: right; max-width: 50%; margin: 4px 0 8px 16px; }
.rich-txbx > p { margin: 0 0 4px; }
.rich-txbx > p:last-child { margin-bottom: 0; }
/* 각주 같은 짧은 문서 안 링크(10-12 스물셋째 ⑱) — 글·줄 간격은 그대로 두고 보이지 않는 누를 자리를 사방 14px 넓힌다(「[1]」 18×21 → 46×49 · 줄 높이에 안 셈).
   이웃 링크와 겹치면 view.js fitJumpHits 가 그쪽 변만 둘 사이 가운데까지로 줄인다(--jl·--jr·--jt·--jb) · 빈 쪽은 그대로 넓다 */
.rich a.rich-jump-small { position: relative; }
.rich a.rich-jump-small::before { content: ''; position: absolute; left: calc(-1 * var(--jl, 14px)); right: calc(-1 * var(--jr, 14px)); top: calc(-1 * var(--jt, 14px)); bottom: calc(-1 * var(--jb, 14px)); }
@media print { .rich a.rich-jump-small::before { content: none; } }
body.dark .rich-img { filter: invert(1) hue-rotate(180deg); }
/* 어두운 화면의 비친 그림(10-12 스물셋째 ⑥) — 바탕이 비친 PNG·SVG·로고·서명은 검은 선이 어두운 바탕(#0f172a)에 묻혀 안 보였다.
   view.js markClear 가 비친 곳이 있는 그림에만 img-clear 를 붙이고, 어두운 화면일 때만 흰 받침을 깐다(불투명 사진엔 안 붙어 테두리가 안 생긴다).
   그림 색은 그대로 — 「어둡게」 로 뒤집을 땐 받침도 같이 뒤집혀 검정 위 흰 선이 된다(밝은 화면에서 뒤집어도 선이 보인다) */
@media (prefers-color-scheme: dark) { img.img.img-clear, img.rich-img.img-clear { background: #fff; } }
body.dark img.img.img-clear, body.dark img.rich-img.img-clear { background: #fff; }
/* 한글 도형(선·사각형·타원…) — 그림처럼 폭에 맞춰 줄고, 어두운 화면에선 검은 선이 보이게 뒤집는다 */
.rich-shape { display: block; max-width: 100%; height: auto; }
body.dark .rich-shape { filter: invert(1) hue-rotate(180deg); }
/* 11-08 F01(쪽지 a0qtmg) — 「어둡게」 를 눌러도 워드·엑셀 본문(.rich)은 화면 색(--card 흰색)이라 밝은 그대로였다(PDF 만 뒤집힘 · 안내는 「문서 색도 뒤집었어요」).
   PDF 와 같게: 흰 종이·짙은 글로 맞춘 뒤 통째로 뒤집는다(기기 테마가 어두워도 결과가 같게) · 안의 그림·도형은 본문과 함께 뒤집히므로 따로 또 뒤집지 않는다 · 「종이는 원래 색」 이면 그대로 */
/* 11-08 F03(쪽지 a0qtmg) — 홈(아래 탭이 있는 첫 화면)에선 머리 줄의 문서 몫(파일 이름·남은 시간·목차·첨부·메모·읽어 주기·검색)을 숨긴다 · 「앞으로」 로 문서에 돌아오면 그대로 다시 보인다 */
body.has-tabs :is(#docName, #docMeta, #readLeft, #btnToc, #btnAtt, #btnNotes, #btnRead, #btnSearch, #searchBar) { display: none !important; }
body.dark:not(.paper-keep) .rich { background: #fff; color: #1e293b; filter: invert(1) hue-rotate(180deg); }
body.dark:not(.paper-keep) .rich .rich-img, body.dark:not(.paper-keep) .rich .rich-shape { filter: none; }
/* 글이 든 그림(흐름도·제목 그림) — 그림 위에 글을 원래 자리대로. 원래 크기를 넘지 않고, 좁으면 85% 까지만 줄인 뒤 가로로 굴린다(표와 같이) */
.rich-diagwrap { overflow-x: auto; margin: 8px 0; }
.rich-diagram { position: relative; container-type: inline-size; white-space: normal; line-height: 1.25;
  width: calc(min(var(--nw), max(100%, var(--nw) * .85)) * var(--zoom, 1)); }
.rich-diagram > svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.diag-text { position: absolute; display: flex; flex-direction: column; box-sizing: border-box; overflow-wrap: anywhere; }
.diag-text p { min-height: 0; margin: 0; }
.diag-text .rich-fig, .diag-text .rich-tblwrap { margin: 4px 0; }
.rich-caption { color: var(--sub); font-size: .875em; margin: 0 0 8px; }
/* 입력 칸·목록 상자(한글 양식 개체) — 적힌 값을 칸 모양으로 */
.rich-field { display: inline-block; min-width: 4em; min-height: 1.4em; border: 1px solid var(--muted); border-radius: 8px; padding: 0 8px; margin: 0 4px; vertical-align: middle; }
.rich-combo::after { content: "\25BE"; color: var(--sub); margin-left: 8px; float: right; }
.rich-compose { border: 1px solid var(--muted); border-radius: 50%; padding: 0 4px; margin: 0 0; }
.rich-note { color: var(--muted); font-size: 0.875rem; }
/* 메일 — 머리(보낸 사람·날짜) · 첨부 목록(이름 · 크기 · 열기 · 저장) · 압축 목록도 같은 모양 */
.eml-subject { font-size: 1.25rem; margin: 8px 0; overflow-wrap: anywhere; }
.eml-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 16px; color: var(--sub); font-size: .875rem; }
.eml-head dt { font-weight: 700; } .eml-head dd { margin: 0; overflow-wrap: anywhere; }
.eml-reply { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 16px; text-decoration: none; } /* 답장 메일 쓰기(10-08) */
@media print { .eml-reply { display: none !important; } }
.eml-body { border-top: 1px solid var(--line); padding-top: 12px; }
/* 꾸민 메일 본문(10-12 · eml.js) — 모양대로 / 「글만 보기」 · 안내 줄 */
.eml-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.eml-mode .eml-modesay { flex: 1 1 200px; min-width: 0; margin: 0; }
.eml-mode .btn { min-height: 44px; font-size: .9375rem; }
.eml-html .rich-tblwrap { margin: 8px 0; }
.eml-attach { list-style: none; padding: 0; margin: 8px 0; }
.eml-attach li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--line); }
.eml-attach-name { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; } .eml-attach-size { color: var(--sub); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.eml-attach .btn { min-height: 48px; } /* 누를 칸 48px · 크기 글 15px(11-07 · 전엔 44px·14px) */
.eml-attach-btns { display: inline-flex; gap: 8px; margin-left: auto; }
/* 압축 목록 폴더(11-07 · 사장님 화면 지적) — 위치 줄 · 「폴더: …」 한 줄 · 폴더가 둘 넘으면 폴더마다 머리(누르면 접고 폄) · 줄에는 파일 이름만 */
.zip-where, .zip-folder-one { color: var(--sub); font-size: .9375rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.zip-folder-one { color: var(--text); font-weight: 600; }
.zip-folder-head { font-size: 1rem; margin: 12px 0 0; }
.zip-folder { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 4px 8px 4px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.zip-folder:hover { background: var(--line); }
.zip-folder::before { content: ""; flex: none; width: .5em; height: .5em; margin: 0 .35em 0 .25em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.zip-folder[aria-expanded="false"]::before { transform: rotate(-45deg); }
.zip-folder-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.zip-folder-count { flex: none; color: var(--sub); font-size: .9375rem; font-weight: 400; }
.zip-folder-head + .eml-attach { margin-top: 0; padding-left: 12px; }
@media (prefers-reduced-motion: no-preference) { .zip-folder::before { transition: transform .15s; } }
#btnBack { min-height: 44px; margin: 0 0 8px; }
.rich-readonly { -webkit-user-select: none; user-select: none; } /* 배포용(읽기만) — 고르기·복사를 막는다 */
.rich mark.hl { background: var(--hl); color: inherit; }
.rich .hlBlock { background: var(--hl); }
#btnRetry { margin-top: 8px; border: 0; }
#btnRetry + #btnPickOther { margin-inline-start: 8px; } /* 11-27 — 단추를 글자 틈 없이 끼워 넣어 「다시 시도」·「다른 파일 열기」 가 맞붙었다(눈 점수 사진 45894022182 오류 틀) */
.rich-hf { display: flow-root; color: var(--sub); font-size: .875em; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; } /* flow-root — 머리말 안 띄운 글상자가 본문으로 흘러 나가지 않게(10-18) */
.rich-footer { border-bottom: 0; border-top: 1px solid var(--line); padding: 8px 0 0; margin: 16px 0 0; }
.rich-noteref { font-size: .75em; vertical-align: super; text-decoration: none; padding: 0 4px; }
.rich-notes { margin-top: 24px; padding: 12px 0 0 24px; border-top: 1px solid var(--line); font-size: .875em; color: var(--sub); }
/* 문서 끝 각주 모음(10-13 ⑥) — 「각주」 제목 · 번호가 칸 밖으로 밀리지 않게(발표자 메모 칸 규칙 .rich-notes 가 왼쪽 여백을 0 으로 만든다) */
.rich-notes-title { font-size: 1rem; margin: 24px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--sub); }
.rich ol.rich-notes { margin: 0; padding: 0 0 0 2em; border: 0; border-radius: 0; background: none; }
.rich ol.rich-notes > li { margin: 0 0 8px; }
.rich-textart { font-weight: 700; font-size: 1.25em; }
.rich-btn { display: inline-block; border: 1px solid var(--muted); border-radius: 8px; padding: 0 8px; margin: 0 4px; font-size: .9em; }
.rich rt { font-size: .75em; color: var(--sub); }
.rich-num { color: var(--sub); }
#engineBar { width: min(320px, 100%); height: 12px; accent-color: var(--accent); }
.status .small { font-size: 0.875rem; }

/* 폰에서 찾기 칸에 글을 쓰는 동안 아래 도구줄을 숨긴다 — 글자판이 화면 절반을 가져가므로 한 줄이라도 문서에 준다(§2-KB) */
@media (pointer: coarse) { body:has(#q:focus) .tools { display: none; } }

/* 엑셀 — 열 글자·행 번호 · 숫자는 오른쪽 · 시트 이름 */
.rich-sheetname, .rich-slidenum { font-size: 1.25rem; margin: 8px 0 12px; }
.rich-slidenum { color: var(--sub); font-size: 0.875rem; }
.rich-slidetitle { font-weight: 700; font-size: 1.25em; }
/* HTML·전자책(10-11) — 제목은 찾기 단위(p)로 만들고 크기만 · 표 머리 칸 · 코드 덩어리는 폰 폭에서 꺾는다 */
.rich-h { font-weight: 700; margin: .6em 0 .3em; }
/* 문서 글자 비율은 docfont.css 로(11-04) */
.rich-tbl td.rich-th { font-weight: 700; background: var(--line); }
/* 일정·연락처 카드(10-11) */
.pim-actions { max-width: 800px; margin: 0 auto 8px; padding: 0 16px; }
.pim-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px 12px; margin: 12px 0; background: var(--card); color: var(--text); white-space: normal; }
.pim-row { margin: 4px 0; overflow-wrap: anywhere; }
.pim-label { color: var(--sub); }
.pim-title { margin-top: 4px; }
.rich ul:not(.eml-attach), .rich ol { padding-left: 1.5em; } /* 맨 위 「* { padding: 0 }」 에 목록 점이 화면 밖으로 나갔다 */
.rich-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, "D2Coding", Consolas, monospace; font-size: .875em; }
.rich-sheet th { background: var(--line); color: var(--sub); font-weight: 400; font-size: .875em; padding: 4px 8px; border: 1px solid var(--muted); position: sticky; top: 0; }
.rich-sheet th.rich-rowhead { position: sticky; left: 0; text-align: right; white-space: nowrap; } /* 줄 번호가 「1/3」 처럼 꺾이지 않게(10-08 사진) */
.rich-sheet td { white-space: pre-wrap; }
.rich-num-cell { text-align: right; font-variant-numeric: tabular-nums; }

/* 인쇄 · PDF로 저장 — 스크롤 칸을 풀어 문서 전체가, 어두운 화면이어도 종이에는 밝게 */
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --sub: #333; --muted: #555; --line: #ccc; --link-text: #000; }
  html, body { height: auto; display: block; background: #fff; }
  .bar, .search, .tools, .rich-notice, .sc-skip-link, .welcome, .status, .csv-pager { display: none !important; }
  /* 배포용(읽기만) 문서 — 브라우저 메뉴로 인쇄해도 본문 대신 안내만 */
  body[data-noprint] main { display: none !important; }
  body[data-noprint]::after { content: "배포용 문서라 인쇄는 막아 두었어요."; display: block; padding: 24px; font-size: 1rem; }
  main { overflow: visible; }
  .doc { padding: 0; }
  .page { box-shadow: none; margin: 0 auto; break-after: page; }
  .page:last-child { break-after: auto; }
  body.dark .page canvas, body.dark .img, body.dark .rich-img, body.dark .rich-shape, body.dark .xps-page { filter: none; }
  body.dark .rich { filter: none !important; background: #fff; color: #1e293b; } /* 종이에는 원래 색(11-08 F01) */
  .page.print-skip { display: none !important; } /* 인쇄할 쪽 범위(10-13 ⑭) — 고른 쪽만 종이에 */
  .rich, .textdoc { max-width: none; padding: 0; }
  .rich-tblwrap { overflow: visible; }
  .rich-sheet th { position: static; }
}

/* PDF 링크 칸 — 글자 층 위에 겹친다(글자는 그대로 보이고, 링크 자리만 누를 수 있다) */
.linkLayer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
/* PDF 신청서 칸 — 칸 자리에 얹는 입력 칸(글자는 늘 검정 · 쪽은 밝은 종이라서) */
.formLayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pdf-field { position: absolute; box-sizing: border-box; pointer-events: auto; margin: 0; padding: 0 4px; border: 1px solid rgba(47, 107, 255, .55); border-radius: 8px; background: rgba(47, 107, 255, .07); color: #000; font-family: inherit; line-height: 1.2; resize: none; }
.pdf-field:focus { outline: 2px solid var(--accent); outline-offset: 0; background: #fff; }
:root { --paper-accent: #1d4ed8; } /* 신청서 칸 표시색 — 쪽은 어두운 화면에서도 밝은 종이라 두 갈래 모두 같은 진한 파랑(흰 종이 대비 6.7:1) */
@media (prefers-color-scheme: dark) { :root { --paper-accent: #1d4ed8; } } /* 일부러 같게 둠 — 위 까닭 */
input.pdf-field[type="checkbox"], input.pdf-field[type="radio"] { accent-color: var(--paper-accent); padding: 0; }
body.dark .pdf-field { background: rgba(255, 255, 255, .85); }
@media print { .pdf-field { border-color: transparent; background: transparent; } .form-bar { display: none; } }
.linkLayer a { position: absolute; display: block; pointer-events: auto; border-radius: 8px; }
.linkLayer a:hover { background: rgba(47, 107, 255, .12); }
.linkLayer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 암호 입력 */
.pw { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.pw label { font-size: 1rem; }
.pw input { height: 48px; min-width: 0; width: min(240px, 100%); padding: 0 12px; font-size: 1rem; border: 1px solid var(--muted); border-radius: 12px; background: var(--card); color: var(--text); }
.pw .btn { border: 0; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--muted); }
.status .err { color: #b91c1c; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root .status .err { color: #fca5a5; } }
@media print { .linkLayer { display: none; } }

/* 목차 창 */
/* 저장하기(10-07) — 글·표·사진 꺼내기 */
#expList { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.exp-note { color: var(--sub); }
/* 이름 바꿔 저장(10-09) — 이름 칸 + 그대로인 확장자 + 저장 · 16px(아이폰 확대 막기) · 좁은 폰에서 넘치지 않게 칸이 줄어든다 */
.exp-rename { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; }
.exp-rename[hidden] { display: none; }
.exp-rename input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.exp-rename .exp-ext { flex: none; color: var(--sub); }
.exp-rename .btn { flex: none; }
/* 글꼴 고르기(10-09) — 고르면 문서가 정한 글꼴보다 이긴다(고른 사람의 뜻) · 「문서 그대로」 면 손대지 않는다 · 표·수식 그림은 그대로 */
html[data-font="sans"] { --doc-font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html[data-font="serif"] { --doc-font: "Noto Serif KR", "AppleMyungjo", "Batang", "Nanum Myeongjo", serif; }
html[data-font] .textdoc, html[data-font] .reflow, html[data-font] .rich, html[data-font] .rich :where(p, li, span, td, th, h1, h2, h3, h4, h5, h6, div) { font-family: var(--doc-font) !important; }
/* 글 줄 간격(10-09) — 넓게 고르면 문서가 문단마다 정한 줄 간격보다 이 값이 이긴다(고른 사람의 뜻) · 보통이면 문서 그대로 */
html[data-lh] .rich p, html[data-lh] .rich li { line-height: calc(1.7 * var(--lh, 1)) !important; }
.line-gap-row { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
/* 글자 방식(10-09) — 글 문서 위 작은 줄 · 인쇄엔 없음 */
.enc-row { max-width: 960px; margin: 0 auto; padding: 8px 16px 0; color: var(--sub); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.enc-row select { min-height: 44px; font-size: 1rem; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
@media print { .enc-row { display: none; } }
/* PO-06(11-01) 글 고치기 — 전체 화면 · 저장 단추는 위(글자판이 올라와도 안 가림 · §2-KB) */
/* 제자리 고치기(11-12 · 회의 261112_원본그대로고치기) — 보던 글 칸 자리에 같은 모양의 입력 칸 · 막대는 스크롤해도 위에(글자판이 아래를 먹으니 아래 고정 안 함 · §2-KB) */
.inplace-bar { position: sticky; top: 0; z-index: 6; display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; }
.inplace-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inplace-row .btn { min-height: 44px; }
.inplace-row #inplaceSave { margin-left: auto; }
.inplace-info { margin: 0; color: var(--sub); }
.inplace-text { display: block; width: 100%; box-sizing: border-box; min-height: 40vh; margin: 0; font: inherit; line-height: 1.6; color: var(--text); background: var(--card); border: 1px dashed var(--line-strong); border-radius: 8px; outline-offset: 2px; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.inplace-text.mono { font-family: ui-monospace, "D2Coding", Consolas, monospace; }
.inplace-text.nowrap { white-space: pre; overflow-x: auto; overflow-wrap: normal; }
@media print { .inplace-bar { display: none; } }
/* 워드 제자리(11-12 · fixinplace.js) — 누른 문단만 입력 칸 · 고친 문단 점선 밑줄 · 못 고치는 곳은 눌렀을 때만 이유 한 줄 */
.rich [data-cv-p] { cursor: text; }
/* 종이 색 따라가는 표시 색(11-12 88 후보 12) — 「어둡게」 는 종이를 흰색으로 두고 통째로 뒤집는데, 기기 어두운 색(#6b95ff·#cbd5e1)을 그대로 쓰면
   흰 종이 위 대비 2.85·1.5 라 점선·이유 글이 안 보였다 → 종이가 흰색일 땐 밝은 쪽 값(흰 바탕 대비 6.0·7.6) */
.rich { --inplace-mark: var(--accent); --inplace-sub: var(--sub); }
body.dark .rich { --inplace-mark: #104dfd; --inplace-sub: #475569; }
.rich .inplace-on { outline: 2px dashed var(--inplace-mark); outline-offset: 2px; border-radius: 4px; }
.rich .inplace-done { text-decoration: underline dashed var(--inplace-mark); text-underline-offset: 4px; }
.rich .inplace-why { display: block; margin-top: 4px; font-size: calc(.875rem * var(--zoom, 1)); color: var(--inplace-sub); text-decoration: none; } /* 글자 키우면 이유 글도 같이(88 후보 12) */
body[data-inplace] .rich [data-cv-p]:focus-visible { outline: 2px solid var(--inplace-mark); outline-offset: 2px; border-radius: 4px; } /* 키보드로 옮겨 온 문단(88 후보 13) */
.inplace-list { max-width: 560px; padding: 16px; border-radius: 12px; }
.inplace-list h2 { margin: 0 0 4px; font-size: 1.25rem; }
.inplace-bar .btn:disabled, .inplace-list .btn:disabled { opacity: .45; cursor: default; } /* 누를 수 없는 저장 — 누를 수 있는 단추처럼 보이지 않게(§2-T · 11-12 사진)  */
body[data-inplace] #btnFixText, body[data-inplace] #btnTextEdit { display: none; } /* 고치는 동안 입구 단추는 숨김(같은 일을 두 번 시작하지 않게) */
.inplace-diff { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.inplace-jump { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; } /* 항목을 누르면 그 문단으로(D-23) */
.inplace-diff li { padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; overflow-wrap: anywhere; }
.inplace-diff ins, .inplace-diff del { white-space: pre-wrap; } /* 엔터로 나눈 새 문단이 목록에서도 줄로 보이게(1112ab-2) */
.inplace-diff del { color: var(--sub); }
.inplace-diff ins { text-decoration: none; font-weight: 700; }
.inplace-ok { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.inplace-ok input { width: 22px; height: 22px; }
/* 줄 바꿈 끄기(10-12 스물셋째 ⑫) — 글 칸 안에서만 가로로 구른다(화면 전체는 안 넘친다) · 인쇄는 늘 접는다(종이 밖으로 나가지 않게) */
.enc-row .btn-mini { margin-left: auto; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; }
.textdoc.nowrap { white-space: pre; word-break: normal; overflow-wrap: normal; overflow-x: auto; }
@media print { .textdoc.nowrap { white-space: pre-wrap; word-break: break-all; overflow: visible; } }
.line-gap-row select { min-height: 44px; font-size: 1rem; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
/* 최근 문서 분류(10-09) — 「전체 · 학교 · 회사」 고르기(누른 것은 채운 색) · 줄의 분류 단추·입력칸 */
.recent-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.recent-tags[hidden] { display: none; }
.recent-tags button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.recent-tags button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.recent-tagedit { display: flex; gap: 8px; align-items: center; flex: 1 1 100%; }
.recent-tagedit input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
/* 문서 정보(10-09) — 이름표 | 값 두 칸 · 긴 값은 줄바꿈 */
.exp-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0 4px 8px; padding: 12px 12px; border-radius: 12px; background: var(--line); }
.exp-info[hidden] { display: none; }
.exp-info dt { color: var(--sub); }
.exp-info dd { margin: 0; overflow-wrap: anywhere; color: var(--text); }
/* 글자 수(10-09) — 센 값을 버튼 바로 아래에 · 숫자 자리 고정 */
.exp-count { margin: 0 4px 8px; padding: 12px 12px; border-radius: 12px; background: var(--line); color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.6; }
.exp-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 56px; padding: 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.exp-item[hidden] { display: none; }
.exp-item:hover, .exp-item:focus-visible { background: var(--line); }
.exp-name { font-weight: 700; }
.exp-desc { font-size: .875rem; color: var(--sub); }
#privacyChange { display: block; color: var(--text); } /* 처리방침 바뀜 알림(11-12 · 장부 1112ah-1) — 설명 줄 아래 한 줄 · 본문 색 */
#privacyChange[hidden] { display: none; }
.exp-note { margin: 4px 0; padding: 12px; border-radius: 12px; background: var(--line); color: var(--text); font-size: .9375rem; line-height: 1.5; } /* 숨긴 단추 자리의 이유(D-03) · 15px */
.exp-note[hidden] { display: none; }
#tocDialog, #attDialog, #expDialog, #contactDialog, #hitDialog { margin: auto; /* 맨 위 「* { margin: 0 }」 이 창을 가운데로 보내는 기본 여백까지 지워 왼쪽 위에 붙었다(사진으로 발견) */ border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100% - 32px)); max-height: min(80vh, 720px); background: var(--card); color: var(--text); }
#tocDialog::backdrop, #attDialog::backdrop, #expDialog::backdrop, #contactDialog::backdrop, #hitDialog::backdrop { background: rgba(0, 0, 0, .45); }
/* 11-27 QR 결과·스캔 기록·QR 만들기·뽑은 글자·언어 창(문서함 #1256 · 눈 점수 사진 45897868592) — 위 창 목록에 처음부터 빠져 「* { margin: 0 }」 로 왼쪽 위에 붙고 브라우저 기본 검은 테두리·글이 가장자리에 붙은 채 떴다 · 같은 창 꼴 + 안쪽 여백 16(머리 줄은 끝까지) */
#langDialog, #qrDialog, #scanHistDialog, #qrMakeDialog, #ocrTextDialog { margin: auto; border: 0; border-radius: 12px; padding: 0 16px 16px; width: min(560px, calc(100% - 32px)); max-height: min(80vh, 720px); background: var(--card); color: var(--text); }
:is(#langDialog, #qrDialog, #scanHistDialog, #qrMakeDialog, #ocrTextDialog) > .toc-head { margin: 0 -16px 12px; }
:is(#langDialog, #qrDialog, #scanHistDialog, #qrMakeDialog, #ocrTextDialog)::backdrop { background: rgba(0, 0, 0, .45); }
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; /* 11-27 긴 제목이 닫기 단추에 맞붙었다(QR 「읽지 못했어요」 · 사진 45898656241) */ padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.toc-head h2 { font-size: 1.25rem; min-width: 0; }
#tocList { padding: 8px 8px 16px; }
#tocWait { padding: 8px 16px 0; color: var(--sub); font-size: .9375rem; }
#attList { padding: 8px 16px 16px; } .att-note { color: var(--sub); }
#tocList ul { list-style: none; }
#tocList ul ul { padding-left: 16px; }
.toc-item { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; text-decoration: none; }
.toc-item:hover, .toc-item:focus-visible { background: var(--line); }
.toc-item.toc-here { box-shadow: inset 4px 0 0 var(--accent); font-weight: 700; }
.toc-item.toc-here::after { content: '지금 읽는 곳'; margin-left: auto; padding-left: 8px; font-size: .8125rem; font-weight: 400; color: var(--sub); white-space: nowrap; }
/* 아래 도구줄 — 단추가 늘어도 폰 폭에서 넘치지 않게 쪽 표시 글자가 줄어든다 */
#pageLabel { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tools .grow { flex: 1 1 0; min-width: 0; }
@media print { #tocDialog, #attDialog, #expDialog, #contactDialog, #hitDialog, #langDialog, #qrDialog, #scanHistDialog, #qrMakeDialog, #ocrTextDialog, .sheet { display: none; } }
/* 찾은 곳 목록(10-09) — 자리 이름 + 앞뒤 글 · 찾은 말은 굵게 */
#hitList { list-style: none; padding: 8px 8px 16px; }
#hitList .toc-item { flex-direction: column; align-items: flex-start; gap: 2px; }
.hit-where { font-size: .8125rem; color: var(--sub); }
.hit-text { overflow-wrap: anywhere; } .hit-text b { background: #fde68a; color: #1b1b1b; font-weight: 700; } /* 어둡게여도 노란 바탕엔 짙은 글자 */
.hit-more { padding: 8px 12px; color: var(--sub); font-size: .875rem; }
/* 도움말 · 쪽 이동 창 — 목차 창과 같은 모양 */
.sheet { margin: auto; border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100% - 32px)); max-height: min(80vh, 720px); background: var(--card); color: var(--text); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.help-body { padding: 16px; }
.photo-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: -16px -16px 8px; padding: 4px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.photo-bar .btn { min-height: 44px; }
/* 글자 200% 에서 「다 됐어요」 가 창 오른쪽 밖 87px(창 34곳 시험 qa-1107-dialogs ① · 42348686322) — .btn 이 flex:none 이라 줄지 않았다
   → 위 막대 단추는 줄고 글자가 단추 안에서 줄을 바꾼다 · 가운데 「n/N」 은 남는 자리 */
.photo-bar .btn { flex: 0 1 auto; min-width: 0; white-space: normal; text-align: center; justify-content: center; }
.photo-bar .photo-pos { flex: 1 1 auto; min-width: 0; text-align: center; }
.photo-pos { flex: 1; text-align: center; font-variant-numeric: tabular-nums; color: var(--sub); }
.help-body h2 { font-size: 1.25rem; margin-bottom: 12px; }
.help-body h3 { font-size: 1rem; margin: 12px 0 4px; }
/* 도움말 질문 바로가기(10-28 QA CU-05) */
.help-qs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 8px; }
.help-qs a { color: var(--link-text); min-height: 44px; display: inline-flex; align-items: center; }
.help-formats summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--link-text); }
.help-body p { font-size: 1rem; line-height: 1.6; }
.help-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
/* 단축키 목록(10-11) — 키 | 하는 일 두 칸 · 좁은 폰에선 키 아래에 설명 */
.key-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; margin: 4px 0 8px; font-size: .9375rem; }
.key-list dd { margin: 0; color: var(--sub); overflow-wrap: anywhere; }
@media (max-width: 420px) { .key-list { grid-template-columns: minmax(0, 1fr); gap: 0; } .key-list dd { margin-bottom: 8px; } }
kbd { display: inline-block; min-width: 1.6em; padding: 0 4px; border: 1px solid var(--muted); border-bottom-width: 2px; border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .8125rem; line-height: 1.5; text-align: center; }
#helpKeys:focus { outline: none; }
.help-links a { color: var(--link-text); min-height: 44px; display: inline-flex; align-items: center; }
.help-body label { display: grid; gap: 8px; font-size: 1rem; }
.help-body label.stamp-row, .help-body label.toggle-row { display: flex; align-items: center; gap: 12px; min-height: 44px; } /* 쪽 번호·표시 켜기(10-07) · 보기 설정(10-08) — 체크 상자와 글이 한 줄 */
.help-body label.stamp-row input, .help-body label.toggle-row input { width: 22px; height: 22px; flex: none; }
.help-body fieldset.stamp-pick { border: 0; margin: 8px 0 0; padding: 0; } /* 제출용 문구 자리·진하기(10-31 · AC-P03) */
.help-body fieldset.stamp-pick legend { padding: 0; font-weight: 600; }
.help-body input[type=number], .help-body input[type=text], .help-body input[type=password] { min-height: 44px; font: inherit; font-size: 1rem; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
/* 소리 내어 읽기 — 아래 도구 막대 바로 위에 떠 있는 띠 · 읽는 문단은 테두리로 */
.read-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: calc(100% - 16px); padding: 8px 12px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.read-bar[hidden] { display: none; }
/* 한글·워드 형광펜·메모(10-09) — 칠한 칸 · 메모 꼬리표 · 고른 글 띠(읽기 띠와 같은 자리 — 둘이 함께면 이 띠가 위로) */
mark.user-hl { color: inherit; border-radius: 8px; cursor: pointer; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hl-memo { position: relative; display: inline-flex; align-items: center; min-height: 28px; margin: 0 4px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--accent); background: var(--card); color: var(--link-text); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; vertical-align: middle; }
.hl-memo::before { content: ''; position: absolute; inset: -8px -6px; } /* 글줄 높이는 그대로 · 누르는 범위만 44px */
@media print { .hl-memo { border: 0; background: none; color: #333; } .hl-memo::after { content: ' — ' attr(data-memo); font-weight: 400; } }
.rich-sel-bar input { min-width: 0; flex: 1 1 12em; height: 44px; padding: 0 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
body[data-reading] #richSelBar { bottom: calc(132px + env(safe-area-inset-bottom)); }
/* 자동 넘김 띠(10-09) — 소리 읽기 띠와 함께 뜨면 한 칸 위로(겹치지 않게) */
body[data-reading] #autoBar { bottom: calc(132px + env(safe-area-inset-bottom)); }
.read-bar #readMsg { font-size: 0.875rem; }
.reading { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media print { .read-bar { display: none; } .reading { outline: 0; } }
/* 앱 안에서 열림 — 이름·「파일 열기」·도움말은 앱 위 막대가 맡는다(두 번 보이지 않게) */
.in-app .brand, .in-app .name, .in-app #btnOpen, .in-app #btnHelp { display: none; }
/* PDF 합치기 목록 — 차례 번호 · 「위로」·「빼기」 는 누르는 자리 44px */
.merge-list { margin: 12px 0 0 1.4em; display: grid; gap: 8px; }
.merge-list li { overflow-wrap: anywhere; }
.merge-list .btn-mini { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
/* 목록에서 뺀 뒤 6초 되돌리기 줄(11-02 · removeWithUndo) — 모달 창 안이라 알림 띠 대신 목록 아래 */
.undo-line { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; font-size: .9375rem; color: var(--text); }
#photoDialog .help-body > [inert] { opacity: .5; transition: opacity .2s .4s; } /* 사진 PDF 를 만드는 동안 — 금방 끝나면 안 깜빡이게 0.4초 뒤에 */
#photoStuck span { min-width: 0; overflow-wrap: anywhere; }
.undo-line .btn-mini { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.merge-list .btn-mini:disabled { opacity: .45; cursor: default; }
/* 쪽 순서·빼기 — 쪽마다 작은 그림 · 쪽이 많으면 목록만 굴린다(저장 단추는 늘 보이게) · 뺀 쪽은 흐리게(되살리기는 또렷하게) */
/*   창을 위아래로 나눠 목록만 굴린다 — 375×740 폰에서 목록이 창을 다 차지해 저장 단추가 화면 밖으로 밀렸다(qa-1010 에서 잡음) */
#orderDialog[open] { display: flex; }
#orderForm { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#orderForm > p, #orderForm > details, #orderForm > h2 { flex: none; }
#orderForm .goto-actions { margin-top: 8px; }
#orderForm input[type=text] { font: inherit; font-size: 1rem; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.order-sum { margin-top: 4px; font-variant-numeric: tabular-nums; }
.order-list { flex: 1 1 auto; min-height: 180px; overflow: auto; overscroll-behavior: contain; margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.order-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-thumb { width: 40px; height: auto; max-height: 56px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.order-body { display: grid; gap: 4px; min-width: 0; }
.order-label { font-variant-numeric: tabular-nums; }
.order-btns { display: flex; gap: 8px; }
.order-btns .btn-mini { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; }
.order-btns .btn-mini:disabled { opacity: .45; cursor: default; }
.order-typed { margin-top: 8px; }
.order-typed summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--accent, inherit); }
.order-typed summary::before { content: '▸'; margin-right: 8px; }
.order-typed[open] summary::before { content: '▾'; }
#orderForm .goto-actions { flex-wrap: wrap; }
.order-out .order-thumb { opacity: .45; }
.order-out .order-label { color: var(--sub); text-decoration: line-through; } /* 11-02 — 글자는 흐리게(.45 · 밝은 화면 약 2.7:1) 말고 보조색(6:1 넘음)+줄 긋기로 「빠진 장」 을 보인다(55 §2-L) */
.order-out .order-label { text-decoration: line-through; }

/* 사진으로 PDF — 목록엔 작은 미리보기(단추는 11-04 부터 「찍기」 탭) */
/* 샘플 문서(10-12 스물셋째 ⑬) — 끌어다 놓기 칸 바로 아래 · 단추 아래 한 줄 안내 */
.sample-entry { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } /* 11-08 시안 A — 한글 샘플 먼저 · 둘 나란히(좁으면 줄 바꿈) · 써 보기 안내·오피스 샘플은 「더 알아보기」 안 */
.sample-entry .small { font-size: .9375rem; color: var(--sub); }
/* 첫 행동 먼저(10-28 QA CU-01) — 큰 열기 단추가 제목 바로 아래 · 채운 단추는 이것 하나(샘플 등은 plain) · 형식 목록은 접어 둔다 */
.open-first { margin: 0 0 12px; }
.big-open { display: flex; width: 100%; justify-content: center; text-align: center; min-height: 56px; padding: 12px 16px; border-radius: 16px; font-size: 1.0625rem; } /* 11-08 시안 A — 폭 가득 채운 단추 하나(화면당 채운 단추 하나) */
/* 첫 화면에서는 채운 단추를 본문 하나로(§2-UI 채운 색은 화면당 하나) — 머리의 「파일 열기」 는 문서를 연 뒤에 다시 채운 색 */
/* 11-08 7 자체검사 — 빈·오류·여는 중(상태 칸)에서도 낮춘다(증명서 42396031339 「채운 단추 2개」 · 회의 261108_7자체검사) · 상태 칸이 닫히면 저절로 원래대로 */
body:has(#welcome:not([hidden])) #btnOpen, body:has(.cmp-recover) #btnOpen, body:has(#status:not([hidden])) #btnOpen { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
/* 11-08 시안 A — 홈 탭에선 머리의 「파일 열기」 를 숨긴다(같은 이름 단추가 한 화면에 둘 → 하나 · 본문 큰 단추가 같은 #file 을 연다) · 다른 탭·문서 화면에선 그대로
   숨긴 칸(#file)을 click() 으로 여는 것은 앱 안(.in-app #btnOpen 숨김)과 #compareFile·#photoFile 이 이미 쓰는 길 */
body:has(#welcome:not([hidden]) #tabHome:not([hidden])) #btnOpen { display: none; }
/* 11-08 7 자체검사 — 여는 동안은 파일 고르기 칸이 잠긴다(view.js setOpening) · 눌리는 척하지 않게 흐리게 */
body.opening-file #btnOpen { opacity: .5; cursor: default; }
.formats-more { margin: 8px 0; text-align: center; }
.formats-more summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--link-text); }
.formats-more p { text-align: left; color: var(--sub); }
.from-where { margin: 8px 0; text-align: center; }
.from-where summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--link-text); }
.from-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-top: 4px; }
.from-pick .btn[aria-pressed="true"] { outline: 2px solid var(--accent); }
.from-tip { margin-top: 8px; color: var(--sub); }
.in-app .from-where { display: none; }
.sample-office { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; font-size: .9375rem; color: var(--sub); }
.photo-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-list img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.photo-list .pthumb-none { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-size: .8125rem; line-height: 1.2; color: var(--sub); border: 1px dashed var(--line); border-radius: 8px; }
.photo-list .pname { flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; }
/* 스캔 화면(10-26) — 작은 그림은 만들어질 모습이라 조금 크게 · 장 상태(가장자리 찾음/못 찾음)는 이름 아래 한 줄 */
.photo-list img { width: 64px; height: 64px; object-fit: contain; }
.photo-list .pstate { display: block; font-size: 0.875rem; color: var(--sub); }
/* 한 장씩 크게 보기(11-03 · 약식 검토 261101_약식_찍기배치 차례 2·3 · 앱 ScanScreen 과 같게) — 폰 폭에서 JS 가 .one 을 붙인다(판정 한 곳: view.js photoOneQ)
   목록이 옆으로 한 장씩 넘어간다(좌우로 밀기 = 가로 굴리기 · 한 장에 맞춰 멈춤) · 그림은 크게 · 단추는 그 장 아래 */
.photo-list.one { display: flex; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.photo-list.one::-webkit-scrollbar { display: none; }
.photo-list.one li { flex: 0 0 100%; min-width: 0; box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 4px; justify-content: center; }
.photo-list.one img, .photo-list.one .pthumb-none { width: 100%; height: min(48vh, 420px); object-fit: contain; }
.photo-list.one .pname { flex: 1 1 100%; text-align: center; }
.photo-nav { display: flex; gap: 8px; margin: 8px 0 0; }
.photo-nav[hidden] { display: none; }
.photo-nav .btn { flex: 1 1 0; min-height: 44px; }
.photo-strip { display: flex; gap: 8px; margin: 8px 0 0; overflow-x: auto; padding: 4px; }
.photo-strip[hidden] { display: none; }
.photo-chip { position: relative; flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #333; font: inherit; cursor: pointer; overflow: hidden; }
.photo-chip[aria-current="true"] { border: 3px solid var(--accent); }
.photo-chip img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-chip .chip-mark { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .8); color: #fff; font-size: .8125rem; line-height: 1.3; text-align: center; }
.photo-chip .chip-n { position: absolute; top: 0; left: 0; min-width: 18px; background: rgba(255, 255, 255, .9); color: #111; font-size: .8125rem; line-height: 1.3; text-align: center; border-bottom-right-radius: 8px; }
/* 띠 끌어 놓기(11-03) — 끄는 작은 그림은 손가락을 따라가고 위로 뜬다 · 놓을 자리는 옆 작은 그림의 강조색 세로줄(색만이 아니라 자리로도 보인다) · 끄는 동안 글 고르기·그림 끌기 막음 */
.photo-chip { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.photo-chip img { -webkit-user-drag: none; pointer-events: none; }
.photo-chip.dragging { z-index: 2; opacity: .85; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); cursor: grabbing; }
.photo-chip.drop-before { box-shadow: -5px 0 0 var(--accent); }
.photo-chip.drop-after { box-shadow: 5px 0 0 var(--accent); }
.photo-strip.dragging { scroll-snap-type: none; }
.photo-strip-hint { margin: 4px 0 0; color: var(--sub); }
.photo-strip-hint[hidden] { display: none; }
/* 큰 그림 위 모서리 손잡이(11-03 · 명세 141줄) — 폰 폭 한 장 그림 자리 · 캔버스 위 밀기는 손잡이 끌기(장 넘기기 아님) · 단추 44px */
.edge-inline { flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.edge-inline[hidden] { display: none; }
#edgeInCanvas { max-width: 100%; height: auto; touch-action: none; border-radius: 8px; background: #fff; }
#edgeInCanvas:focus-visible { outline: 3px solid var(--accent, #2f6bff); outline-offset: 2px; }
.edge-in-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; }
.edge-in-btns .btn { min-height: 44px; }
.photo-list .plook { min-height: 44px; font: inherit; font-size: 0.9375rem; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); } /* 장마다 보정(10-31 · CS-04) */
.edge-wrap { display: flex; justify-content: center; }
#edgeCanvas { max-width: 100%; height: auto; touch-action: none; border-radius: 8px; background: #fff; }
#edgeCanvas:focus-visible { outline: 3px solid var(--accent, #2f6bff); outline-offset: 2px; }
/* 모서리 점 단추로 옮기기(10-26 · 접근성) — 점 고르기 넷 · 화살표 넷 · 누르는 자리 44px */
.edge-nudge { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.edge-nudge .btn-mini { min-width: 44px; min-height: 44px; }
.edge-pick [aria-pressed="true"] { outline: 2px solid var(--accent, #2f6bff); font-weight: 700; }
.photo-name { width: 100%; min-height: 44px; font-size: 1rem; box-sizing: border-box; }
label.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
label.check input { width: 20px; height: 20px; }
/* 글만 크게 보기 — 쪽 모양은 숨기고 글을 폰 폭에 맞춰 흘린다 */
body.reflowing #doc > .page { display: none; }
.reflow { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; background: var(--card); color: var(--text); font-size: calc(1.25rem * var(--rf, 1)); line-height: calc(1.75 * var(--lh, 1)); }
.reflow p { margin: 0 0 .9em; overflow-wrap: anywhere; }
/* 문서 글자 비율은 docfont.css 로(11-04) */
.reflow .rf-page { text-align: center; color: var(--sub); font-size: .8em; margin: 1.6em 0 1em; }
@media print { .reflow-bar { display: none; } }
/* 문서 속 날짜 — 띠 · 목록(지난 날짜는 흐리게 + 글로 표시) */
.date-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.date-bar p { margin: 0 !important; }
.date-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.date-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.date-list .dwhen { font-weight: 700; }
.date-list .dwhat { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; color: var(--sub); }
.date-list li.past { color: var(--sub); } /* 11-02 — 흐리게(.72 · 약 3.8:1) 말고 보조색으로(55 §2-L) */
.date-list .btn-mini { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
@media print { .date-bar { display: none; } }
/* 형광펜·메모 — 화면에 겹치는 칠과 쪽지(저장하면 PDF 표준 주석으로 들어간다) */
.markLayer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.markLayer .hlMark { position: absolute; background: rgba(255, 212, 0, .42); mix-blend-mode: multiply; border-radius: 8px; }
/* 밑줄·취소선(10-13 스물다섯째 ⑯) — 가로 선 · 화면에선 테마 글자색(저장은 검정 잉크) */
.markLayer .uMark, .markLayer .sMark { position: absolute; height: 2px; background: var(--text); }
/* 형광펜 색(10-09) — 44px 동그라미 넷 · 고른 것은 굵은 테두리 */
.hl-colors { display: inline-flex; gap: 4px; vertical-align: middle; }
.hl-chip { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.hl-chip[aria-pressed="true"] { border: 4px solid var(--text); }
/* 펜 색·굵기(10-13 스물다섯째 ⑪) — 형광펜 색과 같은 모양 · 고른 색·굵기는 테두리 */
.pen-opts { display: inline-flex; gap: 4px; vertical-align: middle; flex-wrap: wrap; align-items: center; }
.pen-chip { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.pen-chip[aria-pressed="true"] { border: 4px solid var(--text); }
.pen-w[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
body.erase-mode .page { cursor: crosshair; }
.markLayer img { position: absolute; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.memo-text { width: 100%; margin-top: 8px; padding: 8px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); resize: vertical; }
body.memo-placing .page { cursor: crosshair; outline: 2px dashed var(--accent); outline-offset: -2px; }
@media print { .mark-bar { display: none; } }
.edit-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; margin-top: 8px; }
.edit-choices .btn { flex: 1 1 140px; }
/* 손보기 묶음 제목(10-28 QA CU-03) — 진한 단추 대신 묶음으로 고르게 */
.edit-group { margin-top: 16px; font-size: .875rem; color: var(--sub); font-weight: 700; }
.exp-group { margin: 12px 0 4px; font-size: .875rem; color: var(--sub); font-weight: 700; }
/* 비교 실패 곁의 다음 길(10-28 QA CU-06) */
.cmp-recover { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cmp-recover .btn { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--link-text); text-decoration: underline; font: inherit; cursor: pointer; }
.exp-edit-link { margin-top: 12px; }
/* 서명 칸 — 손가락으로 그릴 때 화면이 굴러가지 않게 · 밝은 종이 위에 짙은 파랑(어두운 보기에서도 종이는 밝다) */
.sig-pad { display: block; width: 100%; height: 180px; margin-top: 12px; background: #fff; border: 1px dashed var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; }
.sigLayer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.sigLayer svg { position: absolute; }
body.sig-placing .page { cursor: crosshair; outline: 2px dashed var(--accent); outline-offset: -2px; }
@media print { .sign-bar { display: none; } }
/* 글자·✓·도장 넣기(10-12) — 쪽 위에 그대로(쪽지와 달리 그림자 없이) · 놓을 차례면 쪽 테두리 */
.markLayer img.fillPut { box-shadow: none; }
/* 메모 옮기기·고치기(10-13 스물다섯째 ⑤) — 붙인 쪽지를 끌거나 눌러 고친다 · 고른 것은 테두리 */
.markLayer img.memoMark { pointer-events: auto; touch-action: none; cursor: move; }
body.memo-placing .markLayer img.memoMark, body.pen-mode .markLayer img.memoMark { pointer-events: none; }
.markLayer img.memoMark:focus-visible, .markLayer img.memoMark.memo-sel { outline: 2px solid var(--accent); outline-offset: 2px; }
body.fill-placing .page { cursor: crosshair; outline: 2px dashed var(--accent); outline-offset: -2px; }
/* 넣은 것 옮기기·크기(10-13) — 넣은 서명·글자·도장은 누를 수 있다(끌면 옮김) · 고르면 테두리와 네 귀 손잡이(누를 자리 44px · 보이는 점 14px) */
.markLayer img.fillPut, .sigLayer svg.sigInk { pointer-events: auto; touch-action: none; cursor: move; }
.sigLayer svg.sigInk { pointer-events: bounding-box; }
body.fill-placing .markLayer img.fillPut, body.sig-placing .sigLayer svg.sigInk, body.pen-mode .markLayer img.fillPut, body.pen-mode .sigLayer svg.sigInk, body.redact-mode .markLayer img.fillPut, body.memo-placing .markLayer img.fillPut { pointer-events: none; }
.markLayer img.fillPut:focus-visible, .sigLayer svg.sigInk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.put-sel-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.put-sel { position: absolute; box-sizing: border-box; outline: 2px solid var(--accent); outline-offset: 1px; background: rgba(37, 99, 235, .06); pointer-events: auto; touch-action: none; cursor: move; }
.put-sel:focus-visible { outline-width: 3px; }
.put-h { position: absolute; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: auto; touch-action: none; cursor: nwse-resize; }
.put-h[data-c="tr"], .put-h[data-c="bl"] { cursor: nesw-resize; }
.put-h[data-c="tr"]::after, .put-h[data-c="br"]::after { left: 4px; }
.put-h[data-c="bl"]::after, .put-h[data-c="br"]::after { top: 4px; }
.put-h::after { content: ''; position: absolute; left: 24px; top: 24px; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.put-h:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; border-radius: 50%; }
@media print { .put-sel-layer { display: none; } }
.text-put { width: 100%; min-height: 44px; margin-top: 8px; padding: 8px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.text-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.text-quick .btn { min-height: 44px; }
@media print { .fill-bar { display: none; } }
/* 가리고 저장(10-12) — 검은 네모 · 켜 있는 동안 손가락은 그리기(화면이 안 굴러간다 · 펜과 같다) · 사진도 같은 모양 */
.markLayer .redactBox, .img-redact .redactBox { position: absolute; background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; } /* 인쇄 — 브라우저는 기본으로 바탕색을 빼고 찍어 가린 곳이 드러났다(R-1125-76) */
.markLayer .redactStroke, .img-redact .redactStroke { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; } /* 칠하기(10-31 · CS-08) */
.redactStroke polyline { fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; }
.img-redact .mosaicBox { position: absolute; -webkit-print-color-adjust: exact; print-color-adjust: exact; background: repeating-conic-gradient(#555 0 25%, #999 0 50%) 0 0 / 12px 12px; outline: 2px solid #000; } /* 모자이크(10-31 · CS-08) — 저장 전 표시 */
body.redact-mode .page { touch-action: none; cursor: crosshair; }
body.redact-mode .page > *:not(.markLayer) { pointer-events: none; }
.img-redact { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.imgbox.redacting { touch-action: none; cursor: crosshair; }
.imgbox.redacting > * { pointer-events: none; }
.img-redact-bar { max-width: 640px; margin: 0 8px 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.img-redact-bar p { flex: 1 1 100%; margin: 0; line-height: 1.6; }
.img-redact-bar .btn { min-height: 44px; }
@media (min-width: 656px) { .img-redact-bar { margin: 0 auto 8px; } }
@media print { .redact-bar, .img-redact-bar { display: none !important; } .page:has(.redactBox, .redactStroke) .textLayer, .imgbox:has(.redactBox, .mosaicBox) .textLayer { display: none; } } /* 가린 쪽의 안 보이는 글자가 「PDF로 저장」 에 따라가지 않게 */
/* 사진 자르기(10-13) — 남길 네모 밖은 어둡게 · 네 귀 손잡이는 네모 안쪽 귀에(누를 자리 44px · 사진 밖으로 삐지지 않게) · 켜 있는 동안 손가락은 자르기(화면이 안 굴러간다) */
.img-crop { position: absolute; inset: 0; z-index: 5; overflow: hidden; touch-action: none; cursor: crosshair; }
.imgbox.cropping { touch-action: none; }
.crop-box { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, .6); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; touch-action: none; }
.crop-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.crop-h { position: absolute; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; touch-action: none; cursor: nwse-resize; }
.crop-h[data-c="tl"] { left: 0; top: 0; } .crop-h[data-c="tr"] { right: 0; top: 0; cursor: nesw-resize; }
.crop-h[data-c="bl"] { left: 0; bottom: 0; cursor: nesw-resize; } .crop-h[data-c="br"] { right: 0; bottom: 0; }
.crop-h::before { content: ''; position: absolute; width: 18px; height: 18px; border: 0 solid #fff; filter: drop-shadow(0 0 1px #000); }
.crop-h[data-c="tl"]::before { left: 2px; top: 2px; border-left-width: 4px; border-top-width: 4px; }
.crop-h[data-c="tr"]::before { right: 2px; top: 2px; border-right-width: 4px; border-top-width: 4px; }
.crop-h[data-c="bl"]::before { left: 2px; bottom: 2px; border-left-width: 4px; border-bottom-width: 4px; }
.crop-h[data-c="br"]::before { right: 2px; bottom: 2px; border-right-width: 4px; border-bottom-width: 4px; }
.crop-h:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media print { .img-crop { display: none !important; } }
/* 사진 크기 줄이기(10-13) — 줄인 뒤 용량 미리보기 */
.ish-preview { margin: 12px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* 도장 미리보기(10-12) — 지운 바탕이 보이게 밝은 종이 위(어두운 보기에서도 종이는 밝다) */
.seal-preview { display: block; max-width: 160px; max-height: 160px; margin: 8px 0; padding: 8px; background: #fff; border: 1px dashed var(--line); border-radius: 8px; }
.pick-err:empty { display: none; }
/* 위험 글씨 색(10-19) — 전엔 --danger 정의가 없어 어두운 화면에서도 밝은 화면용 진한 빨강(#c62828)이 떠 잘 안 보였다 · 링크 경고와 같은 짝 */
:root { --danger-text: #c62828; }
@media (prefers-color-scheme: dark) { :root { --danger-text: #fca5a5; } }
/* 고대비 모드 형광펜(10-19) — pdf.js 화면 꾸밈이 쓰는 이름인데 정의가 없어 그 속성이 통째로 무효였다 · 값은 pdf.js 공식 pdf_viewer.css 그대로(평소 none · 고대비 invert) */
:root { --hcm-highlight-filter: none; --hcm-highlight-selected-filter: none; }
@media screen and (forced-colors: active) { :root { --hcm-highlight-filter: invert(100%); } }
.pick-err { color: var(--danger-text, #c62828); }
/* 넘치면 다음 줄로(11-07 사장님 폰 사진 — 사진 창 「PDF 로 저장」 이 글자 큰 폰에서 왼쪽 화면 밖으로 잘림 · 한 줄 고정 + 오른쪽 정렬이라 넘친 쪽이 왼쪽으로 사라졌다)
   창 24곳이 같은 줄을 쓴다 — 넘치지 않으면 모양은 그대로 */
.goto-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
/* 단추 하나가 한 줄 폭보다 넓으면 그래도 넘친다(.btn 은 flex:none) — 글자 200% 에서 「사진으로 저장(JPG)」 이 창 왼쪽 밖 1px(시험 ①-가 · 42345349560)
   → 이 줄 안에서만 폭 상한 + 글자 줄바꿈 */
.goto-actions > .btn { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: center; justify-content: center; }
/* 바깥 링크 묻기(10-13) — 실제 주소 전체(도메인 굵게) · 글씨와 다른 곳이면 경고 · 긴 주소는 줄을 바꿔 가로로 안 넘친다 */
:root { --link-warn-text: #8a1c1c; --link-warn-bg: #fdecea; --link-warn-line: #e8a5a5; }
@media (prefers-color-scheme: dark) { :root { --link-warn-text: #ffd2d2; --link-warn-bg: #4a1f1f; --link-warn-line: #a35656; } }
.link-ask .link-url { margin: 4px 0 8px; padding: 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; word-break: break-all; }
.link-ask .link-url strong { font-weight: 800; font-size: 1.0625rem; }
.link-ask .link-warn { margin: 0 0 8px; padding: 12px 12px; border: 1px solid var(--link-warn-line); border-radius: 8px; background: var(--link-warn-bg); color: var(--link-warn-text); font-weight: 700; overflow-wrap: anywhere; }
.link-ask .small { font-size: .875rem; color: var(--sub); }
.link-ask .goto-actions { flex-wrap: wrap; }
/* 붙여넣기로 열기(10-13) — 안내는 마우스·자판이 있는 화면(PC)에서만 · 앱 안은 앱이 파일을 넘긴다 */
/* 붙여넣기 안내(11-03 · 장부 1102ao-2) — 손가락 화면에서만 숨긴다. 전엔 「마우스가 있는 화면」 에서만 보였는데, 마우스 없이 글자판만 쓰는 PC·
   마우스를 보고하지 않는 PC(11-02 검사 PC 시험에서 숨었다)에선 Ctrl+V 가 되는데도 안내가 사라졌다. Ctrl+V 는 글자판 기능이라 손가락 화면만 뺀다 */
.paste-hint { display: block; margin-top: 8px; color: var(--sub); }
@media (pointer: coarse) { .paste-hint, .drop { display: none; } } /* 손가락 화면 판정은 site/touch.js TOUCH_Q 와 같은 글만(11-08 QA 보강 공통 · 전엔 「and (hover: none)」 이 붙어 곳마다 달랐다) · 끌어다 놓기 상자는 폰에서 할 수 없어 숨김(B-01 · 창 전체 놓기 받기는 그대로) */
.in-app .paste-hint { display: none !important; }
.paste-ask .paste-peek { margin: 4px 0 0; padding: 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: .9375rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.paste-ask .goto-actions { flex-wrap: wrap; }
.btn.plain { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
/* 쪽 번호 — 여러 쪽 PDF 에서는 눌러서 쪽 이동, 아니면 글자처럼 */
button#pageLabel { border: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--sub); min-height: 44px; padding: 0 8px; border-radius: 8px; cursor: pointer; }
button#pageLabel:not(:disabled) { color: var(--text); text-decoration: underline dotted; text-underline-offset: 4px; }
button#pageLabel:disabled { cursor: default; color: var(--sub); }
/* 배율 글자 = 「한 장 맞춤 ↔ 폭 맞춤」 단추(10-08 · PDF 만) — 쪽 번호 단추와 같은 모양 */
button#zoomLabel { border: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--sub); min-height: 44px; padding: 0 8px; border-radius: 8px; cursor: pointer; }
button#zoomLabel:not(:disabled) { color: var(--text); text-decoration: underline dotted; text-underline-offset: 4px; }
button#zoomLabel:disabled { cursor: default; }
button#zoomLabel[aria-pressed="true"] { font-weight: 700; }

/* 메모 단추·글 — 쪽 위에 겹친다 */
.noteLayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.note-btn { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: #d97706; color: #fff; display: inline-flex; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.note-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* 누를 자리 44px(10-13) — 보이는 동그라미 28px 둘레 8px 의 보이지 않는 자리 · 이웃 메모·링크와 겹치면 view.js fitNoteHits 가 그 변만 줄인다 · 테두리(2px) 바깥부터 잰다 */
.note-btn::before { content: ''; position: absolute; left: calc(-2px - var(--nl, 8px)); right: calc(-2px - var(--nr, 8px)); top: calc(-2px - var(--nt, 8px)); bottom: calc(-2px - var(--nb, 8px)); border-radius: 8px; }
.note-pop { position: absolute; z-index: 4; max-width: min(280px, 90%); padding: 8px 12px; border-radius: 8px; background: #fff8e1; color: #111827; border: 1px solid #d97706; box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: auto; font-size: 0.875rem; line-height: 1.6; white-space: pre-wrap; }
.note-pop strong { display: block; font-size: 0.875rem; }
body.dark .note-pop { filter: none; }
@media print { .noteLayer { display: none; } }
/* 메모 목록(10-13) — 위 막대 단추(메모 수 딱지) · 쪽·쓴 사람·날짜 + 글(세 줄까지) · 한 줄 전체가 누르는 자리 */
.note-list-btn { position: relative; }
.note-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #b45309; color: #fff; font-size: .8125rem; font-weight: 700; line-height: 18px; text-align: center; pointer-events: none; }
.notes-state { padding: 0 16px; color: var(--sub); }
.note-list { list-style: none; margin: 0; padding: 8px 8px 16px; }
.note-item { display: grid; gap: 4px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.note-item:hover { background: var(--bg); }
.note-item-head { font-size: .8125rem; color: var(--sub); overflow-wrap: anywhere; }
.note-item-head b { color: var(--warn-ink); font-weight: 700; }
.note-item-quote { font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* 칠한 글자(PO-05) */
.order-grip { cursor: grab; touch-action: none; } /* 끌어서 순서(11-01) */
.order-drag { opacity: .5; }
.order-drop { box-shadow: 0 -3px 0 var(--accent); }
.order-drop-end > li:last-child { box-shadow: 0 3px 0 var(--accent); }
.photo-more { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } /* 찍은 뒤 한 장 더(11-01) */
.photo-more-btn { min-height: 48px; flex: 1 1 200px; font-weight: 700; }
/* 아래 탭(11-01 · 창고 app-shell 규칙 — 누르는 곳 44px 넘게 · 안전영역 · 지금 탭 강조색 · 아이콘은 글자색 · 글자판이 오르면 숨김 · 1024px 이상은 왼쪽 옆 메뉴) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar[hidden] { display: none; }
.tabbar .tab { flex: 1 1 0; min-width: 0; min-height: 56px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; color: var(--sub); text-decoration: none; font-size: .8125rem; }
/* 탭 다섯(11-04 · 261104_하단탭) — 375px 에서 칸 75px · 글자를 rem 로만 키우면 기본 글자 200%(26px)에서 「더보기」 가 78px 로 칸을 넘어 잘린다
   → 글자는 rem 로 따르되 화면 폭의 4.2%(375px 에서 15.75px · 3글자 47px)를 넘지 않게 · 그래도 넘치면 줄을 바꿔 잘리지 않게 */
.tabbar .tab span { max-width: 100%; font-size: min(1em, 16px); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.tabbar .tab svg { flex: none; }
.tabbar .tab[aria-current="page"] { color: var(--link-text); font-weight: 700; } /* 11-04 — --accent 는 면 색(옛 바탕 #fcf8ff 위 4.3:1 · 11-16 막대 바탕 흰색(키트 · 보라 띠 없앰)) · 글자는 --link-text */
/* 지금 탭은 색만이 아니라 모양으로도(맹검 ④ · VIS4) — 11-19 시안 A-Clear: 위 막대 대신 아이콘 뒤 알약(옅은 대표색) + 굵은 글자 · 막대 바탕은 흰 카드색 */
.tabbar .tab svg { box-sizing: content-box; padding: 4px 16px; border-radius: 999px; }
.tabbar .tab[aria-current="page"] svg { background: var(--home-tint); }
.tabbar .tab[aria-current="page"]::before { content: none; }
.tabbar .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
body.has-tabs { --tabs-h: calc(57px + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--tabs-h); }
body.has-tabs #toast, body.has-tabs .offline-retry-bar { bottom: calc(var(--tabs-h) + 12px); }
/* 11-02 고침 — 전엔 body[data-kb="open"] 을 봤는데 그 표시를 붙이는 코드가 0곳이라 글자판 위에 탭 띠 57px 가 남았다(55 §2-KB). kbCheck 가 붙이는 kb-open 을 본다 */
body.kb-open .tabbar { display: none; }
.tool-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.tool-list .exp-item { width: 100%; text-decoration: none; }
/* 찍기 탭(11-04) — 홈에서 옮겨 온 찍기 단추 둘 · 도구 목록과 같은 모양 */
.capture-list { display: grid; gap: 8px; margin: 0 0 16px; }
/* 11-16 찍기 종류 타일(회의 261116_찍기종류 D-1 · 디자인 2×3 → 지금 연 셋은 한 줄 셋) — 고른 것은 진한 테두리 + 옅은 대표색 바탕(색만으로 말하지 않게 굵은 글자도) */
.cap-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.cap-kind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 0.9375rem; line-height: 1.3; text-align: center; cursor: pointer; }
.cap-kind[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--home-tint); color: var(--link-text); font-weight: 700; } /* 11-17 두 겹 테두리는 안쪽 그림자로 — 테두리를 2px 로 바꾸고 여백을 7·3px 로 줄이던 것이 여백 4의 배수(UI4)를 어겼다(qa-self check-screen-spec) · 크기는 그대로 */ /* 11-16 고른 타일 글자가 --accent-text(흰/Night)라 옅은 바탕 위 대비 1.24·1.32 로 안 보였다 → 글자용 파랑(밝은 5.41 · 어두운 7.23) */
.cap-kind:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cap-kind-desc { margin: 0 0 12px; color: var(--sub); }
.cap-kinds[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 11-27 글자 130%·200% — 셋 칸이면 「문서 여러 장」 이 세 줄로 꺾였다(사전 채점 45894954623 바닥 위반) · 글자 키우기는 html 글자 크기라 화면 폭 조건이 안 듣는다 → 찍기 탭 폭을 em 으로 재는 container 조건(칸 폭이 18em 아래면 두 칸) */
#tabCapture { container: cvcap / inline-size; }
.cap-kind span { word-break: keep-all; }
@container cvcap (max-width: 18em) { .cap-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 11-27 QR 타일일 때(타일 설명은 낭독기에만) — 타일 묶음과 채운 단추 사이가 8px 로 붙었다 · 만들기 카드와 안내 목록 사이도 좁았다(사진 45896170887) · 묶음 사이 16 */
#tabCapture:has(#capKindDesc.sr-only) .cap-kinds { margin-bottom: 16px; }
#capTipsQr { margin-top: 16px; word-break: keep-all; } /* 11-27 사전 채점 45988256379 여백·밀도 7/10 — 폰 360 에서 안내 3줄이 6줄로 접혔다 → 문장을 줄마다 20자 안으로 줄이고 낱말 중간에서 안 꺾음 */
#qrDialog .qr-host { margin: 0 0 4px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
#qrDialog .qr-text { margin: 0 0 8px; font-size: 1.0625rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; user-select: text; }
#qrDialog .qr-acts, #qrMakeDialog .qr-acts, #scanHistDialog .qr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; } /* 11-27 QR 만들기·스캔 기록도 — 전엔 「그림으로 저장」·「A4 안내문 PDF」 가 빈칸 하나로 맞붙고 미리 보기에 닿았다 */
#qrDialog .qr-acts .btn, #qrMakeDialog .qr-acts .btn, #scanHistDialog .qr-acts .btn { min-height: 44px; }
/* 11-23 QS3 위험 신호 3단계(문서함 @1219) — 색만으로 가르지 않게 머리 글에 「주의·위험」 낱말 · 왼쪽 띠 4px · 없음은 회색(보장 낱말 없음) */
#qrDialog #qrTitle { overflow-wrap: anywhere; }
/* 11-27 QR 결과 창의 읽는 중(qrBusy · data-busy)·못 읽음(data-fail) = 앱 상태 틀과 같은 꼴(그림 48 + 한 줄 + 단추 하나 · 가운데 · .status 와 같은 그림) — 사전 채점 45900953538 「빈·오류가 같은 틀」 */
#qrDialog[data-busy] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'/%3E%3C/svg%3E"); }
#qrDialog[data-fail] { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E"); }
#qrDialog:is([data-busy], [data-fail]) #qrNote { margin: 8px 0 0; text-align: center; font-size: 1rem; }
#qrDialog:is([data-busy], [data-fail]) #qrNote::before { content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 12px; background: var(--sub); -webkit-mask: var(--st-icon) center / contain no-repeat; mask: var(--st-icon) center / contain no-repeat; }
#qrDialog[data-busy] #qrNote::before { animation: cv-st-spin 1.2s linear infinite; }
#qrDialog:is([data-busy], [data-fail]) .qr-acts { justify-content: center; } /* 11-27 읽는 중 「그만두기」 도 가운데(빈·오류와 같은 틀) */
@media (prefers-reduced-motion: reduce) { #qrDialog[data-busy] #qrNote::before { animation: none; } }
#qrDialog .qr-risk { margin: 4px 0 8px; padding: 8px 12px; border-left: 4px solid var(--muted); border-radius: 8px; background: color-mix(in srgb, var(--muted) 5%, transparent); }
/* R-1127-77 흉내·너무 긴 주소(copy · 열지 않음)도 주의 모양 — 전엔 「신호 없음」 과 같은 회색이라 안전해 보였다 */
#qrDialog .qr-risk:is([data-level="caution"], [data-level="copy"]) { border-left-color: var(--warn-ink); background: color-mix(in srgb, var(--warn-ink) 5%, transparent); }
#qrDialog .qr-risk[data-level="danger"] { border-left-color: var(--danger-text); background: color-mix(in srgb, var(--danger-text) 5%, transparent); }
#qrDialog .qr-risk-head { margin: 0; font-weight: 700; color: var(--sub); }
#qrDialog .qr-risk:is([data-level="caution"], [data-level="copy"]) .qr-risk-head { color: var(--warn-ink); }
#qrDialog .qr-risk[data-level="danger"] .qr-risk-head { color: var(--danger-text); }
#qrDialog .qr-signals { margin: 4px 0 0; padding-left: 20px; color: var(--text); line-height: 1.5; }
#qrDialog .qr-signals[hidden] { display: none; }
#qrDialog .qr-rules { margin: 8px 0 0; color: var(--muted); }
/* 11-24 QS4~QS7 종류별 칸 — 이름(작게·흐리게) / 값(크게) 두 줄 · 카드 한 장 · 값은 골라 복사할 수 있게 */
#qrDialog .qr-facts { margin: 4px 0 8px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
#qrDialog .qr-facts[hidden], #qrDialog .qr-raw[hidden] { display: none; }
#qrDialog .qr-fact { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; padding: 12px 0; border-top: 1px solid var(--line); }
#qrDialog .qr-fact:first-child { border-top: 0; }
#qrDialog .qr-fact dt { grid-column: 1 / -1; margin: 0 0 4px; font-size: .875rem; color: var(--sub); }
#qrDialog .qr-fact dd { margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; user-select: text; }
#qrDialog .qr-fact dd.qr-num { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
#qrDialog .qr-fact dd a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; color: var(--link-text); } /* 11-27 명함 전화·메일 링크가 한 줄 높이(약 25px)라 손가락이 빗나갔다 */
#qrDialog .qr-fact .btn-mini { min-height: 44px; min-width: 64px; }
#qrDialog .qr-raw { margin: 0 0 8px; color: var(--sub); }
#qrDialog .qr-raw summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
#qrDialog .qr-raw .qr-text { font-size: .9375rem; color: var(--sub); white-space: pre-wrap; }
#ocrTextDialog .ocr-text-out { width: 100%; box-sizing: border-box; min-height: 12rem; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; line-height: 1.6; resize: vertical; }
#ocrTextDialog .qr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
#ocrTextDialog .qr-acts .btn { min-height: 44px; }
.cap-kinds[data-n="5"] .cap-kind:last-child { grid-column: span 2; }
/* 여섯이면 2×3 그대로(회의 디자인 2×3) */
.capture-list .btn.cap-go, .capture-list .btn.cap-pick { width: 100%; min-height: 48px; }
.capture-list .exp-item { width: 100%; text-align: left; }
.capture-tips { margin: 0; padding-left: 1.25em; color: var(--sub); line-height: 1.6; } /* 11-04 — 찍으면 저절로 되는 것 세 줄(검사 PC 사진: 카드 아래가 비었다 · 사장님 「찍을 때부터 자동으로」) */
/* 최근 탭이 빌 때(11-04) — 작은 그림 + 한 줄 + 단추 하나 */
.recent-blank { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0; padding: 16px 8px; text-align: center; color: var(--sub); }
.recent-blank[hidden] { display: none; }
.recent-blank p { margin: 0; }
.open-formats { margin: 12px 0 0; }
/* 언어 고르기(11-03 · 더보기 탭) — 줄마다 누를 자리 48px(§2-ACC 44px 이상) · 고른 줄은 글자로도(동그라미) */
.lang-pick { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.lang-pick[hidden] { display: none; }
.lang-pick legend { padding: 0 4px; font-weight: 700; }
.lang-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px; border-radius: 8px; cursor: pointer; }
.lang-opt:hover, .lang-opt:focus-within { background: var(--line); }
.lang-opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent, currentColor); }
.lang-pick .small { margin: 8px 4px 0; }
.tool-group { margin: 16px 0 8px; color: var(--sub); }
@media (min-width: 1024px) {
  .tabbar { top: 0; bottom: 0; right: auto; width: 96px; flex-direction: column; justify-content: flex-start; padding-top: 72px; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar .tab { flex: 0 0 auto; min-height: 64px; }
  .tabbar .tab span { font-size: 1em; } /* 옆 메뉴는 칸 폭 96px — 화면 폭 상한이 필요 없다 */
  .tabbar .tab[aria-current="page"]::before { top: 18%; bottom: 18%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 8px 8px 0; }
  body.has-tabs { padding-bottom: 0; padding-left: 96px; }
  body.has-tabs #toast { bottom: 12px; }
}
/* 옆 메뉴인데 화면이 낮을 때(가로 모드 · 11-04) — 다섯 칸 × 64 + 위 72 = 392px 가 높이 360 에서 마지막 탭을 자른다 → 칸 56 · 위 여백 8 · 그래도 모자라면 메뉴 안에서 굴림 */
@media (min-width: 1024px) and (max-height: 520px) {
  .tabbar { padding-top: 8px; overflow-y: auto; }
  .tabbar .tab { min-height: 56px; }
}
/* 보정 네 가지(CS-04 · 11-01) — 옛 체크 줄과 같은 모양 */
.photo-look { border: 0; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.photo-look legend { padding: 0; margin-bottom: 4px; font-weight: 700; }
/* 내 폴더(PO-02 · 11-01 · PC 크롬·엣지만) */
.my-folders { margin: 16px 0; }
.my-folders h2 { font-size: 1.0625rem; margin: 0 0 4px; }
.folder-list { display: grid; gap: 8px; margin: 8px 0; }
.folder-list .folder-open { width: 100%; min-height: 48px; text-align: left; }
#folderDialog .toc-head { gap: 8px; flex-wrap: wrap; }
/* 11-26 직접 본 사진 q1123-ps2-1440-dark-pick(web-pc 45765466379) — ① 창 몸(.sheet padding 0)의 글·검색 칸·칩·격자가 창 가장자리에 0px 로 붙음
   ② 머리 단추 둘(이름 바꾸기·이 폴더 빼기)이 space-between 으로 창 폭만큼 벌어짐 ③ 검색 칸만 밝은 회색(브라우저 기본) · 시안 PS2 는 여백 24·단추 모음·어두운 칸 */
#folderDialog.fp-only #folderKinds, #folderDialog.fp-only #folderState:not(.busy) { display: none; } /* 사진뿐인 폴더의 사진 격자 — 「전체 13 · 사진 13」 칩 줄·「파일 13개」 줄이 아래 「전체 13 · AI 그림」 칩과 머리 「13장」 과 겹쳤다 */
#folderFind { width: 100%; min-height: 44px; box-sizing: border-box; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; }
#folderFind::placeholder { color: var(--sub); }
.folder-kinds, .folder-sorts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.folder-kinds .chip, .folder-sorts .chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.folder-kinds .chip[aria-pressed="true"], .folder-sorts .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.folder-cap { color: var(--danger-text); font-weight: 700; }
#folderProgress { width: 100%; }
.folder-files { list-style: none; margin: 8px 0 0; padding: 0; }
.folder-files li { border-bottom: 1px solid var(--line); }
.folder-file { all: unset; box-sizing: border-box; width: 100%; min-height: 56px; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 8px 4px; cursor: pointer; }
.folder-file:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.folder-kind { grid-row: 1 / span 2; align-self: center; text-align: center; font-size: .8125rem; border-radius: 8px; padding: 8px 0; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.folder-name { overflow-wrap: anywhere; }
.folder-meta { color: var(--sub); }
/* PS2 폴더 사진 격자(문서함 #1227 · 시안 PS2) — 폰 4열 3px · PC 8열 6px 둥근 8 · 날짜 묶음 · 고른 장 = 주색 테두리 + 둥근 표시 */
.fp-top { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; }
.fp-top > div { flex: 1; }
.fp-head { font-size: 1.25rem; font-weight: 800; line-height: 1.35; margin: 4px 0; }
.fp-head em { font-style: normal; color: var(--link-text); }
.fp-sub { margin: 0 0 8px; color: var(--sub); }
.fp-pick { min-height: 44px; flex: none; }
.fp-pick[aria-pressed="true"] { color: var(--link-text); font-weight: 700; }
.fp-grid { flex: 1 1 240px; min-height: 240px; overflow-y: auto; overflow-x: hidden; margin: 4px 0 0; } /* 굴리는 곳은 여기 하나 — 전엔 창과 격자에 굴림 막대가 둘(사진 q1123-ps2-800-light-pick) · 작은 그림 미리 읽기도 이 상자 기준 */
.fp-day { font-size: .8125rem; font-weight: 700; color: var(--sub); margin: 16px 0 8px; } /* 12-01 여백 4의 배수(check-screen-spec UI4 · 14·6 → 16·8) */
.fp-day:first-child { margin-top: 4px; }
.fp-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
@media (min-width: 1024px) { .fp-thumbs { grid-template-columns: repeat(8, 1fr); gap: 8px; } .fp-th { border-radius: 8px; } }
.fp-th { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--line); cursor: pointer; }
.fp-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-th img:not([src]) { visibility: hidden; }
.fp-th:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.fp-th.fp-wait::before, .fp-th.fp-bad::before { content: attr(data-ext); position: absolute; inset: 0; display: grid; place-items: center; font-size: .8125rem; font-weight: 700; color: var(--text); } /* 그림 대신 형식 이름 — 빈 칸이던 것(11-26) */
.fp-th.fp-bad { outline: 1px dashed var(--line-strong); outline-offset: -4px; }
.fp-th.fp-bad:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; } /* 11-30 「7」 디자인 D7: 못 쓰는 사진 칸도 글쇠 초점이 3px 로 보이게(위 점선이 초점 링을 덮었다) */
.fp-ck { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ffffff; background: rgba(0, 0, 0, .25); box-sizing: border-box; }
.fp-th.sel .fp-ck { background: var(--accent); }
.fp-th.sel .fp-ck::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); } /* 고른 장 = 색만이 아니라 체크로도 */
.fp-th.sel::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--accent); }
.fp-tag { position: absolute; left: 4px; bottom: 4px; background: #0b0d12; color: #ffffff; font-size: .8125rem; font-weight: 700; border-radius: 4px; padding: 0 8px; }
.fp-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.fp-dock { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 8px; /* PS8 — 「한 번에 바꾸기」 가 채운 단추(시안 PS2 고르는 중) · 넘겨 보기는 테두리 */ padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.fp-dock .btn { min-height: 48px; padding: 0 8px; justify-content: center; text-align: center; } /* 넓은 칸(두 칸 차지)에서 글자가 왼쪽에 붙던 것(장부 1123ab-4 · 사진 q1123-ps2-*) */
/* 칸 폭은 글자 크기를 따른다 — 네 칸으로 굳혀 두면 글자 200% 에서 단추 이름이 한 글자씩 세로로 섰다(R-1126-41) */
@media (max-width: 1023.98px) {
  .fp-dock .btn { flex: 1 1 max(56px, 3.9rem); min-width: 0; white-space: normal; }
  .fp-dock #fpBatch { flex: 1.6 1 6rem; }
  .fp-dock { row-gap: 4px; } /* 줄 나눔 빈 줄까지 두 번 = 8 */
  .fp-dock::after { content: ""; order: 1; flex: 0 0 100%; } /* 줄 나눔 — 아래 둘은 늘 다음 줄 */
  .fp-dock #fpRen, .fp-dock #fpDel { order: 2; flex: 0 1 auto; padding: 0 16px; } /* 🙋2 원래 파일 이름 바꾸기·지우기 — 좁은 창에선 다음 줄 왼쪽(첫 줄 차례·채운 단추 자리는 그대로) */
}
@media (min-width: 1024px) { .fp-dock { justify-content: center; } .fp-dock .btn { padding: 0 16px; } .fp-dock #fpBatch { min-width: 260px; } } /* 시안 PS2 PC — 채운 「N장 한 번에 바꾸기」 가 가장 넓은 단추(11-30 나란히 사진 side-PS2-pc · 전엔 옛 채운 단추였던 넘겨 보기가 260 을 쥐어 테두리 단추가 가장 컸다) */
.note-ring { position: absolute; border: 3px solid var(--accent); border-radius: 8px; pointer-events: none; animation: noteRing .5s ease-in-out 3; z-index: 5; } /* 누른 메모 자리(PO-05) */
.note-ring.still { animation: none; }
@keyframes noteRing { 50% { opacity: .2; } }
.notes-tools { padding: 0 16px; margin: 4px 0 0; justify-content: flex-start; flex-wrap: wrap; }
.note-item-text { font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }

/* 스캔 PDF 글자 읽기 */
.ocr-bar { max-width: 900px; margin: 0 8px 8px; /* 폰에서 좌우 끝에 붙지 않게 */ padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.ocr-bar p { font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.ocr-bar .small { font-size: 0.875rem; color: var(--sub); margin: 8px 0 0; }
.ocr-bar .ocr-eng { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; cursor: pointer; } /* 영어도 함께 읽기(10-09) — 누르는 칸 44px */
.ocr-bar .ocr-eng input { width: 22px; height: 22px; flex: none; }
.ocr-bar .btn { border: 0; }
.ocrLayer { position: absolute; inset: 0; z-index: 1; line-height: 1; }
.ocrLayer span { position: absolute; color: transparent; white-space: pre; transform-origin: 0 0; cursor: text; }
.ocrLayer span::selection { background: rgba(47, 107, 255, .35); }
.ocrLayer mark.hl { background: var(--hl); color: transparent; }
@media (min-width: 916px) { .ocr-bar { margin: 0 auto 8px; } }
@media print { .ocr-bar { display: none; } }

/* 파워포인트 — 장마다 원래 비율(보통 16:9)의 카드 · 글이 넘치면 카드가 늘어난다 · 제목은 크게(QA 0929) */
.rich-slide { aspect-ratio: var(--ratio, 1.7778); border: 1px solid var(--line); border-radius: 8px; padding: 4% 5%; margin: 8px 0 24px; background: var(--card); overflow-wrap: anywhere; }
/* 문서 글자 비율은 docfont.css 로(11-04) */
@media print { .rich-slide { break-inside: avoid; } }
/* 글자색 — 워드·한글·파워포인트의 글자색. 어두운 화면에서는 밝게 섞어 읽히게 · 바탕색 칸 안은 칸 글자색을 따른다(§2-L) */
.rich .fc { color: var(--fc); }
@media (prefers-color-scheme: dark) { :root .rich .fc { color: color-mix(in srgb, var(--fc) 45%, #ffffff); } }
/* 어두운 화면 규칙(:root:not(...) 가 붙어 더 구체적)이 이 규칙을 이겨 노란 칸 위 빨간 글자가 대비 1.75 였다(기능 시험) — 칸 글자색이 늘 이긴다 */
.rich .rich-filled .fc { color: inherit !important; }
/* 칸 바탕과 대비가 4.5:1 이상인 색 글자만 원래 색 — 계산은 docshare.js styleCell */
.rich .rich-filled .fc.fc-keep { color: var(--fc) !important; }
/* 형광펜·음영(11-26 QA 1126 #15 · 워드 w:highlight·w:shd · docshare.js shade) — 바탕은 원래 색, 글자는 그 바탕에서 읽히는 검정/흰색 ·
   글자색은 바탕과 대비 4.5:1 이상일 때만(fc-keep · 칸 바탕색과 같은 규칙) · 어두운 화면에서도 바탕을 그대로 둬 원본처럼 보인다 */
.rich .rich-shd { background-color: var(--shd); color: var(--shd-ink) !important; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rich .rich-shd .fc, .rich .rich-shd.fc { color: var(--shd-ink) !important; }
.rich .rich-shd .fc.fc-keep, .rich .rich-shd.fc.fc-keep { color: var(--fc) !important; }
.rich mark.hl.hl-cur { outline: 2px solid var(--accent); outline-offset: 1px; } /* 찾기 — 지금 보는 곳(11-26 QA 1126 #6) */
/* 머리말 쪽 번호 줄을 쪽 경계마다(11-26 QA 1126 #11) */
.rich-pghf { font-variant-numeric: tabular-nums; }
.rich-formula { color: var(--muted); font-style: italic; }
/* 결과가 저장 안 된 수식을 여기서 계산한 칸 — 값은 보통 글씨, 점선 밑줄로 「여기서 계산함」 을 알린다(길게 누르면 식) */
.rich-calc { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }

/* 파워포인트 원본 배치 — 장 비율 그대로 · 글자 크기는 장 폭에 비례(cqw) · 확대하면 장이 커지고 가로로 굴린다 */
.rich-slidewrap { overflow-x: auto; margin: 8px 0 24px; }
.rich-slide.layout { position: relative; padding: 0; margin: 0; width: calc(100% * var(--zoom, 1)); container-type: inline-size; white-space: normal; line-height: 1.2; }
.slide-shape { position: absolute; display: flex; flex-direction: column; overflow-wrap: anywhere; padding: .2em .3em; }
.slide-shape p { min-height: 0; }
.slide-shape .rich-fig { margin: 0; }
/* 선(10-18) — 장 안에서 시작점·길이·기울기로 놓은 얇은 띠 · 테두리 있는 도형은 테두리를 상자 안쪽에 */
.slide-line { position: absolute; height: 0; transform-origin: 0 0; pointer-events: none; }
.slide-shape.slide-lined { box-sizing: border-box; }
/* 발표 속 동영상·소리(10-18) — 그 자리에서 재생 · 폭은 카드 안으로 */
.rich-mediabox { margin: .5em 0; max-width: 100%; }
.rich-mediabox video { display: block; width: 100%; max-width: 640px; height: auto; background: #000; border-radius: 8px; }
.rich-mediabox audio { display: block; width: 100%; max-width: 420px; }
.slide-shape .rich-mediabox, .slide-shape .rich-mediabox video { margin: 0; max-width: none; height: 100%; }
.slide-pic .rich-img { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.rich-notice .btn-mini { margin-left: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }

/* 아래 도구 막대 이름(10-28 UI·UX QA CU-02) — 그림만으로는 저장·보내기·문서 색의 뜻을 바로 읽기 어려웠다.
   넓은 화면에서만 그림 옆에 짧은 이름 · 좁은 화면은 막대가 꽉 차 그대로 그림만(결정 기록부 「PDF 서명 넣기」 — 375px 에서 단추를 더 못 둔다)
   보이는 이름은 읽어 주는 이름(aria-label) 안에 든다 — 손보기 ⊂ 「PDF 손보기 — …」 · 어둡게/밝게 ⊂ 「어둡게 보기/밝게 보기」 */
.tool-name { display: none; }
@media (min-width: 900px) {
  .tools button.icon.named { width: auto; padding: 0 12px; gap: 8px; }
  .tools .tool-name { display: inline; font-size: .875rem; }
}

/* 폰 도구줄 — 단추 6개(축소·배율·확대·인쇄·보내기·어둡게) 사이에 이름표 자리를 남긴다. 단추는 44px 아래로 줄이지 않는다(터치 크기) · QA 0930 */
@media (max-width: 420px) {
  .tools { gap: 4px; padding-left: 4px; padding-right: 4px; }
  .tools button.icon { width: 44px; }
  .tools #zoomLabel { min-width: 40px; }
  button#pageLabel { padding: 0 4px; }
}

/* 잠깐 뜨는 안내(인쇄 준비·보내기 실패) — 도구줄 바로 위, 글자색·바탕을 뒤집어 밝은·어두운 화면 둘 다 읽힌다 */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: calc(100vw - 32px); padding: 8px 16px; border-radius: 12px; background: var(--text); color: var(--card); font-size: 0.875rem; text-align: center; }
/* 알림 안 단추(인쇄 준비 「취소」) — 알림 색을 뒤집어 단추로 보이게 · 누를 자리 44px */
.toast { pointer-events: none; } .toast button { pointer-events: auto; } /* 알림 띠는 지나가는 글 — 사진 위에 뜬 채 가리기 끌기·넘기기를 가로챘다(11-26 web-pc 45742582160 ⑤ 누른 자리 맨 위가 #toast) · 안의 단추만 눌린다 */
.toast button { margin-left: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--card); border-radius: 8px; background: transparent; color: var(--card); font: inherit; font-weight: 700; cursor: pointer; }
/* 아주 좁은 폰(359px 이하) — 배율 숫자(100%)를 빼서 쪽 번호 자리를 낸다(320px 에서 「12 / 34」 가 잘렸다). 배율은 확대·축소 단추로 그대로 바뀐다 */
@media (max-width: 399px) { .tools #zoomLabel { display: none; } } /* 375px 폰에서 「보내기」 까지 보이면 막대가 380px 로 넘쳤다(헌법 총집합 10-07 · qa-1007 ③④) — 배율 숫자는 손가락 확대가 있어 빼도 된다 */
/* 위 막대도 359px 이하에선 틈·여백만 줄인다 — 「소리 내어 읽기」 단추가 늘자 320px 에서 「파일 열기」 가 둘째 줄로 밀렸다(qa-1002 ⑦ · 10-05). 단추는 44px 아래로 안 줄인다 */
/* 359px 이하 — 「저장하기」 단추가 늘자 320·344px 에서 쪽 번호 「123 / 456」 이 잘렸다(qa-0929 · 헌법 총집합 10-07) → 인쇄는 「저장하기」 창 안으로(그 단추가 있을 때만) */
@media (max-width: 359px) { .tools:has(#btnExport:not([hidden])) #btnPrint { display: none; } }
/* 11-11 375px 에서도 「저장하기」·「보내기」 가 둘 다 보이면 단추 44px 여덟 개로 막대가 392px(가로 넘침 · qa-1007 ③④ 11-05부터 · 웹 시험 42875244101 단추 폭 찍음) → 그때만 인쇄를 「저장하기」 창 안(expPrint)으로 · 보내기가 없으면 375px 에서도 막대에 그대로(qa-sweep) */
@media (max-width: 399px) { .tools:has(#btnExport:not([hidden])):has(#btnShare:not([hidden])) #btnPrint { display: none; } }
@media (max-width: 359px) {
  .bar { gap: 0; padding-left: 4px; padding-right: 4px; }
  .bar .brand { padding-left: 4px; padding-right: 4px; }
  .bar .brand-mark { display: none; } /* 로고 그림(11-01)만 숨긴다 — 이 폭에선 22px 도 「파일 열기」 를 둘째 줄로 민다(qa-1002 ⑦ 전례) · 이름 글자는 남김 */
  .bar button.icon { width: 44px; }
  #btnOpen { padding: 0 10px; }
}
/* 접는 폰 바깥 화면(300px 이하) — 단추 다섯 개만으로 꽉 차 넘쳤다 → 이름표를 윗줄로 내린다 */
@media (max-width: 300px) {
  .tools { flex-wrap: wrap; row-gap: 0; }
  .tools .grow { display: none; }
  button#pageLabel { order: -1; flex: 1 0 100%; }
  .toast { bottom: calc(116px + env(safe-area-inset-bottom)); } /* 도구줄이 두 줄이 된 만큼 위로 */
  /* 위 막대도 306px 로 넘쳐 폰이 화면을 넓혀 그렸다(그래서 알림이 도구줄을 덮었다) — 틈·여백만 줄인다. 단추는 44px 아래로 안 줄인다 */
  .bar { gap: 0; padding-left: 4px; padding-right: 4px; }
  .bar .brand { padding-left: 4px; padding-right: 4px; }
  .bar button.icon { width: 44px; }
  #btnOpen { padding: 0 10px; }
}

/* 키보드(Tab)로 고른 칸 — 어디가 골라졌는지 늘 보이게. 전엔 브라우저 기본(1px 흐린 테두리)뿐이거나 아예 지웠다(추가 관점 QA 0930 · qa-1002 ② 다섯 화면 전부)
   파랑 테두리 3px · 바탕과 대비 3:1 넘음(밝은 #2f6bff · 어두운 #6b95ff) · 마우스로 누를 땐 안 뜬다(:focus-visible) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 위 막대 — 글자를 크게 키우면(200%) 「파일 열기」 가 오른쪽으로 잘렸다(막대가 넘친 부분을 감춰 화면 폭 검사는 0 이었다 · qa-1002 ⑦).
   자리가 모자라면 단추를 다음 줄로 내린다. 파일 이름 칸은 바탕 크기 0 에서 남는 자리를 채우게 해(줄어드는 쪽) 긴 이름 때문에 단추가 내려가지는 않는다 */
.bar { flex-wrap: wrap; row-gap: 0; }
/* 11-04 — 그래도 글자 200%(375px)에선 「파일 열기」 가 둘째 줄로 내려가 머리띠가 화면 위 1/5 을 먹었다(검사 PC 사진 design-live-view-*-375-text200) → 하단 탭 글자(min(1em,4.2vw))와 같은 방식으로 머리띠 글자만 폭에 맞춰 상한(375px 에서 약 17px · 기본 16px 보다 작아지지 않음) · 줄바꿈 규칙은 그대로 둬 더 좁으면 여전히 내린다 */
.bar .brand, #btnOpen { font-size: min(1rem, 17px); } /* 11-04 — 글자 200% 에서도 머리띠 한 줄(위 줄 상한 · vw 없이) */
.bar .name { flex: 100 1 0; }
/* 좁은 폰에서 문서를 열면 파일 이름을 막대 아래 한 줄로(10-07) — 단추·「파일 열기」 사이에 끼면 375px 에서 「e.」 처럼 한두 글자만 보였다(사진) */
@media (max-width: 600px) { .bar .name:not(:empty) { order: 10; flex: 1 0 100%; padding: 0 8px 8px; font-size: .875rem; } }
/* 11-02 — 문서를 연 좁은 폰(430px 이하)에선 막대 로고 그림만 숨긴다: 11-01 로고(22px+틈)가 붙은 뒤 375px 에서 「파일 열기」 가 둘째 줄로 밀렸다(qa-1012 ⑧ 22/22 → 20/22) · 첫 화면 로고·글자 「클린뷰어」 는 그대로 */
@media (max-width: 430px) { body:not(.has-tabs) .bar:has(.name:not(:empty)) .brand-mark { display: none; } } /* 11-12 QA 게이트 Q21 — 뒤로가기로 첫 화면에 와도 문서 이름이 남아 로고가 사라졌다 · 문서 화면에서만 */

/* 낭독기에만 들리는 글(문서를 연 뒤 제목) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 새로고침·뒤로 뒤 안내 */
.reopen { background: var(--card); color: var(--text); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin: 8px 0 12px; }

/* 도움말 「PDF 볼 준비」 — 단추와 상태 글 */
.help-body .prep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* 새 판 알림 — 도구줄 위(알림 칸 자리 위쪽) · 밝은·어두운 화면 둘 다 읽히게 글자·바탕 뒤집기 */
.update-bar { position: fixed; left: 16px; right: 16px; bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 21; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--card); font-size: 0.875rem; }
.update-bar > span { flex: 1 1 200px; }
.update-bar .btn.plain { color: var(--card); border-color: var(--card); }

/* 차트를 숫자 표로 — 제목은 표 위에 굵게 */
.rich-chart { margin: 8px 0; }
.rich-chart-title { font-weight: 700; margin: 4px 0; }
/* 파워포인트 발표자 메모(10-07) — 장 아래 접힌 칸 · 누르는 자리 44px */
.rich-notes { padding: 0; /* 문서 안 목록 규칙이 왼쪽 24px 를 줬다(사진) */ margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.rich-notes > summary { min-height: 44px; display: flex; align-items: center; padding: 0 12px; cursor: pointer; font-weight: 600; color: var(--text); }
.rich-notes > summary::-webkit-details-marker { display: none; }
.rich-notes > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 12px 0 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); } /* 글자 세모는 글꼴 따라 작게·엉뚱한 방향으로 보였다(사진) — 선으로 그린 꺾쇠 */ /* flex 로 바꾸면 기본 세모가 사라져 「누르면 펼쳐진다」 가 안 보인다 */
.rich-notes[open] > summary::before { transform: rotate(45deg); }
.rich-notes > p { margin: 0; padding: 4px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-notes > p:last-child { padding-bottom: 12px; }
@media print { .rich-notes > summary { min-height: 0; } }
/* 차트 그림(10-07) — 폰 폭에서 글자가 12px 아래로 줄지 않게 그림 폭을 480px 로 묶는다(그림 안 글자 15 × 343/400 ≈ 13px) */
.rich-chart-fig { margin: 8px 0 12px; max-width: 480px; }
.rich-chart-svg { display: block; width: 100%; height: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.rich-chart-svg .rc-grid { stroke: var(--line); stroke-width: 1; }
.rich-chart-svg .rc-axis { stroke: var(--sub); stroke-width: 1.5; }
.rich-chart-svg .rc-label { fill: var(--sub); font-size: var(--rc-label-size, 15px); font-family: inherit; } /* 크기는 docfigure.js fitChartLabels 가 손님 글자에 맞춰 정한다(10-29) */
.rich-chart-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; }
.rich-chart-legend li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.rich-chart-chip { flex: none; width: 12px; height: 12px; border-radius: 8px; }
@media print { .rich-chart-svg { border-color: #999; } }
.rich-chart th { border: 1px solid var(--muted); padding: 4px 8px; background: var(--bg); color: var(--text); font-weight: 600; text-align: left; vertical-align: top; } /* 머리 칸에도 테두리 — 없으면 「Series 1Series 2」 처럼 붙어 보였다(사진) */

/* 쪽 돌리기 방향 고르기(10-05) */
.turn-choices { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 0 16px; }
.turn-choices legend { padding: 0; margin-bottom: 4px; }
/* 문서 속 연락처(10-07) — 값 + 걸기·메일·지도(44px) */
#contactBody { padding: 8px 16px 16px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.contact-val { flex: 1 1 12em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.contact-save { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; } /* 연락처 저장(10-09) — 걸기 옆 덜 눈에 띄게 */
.contact-go { min-height: 44px; min-width: 44px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--link-text); text-decoration: none; font-weight: 600; }
/* 엑셀 칸 합계(10-07) — 고른 칸 · 아래 띠(도구줄 위) */
table.rich-sheet td.cell-sel { outline: 2px solid var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.sum-bar { position: fixed; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.18); font-variant-numeric: tabular-nums; }
.sum-bar[hidden] { display: none; }
.sum-bar span { flex: 1 1 auto; min-width: 0; }
.sum-bar .btn { min-height: 44px; }
.sum-bar .sum-formula { flex-basis: 100%; order: 3; font-family: ui-monospace, Consolas, monospace; font-size: .875rem; color: var(--sub); overflow-wrap: anywhere; } /* 수식 보기(10-08) — 긴 수식은 줄을 바꿔 다 보인다 */
.sum-bar .sum-formula[hidden] { display: none; }
@media print { .sum-bar { display: none !important; } }
/* 엑셀 첫 줄·첫 칸 고정(10-07 열셋째 「9」 ②) — 켜면 표 상자가 화면 높이 안에서 스스로 굴러가야 위에 붙일 수 있다 */
.sheet-freeze { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sheet-freeze .btn { min-height: 44px; }
.sheet-freeze .btn[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
.rich-tblwrap.fz-on { max-height: min(75vh, 900px); overflow: auto; }
.rich-tblwrap.fz-on .rich-sheet thead th { z-index: 3; }
.rich-sheet.fz-r tbody tr.fz-row > * { position: sticky; top: var(--fz-y, var(--fz-top, 28px)); z-index: 2; background: var(--card); box-shadow: 0 1px 0 var(--muted); }
.rich-sheet.fz-c tbody td.fz-c0 { position: sticky; left: var(--fz-left, 40px); z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--muted); }
.rich-sheet.fz-c.fz-r tbody tr.fz-row > td.fz-c0 { z-index: 3; }
.rich-sheet.fz-r tbody tr.fz-row > th.rich-rowhead, .rich-sheet.fz-c tbody th.rich-rowhead { z-index: 2; }
.sheet-freeze-n { display: inline-flex; align-items: center; gap: 4px; }
.sheet-freeze-n[hidden] { display: none; }
.sheet-freeze-n select { min-height: 44px; font: inherit; }
.sheet-freeze .sheet-freeze-file { flex: 1 1 100%; margin: 0; } /* 엑셀에 저장된 틀 고정대로 켰다는 말(10-13 ⑮) */
.rich-sheet thead th.rich-rowhead { left: 0; z-index: 4; }
/* CSV 표(10-11) — 엑셀과 같은 고정·합계 손잡이 · 줄 번호 칸이 없어 첫 칸은 왼쪽 0 · 2쪽부터 다시 보이는 머리줄도 첫 칸이 붙는다 */
.rich-sheet.fz-c thead th.fz-c0 { left: var(--fz-left, 0); z-index: 4; }
.csv-sheet td { cursor: cell; }
/* 열 넓히기 손잡이(10-07 열셋째 「9」 ③) — 보이는 것은 가는 선 · 누를 자리는 44px */
.rich-sheet thead th { position: sticky; }
.col-grip { position: absolute; top: 0; right: 0; width: 12px; height: 100%; cursor: col-resize; touch-action: none; z-index: 5; }
.col-grip::before { content: ''; position: absolute; inset: 0 0 0 -32px; }
/* 누를 자리는 자기 칸 머리 안에서만 — 좁은 칸(31px)에선 옆 칸 손잡이의 넓힌 자리가 이 칸까지 덮어 끌면 옆 칸이 넓어졌다(qa-1013 ③ · 칸 머리마다 따로 겹이라 뒤 칸이 이긴다) */
.rich-sheet thead th { overflow: hidden; }
@media (pointer: coarse) { .rich-sheet thead th { height: 44px; } } /* 손가락으로 잡는 자리 44px */
.col-grip::after { content: ''; position: absolute; top: 20%; bottom: 20%; right: 1px; width: 2px; border-radius: 999px; background: var(--muted); }
.col-grip:hover::after, .col-grip:focus-visible::after, .col-grip.dragging::after { background: var(--accent); }
@media print { .sheet-freeze, .col-grip { display: none !important; } .rich-tblwrap.fz-on { max-height: none; overflow: visible; } }
/* 인쇄(10-12) — 칸 머리의 최소 폭(열 넓히기 10-07)이 16칸 표를 A4 밖 1049px 로 밀었다(qa-1003 ⑤) · 종이에선 폭을 풀어 칸이 줄어 들게 */
@media print { .rich-sheet thead th { min-width: 0 !important; width: auto !important; } .rich-sheet td { overflow-wrap: anywhere; } }
/* 가로 두 쪽(10-07 열셋째 「9」 ④) — 손가락 기기를 눕혔을 때만(view.js twoUpWanted) · 쪽 아닌 띠(글자 읽기·날짜·연락처)는 한 줄을 다 쓴다 */
#doc.two-up { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 8px; }
#doc.two-up > .page { margin: 0; }
#doc.two-up > :not(.page) { flex: 1 0 100%; }
#doc.two-up { margin-inline: auto; }
.goto-view h3 { font-size: 1rem; margin: 16px 0 8px; }
.goto-view-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.goto-view-btns .btn { min-height: 44px; }
.goto-view-btns .btn[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; }
/* 쪽 미리보기(10-11) — 쪽 번호 창 안 작은 그림 격자 · 격자만 굴린다(이동·닫기 단추는 늘 보이게) · 지금 쪽은 굵은 테두리 + 글 */
.page-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: min(42vh, 340px); overflow: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.thumb:hover { background: var(--line); }
.thumb-cv { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.thumb-n { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--sub); }
.thumb[aria-current="page"] { border-color: var(--accent); }
.thumb[aria-current="page"] .thumb-n { color: var(--text); font-weight: 700; }
.thumb[aria-current="page"] .thumb-n::after { content: ' · 지금'; font-weight: 400; }
body.dark .thumb-cv { filter: invert(1) hue-rotate(180deg); }
body.dark.paper-keep .thumb-cv { filter: none; }
@media print { #doc.two-up { display: block; } #doc.two-up > .page { margin: 0 auto; } }
/* 어두운 화면에서도 종이는 원래 색(10-07 열셋째 「9」 ⑤) — 뒤집기를 끈다(PDF 쪽·사진·문서 속 그림·도형) */
body.dark.paper-keep .page canvas, body.dark.paper-keep .img, body.dark.paper-keep .rich-img, body.dark.paper-keep .rich-shape, body.dark.paper-keep .xps-page { filter: none; }

/* 발표 보기(10-08) — 검은 바탕 가운데 장 하나 · 아래 막대(이전 · N/M · 다음 · 끝내기) · 인쇄엔 안 나온다 */
.present { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #000; color: #fff; }
.present[hidden] { display: none; }
.present-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; user-select: none; cursor: pointer; }
.present-stage .present-slide { margin: 0; box-sizing: border-box; overflow: hidden; color: var(--text); --zoom: 1; }
.present-bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: #111; }
.present-bar .btn { min-height: 44px; }
.present-bar .btn.plain { color: #fff; border-color: #6b7280; background: transparent; }
.present-bar .btn.plain:disabled { color: #9ca3af; border-color: #374151; }
.present-count { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; color: #e5e7eb; }
/* 발표자 메모·지난 시간(10-12 스물셋째 ⑯) — 장 아래 띠(장 자리는 그만큼 줄어든다) · 길면 띠 안에서 굴린다 · 시간은 분:초 */
.present-notes { flex: none; max-height: 32vh; overflow-y: auto; padding: 8px 16px; background: #111; color: #e5e7eb; border-top: 1px solid #374151; font-size: 1rem; line-height: 1.6; }
.present-notes p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.present-notes .present-notes-none { color: #9ca3af; }
.present-bar .btn.plain[aria-pressed="true"] { background: #e5e7eb; color: #111; border-color: #e5e7eb; }
.present-time { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; color: #e5e7eb; }
body.presenting { overflow: hidden; }
@media print { .present { display: none !important; } }

/* 첨부 한 번에 모두 저장(10-08) */
.att-all-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }
.att-all-row .btn { min-height: 44px; }

/* 그림 크게 보기(10-08) — 검은 바탕 · 위 막대(제목 · 더 크게 · 닫기) · 「더 크게」 면 2.5배로 굴려 본다 */
#doc img[data-zoom] { cursor: zoom-in; }
#doc img[data-zoom]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.img-view { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #000; color: #fff; }
.img-view[hidden] { display: none; }
.img-view-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: #111; }
.img-view-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1rem; font-weight: 600; color: #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-view-bar .btn { min-height: 44px; flex: none; }
.img-view-bar .btn.plain { color: #fff; border-color: #6b7280; background: transparent; }
/* 「이 그림 저장」(10-13)이 늘어 폰 폭에선 제목을 윗줄로 — 단추 셋은 아랫줄에 그대로 44px · 오른쪽 끝 맞춤 */
@media (max-width: 520px) { .img-view-bar { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; } .img-view-title { flex: 1 0 100%; } }
.img-view-stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 8px; }
.img-view-img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; } /* 작은 그림도 화면에 맞게 키운다(크게 보려고 누른 것이다) */
.img-view-stage.big { place-items: start; }
.img-view-stage.big .img-view-img { width: 250%; height: auto; cursor: zoom-out; }
@media print { .img-view { display: none !important; } }

/* 펜(10-08) — 켜 있는 동안 쪽 위 손가락은 그리기(화면 안 굴러감) · 글자 층·칸이 손가락을 가로채지 않게 */
body.pen-mode .page { touch-action: none; cursor: crosshair; }
body.pen-mode .page > * { pointer-events: none; }
.markLayer svg.penInk { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* 사진 돌리기(10-08) */
.img-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0; }
.img-tools .btn { min-height: 44px; }
@media print { .img-tools { display: none !important; } }
/* 사진 속 위치 정보(10-11) — 사진 위 띠 · 알림은 굵게 · 단추 44px · 인쇄엔 없음 */
.img-gps { max-width: 640px; margin: 0 8px 8px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid #b45309; border-radius: 12px; background: var(--card); color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.img-gps p { flex: 1 1 100%; margin: 0; line-height: 1.6; }
.img-gps .small { color: var(--sub); font-size: .875rem; }
.img-gps .btn { min-height: 44px; }
@media (min-width: 656px) { .img-gps { margin: 0 auto 8px; } }
@media print { .img-gps { display: none !important; } }
/* 사진 여러 장(10-09) — 이전 · 2 / 5 · 다음 */
.img-set { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.img-set .btn { min-height: 44px; }
.img-set-count { min-width: 4em; text-align: center; font-variant-numeric: tabular-nums; }
/* 밝게 보기(10-08) — 어두운 서류 사진 · 어둡게 화면에서도(뒤집기와 함께) · 인쇄는 원래 사진 그대로 */
/* 배율(--bright)은 사진마다 잰다(view.js brightGain · 종이가 흰색 가까이) · 대비는 조금만(많이 주면 어두운 사진이 도로 어두워진다) */
.img.img-bright { filter: brightness(var(--bright, 1.6)) contrast(1.15); }
body.dark .img.img-bright { filter: brightness(var(--bright, 1.6)) contrast(1.15) invert(1) hue-rotate(180deg); }
body.dark.paper-keep .img.img-bright { filter: brightness(var(--bright, 1.6)) contrast(1.15); }
@media print { .img.img-bright, body.dark .img.img-bright { filter: none; } }

/* 옆으로 넘기기(10-08) — 쪽 상자를 가로 띠에 · 밀면 쪽마다 멈춘다 · 띠 높이는 JS(fitFlipStrip) */
#doc.flip .flip-strip { display: flex; gap: 16px; overflow-x: auto; overflow-y: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 8px 0; }
#doc.flip .flip-strip > .page { flex: none; margin: 0 auto; scroll-snap-align: center; scroll-snap-stop: always; }
#doc.flip .flip-strip::before, #doc.flip .flip-strip::after { content: ""; flex: 0 0 max(0px, calc((100% - var(--pw, 0px)) / 2 - 16px)); } /* 첫·끝 쪽도 가운데에 멈추게 */
@media print { #doc.flip .flip-strip { display: block; height: auto !important; overflow: visible; } #doc.flip .flip-strip > .page { margin: 0 auto; } }

/* 남은 읽기 시간(10-08) — 이름 옆(폰은 이름 줄 오른쪽 · 앱은 이름이 숨으니 머리 아래 한 줄) */
.read-left { font-size: .8125rem; color: var(--sub); white-space: nowrap; flex: none; padding: 0 8px; }
@media (max-width: 600px) {
  .bar .name:not(:empty) { flex: 1 1 60%; }
  .bar .read-left { order: 10; padding: 0 8px 8px; margin-left: auto; }
}
.in-app .bar .read-left { order: 10; flex: 1 0 100%; text-align: right; padding: 0 12px 8px; }

/* 누런 바탕(10-09) — 글 문서는 바탕·글자 색을, PDF·사진은 종이를 살짝 누렇게 · 어둡게가 켜지면 어둡게가 먼저 · 인쇄는 원래대로 */
body.sepia:not(.dark) { --sepia-bg: #f4ead5; --sepia-ink: #3b2e1c; }
body.sepia:not(.dark) .textdoc, body.sepia:not(.dark) .rich, body.sepia:not(.dark) .reflow { background: var(--sepia-bg); color: var(--sepia-ink); }
body.sepia:not(.dark) .page canvas, body.sepia:not(.dark) .img:not(.img-bright) { filter: sepia(.3) brightness(.98); }
@media print { body.sepia .textdoc, body.sepia .rich, body.sepia .reflow { background: #fff; color: #000; } body.sepia .page canvas, body.sepia .img { filter: none; } }

/* 맨 위로(10-08) — 도구줄 위 오른쪽 · 44px · 인쇄엔 안 나옴 */
.to-top { position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: .875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; }
/* 읽은 만큼 막대(10-09) — 본문 칸 맨 위에 붙는 얇은 띠 · 누르는 것이 아니라 보이기만 · 인쇄엔 없음 */
.read-prog { position: sticky; top: 0; left: 0; right: 0; height: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); z-index: 6; }
.read-prog[hidden] { display: none; }
.read-prog > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
@media print { .read-prog { display: none !important; } }
/* 링크·목차로 간 뒤 돌아오기(10-09) — 맨 위로 단추와 같은 모양, 왼쪽 아래 */
.to-top.link-back { right: auto; left: 16px; }
@media print { .to-top { display: none !important; } }

/* 최근 문서 이름으로 찾기(10-08) */
.recent-find { margin: 8px 0; }
.recent-find input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

/* 내 책갈피(10-08) */
.mark-list { list-style: none; padding: 0; margin: 4px 0; }
.mark-list li { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.mark-list .mark-go { flex: 1 1 auto; min-width: 0; min-height: 44px; text-align: left; justify-content: flex-start; border: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark-list .mark-del, .mark-list .mark-ren { flex: none; }
/* 책갈피 이름 붙이기(10-09) — 입력칸은 16px(아이폰 확대 막기) · 44px */
.mark-list .mark-name { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); margin: 4px 0; }
.mark-list .mark-name-ok { flex: none; min-height: 44px; }
/* 숨긴 시트·숨긴 장(10-11 · docshare hiddenParts) — 맨 위 「숨긴 시트 N개 — 보기」 · 이름 옆 「숨김」 */
.rich-hiddenbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.rich-hiddenbar .btn { min-height: 44px; font-size: .9375rem; }
.rich-hiddentag, .rich-mediatag { display: inline-block; font-size: .8125rem; font-weight: 700; line-height: 1.4; padding: 0 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--sub); vertical-align: middle; }
/* 검토 메모(10-11 · docshare memoBook) — 워드 주석·한글 메모: 달린 글은 옅게 칠하고 「메모 N」 표 · 문서 끝 「검토 메모 N개」 */
.rich mark.rich-memo-at { background: rgba(250, 204, 21, .3); color: inherit; border-bottom: 2px solid #ca8a04; padding: 0; }
.rich-memo-ref { font-size: .75em; vertical-align: super; margin-left: 4px; padding: 0 4px; border-radius: 8px; background: var(--line); color: var(--link-text); text-decoration: none; white-space: nowrap; }
.rich-memo-flash { outline: 3px solid var(--accent); outline-offset: 2px; }
.rich-memos { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.rich-memos-title { font-size: 1.0625rem; margin: 0 0 8px; }
.rich-memo-list { list-style: none; padding: 0; margin: 0; }
.rich-memo { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 8px; background: var(--card); overflow-wrap: anywhere; }
.rich-memo:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.rich-memo.reply { margin-left: 24px; }
.rich-memo-head, .rich-memo-quote { margin: 0 0 4px; }
.rich-memo-who, .rich-memo-quote { color: var(--sub); font-size: .875em; }
.rich-memo-done { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--sub); }
.rich-memo-go { min-height: 44px; margin-top: 4px; font-size: .9375rem; }
/* 워드 고친 곳(10-12 · docshare revisionBook) — 넣은 글 밑줄 · 지운 글 줄긋기(색만으로 가르지 않는다) · 맨 위 「고친 곳 N개」 와 켜고 끄기 */
.rich ins.rich-ins { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; color: var(--cmp-add); background: var(--cmp-add-bg); }
.rich del.rich-del { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--cmp-del); background: var(--cmp-del-bg); }
.rich.rich-rev-final ins.rich-ins { text-decoration: none; color: inherit; background: none; }
.rich-revbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.rich-revbar .btn { min-height: 44px; font-size: .9375rem; }
.rich-revbar .rich-revsay { flex: 1 1 200px; min-width: 0; margin: 0; }
/* 원래 쪽 나눔(10-13 ⑫) — 쪽 경계는 얇은 선 + 「— 2쪽 —」 · 맨 위 쪽 수와 「N쪽으로 가기」(44px) · 손으로 넣은 나눔만 인쇄에서도 새 쪽 */
.rich-pgbreak { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--sub); font-size: .8125rem; line-height: 1.4; white-space: nowrap; }
.rich-pgbreak::before, .rich-pgbreak::after { content: ''; flex: 1 1 0; min-width: 0; border-top: 1px dashed var(--muted); }
.rich-pagebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.rich-pagecount { font-weight: 700; }
.rich-pagego { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.rich-pagego-lab { display: inline-flex; align-items: center; gap: 8px; }
.rich-pagego input { width: 4.5em; min-height: 44px; box-sizing: border-box; padding: 0 8px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--muted); border-radius: 8px; }
.rich-pagego .btn { min-height: 44px; font-size: .9375rem; }
.rich-pagego-say { color: var(--sub); font-size: .875rem; }
.rich-pagebar .rich-pagenote { flex: 1 1 100%; margin: 0; }
/* XPS·OXPS 쪽(10-13 ㉑) — 종이처럼 흰 바탕(어두운 화면에서도 · 원래 색 그대로 읽히게) · 글은 쪽 폭에 맞춘 크기(cqw)로 그 자리에 · 고를 수 있다 */
.xps-pnum { margin: 8px 0 8px; color: var(--sub); font-size: .875rem; }
.xps-page { position: relative; width: 100%; margin: 0 auto 8px; background: #fff; color: #000; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(0, 0, 0, .12); overflow: hidden; container-type: inline-size; }
.xps-page > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rich .xps-page > p.xps-g { position: absolute; margin: 0; padding: 0; white-space: pre; line-height: 1; color: #000; font-family: system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
@media print { .xps-page { box-shadow: none; break-inside: avoid; } }
/* 그림 문서(.odg · .vsdx · 10-29) — 도형 안 글을 도형 자리에(쪽 너비 기준 cqw 크기 · 고르기·찾기가 된다) */
.rich .xps-page > .draw-t { position: absolute; margin: 0; padding: 0 .4cqw; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: hidden; line-height: 1.15; color: #000; font-family: system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; overflow-wrap: anywhere; }
.rich .xps-page > .draw-t.top { justify-content: flex-start; text-align: start; }
.rich .xps-page > .draw-t > p { margin: 0; }
@media print { .rich-pagebar { display: none; } .rich-pgbreak[data-kind="hard"] { break-before: page; } .rich-pgbreak::before, .rich-pgbreak::after { border-color: #999; } }
/* 엑셀 칸 메모(10-11 · xlsx drawGrid) — 오른쪽 위 빨간 삼각 · 누르면(폰)·고르면(키보드) 칸 아래 메모 글 · 시트 아래 「이 시트 메모 N개」 */
.rich .rich-sheet tbody td.xl-note.xl-note { background-image: linear-gradient(225deg, #dc2626 0 6px, transparent 6px); background-repeat: no-repeat; background-position: top right; background-size: 10px 10px; cursor: pointer; }
/* 엑셀 조건부 서식 데이터 막대(10-13 ⑭) — 칸 바탕에 반투명 띠(값 비율만큼) · 메모 삼각과 같이 있으면 둘 다 */
.rich .rich-sheet tbody td.xl-bar { background-image: linear-gradient(to right, var(--xl-bar-c) var(--xl-bar), transparent var(--xl-bar)); background-repeat: no-repeat; }
.rich .rich-sheet tbody td.xl-bar.xl-note.xl-note { background-image: linear-gradient(225deg, #dc2626 0 6px, transparent 6px), linear-gradient(to right, var(--xl-bar-c) var(--xl-bar), transparent var(--xl-bar)); background-size: 10px 10px, 100% 100%; background-position: top right, 0 0; }
@media print { .rich .rich-sheet tbody td.xl-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.rich-sheet td.xl-note:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.xl-notes-host { position: relative; }
.xl-note-pop { position: absolute; z-index: 6; width: min(300px, calc(100% - 8px)); box-sizing: border-box; background: var(--card); color: var(--text); border: 1px solid var(--muted); border-radius: 8px; padding: 8px 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); overflow-wrap: anywhere; }
.xl-note-head { margin: 0 0 4px; } .xl-note-who { color: var(--sub); font-size: .875em; }
.xl-note-text { margin: 0 0 8px; white-space: pre-wrap; }
.xl-note-close { min-height: 44px; font-size: .9375rem; }
.xl-note-list { margin: 4px 0 16px; font-size: .9375rem; }
.xl-note-title { margin: 0 0 4px; font-weight: 700; }
.xl-note-list ul { list-style: none; padding: 0; margin: 0; }
.xl-note-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; overflow-wrap: anywhere; }
.xl-note-go { min-height: 44px; font-size: .9375rem; }
.xl-note-go:disabled { opacity: .5; cursor: default; }
.xl-note-li { flex: 1 1 160px; min-width: 0; white-space: pre-wrap; }
.split-mode { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 0 16px; } /* 나누기 방법·메모 글자 크기(10-17) — 누를 자리 44px */
.split-mode legend { width: 100%; padding: 0; }
.split-mode label { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.split-zip { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; margin: 4px 0; } /* 나누기 「한 파일(.zip)로」(10-17) */
.split-zip input { width: 22px; height: 22px; margin-top: 4px; flex: none; }
/* 수식(10-18 · 워드 OMML → MathML) — 수학 글꼴 · 따로 줄 수식은 가운데 · 폭이 넘치면 그 줄만 옆으로 */
/* 문서 글자 비율은 docfont.css 로(11-04) */
.rich-mathblock { text-align: center; margin: .6em 0; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
math.rich-math mtd { padding: .15em .5em; } /* 행렬 칸 사이(붙어서 「12」 로 읽혔다) */
/* 고대비 모드(forced-colors · 10-29) — 이 모드는 바탕색을 지우고 시스템 색으로 바꾼다. 바탕색으로만 모양을 낸 것(「파일 열기」·누르는 단추 ·
   알림·새 판 띠·대화상자·아이콘 단추)은 테두리가 없어 글자만 둥둥 떠 단추인지·어디까지가 띠인지 안 보였다(qa-1029-i ③ — 잰 값 테두리 0px) →
   그 모드에서만 시스템 테두리 색을 준다(평소 화면은 그대로) */
@media (forced-colors: active) {
  .btn, button.icon, button#zoomLabel:not(:disabled), button#pageLabel:not(:disabled) { border: 1px solid ButtonBorder; }
  .toast, .update-bar, .sum-bar, .read-bar, .to-top, dialog, dialog.sheet, #tocDialog, #attDialog, #expDialog, #contactDialog, #hitDialog, #langDialog, #qrDialog, #scanHistDialog, #qrMakeDialog, #ocrTextDialog { border: 1px solid CanvasText; } /* 대화상자는 .sheet·#…Dialog 의 border: 0 을 이겨야 한다 */
  .bar, .search { border-bottom: 1px solid CanvasText; }
  .tools { border-top: 1px solid CanvasText; }
  .toast button { border-color: ButtonBorder; }
}
/* 도구줄이 모자랄 때(10-29 · 글자 크기 최대) — view.js fitTools 가 쪽 번호·배율 글이 잘리는 것을 재서 붙인다. 쪽 번호를 윗줄 한 줄로(300px 규칙과 같은 모양) ·
   떠 있는 띠는 두 줄이 된 도구줄 높이(--tools-h) 위로 */
.tools.tight { flex-wrap: wrap; row-gap: 0; }
.tools.tight .grow { display: none; }
.tools.tight button#pageLabel { order: -1; flex: 1 0 100%; }
button#pageLabel { min-width: 44px; } /* 쪽 번호 단추 — 「1 / 2」 처럼 짧으면 39px 로 누르는 자리가 모자랐다(qa-1029-i ②) · 잘림은 위 tight 가 맡는다 */
body.tools-tight:not(.bars-hidden) .read-bar, body.tools-tight:not(.bars-hidden) .sum-bar { bottom: calc(var(--tools-h, 56px) + 8px); }
body.tools-tight:not(.bars-hidden)[data-reading] #autoBar, body.tools-tight:not(.bars-hidden)[data-reading] #richSelBar { bottom: calc(var(--tools-h, 56px) + 76px); }
body.tools-tight:not(.bars-hidden) .toast { bottom: calc(var(--tools-h, 56px) + 12px); }
body.tools-tight:not(.bars-hidden) .to-top { bottom: calc(var(--tools-h, 56px) + 16px); }
body.tools-tight:not(.bars-hidden) .update-bar { bottom: calc(var(--tools-h, 56px) + 64px); }
/* 글자판이 떠 있는 동안(10-29 · view.js kbCheck) — 줄어든 화면 맨 아래에 남은 띠가 쓰고 있는 칸을 가리지 않게 숨긴다. 글자판을 닫으면 그대로 돌아온다 */
body.kb-open .tools, body.kb-open .toast, body.kb-open .sum-bar, body.kb-open .read-bar, body.kb-open .to-top, body.kb-open .update-bar { display: none !important; }
/* 자막(10-30 y · subs.js) — 줄마다 「시각 · 대사」 · 좁은 화면에선 시각 아래로 대사가 내려간다 */
.rich ol.subs { list-style: none; padding: 0; margin: 0; }
.rich ol.subs > li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.subs-time { color: var(--sub); font-variant-numeric: tabular-nums; font-size: .875em; white-space: nowrap; flex: 0 0 auto; }
.rich .subs-text { flex: 1 1 14em; min-width: 0; margin: 0; white-space: pre-line; }
.subs-lang select { min-height: 48px; max-width: 100%; }
/* 주피터 노트북(10-30 y · notebook.js) — 칸마다 선으로 나누고, 입력·출력 이름은 작게 · 코드·출력은 고정폭(.rich-pre) */
.nb-cell { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rich .nb-label { color: var(--muted); font-size: .8125em; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.rich .nb-code { margin: 4px 0 8px; padding: 8px; border-radius: 8px; background: var(--bg); }
.rich .nb-err, .rich .nb-err-label { color: #b91c1c; }
@media (prefers-color-scheme: dark) { .rich .nb-err, .rich .nb-err-label { color: #fca5a5; } }
.nb-img { max-width: 100%; height: auto; display: block; margin: 4px 0; }
.rich .mobi-author { color: var(--sub); font-weight: 600; } /* 전자책 MOBI 저자(10-30 y) */
/* 캐드 도면 속 글(10-30 w · dxf.js) — 그림 안 글은 고를 수 없어 아래에 모아 찾기·복사가 되게 */
.dxf-texts { margin: 12px auto; padding: 0 4px; color: var(--text); overflow-wrap: anywhere; }
.dxf-texts summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.dxf-texts p { margin: 4px 0; white-space: pre-wrap; }
/* 개인정보 찾아 가리기(AC-P01 · 10-31) — 찾은 것마다 한 줄 고르기(누를 자리 44px) · 왼쪽 맞춤 */
.pii-list { display: grid; gap: 4px; margin: 8px 0 0; text-align: left; }
.pii-list p { margin: 0 0 4px; line-height: 1.6; }
.pii-list .toggle-row { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.pii-list .toggle-row input { width: 22px; height: 22px; flex: none; }
.pii-list .btn { min-height: 44px; justify-self: start; }
/* 11-06 사장님 🙋1 「예」(보드 #1375) — 찾은 것은 기본으로 모두 고른 채 · 개수와 「빼기」 를 더 크게(빼려는 것만 누르면 된다) */
.pii-list .pii-count { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin: 0; }
.pii-list .pii-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 4px 0; }
.pii-list .pii-row .toggle-row { flex: 1 1 auto; min-width: 0; min-height: 48px; }
.pii-list .pii-row .toggle-row span { overflow-wrap: anywhere; }
.pii-list .pii-row .btn { min-height: 48px; min-width: 88px; justify-content: center; font-size: 1rem; }
.pii-list .pii-row.off .toggle-row span { color: var(--sub); text-decoration: line-through; }
/* 가린 결과 → 보내기 준비(11-06 · 회의 261106 D-36 · 시안 R-06 (나) 두 화면) — 폰은 화면 전체 · 넓은 화면은 가운데 480px · 누를 자리 48px · 글자 15px 이상 */
.red-res { margin: 0 auto; border: 0; padding: 0; width: 100%; max-width: 480px; height: 100%; max-height: 100%; background: var(--card); color: var(--text); display: none; flex-direction: column; font-size: .9375rem; }
.red-res[open] { display: flex; }
.red-res::backdrop { background: rgba(0, 0, 0, .45); }
.red-res-top { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 4px; border-bottom: 1px solid var(--line); flex: none; }
.red-res-top h2 { font-size: 1.0625rem; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.red-res-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; }
.red-trust { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--sub); }
.red-trust > svg { flex: none; }
.red-trust-full { display: none; }
.red-trust-short { flex: 1; min-width: 0; }
.red-trust-short summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-height: 48px; cursor: pointer; list-style: none; }
.red-trust-short summary::-webkit-details-marker { display: none; }
.red-trust-short summary b { font-weight: 700; color: var(--text); }
.red-trust-short summary u { margin-left: auto; color: var(--link-text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.red-trust-short p { padding: 0 0 12px; color: var(--text); }
@media (min-width: 560px) { .red-trust-full { display: block; } .red-trust-short { display: none; } }
.red-head { display: flex; gap: 12px; align-items: flex-start; }
.red-pic { width: 48px; height: 48px; border-radius: 12px; background: var(--bg); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.red-pic.red-no { color: var(--danger-text); }
.red-big { font-size: 1.75rem; line-height: 1.3; font-weight: 700; }
.red-sub, .red-file, .red-note, .red-hint { color: var(--sub); }
.red-file, .red-note { margin: 12px 0 0; overflow-wrap: anywhere; }
.red-file b { color: var(--text); }
.red-sec { margin: 24px 0 0; }
.red-sec h3 { font-size: 1.0625rem; margin: 0 0 4px; }
.red-hint { margin: 0 0 8px; }
.red-list, .red-cond { list-style: none; border-top: 1px solid var(--line); }
.red-list li, .red-cond li { border-bottom: 1px solid var(--line); }
/* 가린 곳 줄 — 줄 전체가 스위치(56px) · 상태는 글자로도(「가림」·「안 가림」 — 색만으로 안 말한다) */
.red-sw { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.red-sw .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.red-sw .what small { display: block; color: var(--sub); font-size: .9375rem; }
.red-sw .st { font-weight: 700; color: var(--sub); white-space: nowrap; }
.red-sw .knob { width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; flex: none; border: 2px solid var(--muted); }
.red-sw .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 12px; background: var(--card); border: 2px solid var(--muted); box-sizing: border-box; }
.red-sw[aria-checked="true"] .knob { background: var(--accent); border-color: var(--accent); }
.red-sw[aria-checked="true"] .knob::after { left: 22px; border-color: var(--accent); }
.red-sw[aria-checked="true"] .st { color: var(--text); }
.red-mini { padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 16px; align-items: center; }
.red-mini p { color: var(--sub); overflow-wrap: anywhere; }
.red-mini p b { display: block; color: var(--text); }
.red-summary { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin: 0 0 8px; }
.red-given { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--sub); margin: 0 0 8px; }
.red-cond-form { display: grid; gap: 8px; margin: 0 0 12px; }
.red-field { display: grid; gap: 4px; }
.red-field input { min-height: 48px; font: inherit; font-size: 1rem; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); min-width: 0; }
.red-check { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.red-check input { width: 22px; height: 22px; flex: none; }
.red-cond li { display: flex; gap: 12px; padding: 12px 0; }
.red-cond li > svg { flex: none; }
.red-cond .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.red-cond .k { color: var(--sub); }
.red-cond .say { display: block; font-weight: 700; }
.red-cond .note { display: block; color: var(--sub); }
.red-cond .ok { color: var(--accent-text); } .red-cond .chk { color: var(--warn-ink); } .red-cond .no { color: var(--danger-text); }
.red-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 16px; }
.red-state h3 { font-size: 1.25rem; }
.red-prog { width: 100%; max-width: 280px; height: 8px; }
.red-act { flex: none; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); }
.red-row { display: flex; gap: 8px; }
.red-row .btn { flex: 1 1 0; min-width: 0; justify-content: center; }
.red-row .btn.plain { flex: 0 0 auto; }
.red-wide { width: 100%; min-height: 56px; font-size: 1.0625rem; justify-content: center; }
/* 상태 — 그 상태 이름이 없는 data-s 는 숨긴다 */
.red-res[data-state="result"] [data-s]:not([data-s~="result"]), .red-res[data-state="ready"] [data-s]:not([data-s~="ready"]),
.red-res[data-state="empty"] [data-s]:not([data-s~="empty"]), .red-res[data-state="wait"] [data-s]:not([data-s~="wait"]),
.red-res[data-state="error"] [data-s]:not([data-s~="error"]) { display: none !important; }
@media print { .red-res { display: none !important; } }
/* 숨은 정보 지운 사본(AC-P02 · 10-31) — 문서 정보 칸 바로 아래 · 누를 자리 44px */
#expMetaClean { min-height: 44px; margin: 0 4px 8px; }
#expMetaClean[hidden] { display: none; }
/* 전자서명 띠(AC-P05 · 10-31) — 서명 뒤 고침이 있으면 경고 색(글자만 · 밝은·어두운 화면 둘 다 읽히는 경고 색) */
.sig-bar p { margin: 0 0 4px; line-height: 1.6; }
.sig-bar .sig-warn { color: var(--warn-ink); font-weight: 700; }
/* 펼친 책 두 쪽 나누기(CS-05 · 10-31) — 사진은 창 폭 안 · 막대는 누르기 쉽게 */
.book-canvas { display: block; max-width: 100%; height: auto; max-height: 55vh; width: auto; margin: 8px 0; border-radius: 8px; touch-action: pan-y; cursor: ew-resize; } /* 11-03 — 가로 화면에서도 막대·단추가 창 안에 남게 높이 상한 · 옆으로 끌면 선이 옮겨진다 */
.book-range { width: 100%; min-height: 44px; }
/* 창 본문 굴리기(11-03 · 명세 CS-05 · 앱 점수표 결함 2) — 그림이 높아도 막대·차례·단추까지 굴려 닿는다 */
#bookDialog { overflow-y: auto; overscroll-behavior: contain; }
#bookDialog .goto-actions .btn { min-height: 44px; }
/* 신분증 차례 · A4 위 미리보기(11-03 · 명세 CS-01 68~75줄) — 쪽은 A4 비율 흰 종이 · 카드 자리는 view.js 가 % 로(PDF 와 같은 셈) */
.photo-id { margin: 12px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.photo-id h3 { margin-top: 0; }
.photo-id-ask { font-weight: 600; }
.photo-id-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-id-btns .btn, #photoIdAddBack { min-height: 44px; flex: 1 1 140px; }
.photo-id-page { position: relative; width: min(72%, 260px); aspect-ratio: 595.28 / 841.89; margin: 8px auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.photo-id-card { position: absolute; display: block; object-fit: fill; background: #e5e7eb; }
/* 용량 줄이기 진행 창·결과 창(11-03 · 앱 6231d40 과 같게) — 띠는 창 너비 · 큰 줄 하나 · 단추 줄바꿈(375px 넘침 없게) · 단추 48px(.btn) */
.shrink-prog { width: 100%; height: 12px; margin: 12px 0 4px; accent-color: var(--accent); }
.shrink-res p { margin: 8px 0 0; overflow-wrap: anywhere; }
.shrink-res .shrink-big { font-size: 1.25rem; font-weight: 700; margin-top: 0; }
.shrink-res-actions { flex-wrap: wrap; }

/* ─── 글 바로잡기(11-06 · 회의 261104_원본글고치기 시안 A · fixui.js) — 온 화면 창 · 줄 고르기 · 입력 시트 · 견주기 ─── */
.fix-new { border-color: var(--accent); }
.fix-tag { display: inline-block; margin-left: 4px; padding: 0 8px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent-text); font-size: .8125rem; font-weight: 700; vertical-align: middle; }
.fix-sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); box-sizing: border-box; background: var(--card); color: var(--text); overflow-y: auto; }
.fix-sheet[open] { display: flex; flex-direction: column; gap: 8px; }
.fix-top { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.fix-top h2 { flex: 1; min-width: 0; font-size: 1.0625rem; margin: 0; overflow-wrap: anywhere; }
.fix-back { min-height: 44px; flex: none; }
.fix-sub { margin: 0; }
.fix-pages { display: grid; gap: 12px; }
.fix-page { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.fix-page-no { margin: 0 0 4px; font-size: .8125rem; color: var(--sub); font-weight: 700; }
.fix-ln { display: block; width: 100%; min-height: 44px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .9375rem; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.fix-ln.no { color: var(--muted); background: var(--line); border-style: solid; }
.fix-ln.done { border: 2px solid var(--accent); }
.fix-ln.done::after { content: " · 고침"; color: var(--accent-text); font-weight: 700; font-size: .8125rem; }
:lang(en) .fix-ln.done::after { content: " · fixed"; }
.fix-ln.on { border: 2px solid var(--accent); }
.fix-ln:focus-visible, .fix-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fix-state { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); color: var(--text); font-size: .9375rem; }
.fix-state-ic { flex: none; width: 24px; height: 24px; color: var(--sub); }
.fix-state-ic svg { width: 24px; height: 24px; }
.fix-state-tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fix-state .btn { min-height: 44px; flex: none; }
.fix-input { position: sticky; bottom: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--card); box-shadow: 0 -4px 16px rgba(0, 0, 0, .16); }
.fix-input-top { position: static; border-radius: 16px; }
.fix-fld { display: block; font-size: .8125rem; color: var(--sub); margin-bottom: 4px; }
.fix-in { display: block; width: 100%; min-height: 48px; box-sizing: border-box; padding: 8px 12px; border: 2px solid var(--accent); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 1.0625rem; }
.fix-say { margin: 8px 0; font-size: .9375rem; color: var(--sub); }
.fix-say b { color: var(--text); }
.fix-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; }
.fix-row .btn { min-height: 48px; }
.fix-row .btn:not(.plain) { flex: 1; }
.fix-row .btn[disabled] { opacity: .45; }
.fix-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.fix-actions .btn { min-height: 44px; }
.fix-cmp { display: grid; gap: 4px; }
.fix-big-label { margin: 12px 0 4px; font-size: .8125rem; font-weight: 700; color: var(--sub); }
.fix-zoom { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; overflow-x: auto; }
.fix-zoom.after { border: 2px solid var(--accent); }
.fix-zoom-text { color: #14171f; font-size: 1.75rem; line-height: 1.35; overflow-wrap: anywhere; }
.fix-crop { display: block; max-width: 100%; height: auto; }
.fix-measure { margin: 8px 0; padding: 0; list-style: none; }
.fix-measure li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.fix-what { display: block; font-size: .8125rem; color: var(--sub); }
.fix-warn { margin: 8px 0; padding: 12px; border-radius: 12px; border: 1px solid var(--note-line, #d97706); font-size: .9375rem; }
.fix-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; font-size: .9375rem; cursor: pointer; }
.fix-check input { flex: none; width: 24px; height: 24px; margin: 0; }
/* 언어 바꾸기 단추(11-07 · §2-UI UI9 · 약식 회의 261107_약식_언어단추) — 앱 안에선 숨김(앱은 ENGLISH_READY 전 · 반쪽 영어 화면 막기 §2-DUAL)
   문서를 연 좁은 폰(430px 이하)에선 막대에서 빼고 더보기 줄로 — 「파일 열기」 가 둘째 줄로 밀려 qa-1012 ⑧ 이 깨진다(로고 그림 숨김과 같은 까닭) */
.in-app #btnLang, .in-app #moreLang { display: none; }
@media (max-width: 430px) { body:not(.has-tabs) .bar:has(.name:not(:empty)) #btnLang { display: none; } } /* 11-12 QA 게이트 Q21 — 뒤로가기로 첫 화면에 와도 언어 단추가 숨은 채였다 · 문서 화면에서만 */
#langDialog .lang-pick { margin: 0; }
/* 문서를 연 동안 폰 크롬의 「당겨서 새로고침」 을 막는다 — 한 번 당기면 보던 문서·가린 곳·넣은 글이 사라졌다(11-07 7 자체검사 UX · 최근 기억은 기본 꺼짐이라 되살릴 길도 없다) · 첫 화면은 그대로 */
html:has(> body.doc-open), body.doc-open { overscroll-behavior-y: contain; } /* 화면 굴림이 html 에서 일어나는 브라우저도 */

/* PDF 제자리 고치기(fixinplace-pdf.js · 베타 · 꺼짐) — 스크립트 안 <style> 은 CSP 가 막아 여기로(11-12) · 덮는 글 상자는 종이(늘 흰색) 위라 흰 바탕·검은 글 그대로 */
.ipdf-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ipdf-mark { position: absolute; border-bottom: 2px dotted var(--accent); pointer-events: none; box-sizing: border-box; }
.ipdf-hit { position: absolute; transform: translateY(-50%); min-width: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: text; pointer-events: auto; }
.ipdf-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.ipdf-mark.ipdf-done { border: 2px dashed var(--accent); background: #fff; color: #111; overflow: hidden; white-space: nowrap; line-height: 1; display: flex; align-items: center; }
.ipdf-mark.ipdf-bad { border-style: solid; border-color: #b91c1c; }
.ipdf-input { position: absolute; z-index: 6; min-height: 44px; box-sizing: border-box; padding: 0 4px; border: 2px solid var(--accent); border-radius: 4px; background: #fff; color: #111; pointer-events: auto; transform: translateY(-50%); }

/* 11-16 회의 261116_리디자인시안 D3 — 문서 화면 머리는 뒤로·이름·찾기 · 「파일 열기」 없음(다른 파일은 뒤로(첫 화면)·최근에서 연다)
   머리 「클린뷰어」 는 문서 화면에서 이미 첫 화면으로 가는 단추(syncBrand · aria-label 「클린뷰어 — 첫 화면으로」) → 「←」 모양만 보이게 · 앱 안(.in-app)은 앱 머리가 따로 */
.brand-back { display: none; width: 24px; height: 24px; flex: none; }
body.doc-open:not(.in-app) #btnOpen { display: none; }
body.doc-open:not(.in-app) .bar .brand { min-width: 44px; min-height: 44px; justify-content: center; padding-left: 4px; padding-right: 4px; }
body.doc-open:not(.in-app) .bar .brand .brand-back { display: block; }
body.doc-open:not(.in-app) .bar .brand .brand-mark, body.doc-open:not(.in-app) .bar .brand .brand-word { display: none; }

/* 11-17 회의 261116_리디자인시안 D4(스위치 ?d4=1 · view.js d4On) — 폰(손가락) 아래 줄 = 저장·고치기·어둡게·소리·더보기
   칸 높이 56 + 안전영역 · 그림 위 · 이름 13px 한 줄 · 확대·작게·쪽·인쇄·보내기는 「더보기」 창 · 마우스 화면은 −·+·쪽 그대로 · 폭 320 미만이면 세 칸(저장·고치기·더보기) */
.tools-more-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tools-more-list .btn { min-height: 48px; justify-content: flex-start; }
@media (pointer: coarse) {
  body.d4 .tools { justify-content: space-around; gap: 0; flex-wrap: wrap; }
  body.d4 .tools :is(#zoomOut, #zoomLabel, #zoomIn, #btnPrint, #btnShare), body.d4 .tools .grow { display: none !important; }
  /* 11-19 쪽 번호는 아래 줄 → 머리 둘째 줄 칩(D3 · 회의 261119_약식_문서통째교체) — view.js 가 #docName 과 #pageLabel 을 .doc-line 하나로 묶는다
     줄 = 파일 이름(남는 폭 · 말줄임) + 쪽 칩(둥근 판 · 누르는 자리 44 · 누르면 쪽 이동) · 쪽 수 없는 문서는 칩 숨김 · 첫 화면(탭)에선 줄째 숨김 */
  /* 11-20 시안 A-Clear 03 상세(묶음 시안A통째) — 머리 한 줄 = 뒤로 · [굵은 이름 / 「한글 문서 · 214KB」] · 찾기 · (목차·메모 등) · 쪽 칩은 오른쪽 아래 떠 있는 알약(#pageFloat) */
  body.d4 .bar .doc-line { order: 0; flex: 1 1 0; display: flex; align-items: center; min-width: 0; padding: 4px 4px; }
  body.d4 .bar .doc-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
  body.d4 .bar .doc-title .name { order: 0; flex: none; min-width: 0; padding: 0; font-size: .9375rem; font-weight: 800; line-height: 1.3; color: var(--ac-text); }
  body.d4 .bar .doc-title .doc-meta { font-size: .8125rem; line-height: 1.3; }
  body.d4.doc-open .bar > .grow { flex: 0 0 0; }
  body.has-tabs .bar .doc-line { display: none !important; }
  /* 11-19 min-width 0 → 44px — 쪽 번호 줄(flex 1 0 100%)과 함께 두니 칸 기본 폭 0 이 「같은 줄에 들어감」 으로 계산돼 다섯 칸이 오른쪽 끝에 폭 0 으로 겹쳤다(웹 시험 44512711110 사진 · innerWidth 380 · 눈 점수 44508111773 22px 넘침) · 44px 이면 다음 줄로 내려간다(누르는 크기 기준과 같음) */
  body.d4 .tools button.icon.named:not([hidden]) { flex: 1 1 0; width: auto; min-width: 44px; min-height: 56px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 0; }
  /* 11-19 글자 200% 에서 이름이 칸 밖으로 넘쳐 「손보기저장하기어둡게」 로 겹쳤다(웹 시험 44527295385 ④ · 사진 q1117-d4-font200-360) → 앱 BottomBarD4(글자 배율 1.3 에서 멈춤)와 같게 16px 에서 멈추고, 그래도 넘치면 말줄임 */
  body.d4 .tools .tool-name { display: block; font-size: min(.8125rem, 16px); line-height: 1.2; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* 폭 320 미만이면 세 칸(저장·고치기·더보기) — 11-20 「(pointer: coarse) and (max-width…)」 따로 판정을 이 묶음 안으로(손가락 판정 글 한 꼴 · qa-1108-qa · 장부 1120nd-1 · 같은 차례·같은 결과) */
  @media (max-width: 319px) { body.d4 .tools :is(#btnDark, #btnRead) { display: none !important; } }
}
/* 11-21 장부 1120ng-1(qa-1029-i ② · 웹 시험 44790579640 toolsH 149) — 마우스 화면 320~359 에서 다섯 칸 + −·+·쪽 번호가 한 줄에 안 들어가
   쪽 번호가 한 줄을 통째로 차지하고(tight) 단추가 두 줄로 밀려 도구줄이 세 줄이 됐다 → 이 폭에선 −·+ 를 「더보기」(크게·작게 보기)로만 · 손가락 화면과 같은 길 */
/* 11-22 qa-1108-qa — 손가락 판정은 「손가락 조건」 과 그 반대 꼴만(touch.js TOUCH_Q 한 곳) → 폭 조건은 안쪽 묶음으로
   11-22 qa-1029-i ②(web-pc 44944322687) — 359px 까지만 덮어 360·412 에서 도구줄이 여전히 세 줄(toolsH 149 · 쪽 번호가 한 줄 통째)
   −·배율·+ 와 단추 여섯이 447px + 간격이라 499px 까지 넘친다 → 그 폭까지 −·+ 를 「더보기」 로 */
@media not (pointer: coarse) {
  @media (max-width: 499px) {
    body.d4 .tools :is(#zoomOut, #zoomLabel, #zoomIn) { display: none !important; }
  }
}

/* ── 11-20 시안 A-Clear 통째(묶음 시안A통째 · 사장님 11-19 23:46 「다시는 부분적으로 반영되게 하지 말고 통으로 교체」) — 보기 화면에만 있는 자리 ──
   값은 aclear.css 의 --ac-* 변수만(새 색 없음) · 홈(01)은 위 #tabHome 규칙 · 여기는 아래 탭 · 문서함/스캔/도구/내 정보 바탕 · 상세(03) 머리·찾기 줄·종이·아래 도구·쪽 알약 */
/* 아래 탭 — 흰 막대 + 고른 탭은 옅은 파랑 알약(아이콘 뒤) + 파랑 굵은 글자(색만으로 말하지 않게 굵기도) · 칸 높이 64 · 글자 13 */
.ac-tabbar { background: var(--ac-card); border-top-color: var(--ac-line); }
.ac-tabbar .tab { min-height: 64px; color: var(--ac-sub); }
.ac-tabbar .tab span { font-weight: 600; }
.ac-tabbar .tab svg { padding: 4px 20px; }
.ac-tabbar .tab[aria-current="page"] { color: var(--ac-brand); font-weight: 800; }
.ac-tabbar .tab[aria-current="page"] span { font-weight: 800; }
.ac-tabbar .tab[aria-current="page"] svg { background: var(--ac-tint); }
.ac-tabbar .tab:focus-visible { outline: 3px solid var(--ac-brand); outline-offset: -4px; }
@media (min-width: 1024px) { .ac-tabbar { border-right-color: var(--ac-line); } .ac-tabbar .tab svg { padding: 4px 16px; } }
/* 문서함·스캔·도구·내 정보 칸 — 홈과 같은 시안 바탕 · 머리 막대 선 없음 · 좌우 20 */
body:has(#welcome:not([hidden]) > .tab-panel.ac-page:not([hidden])) { --bg: var(--ac-canvas); --bar: var(--ac-canvas); }
body:has(#welcome:not([hidden]) > .tab-panel.ac-page:not([hidden])) .bar { border-bottom-color: transparent; }
.welcome:has(> .tab-panel.ac-page:not([hidden])) { padding: 8px 20px 32px; }
.ac-page .recent { margin: 0; padding: 0; border: 0; background: none; }
.ac-page .tool-group { margin: 16px 0 8px; font-size: .9375rem; font-weight: 800; color: var(--ac-sub); }
.ac-page .tool-list.ac-card { margin: 0 0 16px; padding: 4px 16px; gap: 0; }
.ac-page .tool-list.ac-card > li + li { border-top: 1px solid var(--ac-line); }
.ac-page .tool-list.ac-card .exp-item { flex-direction: column; align-items: flex-start; border: 0; border-radius: 0; background: none; padding: 12px 0; }
.ac-page .tool-list.ac-card .exp-name { font-size: .9375rem; font-weight: 700; color: var(--ac-text); }
.ac-page .tool-list.ac-card .exp-desc { font-size: .8125rem; color: var(--ac-sub); }
#tabMore .tool-list.ac-card .exp-item { flex-direction: row; align-items: center; }
@media (min-width: 1024px) { .ac-fab { bottom: 24px; right: 24px; } }
/* 상세(03) — 옅은 회색 바탕 위 흰 종이(그림자 · 둥글기) · 머리·아래 도구는 흰 띠 · 찾기 줄은 둥근 칸 + 「1 / 2」 + 위·아래 + 닫기 */
body.doc-open { --bg: var(--ac-canvas); }
body.doc-open .bar, body.doc-open .search, body.doc-open .tools { background: var(--ac-card); border-color: var(--ac-line); }
.doc-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--ac-sub); }
body:not(.doc-open) .doc-meta { display: none; }
body.doc-open .search { gap: 4px; padding: 8px 12px; }
body.doc-open .search input { min-height: 44px; padding: 0 16px; border-color: var(--ac-line); border-radius: 999px; background: var(--ac-canvas); color: var(--ac-text); }
body.doc-open .search .count { font-weight: 700; color: var(--ac-text); }
/* 11-20 종이 위 여백 16 은 뺐다 — 문서가 16px 아래로 밀려 첫 화면 끝의 그림이 늦게 불러졌다(웹 시험 qa-1028-c ⑪ · 옛 판 사진 44571362263 과 견줌) · 위 여백은 옛 .doc 8 그대로 */
body.doc-open #doc > .page { margin-bottom: 16px; border-radius: 4px; box-shadow: var(--ac-paper-shadow), 0 0 0 1px var(--ac-line); }
body.doc-open .tools .tool-name { color: var(--ac-sub); font-weight: 600; }
body.doc-open .tools button.icon.named { color: var(--ac-text); }
/* 쪽 알약 — 오른쪽 아래 떠 있음(시안 「3 / 8」) · 누르는 자리 44 · 누르면 쪽 이동 그대로 · 쪽 수 없는 문서는 숨김(이름 아래 형식 줄이 종류를 말한다) */
/*   자리: 아래 다섯 칸 바로 위(「맨 위로」 #btnTop 과 같은 높이 72) · 「맨 위로」 가 떠 있으면 그 위로 한 칸(56) 올려 겹치지 않게 · 도구줄이 두 줄이면 그 높이를 따른다 */
.page-float { position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 26; pointer-events: none; }
body:has(#btnTop:not([hidden])) .page-float { bottom: calc(128px + env(safe-area-inset-bottom)); }
body.tools-tight .page-float { bottom: calc(var(--tools-h, 56px) + 16px); }
body.tools-tight:has(#btnTop:not([hidden])) .page-float { bottom: calc(var(--tools-h, 56px) + 72px); }
body:not(.doc-open) .page-float, body.bars-hidden .page-float { display: none; }
.page-float #pageLabel { pointer-events: auto; min-width: 44px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ac-pill-bg); color: var(--ac-pill-fg);
  font: inherit; font-size: .8125rem; font-weight: 700; white-space: nowrap; box-shadow: var(--ac-shadow); cursor: pointer; }
.page-float #pageLabel:disabled { display: none; }
/* 11-20 위 button#pageLabel:not(:disabled)(글 색 --text · 점선 밑줄)가 더 세서 짙은 알약 위 글자가 짙게 묻혔다(웹 시험 사진 q1117-d4-360) — 같은 세기로 알약 글 색을 다시 */
.page-float button#pageLabel:not(:disabled) { color: var(--ac-pill-fg); text-decoration: none; }
.page-float #pageLabel:focus-visible { outline: 3px solid var(--ac-brand); outline-offset: 2px; }
@media print { .page-float, .ac-fab { display: none !important; } }
body.kb-open .ac-fab, body.kb-open .page-float { display: none; } /* 글자판이 뜨면 아래 탭처럼 비킨다(§2-KB) */
/* 마우스 화면인데 폭이 좁으면(600 이하) 이름이 둘째 줄로 내려간다(위 .bar .name 규칙) — 「형식 · 크기」 줄은 그 좁은 막대에선 뺀다
   11-20 셋째 줄로 내렸더니 머리가 한 줄 더 높아져(웹 시험 44562910609 사진 q1028c-11-doc) 문서 첫 그림이 화면 밖으로 밀려 늦게 불러오기 시험(qa-1028-c ⑪⑮)·점 색 시험(qa-1029-n·o)이 깨졌다
   손가락 화면(폰)은 위 body.d4 .doc-title 안에서 이름 아래 한 줄로 그대로 보인다 — 여기는 마우스로 쓰는 좁은 창만 */
@media (max-width: 600px) { .bar > .name:not(:empty) ~ .doc-meta { display: none; } }
/* 11-23 QS1 최근 3줄 · QS8 스캔 기록(문서함 @1219) — 칩은 문서함 칩과 같은 꼴 · 줄 높이 44 이상 · 색은 변수만 */
.scan-recent { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
/* 11-30 QR 여백·밀도 7/10(사전 46032568367 「묶음 사이 > 카드 사이 > 카드 안」) — 사진 열어 잼: 고르기 → 찍기 단추 → 최근 스캔 → 만들기 → 안내 사이가 12~16 으로 같아 묶음이 안 갈림.
   QR 타일일 때만 묶음 사이 24 · 같은 묶음(최근 스캔·만들기) 사이 12 · 카드 안 8 그대로 — 문서 찍기 화면은 안 바꿈 */
#tabCapture.cap-qr .capture-list { margin-bottom: 24px; }
#tabCapture.cap-qr .scan-recent { margin-top: 24px; }
@media (max-width: 1023px) { #tabCapture.cap-qr > .cap-side { margin-top: 24px; } }
.scan-recent-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; } /* 11-27 감쌈 — 글자 200% 에서 「최근 스캔」 이 한 글자씩 세로로 끊겼다(사전 45894954623) */
.scan-recent-head h3 { margin: 0; font-size: 1.0625rem; color: var(--text); word-break: keep-all; }
.scan-recent-head .btn-mini { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); /* R-1127-92 --line 은 바탕과 약 1.2:1 이라 단추 테두리가 안 보였다(3:1 아래) */ border-radius: 8px; background: transparent; color: var(--link-text); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap; } /* 11-27 — 꾸밈이 없어 회색 기본 단추로 보였다(사진 45894022182) · 다른 btn-mini 와 같은 테두리 꼴 */
/* 11-24 QS1-03 빈 상태 카드 한 줄 · QS1-01 제목 강조 낱말(「QR·바코드」 를 글자용 대표색으로) */
.scan-recent-empty { margin: 8px 0 4px; color: var(--sub); }
.scan-recent-empty[hidden] { display: none; }
/* 11-27 빈 상태도 상태 틀 꼴(그림 + 한 줄 · 가운데) — 사전 채점 45900953538 「빈·오류가 같은 틀」 · 단추는 머리 줄 「기록 모두 보기」 하나 */
.scan-recent-empty { text-align: center; }
/* 12-01 빈 카드가 세로로 커서(그림 32 + 가운데 줄 · 사진 46454190156 360 에서 약 120px) 첫 화면 무게가 기록 0건 칸에 쏠렸다 — 같은 틀(그림 + 한 줄 + 머리 단추 1)을 가로 한 줄로 */
.scan-recent-empty { display: flex; align-items: center; gap: 8px; text-align: left; margin: 8px 0 0; }
.scan-recent .scan-recent-empty::before { flex: none; width: 24px; height: 24px; margin: 0; }
.scan-recent-empty::before { content: ""; display: block; width: 32px; height: 32px; margin: 4px auto 8px; background: var(--sub); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Cpath d='M14 14h2v2h-2zM18 18h2v2h-2zM14 18h2M18 14h2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Cpath d='M14 14h2v2h-2zM18 18h2v2h-2zM14 18h2M18 14h2'/%3E%3C/svg%3E") center / contain no-repeat; }
/* 11-27 QS2 웹 — PC 끌어 놓기·Ctrl+V 안내 상자(점선 테두리 · 채운 단추가 아니다 · 화면당 채운 단추 1 그대로) */
.qr-drop { margin: 12px 0 0; padding: 12px 16px; border: 1px dashed var(--line-strong); /* 11-27 --line 은 바탕과 1.1~1.5:1 이라 점선 상자가 안 보였다 */ border-radius: 12px; color: var(--sub); text-align: center; }
.qr-drop[hidden] { display: none; }
body.dragging .qr-drop:not([hidden]) { border-color: var(--accent); color: var(--text); }
/* 11-28 시안 QS1-02(문서함 @1256 「PC 는 오른쪽 상자」 · ⑥ 「PC는 오른쪽 할 수 있는 것 카드」) — 눈 점수 사진 46030102346 1280 에서 한 줄로 쌓여 오른쪽이 비었다
   폰·좁은 창은 꾸밈 없이 예전 자리(맨 아래) · 마우스 넓은 창 + QR 타일만 두 칸(왼쪽 고르기·단추·기록 / 오른쪽 카드) · :not([hidden]) — display 가 hidden 을 이기지 않게 */
.cap-side[hidden] { display: none; }
.cap-side-title { display: none; }
@media (min-width: 1024px) {
  .welcome:has(> #tabCapture.cap-qr:not([hidden])) { max-width: 960px; }
  /* 격자로 했더니 카드 높이가 왼쪽 줄 높이를 늘려 단추와 「최근 스캔」 사이가 16→32 로 벌어졌다(사진 46031876464) — 카드는 줄 계산 밖(절대 자리) · 윗변은 타일 첫 줄과 같게 */
  #tabCapture.cap-qr:not([hidden]) { position: relative; padding-right: 324px; }
  #tabCapture.cap-qr > .cap-side { position: absolute; top: 64px; right: 0; width: 300px; box-sizing: border-box; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); }
  .cap-qr .cap-side-title { display: block; margin: 0 0 12px; font-size: 1.0625rem; color: var(--text); word-break: keep-all; }
  .cap-qr .cap-side .qr-drop { margin: 0 0 16px; text-align: left; word-break: keep-all; }
  .cap-qr .cap-side #capTipsQr { margin-top: 0; }
}
.ac-title .ac-accent { color: var(--link-text); } /* 11-27 눈 점수 사진 45894022182 — 전엔 --accent-text(파랑 단추 위 글자색 = 밝은 흰·어두운 남색)라 「QR·바코드」 가 바탕에 묻혀 안 보였다 · 링크 글자색은 두 바탕 모두 4.5:1 넘음 */
.scan-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.scan-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.scan-row:first-child { border-top: 0; }
.scan-row-go { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 8px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.scan-row-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-row-meta { font-size: 0.8125rem; color: var(--sub); }
.scan-row .scan-del { min-height: 44px; }
.scan-row .scan-star { min-width: 44px; min-height: 44px; }
#scanHistDialog .scan-q { width: 100%; min-height: 44px; margin: 4px 0 8px; padding: 0 12px; border: 1px solid var(--line-strong); /* R-1127-92 찾기 칸 테두리 3:1 아래였다 */ border-radius: 12px; background: var(--card); color: var(--text); font: inherit; box-sizing: border-box; }
#scanHistDialog .scan-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
#scanHistDialog .scan-chips .chip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
#scanHistDialog .scan-chips .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
#scanHistDialog .scan-day { margin: 16px 0 0; font-size: 0.8125rem; color: var(--sub); }
#scanHistDialog .scan-empty { margin: 24px 0 8px; text-align: center; color: var(--sub); }
#scanHistDialog .scan-hist-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
:is(#scanHistDialog, #qrMakeDialog) .scan-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); } /* 11-27 QR 만들기 「숨은 네트워크」 칸도(전엔 13px 기본 칸·22px 줄) */
:is(#scanHistDialog, #qrMakeDialog) .scan-switch input { flex: none; width: 24px; height: 24px; }
#qrDialog .qr-histnote { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; color: var(--sub); }
#qrDialog .qr-histnote[hidden] { display: none; }
#qrDialog .qr-histnote .btn-mini { min-height: 44px; }
/* 11-24 QS9·QS10 QR 만들기(문서함 @1219) — 띠는 테두리 카드(채운 단추는 위 「QR·바코드 찍기」 하나 · §2-VIS 2) · 색은 변수만
   미리 보기 QR 은 밝게·어둡게 모두 흰 바탕 검정(뒤집힌 QR 을 못 읽는 스캐너) · 폰은 칸 → 미리 보기 차례, 넓은 창은 나란히 */
.qr-make-band { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.qr-make-band[hidden] { display: none; }
.qr-make-band > svg:first-child { flex: none; color: var(--link-text, var(--text)); } /* 글자용 대표색(--accent-text 는 채운 바탕 위 글이라 흰 카드에선 안 보임) */
.qr-make-band-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.qr-make-band-txt strong { font-size: 1rem; }
.qr-make-band-txt span { font-size: .8125rem; color: var(--sub); }
.qr-make-chev { flex: none; color: var(--sub); }
.qr-make-band:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#qrMakeDialog { width: min(720px, calc(100vw - 24px)); }
#qrMakeDialog .qr-make-kinds { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
#qrMakeDialog .qr-make-kinds .chip { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
#qrMakeDialog .qr-make-kinds .chip[aria-checked="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
#qrMakeDialog .qr-make-body { display: grid; gap: 16px; margin: 12px 0 0; }
@media (min-width: 720px) { #qrMakeDialog .qr-make-body { grid-template-columns: 1fr 240px; align-items: start; } }
#qrMakeDialog .qr-make-form { display: grid; gap: 12px; min-width: 0; }
#qrMakeDialog .qm-group { display: grid; gap: 12px; }
#qrMakeDialog .qm-group[hidden] { display: none; }
#qrMakeDialog .qm-field { display: grid; gap: 4px; color: var(--text); font-size: .875rem; font-weight: 600; }
#qrMakeDialog .qm-field[hidden] { display: none; }
#qrMakeDialog .qm-field input, #qrMakeDialog .qm-field select, #qrMakeDialog .qm-field textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 400; box-sizing: border-box; }
#qrMakeDialog .qm-field textarea { resize: vertical; }
#qrMakeDialog .qm-pw { display: flex; gap: 8px; }
#qrMakeDialog .qm-pw input { flex: 1; min-width: 0; }
#qrMakeDialog .qm-pw .btn-mini { min-height: 44px; min-width: 56px; }
#qrMakeDialog .qm-check { font-size: .875rem; }
#qrMakeDialog .qr-make-preview { margin: 0; display: grid; gap: 8px; justify-items: center; }
#qrMakeDialog .qr-make-img { width: 100%; max-width: 240px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
#qrMakeDialog .qr-make-img svg { width: 100%; height: 100%; display: block; }
#qrMakeDialog .qr-make-img.empty { background: var(--card); border-style: dashed; }
#qrMakeDialog .qr-make-ph { padding: 16px; text-align: center; font-size: .875rem; color: var(--sub); }
#qrMakeDialog figcaption { text-align: center; color: var(--sub); overflow-wrap: anywhere; }
#qrMakeDialog figcaption.warn { color: var(--danger-text, var(--text)); font-weight: 600; }
#qrMakeDialog .qr-make-err { margin: 8px 0 0; color: var(--danger-text, var(--text)); font-weight: 600; }
#qrMakeDialog .qr-make-err[hidden] { display: none; }
#qrMakeDialog .qr-make-note { margin: 8px 0 0; color: var(--sub); }
/* 11-27 QR 창의 작은 테두리 단추(「기록 끄기」·와이파이 「보기」·QR 만들기 「보기」·스캔 기록 「지우기」) — class 가 「btn-mini plain」 인데 .btn.plain 만 꾸밈이 있어 회색 브라우저 기본 단추로 보였다
   → 「기록 모두 보기」 와 같은 테두리 꼴(높이·넓이는 자리마다 규칙 그대로) */
:is(#qrDialog, #scanHistDialog, #qrMakeDialog) .btn-mini.plain { padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
:is(#qrDialog, #scanHistDialog, #qrMakeDialog) .btn-mini.plain:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── PS3 사진 보기(문서함 @1227 · 시안 cleanviewer-photo PS3 · D-14·D-15 · 묶음 사진보기PS3 · view.js pvBuild) ───
   밝게·어둡게와 상관없이 늘 어두운 보기 — 색 변수만 바꿔 안의 띠·단추가 같이 따라온다(§2-L 색은 변수로만)
   바탕 #0B0D12 · 막대 #1A1E27(진한 면 · 반투명 금지) · 글 #FFFFFF 19.43 · 보조 #C9CED8 12.31(막대 위 10.6) · 누름 #2A303C · 채운 단추 #9DB8FF + #0B1226 */
/* 11-26 body.pv-state — 사진 상태 틀(기다림·빈·오류 · view.js photoFrame)도 같은 어두운 색 · 전엔 오류만 어두운 틀이 아니라 밝은 문서 틀이라 사진 화면과 따로 놀았다(사전 45706208822 일관성·앱다움) */
body.photo-view, body.pv-state {
  --bg: #0b0d12; --bar: #1a1e27; --card: #1a1e27; --text: #ffffff; --sub: #c9ced8; --muted: #c9ced8;
  --line: #2a303c; --line-strong: #c9ced8; --accent: #9db8ff; --accent-text: #0b1226; --link-text: #9db8ff;
  --pv-press: var(--line);
  /* 문서 화면 A-Clear 띠(body.doc-open .bar · .tools = --ac-card)도 같은 어두운 면 — 검사 PC 45085113300 ③ 에서 막대가 흰색(255,255,255)으로 잼 */
  --ac-card: var(--bar); --ac-line: var(--bar); --ac-canvas: var(--bg); --ac-text: var(--text); --ac-sub: var(--sub);
  background: var(--bg); color: var(--text); color-scheme: dark;
}
body.photo-view .bar, body.photo-view .tools { border-color: var(--bar); }
body.photo-view .bar .name { color: var(--text); font-size: .9375rem; font-weight: 600; flex: 0 1 auto; }
/* 폭 600 이하에선 문서 화면 규칙(.bar .name order:10 · 둘째 줄)이 남아 이름이 ⋮ 오른쪽 끝으로 밀렸다(검사 PC 45085826755 q1123-ps3-390 사진) — 사진 보기는 한 줄: ← 이름 n/N ⋮ */
body.photo-view .bar .name:not(:empty) { order: 0; flex: 0 1 auto; padding: 0; }
/* 폰 390 — 위 막대 아이콘(▶·별표·정보·⋮)이 늘어 ⋮ 가 둘째 줄로 밀리던 것(사진 q1123-ps10-390-dark) · 한 줄 고정 · 이름이 줄어든다 */
body.photo-view .bar { flex-wrap: nowrap; }
/* 11-26 말줄임 한 줄 → 두 줄까지(글자 200% 에서 「가정통…」 처럼 이름을 잃음 · 사전 45699934820 바닥 위반) · 넘으면 둘째 줄 끝에서 말줄임 */
body.photo-view .bar .name:not(:empty) { min-width: 0; overflow: hidden; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
body.photo-view .bar > .icon, body.photo-view .bar > button { flex: none; }
@media (max-width: 480px) { body.photo-view .bar { gap: 0; } } /* 390 에서 「p04.jp/g」 처럼 짧은 이름도 낱말 가운데서 꺾였다(사진 q1123-ps3-390-light) — 단추 사이 4~8px 을 이름에 준다(누르는 칸 48 그대로) */
/* 11-25 글자 130%·200% 에서 이름이 안 줄어 별표·정보·⋮ 가 화면 밖으로 밀림(눈 점수 사진 45574286013 360 · 130·200) — 손가락 화면은 이름이
   .doc-line > .doc-title 안에 들어가는데(view.js d4) 그 묶음의 「줄어도 됨」 규칙이 (pointer: coarse) 안에만 있었다 → 사진 화면은 어느 화면이든 줄인다 */
body.photo-view .bar .doc-line { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; overflow: hidden; }
body.photo-view .bar .doc-title { min-width: 0; overflow: hidden; } /* 11-26 이름 칸(.name)이 두 줄까지 · 넘으면 「…」(위 규칙) — 전엔 이 칸이 잘라 「가정통신둔」 처럼 글자 가운데가 잘려 보임(45688829975) */
body.photo-view #docMeta, body.photo-view #readLeft, body.photo-view #btnLang, body.photo-view #btnHelp { display: none; }
/* 11-26 사진 상태 틀(기다림·빈·오류 · body.pv-state)의 위 막대도 사진 보기 막대와 같은 꼴 — ← + 이름 한 줄 · 홈 막대(로고·언어·도움말·「파일 열기」) 뺌
   전엔 바탕만 사진 색이고 막대는 홈 막대라 「파일 열기」(옅은)와 틀 안 「다른 사진 열기」(채운)가 같은 일 단추 둘이었다(눈 점수 사진 45765714004 360 빈·기다림·오류 직접 봄 · 사전 45706208822 일관성 9·앱다움 6) */
body.pv-state:not(.in-app) .bar .brand .brand-back { display: block; }
body.pv-state:not(.in-app) .bar .brand .brand-mark, body.pv-state:not(.in-app) .bar .brand .brand-word { display: none; }
body.pv-state #docMeta, body.pv-state #btnLang, body.pv-state #btnHelp, body.pv-state #btnOpen { display: none; }
body.pv-state .bar { flex-wrap: nowrap; border-color: var(--bar); }
body.pv-state .bar .name:not(:empty) { order: 0; flex: 0 1 auto; padding: 0; min-width: 0; color: var(--text); font-size: .9375rem; font-weight: 600; overflow: hidden; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.pv-count { color: var(--sub); font-size: .8125rem; font-weight: 500; margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
body:not(.photo-view) .pv-count, body:not(.photo-view) #pvMore, body:not(.photo-view) #pvInfoBtn { display: none; }
body.photo-view #pvMore[aria-pressed="true"], body.photo-view #pvInfoBtn[aria-expanded="true"] { background: var(--pv-press); }
/* 글자 읽기 띠(QA_DECISIONS 「사진 속 글자 읽기」 그대로 띄움) — 사진 화면에선 「문장 + 단추」 한 줄 · 받는 크기 안내·영어 칸은 아래 작게(11-25 · 눈 점수 사진 45574286013 폰 360 에서 띠가 화면 위 1/3 을 덮어 사진이 밀림) */
/*   문장 칸 최소 12글자 폭(em) — 글자를 키우면(200%) 단추가 아랫줄로 내려가 문장이 좁은 칸에 세로로 갇히지 않는다(45579481090 200%) */
body.photo-view .ocr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px; padding: 8px 12px; text-align: left; }
body.photo-view .ocr-bar #ocrMsg { margin: 0; font-size: .9375rem; flex: 1 1 12em; }
body.photo-view .ocr-bar > .btn { flex: none; }
/* 11-26 — 크기 안내·「영어도」 는 같은 작은 한 줄(좁으면 둘째 줄로 꺾임) · 사전 채점 45688829975 64점 「위계·첫 행동」 */
body.photo-view .ocr-bar .small { flex: 1 1 14em; margin: 0; font-size: .8125rem; color: var(--sub); }
body.photo-view .ocr-bar .ocr-eng { flex: none; margin: 0; font-size: .8125rem; color: var(--sub); }
@media (min-width: 916px) { body.photo-view .ocr-bar { margin: 8px auto; width: calc(100% - 16px); } }
/* 사진 — 1배에선 위·아래 막대 사이에 맞춰 가운데(확대하면 view.js relayout 이 상한을 푼다) */
body.photo-view #doc { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0; }
body.photo-view .imgbox .img { max-height: calc(100dvh - var(--tools-h, 160px) - 64px); width: auto; }
/* 아래 막대 — 펼친 도구 줄 · 돌린 사진 저장 · 작은 그림 띠 · 도구 칸 */
body.photo-view .tools { flex-wrap: wrap; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); row-gap: 8px; }
/* 11-26 !important — 손가락 화면 D4 규칙(body.d4 .tools button.icon.named:not([hidden]) 가 더 셈)이 옛 단추(저장하기·어둡게·더보기)를 사진 도구 위에 한 줄 더 띄웠다(눈 점수 사진 45692429824 360) · ⋮(pv-more)를 누르면 그대로 펼침 */
body.photo-view:not(.pv-more) .tools > :not(.pv-bot) { display: none !important; }
.pv-bot { flex: 1 0 100%; order: 2; display: grid; gap: 8px; min-width: 0; }
.pv-sheet { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; margin: 0; padding: 4px 8px; overflow-x: auto; scrollbar-width: none; }
.pv-sheet[hidden] { display: none; }
.pv-sheet .btn { flex: none; white-space: nowrap; background: var(--pv-press); color: var(--text); border: 0; font-size: .9375rem; font-weight: 600; }
.pv-sheet .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.pv-save { justify-self: center; }
.pv-strip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
.pv-th { flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; opacity: .7; padding: 0; border: 0; background: var(--pv-press); cursor: pointer; }
.pv-th[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--text); }
.pv-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-th img:not([src]) { visibility: hidden; }
/* 칸 최소 폭 = 56px 또는 글자 3.5개 폭 중 큰 것 — 글자를 키우면(130·200%) 칸이 넓어져 줄을 나누고 「색 뽑기」 같은 이름이 낱말 가운데서 꺾이지 않는다(11-25 눈 점수 사진 200%) */
/* 11-26 — 늘 한 줄(칸 폭 = 이름 한 줄 폭 이상 · 남으면 고루 나눔) · 넘치면 옆으로 밀어 봄: 글자 200% 에서 넷째 칸 「바꾸기」 가 둘째 줄로 꺾여 안 보이던 것(사전 채점 45688829975 바닥 위반) */
.pv-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); overflow-x: auto; scrollbar-width: none; max-width: 640px; width: 100%; justify-self: center; }
.pv-grid .pv-tool { min-width: 56px; white-space: nowrap; padding: 4px 8px; align-content: start; } /* 11-26 위쪽 맞춤 — 이름이 두 줄인 칸(「색 / 뽑기」)이 있어도 그림·첫 줄 높이가 같게(사전 45699934820 「들쭉날쭉」) */
/*   보이는 도구가 넷 이하면 고루 나눔 · 이름은 띄어쓰기에서만 꺾임(「색 / 뽑기」 · 낱말 가운데 꺾임 0) — 200% 에서도 넷이 다 보이게(45692429824 「바꾸」 걸침) */
.pv-grid:not(:has(> :nth-child(5 of :not([hidden])))) { grid-auto-columns: minmax(0, 1fr); }
.pv-grid:not(:has(> :nth-child(5 of :not([hidden])))) .pv-tool { min-width: 0; white-space: normal; word-break: keep-all; text-align: center; padding: 4px; }
.pv-tool { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 52px; padding: 4px 0; border: 0; border-radius: 12px; background: none; color: var(--sub); font: inherit; font-size: .8125rem; cursor: pointer; }
.pv-tool svg { color: var(--text); }
.pv-tool:hover, .pv-tool[aria-expanded="true"] { background: var(--pv-press); color: var(--text); }
.pv-tool:disabled { opacity: .5; cursor: default; }
/* 이전·다음 — 사진 양옆 둥근 단추(마우스 화면) · 폰은 밀기·작은 그림 띠 */
.pv-arrows { position: fixed; left: 0; right: 0; top: 50%; display: flex; justify-content: space-between; padding: 0 40px; pointer-events: none; z-index: 5; transform: translateY(-50%); }
.pv-arrows .btn { pointer-events: auto; width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; border-radius: 999px; background: var(--bar); color: var(--text); border: 0; }
.pv-arrows .btn:disabled { opacity: .35; cursor: default; }
@media (pointer: coarse) { .pv-arrows .btn { display: none; } }
body.bars-hidden .pv-arrows { display: none; }
/* PC 가장자리 판 — 왼쪽 220 작은 그림 2열 · 오른쪽 320 정보 · 끝 24px 안에 들면 열림(view.js mousemove) · 자판으로 들어와도 열림 */
.pv-edge { position: fixed; top: 56px; bottom: 0; z-index: 30; background: var(--bar); color: var(--text); overflow-y: auto; transition: clip-path .2s ease; } /* 닫힌 판은 화면 밖이 아니라 제자리에서 오려 둔다 — 전엔 밖에 놓여 1280 에서 정보 글이 화면 폭을 304px 넘는다고 잡혔다(사전 채점 46398634600 바닥 위반) · 글쇠 초점은 그대로 들어와 열린다 */
.pv-edge.l { left: 0; width: 220px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; clip-path: inset(0 100% 0 0); }
.pv-edge.l .pv-th { width: auto; height: auto; aspect-ratio: 1; }
.pv-edge.r { right: 0; width: 320px; padding: 16px; font-size: .875rem; clip-path: inset(0 0 0 100%); }
.pv-edge.on, .pv-edge.pin, .pv-edge:has(:focus-visible) { clip-path: inset(0); } /* 글쇠 초점일 때만 — :focus-within 이던 때는 마우스로 작은 그림·복사를 누르면 단추에 남은 초점이 판을 사진·‹ 위에 계속 열어 두었다(12-01 22시 독립 검수) */
/* 사진 보기를 떠나면(늦게 실패한 장의 못 엶 틀 등) 판·안내도 쉰다 — 전엔 고정한 정보 판이 오류 틀 오른쪽을 덮은 채 ⓘ 가 숨어 닫을 길이 없었다(12-01 22시 독립 검수) */
body:not(.photo-view) :is(.pv-edge, .pv-edge-hint), body.bars-hidden .pv-edge-hint { display: none; }
/* 정보 판을 고정하면 사진·「다음 사진」 단추를 판 왼쪽으로 — 전엔 320 판이 › 단추와 가로 사진 오른쪽을 덮은 채 넘겨도 남았다(R-1126-177 · 색 뽑기 판 --pv-color-w 와 같은 일) */
body.photo-view:has(.pv-edge.r.pin) #doc { padding-right: 320px; }
body.photo-view:has(.pv-edge.r.pin) .pv-arrows { right: 320px; }
body.photo-view:has(.pv-edge.r.pin) .imgbox .img { max-width: calc(100vw - 320px - 32px); }
/* PC 정보 판을 고정하면 왼쪽 위치 띠는 쉰다 — 판이 같은 말과 「장소 뺀 사본 저장」 을 이미 보여 채운 단추가 셋이었다(사진 q1123-ps4-1440-light) */
body.photo-view:has(.pv-edge.r.pin) #imgGps { display: none; }
.pv-edge h2 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; overflow-wrap: anywhere; }
/* PS4 사진 정보(문서함 #1227 · 시안 PS4) — 폰: 아래 시트(밝게 흰 면 · 어둡게 진한 면 · 둥글기 16 — 앱 다른 시트와 같은 값(색·둥글기 래칫)) · PC: 오른쪽 판(늘 어두운 면) 안 같은 칸
   글 대비: 밝게 #172442/#5b6785 on #fff 15.4/5.9 · 어둡게 #fff/#c9ced8 on #1a1e27 17.0/10.6 · 주 단추 #104dfd+#fff 6.1 · #9db8ff+#0b1226 9.6 */
.pv-info { --card: #ffffff; --text: #172442; --sub: #5b6785; --line: #e6eaf2; --accent: #104dfd; --accent-text: #ffffff; --link-text: #104dfd; --pv-tint: #eaf0ff;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 72dvh; overflow-y: auto; background: var(--card); color: var(--text);
  border-radius: 16px 16px 0 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); color-scheme: light; }
@media (prefers-color-scheme: dark) { .pv-info { --card: #1a1e27; --text: #ffffff; --sub: #c9ced8; --line: #2a303c; --accent: #9db8ff; --accent-text: #0b1226; --link-text: #9db8ff; --pv-tint: #2a303c; color-scheme: dark; } }
.pv-edge.r { --pv-tint: var(--line); }
.pv-info-top { display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; }
.pv-grab { width: 40px; height: 4px; border-radius: 999px; background: var(--line); }
.pv-info-x { position: absolute; right: -8px; top: 0; width: 44px; height: 44px; color: var(--text); }
.pv-info-h { font-size: 1.25rem; font-weight: 800; line-height: 1.35; margin: 0 0 4px; overflow-wrap: anywhere; }
.pv-info-h em { font-style: normal; color: var(--link-text); }
.pv-info-sub { margin: 0 0 8px; color: var(--sub); font-size: .8125rem; overflow-wrap: anywhere; }
.pv-info-big { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pv-info-big small { font-size: .9375rem; font-weight: 600; margin-left: 4px; color: var(--sub); }
.pv-info-big [hidden] { display: none; }
.pv-soft { display: grid; gap: 8px; margin-top: 12px; padding: 12px 16px; border-radius: 16px; background: var(--pv-tint); font-size: .875rem; }
.pv-soft b { display: block; color: var(--text); }
.pv-soft span { color: var(--sub); }
.pv-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); cursor: pointer; }
.pv-switch input { width: 24px; height: 24px; accent-color: var(--accent); }
.pv-switch span { color: var(--text); }
.pv-info-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 8px; margin-top: 12px; }
.pv-info-btns .btn { justify-content: center; text-align: center; border-radius: 12px; }
.pv-edge.r .pv-info-btns { grid-template-columns: 1fr; } /* 320 판에선 두 단추를 한 줄씩 — 나란히 두면 「장소 뺀 사본 저장」 이 두 줄로 꺾였다(web-pc 45122129815 q1123-ps4-1440 사진) */
.pv-info-btns .btn.plain { background: transparent; color: var(--text); border: 1px solid var(--line); text-decoration: none; }
/* PS6 색 뽑기(문서함 #1227 · 시안 PS6) — 돋보기 132 둥근 8배(가운데 칸 = 누른 곳 · 손가락 위) · 아래 시트(넓은 화면은 오른쪽 400) · 칸 56 · HEX 28 · RGB·HSL 줄 복사 · 최근 8 */
body.pv-pick .imgbox, body.pv-pick .imgbox img { cursor: crosshair; touch-action: none; }
.pv-loupe { position: fixed; z-index: 60; width: 132px; height: 132px; border-radius: 50%; border: 4px solid #ffffff; box-shadow: 0 1px 2px rgba(23, 36, 66, .06), 0 6px 20px rgba(23, 36, 66, .10); pointer-events: none; image-rendering: pixelated; background: #0b0d12; }
.pv-color { padding-top: 16px; }
/* 11-26 (pointer: fine) → 「coarse 의 반대」 안에 폭 조건(손가락 판정 한 꼴 · qa-1108-qa 공통 칸 · 6aeee59b 부터 걸려 있던 것) */
@media not (pointer: coarse) { @media (min-width: 1024px) { .pv-color { left: auto; width: 400px; top: 56px; border-radius: 0; max-height: none; } } }
/* 가로로 든 폰 — 아래 시트가 사진을 28px 로 밀던 것 → 오른쪽 판 · 아래 막대는 쉼(끝내기는 판의 ×) (R-1126-42 · 앱 R-1126-39 와 같음) */
@media (orientation: landscape) and (max-height: 540px) {
  .pv-color { left: auto; width: min(340px, 46vw); top: 56px; border-radius: 0; max-height: none; }
  body.photo-view.pv-color-on .tools { display: none; }
}
.pv-color .pv-info-x { position: absolute; right: 8px; top: 8px; font-size: 1.25rem; }
.pv-color-top { display: flex; align-items: center; gap: 12px; margin: 8px 48px 8px 0; flex-wrap: wrap; }
.pv-color-t { flex: 1 1 7.5rem; min-width: min(100%, 7.5rem); } /* 글자를 키우면 「#3E6B4F」 가 복사 단추 밑으로 들어갔다(R-1126-42) */
.pv-color .pv-hex { margin: 0; }
.pv-sw { flex: none; width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); }
.pv-color .pv-row { align-items: center; }
.pv-color .pv-row b { flex: 1; }
:is(.pv-info, .pv-edge) .btn-mini { flex: none; min-width: 56px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--link-text); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; } /* 시안 .mini — 전엔 「복사」 가 브라우저 기본 회색 단추(사진 q1123-ps6-390-light) */
body.pv-pick .ocr-bar { display: none !important; } /* 색을 고르는 동안 글자 읽기 띠는 쉼(시안 PS6 은 사진 + 색 판만) */
.pv-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-sw-s { width: 44px; height: 44px; padding: 0; cursor: pointer; }
body:not(.photo-view) .pv-color { display: none; }
.pv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pv-row span { flex: none; max-width: 50%; color: var(--sub); } /* 이름 자리를 먼저 — 값(렌즈·모델 이름)이 길면 「렌즈」 가 두 줄로 꺾이고 빈칸 없는 모델 이름은 판 밖으로 나갔다(R-1126-31) */
.pv-row b { min-width: 0; overflow-wrap: anywhere; font-weight: 600; text-align: right; }
.pv-note { margin-top: 12px; color: var(--sub); font-size: .8125rem; }
.pv-edge-hint { position: fixed; left: 240px; bottom: 96px; z-index: 29; max-width: calc(100vw - 600px); padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bar); color: var(--text); font-size: .8125rem; line-height: 1.4; pointer-events: none; } /* 시안 PS3 PC hint — 판에 안 겹치게 왼쪽 220 판 옆 · 오른쪽 320 판 앞에서 줄바꿈 */
body.photo-view .toast { z-index: 31; } /* 알림이 안내 한 줄(29)·가장자리 판(30) 밑에 깔려 왼쪽이 가렸다(12-01 22시 독립 검수) · 비교·배경 지우기·슬라이드쇼 판 위 값은 아래 규칙이 덮는다 */
@media print { .pv-edge-hint { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .pv-edge { transition: none; } }
@media print { .pv-bot, .pv-arrows, .pv-edge { display: none !important; } body.photo-view { background: #fff; } }
/* PS1 사진 입구(문서함 #1227 · 시안 PS1) — 홈 타일 한 줄 + 창: 결론 한 문장(앞 낱말 주색) · 큰 카드 1 + 중간 2 · 작은 타일 · 채운 단추 1 */
.ac-photo { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; margin: -8px 0 24px; padding: 8px 16px 8px 8px; border: 1px solid var(--ac-line); border-radius: 16px; background: var(--ac-card); color: var(--ac-text); box-shadow: var(--ac-shadow); font: inherit; text-align: left; cursor: pointer; }
.ac-photo .ac-q-ic { flex: none; box-shadow: none; }
.ac-photo-t { flex: 1; display: grid; gap: 4px; }
.ac-photo-t b { font-size: 1.0625rem; }
.ac-photo-t .small { color: var(--ac-sub, var(--sub)); }
.ac-photo-go { font-size: 1.25rem; color: var(--ac-brand); }
.ac-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* ─── 화면 전체 창(11-30 · 시안 PS1·PS2·PS8·PS9) — 전엔 홈 위에 뜬 작은 창이라 시안(한 화면)과 짜임부터 달랐다(검사 PC 사진 46402141023·46398999055 와 시안 나란히 봄)
   showModal 그대로(Esc·초점 가두기·뒤 화면 막기) · 머리 56(← · 가운데 제목) · 몸만 굴림 · 아래 단추 줄은 늘 보임 · 넓은 화면은 몸 1120 가운데 + 왼쪽 메뉴 96(view.js pageTabs 가 넣는 눌리는 사본) */
dialog.sheet.pg { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; background: var(--bg); overflow: hidden auto; --pg-x: max(16px, (100% - 1120px) / 2); }
dialog.pg[open] { display: flex; flex-direction: column; }
dialog.pg::backdrop { background: var(--bg); }
.pg > .toc-head { position: sticky; top: 0; z-index: 2; flex: none; min-height: 56px; margin: 0; padding: 4px 8px; padding-top: calc(4px + env(safe-area-inset-top)); border-bottom: 0; background: var(--bg); justify-content: flex-start; }
.pg > .toc-head > .icon { flex: none; width: 48px; height: 48px; color: var(--text); }
.pg > .toc-head > .icon[hidden] + .pg-t { margin-left: 48px; }
.pg > .toc-head h2, .pg-t { flex: 1 1 0; min-width: 0; margin: 0 48px 0 0; text-align: center; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; } /* 오른쪽 48 = 왼쪽 ← 만큼 비워 제목이 화면 가운데 */
.pg > .toc-head h2:focus, .batch #batchHead:focus { outline: none; } /* 열 때 첫 초점은 제목·결론 줄(낭독기가 먼저 읽게) — 눌리는 것이 아니라 테두리는 안 그린다(사진 q1123-ps9-390-light 굵은 네모) */
.pg-body { flex: 1 0 auto; padding: 0 var(--pg-x) 16px; }
.pg .ph-dock { flex: none; padding-inline: var(--pg-x); }
.pg > .pg-tabs { flex: none; }
@media (max-width: 1023.98px) {
  .pg > .pg-tabs { position: sticky; inset: auto 0 0; }
  .pg:has(.pg-tabs) .ph-dock { bottom: calc(65px + env(safe-area-inset-bottom)); padding-bottom: 12px; }
  #folderDialog:has(#fpDock:not([hidden])) .pg-tabs { display: none; } /* 고르는 중엔 아래가 고른 장 단추 줄(시안 PS2) */
}
@media (min-width: 1024px) { .pg:has(.pg-tabs) { padding-left: 96px; } }
/* 내 폴더 — 격자가 남는 높이를 다 쓴다(낮은 화면에선 격자 240 + 화면 굴림) */
#folderBody, #folderLost { padding: 4px var(--pg-x) 0; }
#folderBody { flex: 1 0 auto; display: flex; flex-direction: column; }
/* 낮은 화면(가로 폰)·글자를 키운 화면(32em)·글자판이 뜬 동안 — 머리와 아래 단추 줄을 붙잡지 않고 함께 굴린다(본문이 밀려 안 보이지 않게 · 반대-막13·14) */
@media (max-height: 32em) { .pg > .toc-head, .pg .ph-dock, .pg .fp-dock, .pg.batch .b-body > .b-side, .pg.batch .b-body.b-one > .b-acts, .pg.batch .b-body.b-one > .b-go { position: static; } .pg > .pg-tabs { display: none; } }
body.kb-open .pg > .toc-head, body.kb-open .pg .ph-dock, body.kb-open .pg .fp-dock, body.kb-open .pg.batch .b-body > .b-side { position: static; }
/* 알림은 아래 단추 줄 위에(알림 속 단추가 아래 단추 누름을 가로채지 않게 · 반대-막6) */
.pg > .toast, body.has-tabs .pg > #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (max-width: 1023.98px) { body.has-tabs .pg:has(.pg-tabs) > #toast { bottom: calc(149px + env(safe-area-inset-bottom)); } body.has-tabs #folderDialog:has(#fpDock:not([hidden])) > #toast { bottom: calc(136px + env(safe-area-inset-bottom)); } }
#folderFiles { padding-bottom: 16px; }
#folderPhotos { flex: 1 0 auto; display: flex; flex-direction: column; }
#folderDialog:not(.fp-on) #folderBody { display: block; }
#folderDialog .toc-head h2 { flex: 1 0 auto; max-width: calc(100% - 56px); margin-right: auto; text-align: left; } /* 오른쪽에 단추 둘 — 줄어들지 않음(좁으면 단추가 다음 줄로 · 제목이 세로로 찌그러지지 않게) */
@media (max-width: 600px) { #folderDialog .toc-head h2 { flex-basis: calc(100% - 56px); } #folderDialog .toc-head .btn { margin-left: 8px; min-height: 44px; } }
.ph-head { font-size: 1.25rem; font-weight: 800; line-height: 1.35; margin: 8px 0 4px; }
.ph-head em { font-style: normal; color: var(--link-text); }
.ph-sub { margin: 0 0 16px; color: var(--sub); }
.ph-cards { display: grid; gap: 12px; }
.ph-cards:has(> .ph-card:only-child) { grid-template-columns: 1fr; } /* 폴더가 하나뿐이면 큰 카드가 줄 전체 — 전엔 PC 오른쪽 1/3 이 빈 자리(사진 q1123-ps1-1440-light-use) */
.ph-cards:not(:has(> .ph-card:only-child)) { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8.5rem, (100% - 12px) / 2)), 1fr)); } /* 둘까지 · 글자를 키우면 한 줄에 하나(R-1126-41) */
.ph-card { all: unset; box-sizing: border-box; display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); cursor: pointer; min-height: 72px; }
.ph-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ph-card .small { color: var(--sub); }
.ph-big { grid-column: 1 / -1; padding: 0; overflow: hidden; gap: 0; }
/* 중간 카드(다른 폴더 2) — 시안 PS1 「카톡으로 받은 사진 · 오늘 · 12장」: 그림 위 + 이름·장 수 아래(11-26 · 전엔 글만 든 네모) */
.ph-mid { padding: 0; overflow: hidden; gap: 0; }
.ph-mid .ph-shot { height: 96px; }
.ph-mid .ph-name { padding: 12px 16px; }
.ph-shot { display: block; height: 168px; background: var(--line); }
.ph-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-shot img:not([src]) { visibility: hidden; }
/* 그림을 못 쓰는 카드(최근 기억 끈 손님 · 폴더 허락 전 · 옮겨진 사진) — 빈 회색 칸 대신 빈 화면과 같은 산 그림(11-30 나란히 사진 side-PS1-pc 에서 큰 카드가 빈 덩어리) */
.ph-shot { position: relative; }
.ph-shot > .ph-scene { position: absolute; inset: 0; margin: auto; width: auto; height: min(120px, 72%); aspect-ratio: 3 / 2; border: 0; background: none; opacity: .7; }
.ph-shot img[src] + .ph-scene { display: none; }
.ph-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; }
.ph-name { flex: 1 1 6rem; min-width: 0; display: grid; gap: 4px; }
.ph-num { white-space: nowrap; font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.ph-num small { font-size: .9375rem; font-weight: 600; color: var(--sub); margin-left: 4px; }
.ph-bar { display: block; height: 8px; margin: 0 16px 16px; border-radius: 8px; background: var(--line); overflow: hidden; }
.ph-bar i { display: block; height: 100%; background: var(--accent); }
.ph-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; text-align: center; }
.ph-empty .small { color: var(--sub); margin: 0; }
.ph-scene { width: 180px; height: 120px; margin-bottom: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); fill: var(--link-text); }
.ph-cut { width: 100%; min-height: 64px; margin-top: 12px; padding: 12px 16px; }
/* 넷까지 · 글자를 키우면 줄을 더 나눈다 — 「슬라이드쇼」 가 360 폭(100%)과 200% 에서 낱말 가운데서 꺾였다(R-1126-41) */
.ph-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(4rem, (100% - 24px) / 4)), 1fr)); gap: 8px; margin-top: 12px; }
.ph-tile { all: unset; box-sizing: border-box; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 76px; padding: 8px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); text-align: center; font-weight: 600; font-size: .875rem; cursor: pointer; }
@media (max-width: 380px) { .ph-tile { font-size: .8125rem; letter-spacing: -.02em; } } /* 11-30 360 폭 「슬라이드쇼」 글 65.x px 가 칸 안쪽 65px 에 0.몇 px 모자라 「슬라이드/쇼」 로 꺾임(web-pc 46402141023 ⑦ 칸67·글65) — 1.3px 좁혀 한 줄 · keep-all 은 띄어쓰기 없는 일본어가 넘쳐 안 씀 */
.ph-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* 처음 화면 카드 둘(시안 PS1 「처음」 .tile — 그림·이름 15·한 줄 · 왼쪽 맞춤 · 높이 92 · 시안 14·6·12.5 는 화면 규격 4의 배수·글자 단계로 16·8·13) · 글자를 키우면 한 줄에 하나 */
.ph-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8.5rem, (100% - 12px) / 2)), 1fr)); gap: 12px; }
.ph-pick { all: unset; box-sizing: border-box; display: grid; gap: 8px; align-content: start; min-height: 92px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); cursor: pointer; }
.ph-pick b { font-size: .9375rem; }
.ph-pick .small { font-size: .8125rem; color: var(--sub); }
.ph-pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ph-ic { width: 22px; height: 22px; color: var(--link-text); }
.ph-dock { position: sticky; bottom: 0; z-index: 1; margin: 0; padding-block: 12px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.ph-dock .btn { width: 100%; min-height: 48px; justify-content: center; } /* 글이 단추 왼쪽에 붙어 있었다(사진 q1123-ps1-390-light-first) */
@media (min-width: 1024px) {
  .ph-head { font-size: 1.75rem; }
  .ph-cards:not(:has(> .ph-card:only-child)) { grid-template-columns: 2fr 1fr; }
  .ph-big { grid-column: 1; grid-row: span 2; }
  .ph-shot { height: 280px; }
  .ph-mid .ph-shot { height: 112px; } /* 오른쪽 둘이 큰 카드 높이를 나눠 씀 */
  .ph-tiles { grid-template-columns: repeat(auto-fill, minmax(max(6rem, (100% - 48px) / 7), 1fr)); }
  .ph-dock .btn { width: 280px; }
}

/* PS8·PS9 사진 한 번에 바꾸기(문서함 #1227 · 시안 PS8·PS9 · site/batch.js) — 결론 한 줄(앞 낱말 주색) · 타일 6(누르면 켬/끔 · 켠 것은 주색 테두리) · 설정 칩 · 예상 용량 크게 + 미리보기 표 · 채운 단추 「N장 바꾸기」 1
   넓은 화면은 오른쪽에 저장 곳·단추 판(시안 PC 두 칸) · 진행 = n/N 크게 + 막대 + 「멈추기」(테두리) · 결과 = 줄인 용량 · 못 한 장과 까닭 · 「바꾼 사진 보기」 */
.batch .b-body { display: grid; grid-template-columns: 1fr; gap: 16px; align-content: start; flex: 1 0 auto; padding: 8px var(--pg-x) 16px; }
@media (min-width: 900px) { .batch .b-body:not(.b-one) { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; } .batch .b-side { position: sticky; top: 64px; } }
.batch .b-side-head { display: none; } /* 폰 아래 띠는 저장 곳·단추만 — 머리는 넓은 화면 오른쪽 판에만(시안 PS8 PC) */
@media (min-width: 900px) { .batch .b-body:not(.b-one) .b-side-head { display: grid; gap: 4px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); } .batch .b-side-head .small { color: var(--sub); } }
/* 폰 — 「12장 바꾸기」 가 늘 아래에(시안 PS8 · 전엔 설정을 끝까지 굴려야 보였다) · 저장 곳·원래 사진은 머리 글이 이미 말하므로 줄을 뺀다 */
@media (max-width: 899.98px) {
  .batch .b-body > .b-side { position: sticky; bottom: 0; z-index: 1; margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--bg); }
  .batch .b-side .b-row { display: none; }
  .batch .b-side .b-go { margin-top: 0; }
}
.batch .b-main { display: grid; gap: 16px; min-width: 0; }
.batch .b-head h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.35; margin: 0 0 4px; }
@media (min-width: 1024px) { .batch .b-head h2 { font-size: 1.75rem; } }
.batch .b-head h2 em { font-style: normal; color: var(--link-text); }
.batch .b-head .small { margin: 0; color: var(--sub); }
.batch .b-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(8.5rem, (100% - 16px) / 3)), 1fr)); gap: 8px; } /* 폰 두 칸 · 넓으면 세 칸(여섯 개가 빈 자리 없이) · 글자를 키우면 한 칸 — 전엔 390 폭에서 한 칸씩 여섯 줄이라 설정이 화면 밖으로 밀렸다(R-1126-43) */
.batch .b-tile { display: grid; gap: 4px; align-content: start; min-height: 88px; padding: 12px 16px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.batch .b-tile b { font-size: .9375rem; }
.batch .b-tile span { font-size: .8125rem; color: var(--sub); }
.batch .b-tile[aria-checked="true"] { border-color: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.batch .b-set { display: grid; gap: 8px; }
.batch .b-lab { margin: 8px 0 0; font-weight: 700; font-size: .9375rem; }
.batch .b-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.batch .b-chips .chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.batch .b-chips .chip[aria-checked="true"] { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.batch .b-chips .chip:disabled { opacity: .45; cursor: not-allowed; }
/* 워터마크 자리 9칸 — 규칙은 아래 PS8 한 벌(11-30 「7」 디자인 D6: 11-24 옛 벌이 뒤 벌에 덮여 죽은 채 크기만 새어 들었다 → 옛 벌을 빼고 살아 있던 값은 아래로) */
.batch .b-pos-c:hover { background: var(--line); }
.batch .b-set input[type="text"] { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; max-width: 360px; }
.batch .b-note { margin: 0; color: var(--sub); }
.batch .b-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.batch .b-card .small { margin: 0; color: var(--sub); }
/* PS8 워터마크 자리 9칸 — 사진 모양 판(3:2) 위 고른 칸에 점 · 칸마다 누르는 곳 44 이상 */
.batch .b-pos { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 44px); gap: 4px; width: max-content; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); }
.batch .b-pos-c { display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; padding: 0; }
.batch .b-pos-c i { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--sub); }
.batch .b-pos-c[aria-checked="true"] { background: var(--card); box-shadow: inset 0 0 0 2px var(--accent); }
.batch .b-pos-c[aria-checked="true"] i { width: 16px; height: 16px; background: var(--accent); border-color: var(--accent); }
.batch .b-pos-c:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.batch .b-file { display: grid; gap: 4px; min-height: 56px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card); color: var(--text); cursor: pointer; }
.batch .b-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.batch .b-file .small { color: var(--sub); overflow-wrap: anywhere; }
.batch .b-file-in { position: absolute; width: 1px; height: 1px; opacity: 0; }
.batch .b-wmprev { display: block; max-width: 100%; max-height: 220px; margin: 0 auto; border-radius: 8px; border: 1px solid var(--line); }
.batch .b-over { color: var(--text); font-weight: 600; }
.batch .b-sum { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.batch .b-big { font-size: 1.75rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.batch .b-big small { font-size: .9375rem; font-weight: 600; margin-left: 4px; color: var(--sub); }
.batch .b-pri { color: var(--link-text); }
.batch .b-arrow { padding-bottom: 4px; color: var(--sub); }
/* 미리보기 표 — 줄마다 격자: 좁거나 글자를 키우면 두 칸·한 칸으로(이름이 한 글자씩 서고 까닭 글이 창 밖으로 나갔다 · R-1126-43) */
.batch .b-tbl, .batch .b-tbl thead, .batch .b-tbl tbody { display: block; }
.batch .b-tbl { width: 100%; font-size: .875rem; }
.batch .b-tbl tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5em), 1fr)); gap: 0 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.batch .b-tbl .b-err { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8em), 1fr)); } /* 못 하는 장 — 이름·까닭 반반(좁으면 위아래) */
.batch .b-tbl .b-more { grid-column: 1 / -1; }
.batch .b-tbl th { text-align: left; font-weight: 600; color: var(--sub); padding: 0 4px; }
.batch .b-tbl td { min-width: 0; padding: 0 4px; overflow-wrap: anywhere; }
.batch .b-tbl .r { text-align: right; }
.batch .b-tbl .b-more { color: var(--sub); }
.batch .b-side { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.batch .b-row b { overflow-wrap: anywhere; }
.batch .b-row span { white-space: nowrap; } /* 「저장 곳」 이 두 줄로 꺾였다(web-pc 45124810367 q1123-ps8-1440) */
.batch .b-go { width: 100%; justify-content: center; margin-top: 8px; }
.batch .b-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.batch .b-bar i { display: block; height: 100%; background: var(--accent); }
.batch .b-fail { border-color: var(--warn-ink, var(--line)); }
.batch .b-acts { display: grid; gap: 8px; }
.batch .b-body.b-one { max-width: 720px; margin: 0 auto; width: 100%; padding-inline: 16px; }
/* 폰 — 진행·결과의 단추는 짧은 내용이어도 화면 아래에(시안 PS9 dock) */
@media (max-width: 899.98px) { .batch .b-body.b-one { display: flex; flex-direction: column; } .batch .b-one > .b-acts, .batch .b-one > .b-go { position: sticky; bottom: 0; margin-top: auto; } .batch .b-one > .b-acts { padding-block: 12px; background: var(--bg); } .batch .b-one > .b-go { bottom: 16px; background: var(--bg); } }
@media (prefers-reduced-motion: no-preference) { .batch .b-bar i { transition: width .2s ease; } }

/* PS10 만화·웹툰(문서함 #1227 · 시안 PS10 · site/comic.js) — 위·아래 막대 사이를 덮는 판 · 세로로 이어(빈틈 0 · 폭 맞춤 · 넓은 화면 720) · 두 쪽(나란히 · 높이 맞춤) · 아래 막대 칩(지금 보기 = 주 단추 색) */
.pv-comic { position: fixed; left: 0; right: 0; z-index: 4; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.pv-comic:focus { outline: none; } /* 화면을 다 차지하는 굴림 자리 — 테두리 위·아래만 파란 줄로 보였다(사진 q1123-ps10-390-light) */
.pv-comic.v { display: grid; justify-items: center; align-content: start; }
.pv-comic.v img { display: block; width: 100%; max-width: 720px; height: auto; aspect-ratio: var(--comic-ar, 3 / 4); }
.pv-comic.two { display: flex; justify-content: center; align-items: center; gap: 0; outline: none; cursor: pointer; touch-action: pan-y pinch-zoom; user-select: none; }
.pv-comic.two img { max-height: 100%; max-width: 50%; object-fit: contain; }
.pv-comic-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px; }
.pv-comic-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-comic-chips .chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pv-press); background: var(--pv-press); color: var(--text); font: inherit; font-size: .875rem; cursor: pointer; }
.pv-comic-chips .chip[aria-checked="true"], .pv-comic-chips .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.pv-comic-chips .chip[hidden] { display: none; }
.pv-comic-note { margin-left: auto; color: var(--sub); }
body.comic-on .pv-arrows { display: none; }
@media print { .pv-comic, .pv-comic-chips { display: none !important; } }

/* PS7 비교 · D-13 별표(문서함 #1227 · 시안 PS7 · site/compare.js) — 사진 보기 위를 덮는 판(늘 어두운 면 · photo-view 변수) · 위 = 뒤로·「2장 비교」·같이 확대 스위치 · 가운데 칸 2(폰)·최대 4(PC) · 아래 = 채운 단추 「1번에 별표」 하나
   별표 = 노랑 채움 + 모양(빈 별/찬 별)으로도 구분 · 노랑은 최근 문서 별표(--warn-ink 어둡게)와 같은 #fbbf24 — 새 색을 늘리지 않는다 */
body.photo-view { --pv-star: #fbbf24; }
.pv-star svg, .pv-cmp-star svg { fill: none; }
.pv-star.on, .pv-cmp-star.on { color: var(--pv-star); }
.pv-star.on svg, .pv-cmp-star.on svg { fill: currentColor; }
body:not(.photo-view) #pvStarBtn { display: none; }
.pv-cmp { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); color: var(--text); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.pv-cmp:focus { outline: none; }
.pv-cmp-top { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 8px; background: var(--bar); }
.pv-cmp-x { width: 44px; height: 44px; color: var(--text); }
.pv-cmp-h { flex: 1; margin: 0; font-size: 1.0625rem; font-weight: 700; }
.pv-cmp-h b { color: var(--link-text); }
.pv-cmp-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; font-size: .9375rem; cursor: pointer; }
.pv-cmp-sw { appearance: none; width: 44px; height: 24px; margin: 0; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.pv-cmp-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.pv-cmp-sw:checked { background: var(--accent); }
.pv-cmp-sw:checked::after { transform: translateX(20px); background: var(--accent-text); }
.pv-cmp-sw:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pv-cmp-grid { display: grid; gap: 4px; min-height: 0; padding: 4px; }
.pv-cmp-grid[data-dir="row"] { grid-auto-flow: column; grid-auto-columns: 1fr; }
.pv-cmp-grid[data-dir="col"] { grid-auto-flow: row; grid-auto-rows: 1fr; }
.pv-cmp-grid[data-n="4"] { grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-cmp-grid[data-n="4"][data-dir="row4"] { grid-auto-flow: column; grid-template-columns: none; grid-template-rows: none; grid-auto-columns: 1fr; } /* 넓은 화면 세로 사진 4장 — 한 줄 4칸(시안 PS7 PC) */
.pv-cmp-cell { display: grid; grid-template-rows: 1fr auto; min-width: 0; min-height: 0; margin: 0; border-radius: 8px; overflow: hidden; background: var(--bar); }
.pv-cmp-view { position: relative; overflow: hidden; min-height: 0; touch-action: none; cursor: grab; }
.pv-cmp-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.pv-cmp-note, .pv-show-bad { display: grid; place-items: center; margin: 0; padding: 16px; color: var(--sub); font-size: .875rem; text-align: center; }
.pv-cmp-note { position: absolute; inset: 0; }
.pv-show-bad { width: 100%; height: 100%; }
.pv-cmp-note[hidden], .pv-show-bad[hidden], .pv-cmp-view img[hidden], .pv-show-img[hidden] { display: none; }
.pv-cmp-cap { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 4px 0 12px; font-size: .875rem; }
.pv-cmp-no { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 700; font-size: .8125rem; }
.pv-cmp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sub); }
.pv-cmp-step, .pv-cmp-star { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.pv-cmp-step:disabled { opacity: .35; cursor: default; }
.pv-cmp-step:hover:not(:disabled), .pv-cmp-star:hover { background: var(--pv-press); }
.pv-cmp-bot { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--bar); }
.pv-cmp-hint { flex: 1; color: var(--sub); font-size: .8125rem; }
.pv-cmp-fill { justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 700; }
@media (max-width: 480px) { .pv-cmp-hint { display: none; } .pv-cmp-fill { flex: 1; } }
@media print { .pv-cmp { display: none !important; } }
body.pv-bg-on .toast { z-index: 41; } /* 배경 지우기 판 위로 — 저장했다는 알림이 판 밑에 깔렸다 */
body.pv-cmp-on .toast { z-index: 41; bottom: calc(76px + env(safe-area-inset-bottom)); } /* 비교 판 위로(아래 채운 단추 위) — 「별표했어요」 가 판 밑에 깔리지 않게 */
@media (max-width: 480px) { .pv-cmp-name { display: none; } .pv-cmp-cap { gap: 0; padding: 0 4px; justify-content: space-between; } } /* 폰 칸 폭 약 189 — 번호·이전·다음·별(24+44×3)만 */

/* PS5 AI 그림 정보(문서함 #1227 · 시안 PS5 · site/aimeta.js) — 사진 정보 판 안 한 칸 · 글 칸은 긴 프롬프트도 6줄까지(넘으면 칸 안에서 굴림) */
.pv-ai { display: grid; gap: 8px; margin-top: 16px; }
.pv-ai-h b { color: var(--link-text); } /* 시안 PS5 — 결론 줄은 주색 · 위 표 줄 선과 겹치던 선은 뺌(사진 q1123-ps5-390-light 두 줄) */
.pv-ai-h { display: grid; gap: 4px; }
.pv-ai-h b { font-size: 1.0625rem; }
.pv-ai-block { display: grid; gap: 4px; }
.pv-ai-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--sub); font-size: .875rem; }
.pv-ai-row .btn-mini { min-height: 44px; min-width: 44px; }
.pv-ai-text { margin: 0; padding: 8px 12px; max-height: calc(1.5em * 6 + 16px); overflow: auto; border-radius: 8px; background: var(--pv-tint); /* 정보 판 안 옅은 면(밝게 #eaf0ff · 어둡게 #2a303c) — pv-press 는 밝은 판에서 어두운 면이라 글이 안 보였음(사진 q1123-ps5-390-light) */ color: var(--text); font: inherit; font-size: .875rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-ai-text:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* PS11 슬라이드쇼(문서함 #1227 · 시안 PS11 · site/slideshow.js) — 화면 전체 어두운 바탕 · 사진 맞춤 · 위 이름·n/N·끝내기 · 아래 멈춤·3/5/10초·섞기 칩(손대지 않으면 2.5초 뒤 숨김 · 멈춤 중엔 늘 보임) */
body:not(.photo-view) #pvPlayBtn { display: none; }
.pv-show { position: fixed; inset: 0; z-index: 45; background: var(--bg); color: var(--text); display: grid; place-items: center; overflow: hidden; }
.pv-show:focus { outline: none; }
.pv-show-img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s ease; cursor: pointer; }
.pv-show-img.fade { opacity: .25; }
.pv-show.still .pv-show-img { transition: none; }
.pv-show-top, .pv-show-bot { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bar); transition: opacity .2s ease, transform .2s ease; }
.pv-show-top { top: 0; padding-top: calc(8px + env(safe-area-inset-top)); min-height: 56px; }
.pv-show-bot { bottom: 0; flex-wrap: wrap; justify-content: center; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.pv-show.idle .pv-show-top, .pv-show.idle .pv-show-bot { opacity: 0; pointer-events: none; }
.pv-show.idle { cursor: none; }
.pv-show.still .pv-show-top, .pv-show.still .pv-show-bot { transition: none; }
.pv-show-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem; }
.pv-show-n { color: var(--sub); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.pv-show-x { width: 44px; height: 44px; color: var(--text); }
.pv-show-secs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pv-show-bot .chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pv-press); background: var(--pv-press); color: var(--text); font: inherit; font-size: .875rem; cursor: pointer; }
.pv-show-bot .chip[aria-checked="true"], .pv-show-bot .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.pv-show-play { min-width: 96px; }
.pv-show-state { flex-basis: 100%; text-align: center; color: var(--sub); font-size: .8125rem; }
@media (min-width: 720px) { .pv-show-state { flex-basis: auto; margin-left: 8px; } }
body.pv-show-on .toast { z-index: 46; }
@media print { .pv-show { display: none !important; } }
/* PS6 PC — 색 판(오른쪽 400)이 열리면 사진을 판 왼쪽 자리에 맞춘다 · 판이 사진 오른쪽을 덮어 그 자리 색을 못 뽑던 것(검사 PC 45141313607 ② 1440 둘째 누름이 판에 떨어짐) */
/* 판 자리는 view.js 가 실제로 재서(--pv-color-w 오른쪽 판 폭 · --pv-color-h 아래 시트 높이) 넣는다 — 무화면 크롬·터치 노트북은 1440 에서도 아래 시트(사진 q1123-ps6-1440-light) */
body.photo-view.pv-color-on #doc { padding-right: var(--pv-color-w, 0px); padding-bottom: var(--pv-color-h, 0px); }
body.photo-view.pv-color-on .imgbox .img { max-width: calc(100vw - var(--pv-color-w, 0px) - 32px); max-height: calc(100dvh - max(var(--pv-color-h, 0px), var(--tools-h, 160px)) - 72px); } /* 오른쪽 판일 때도 아래 막대 몫을 뺀다 — 세로 사진 아래쪽이 막대에 가려 그 자리 색을 못 뽑았다 */
@media (orientation: landscape) and (max-height: 540px) { body.photo-view.pv-color-on .imgbox .img { max-height: calc(100dvh - var(--pv-color-h, 0px) - 72px); } }
/* PS12 배경 지우기(문서함 #1227 · bgcut.js) — 판 틀은 비교(.pv-cmp)와 같은 전체 화면 · 가운데 투명 바둑판 · 아래(PC 는 오른쪽) 상황 글·바탕 칩·채운 단추 하나 */
.pv-bg { grid-template-rows: auto minmax(0, 1fr) auto; }
/* 11-30 시안 PS12 — 늘 어두운 사진 보기가 아니라 밝은 화면(어둡게 쓰는 손님은 밤색) · 흰 바둑판 카드(전엔 늘 어두움 · 사진 q1123-ps12-* · 회의 261130 반대-막16 — 비교 판 .pv-cmp 는 그대로 어둡고 알림도 같은 색으로) */
.pv-bg, body.pv-bg-on .toast { --bg: #f3f5fa; --bar: #f3f5fa; --card: #ffffff; --text: #172442; --sub: #5b6785; --line: #e6eaf2; --line-strong: #64748b; --accent: #104dfd; --accent-text: #ffffff; --link-text: #104dfd; color-scheme: light; }
@media (prefers-color-scheme: dark) { .pv-bg, body.pv-bg-on .toast { --bg: #0b1226; --bar: #0b1226; --card: #141d36; --text: #e8eeff; --sub: #cbd5e1; --line: #2a3556; --line-strong: #94a3b8; --accent: #9db8ff; --accent-text: #0b1226; --link-text: #9db8ff; color-scheme: dark; } }
.pv-bg .pv-cmp-h { margin-right: 52px; text-align: center; } /* ← 만큼 비워 제목이 가운데(시안 hd) */
.pv-bg .btn.plain { border-color: var(--line-strong); background: transparent; color: var(--text); }
.pv-bg-stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* 칸 높이를 굳혀야 max-height 100% 가 먹는다 — 세로 사진 위아래가 잘렸다(R-1126-44) */ place-items: center; min-height: 0; margin: 8px 16px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background-color: var(--card); } /* 투명 바둑판 무늬는 bgcut.js 가 단다(새 화면 파일 한 곳) */
.pv-bg-img { grid-area: 1 / 1; max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-bg-out { width: auto; height: auto; }
.pv-bg-stage:has(.pv-bg-out:not([hidden])) img.pv-bg-img { visibility: hidden; }
.pv-bg[data-state="need"] .pv-bg-stage img, .pv-bg[data-state="work"] .pv-bg-stage img { opacity: .5; }
/* 판은 화면의 58% 까지 — 글자를 키우면 판이 사진을 0 으로 밀고 저장 단추가 화면 밖으로 나갔다(R-1126-44 · 앱 R-1126-40 과 같음) */
.pv-bg-side { display: grid; gap: 12px; align-content: start; min-height: 0; max-height: 58dvh; overflow-y: auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bar); }
.pv-bg-p { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--text); }
.pv-bg-bar { width: 100%; height: 8px; accent-color: var(--accent); }
.pv-bg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-bg-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: .9375rem; cursor: pointer; }
.pv-bg-chip[aria-checked="true"] { border-color: transparent; background: var(--accent); color: var(--accent-text); font-weight: 700; } /* 고른 칩 = 주색 채움(시안 칩 · 다른 사진 화면 칩과 같게) */
.pv-bg-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pv-bg-sw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background-color: var(--bar); }
.pv-bg-fill, .pv-bg-side > .btn { justify-content: center; min-height: 48px; font-weight: 700; }
.pv-bg-fill { border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-text); }
.pv-bg-orig[aria-pressed="true"] { font-weight: 700; }
@media (min-width: 1024px) {
  .pv-bg { grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr; }
  .pv-bg .pv-cmp-top { grid-column: 1 / -1; }
  .pv-bg-side { max-height: none; padding: 24px; }
}
@media (max-width: 1023.98px) and (orientation: landscape) and (max-height: 540px) {
  .pv-bg { grid-template-columns: minmax(0, 1fr) min(320px, 46vw); grid-template-rows: auto minmax(0, 1fr); }
  .pv-bg .pv-cmp-top { grid-column: 1 / -1; }
  .pv-bg-side { max-height: none; }
}
