/* iPDF — PDF 뷰어·편집기 */

:root {
  --navy: #1e3a5f;
  --accent: #2563eb;
  --danger: #c0392b;
  --ok: #15803d;

  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --line: #dde2ea;
  --line-strong: #c3ccd9;
  --text: #16202e;
  --text-2: #566275;
  --text-3: #8a94a6;

  --radius: 7px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .07), 0 4px 12px rgba(16, 30, 54, .06);
  --shadow-lg: 0 10px 40px rgba(16, 30, 54, .2);

  --font: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system,
          BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;
    --surface: #1b212a;
    --surface-2: #232a35;
    --line: #2e3644;
    --line-strong: #414b5c;
    --text: #e6ebf2;
    --text-2: #a3adbd;
    --text-3: #6f7b8d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
/* display 를 지정한 요소에도 hidden 이 먹도록 (flex/grid 가 UA 스타일을 이겨버린다) */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overscroll-behavior-y: none; }
body {
  font-family: var(--font); font-size: 13.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

.boot { position: fixed; inset: 0; display: grid; place-content: center; background: var(--bg); z-index: 100; }
.boot__spinner, .spinner-inline {
  width: 32px; height: 32px; border: 3px solid var(--line);
  border-top-color: var(--navy); border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner-inline { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────  전체 골격  ───────────────────────────── */

.app {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100dvh;
}

.filebar {
  display: flex; align-items: center; gap: 7px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: thin;
  padding: 7px 12px; padding-top: calc(7px + env(safe-area-inset-top));
  background: var(--navy); color: #fff;
}
.filebar > *, .filebar__group > * { flex: 0 0 auto; }
.filebar__group { display: flex; align-items: center; gap: 6px; }
.filebar__spacer { flex: 1 1 auto; min-width: 8px; }
.filebar__brand {
  display: grid; place-content: center; height: 25px; padding: 0 7px; border-radius: 6px;
  background: #fff; color: var(--navy); font-weight: 800; font-size: 13px;
  letter-spacing: -.2px; white-space: nowrap; flex: none;
}
.filebar__name {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  font-size: 13px; color: rgba(255, 255, 255, .92); padding: 0 4px;
}
.filebar__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; font-weight: 600; }
.filebar__name i { color: #ffd166; font-style: normal; font-size: 15px; }

.filebar .btn {
  background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff;
}
.filebar .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .26); }
.filebar .btn--primary { background: var(--accent); border-color: var(--accent); }

/* 설치 단추 — 설치 전에만 보이고, 바로 설치할 수 있을 때 눈에 띄게 */
.filebar__install.is-ready {
  background: #f0b429; color: #3d2c00; font-weight: 700;
  animation: installGlow 2.4s ease-in-out 3;
}
@keyframes installGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0); }
  50% { box-shadow: 0 0 0 4px rgba(240, 180, 41, .45); }
}
.filebar .icon-btn { color: #fff; }
.filebar .icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }

.stagewrap { min-height: 0; position: relative; overflow: hidden; }

.statusbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
  padding: 5px 12px; padding-bottom: calc(5px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); scrollbar-width: thin;
}
.statusbar > * { flex: 0 0 auto; }
.statusbar__sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.statusbar__msg { color: var(--text-3); white-space: nowrap; }
.statusbar__group {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1px;
}
.statusbar__page {
  width: 42px; height: 24px; padding: 0 4px; text-align: center;
  border: 1px solid transparent; border-radius: 4px; background: transparent;
  font-variant-numeric: tabular-nums;
}
.statusbar__page:hover { border-color: var(--line-strong); background: var(--surface); }
.statusbar__page:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.statusbar__total { color: var(--text-3); padding-right: 4px; white-space: nowrap; }
.statusbar__zoom {
  height: 24px; min-width: 92px; padding: 0 4px; cursor: pointer;
  border: 1px solid transparent; border-radius: 4px; background: transparent;
}
.statusbar__zoom:hover { border-color: var(--line-strong); background: var(--surface); }
.statusbar [data-layout-mode].is-active { background: var(--accent); color: #fff; }

/* ─────────────────────────────  공통 부품  ───────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn--lg { height: 42px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover:not(:disabled) { filter: brightness(1.1); background: var(--danger); }
.btn--ghost { border-color: transparent; background: transparent; }

.icon-btn {
  display: grid; place-content: center; min-width: 28px; height: 28px; padding: 0 6px;
  border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 15px;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.btnrow { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.actbar { display: grid; gap: 8px; }
.actbar__row { display: flex; gap: 8px; }
.actbar__row .btn { flex: 1; }

.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.input, .field :is(input, select, textarea) {
  width: 100%; min-height: 34px; padding: 6px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field :is(input, select, textarea):focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 120px; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.65; }

.toasts {
  position: fixed; left: 50%; bottom: calc(56px + env(safe-area-inset-bottom));
  transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; pointer-events: none;
}
.toast {
  padding: 10px 17px; border-radius: 20px; background: #16202e; color: #fff;
  font-size: 13px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out;
  max-width: min(88vw, 460px);
}
.toast--err { background: var(--danger); }
.toast--ok { background: var(--ok); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.modal {
  border: 0; border-radius: 12px; padding: 0; max-width: min(560px, 94vw);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(10, 16, 26, .5); }
.modal__head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.modal__body { padding: 18px; max-height: min(66vh, 580px); overflow: auto; }
.modal__foot { padding: 11px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  padding: 8px 16px; border: 0; background: none; cursor: pointer;
  font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent;
}
.tabs button.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.infolist { display: grid; grid-template-columns: 110px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.infolist dt { color: var(--text-3); }
.infolist dd { margin: 0; word-break: break-all; }

.findlist { display: grid; }
.findlist__item {
  display: flex; gap: 10px; align-items: baseline; text-align: left;
  padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer; font-size: 13px;
}
.findlist__item:hover { background: var(--surface-2); }
.findlist__item b { color: var(--accent); white-space: nowrap; }

/* ─────────────────────────────  시작 화면  ───────────────────────────── */

.welcome {
  height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 32px 20px 48px; gap: 4px;
}
/* 앱 아이콘을 그대로 쓴다 — 아이콘에 이미 PDF 표시가 들어 있다 */
.welcome__mark { width: 76px; height: 76px; margin-bottom: 10px; }
.welcome h1 { font-size: 26px; }
.welcome__sub { color: var(--text-2); margin: 6px 0 22px; line-height: 1.7; }
.welcome__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.welcome__note {
  margin-top: 18px; max-width: 480px; font-size: 12.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; line-height: 1.7;
}
.welcome__recent { margin-top: 34px; width: min(460px, 92vw); text-align: left; }
.welcome__recent h2 { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.recent {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; margin-bottom: 5px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.recent:hover { border-color: var(--accent); }
.recent__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.recent__meta { color: var(--text-3); font-size: 12px; }
.recent__x { color: var(--text-3); padding: 0 4px; }
.recent__x:hover { color: var(--danger); }
.welcome__drop {
  margin-top: 26px; padding: 22px 34px; border: 2px dashed var(--line-strong);
  border-radius: 12px; color: var(--text-3); font-size: 13px;
}
.welcome__drop.is-over { border-color: var(--accent); color: var(--accent); background: rgba(37, 99, 235, .07); }

/* ─────────────────────────────  도구 막대  ───────────────────────────── */

.toolbar {
  display: flex; align-items: center; gap: 3px; flex-wrap: nowrap;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
  padding: 5px 10px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.toolbar > * { flex: 0 0 auto; }
.toolbar__group {
  display: flex; gap: 2px; align-items: center; flex: 0 0 auto;
  padding-right: 8px; margin-right: 5px; border-right: 1px solid var(--line);
}
.toolbar__group--last { border-right: 0; }
.tool {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  cursor: pointer; font-size: 12.5px; white-space: nowrap;
}
.tool:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); }
.tool.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool__icon { font-size: 14px; }
.toolbar label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); padding: 0 4px; }
.toolbar input[type=color] { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; border-radius: 4px; }
.toolbar select { height: 26px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }

/* 좁은 화면에서는 글자를 접고 아이콘만 */
@media (max-width: 1180px) {
  .tool__label { display: none; }
  .tool { padding: 0 8px; }
}

/* ─────────────────────────────  문서 영역  ───────────────────────────── */

.docarea {
  display: grid; grid-template-columns: 148px minmax(0, 1fr);
  height: 100%; background: var(--surface-2);
}
.docarea.is-thumbs-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.docarea.is-thumbs-hidden .thumbs { display: none; }

.thumbs {
  display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
.thumbs__head {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-size: 12px; color: var(--text-2); min-height: 36px;
}
.thumbs__count { flex: 1; white-space: nowrap; }
.thumbs__count b { color: var(--accent); }
.thumbs__acts { display: flex; gap: 1px; }
.thumbs__acts .icon-btn { min-width: 26px; height: 26px; font-size: 13px; }
.linkbtn {
  border: 0; background: none; color: var(--accent); cursor: pointer;
  font-size: 12px; padding: 2px 4px; text-decoration: underline;
}

.thumbs__list { position: relative; overflow-y: auto; padding: 10px 8px; }
.stage { overflow: auto; padding: 18px; -webkit-overflow-scrolling: touch; }

.thumb {
  position: relative; margin-bottom: 9px; cursor: pointer; border-radius: 5px;
  border: 2px solid transparent; touch-action: none; /* 끌어놓기용 */
}
.thumb canvas {
  display: block; width: 100%; background: #fff; border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16); pointer-events: none;
}
.thumb.is-current { border-color: var(--line-strong); }
.thumb.is-selected { border-color: var(--accent); }
.thumb.is-selected::before {
  content: '✓'; position: absolute; left: 4px; top: 4px; z-index: 1;
  width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; display: grid; place-content: center; line-height: 1;
}
.thumbs__list.is-dragging .thumb { opacity: .55; }
.thumbs__list.is-dragging .thumb.is-selected { opacity: 1; outline: 2px solid var(--accent); }
.thumb__no {
  position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .66); color: #fff;
  font-size: 10.5px; padding: 1px 6px; border-radius: 9px; font-variant-numeric: tabular-nums;
  z-index: 2;
}
/* 썸네일 위에 겹쳐 그리는 표시 — 눌러서 고를 수는 없고 보여주기만 한다.
   크기·위치는 renderThumbs 가 캔버스 내부 픽셀에 맞춰 잡아 준다. */
.thumb__overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
.thumb__overlay .annot { position: absolute; }
.thumb__overlay .annot__text { overflow: hidden; white-space: pre-wrap; word-break: break-word; }

/* 끌어다 놓을 자리 표시선 */
.thumbs__drop {
  position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 2px;
  background: var(--accent); pointer-events: none; z-index: 2;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .25);
}

.pagewrap { position: relative; margin: 0 auto 20px; width: max-content; }

/* 두 장씩 보기 — 책처럼 나란히 */
.pagerow {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 16px; margin-bottom: 20px;
}
.pagerow .pagewrap { margin: 0; }
/* 한 장씩 보기 — 가운데에 한 장만 */
.stage[data-layout='single'] { display: grid; place-content: start center; }
.pagewrap canvas { display: block; background: #fff; box-shadow: var(--shadow); }
.pagewrap__num { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 11px; color: var(--text-3); }

/* pdf.js 텍스트 레이어 — 글자를 선택·복사할 수 있게 투명 span 을 덮는다 */
.textLayer {
  position: absolute; inset: 0; overflow: hidden; line-height: 1;
  text-align: initial; forced-color-adjust: none; transform-origin: 0 0; z-index: 2;
}
.textLayer span, .textLayer br {
  color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0;
}
.textLayer ::selection { background: rgba(37, 99, 235, .34); }
.textLayer.is-hidden { display: none; }

/* 주석 오버레이 */
.annotLayer { position: absolute; inset: 0; z-index: 3; }
.annotLayer.is-drawing { cursor: crosshair; }
.annot { position: absolute; box-sizing: border-box; }
.annot.is-selectable { cursor: move; }
.annot.is-selected { outline: 1.5px solid var(--accent); outline-offset: 1px; }
.annot__text { overflow: hidden; word-break: break-word; white-space: pre-wrap; padding: 3px; line-height: 1.35; }
.annot__img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.annot__handle {
  position: absolute; width: 11px; height: 11px; background: #fff;
  border: 1.5px solid var(--accent); border-radius: 2px;
  right: -6px; bottom: -6px; cursor: nwse-resize;
}
.annot__del {
  position: absolute; right: -9px; top: -9px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--danger); color: #fff; border: 0; font-size: 12px; cursor: pointer;
  display: grid; place-content: center; line-height: 1;
}
.annot__rotate {
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; cursor: grab;
  background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-content: center; font-size: 12px; line-height: 1; user-select: none;
}
.annot__rotate:active { cursor: grabbing; }
/* 손잡이를 상자와 잇는 선 — 어디를 잡아야 도는지 눈에 보이게 */
.annot__rotate::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 1.5px; height: 8px; background: var(--accent); transform: translateX(-50%);
}
.annot--textedit-src {
  position: absolute; background: rgba(37, 99, 235, .12);
  outline: 1px dashed var(--accent); cursor: text;
}

/* ─────────────────────────────  서명 패드  ───────────────────────────── */

.signpad {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: #fff; touch-action: none; display: block; width: 100%;
}

/* 보관함 목록 */
.stamplist { display: grid; gap: 7px; max-height: 320px; overflow-y: auto; }
.stampitem {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.stampitem__size { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.stampitem__size input { width: 62px; min-height: 30px; padding: 4px 6px; text-align: right;
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.stampitem img {
  width: 84px; height: 52px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 3px;
}
.stampitem__name {
  min-height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; font-weight: 600;
}
.stampitem__name:hover { border-color: var(--line-strong); background: var(--surface); }
.stampitem__name:focus { outline: none; border-color: var(--accent); background: var(--surface); }

/* 찍을 것 고르기 */
.stamppick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stamppick__item {
  display: grid; gap: 6px; justify-items: center; padding: 10px 8px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.stamppick__item:hover { border-color: var(--accent); background: var(--surface-2); }
.stamppick__item.is-last { border-color: var(--accent); }
.stamppick__item img { width: 100%; height: 62px; object-fit: contain; }
.stamppick__item span { font-size: 12.5px; font-weight: 600; text-align: center; word-break: break-all; }
.stamppick__item em { font-size: 11.5px; color: var(--text-3); font-style: normal; }

/* ─────────────────────────────  좁은 화면  ───────────────────────────── */

@media (max-width: 820px) {
  .docarea { grid-template-columns: 0 minmax(0, 1fr); }
  .thumbs { display: none; }
  .docarea:not(.is-thumbs-hidden) { grid-template-columns: 118px minmax(0, 1fr); }
  .docarea:not(.is-thumbs-hidden) .thumbs { display: grid; }
  .filebar__name b { max-width: 34vw; }
  .stage { padding: 10px; }
}

/* 마우스가 없는 기기에서는 터치 목표를 키운다 */
@media (pointer: coarse) {
  .btn { height: 36px; }
  .btn--sm { height: 32px; }
  .tool { height: 36px; }
  .icon-btn { height: 34px; min-width: 34px; }
  .annot__handle { width: 17px; height: 17px; right: -9px; bottom: -9px; }
  .annot__del { width: 25px; height: 25px; font-size: 14px; }
}

/*
 * 인쇄.
 *
 * 인쇄 단추는 저장본과 똑같은 PDF를 만들어 그걸 인쇄한다 (main.js 의 printDocument).
 * 아래 규칙은 브라우저 메뉴로 이 화면을 직접 인쇄할 때만 쓰인다.
 *
 * ⚠ .annotLayer 를 숨기면 안 된다.
 *    도장·서명·수정이 전부 그 안에 들어 있어서, 숨기면 인쇄물에서 통째로 사라진다.
 *    걷어낼 것은 손잡이·삭제단추 같은 편집용 장식뿐이다.
 */
@media print {
  .filebar, .toolbar, .statusbar, .thumbs, .textLayer { display: none !important; }
  .annot__handle, .annot__del, .annot__rotate, .annot--textedit-src { display: none !important; }
  .annot { outline: none !important; box-shadow: none !important; }

  .app { display: block; height: auto; }
  .docarea { display: block; }
  .stage { overflow: visible; padding: 0; }
  .pagewrap { margin: 0; page-break-after: always; box-shadow: none; }

  /* '배경 그래픽'을 꺼도 도장·형광펜 색이 나오도록 */
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
