/* 리포트 예시 창 — 유료 리포트 읽기 디자인(Case A 130 리디자인 v5.7) 이식 (2026-10-12, PROPOSAL)
   v5.7에서 잰 값: 장 제목 29/700 · 줄 1.28(데스크톱 36/1.24), 장 번호 금 15/700 + 막 이름 15/600, 본문 17/1.8 #d3d9e4,
   근거 카드 #121a28 · 둥글기 20 · 18/20, 유리 막대 높이 58 · 위 10px · rgba(14,21,36,.46) + 흐림, 금 #d5b681.
   애플 디자인 패스(V13.19) 뒤라 금속 금색 · 광택은 쓰지 않는다(평평한 금). 금은 장 번호 · 지금 자리 · 행동에만.
   감사 규칙: 본문 · 제목을 등장 연출로 숨기지 않는다, 움직임 줄이기 존중, 누를 곳 44px, 강제 색 모드에서 경계 유지. */
html body dialog.ex-sheet {
  --exr-gold: #d5b681;
  --exr-label: #f3f5fa;
  --exr-label-2: #aab4c5;
  --exr-label-3: #96a2b7;
  --exr-ink: #d3d9e4;
  --exr-card: #121a28;
  --exr-card-2: #172133;
  --exr-line: rgba(239, 237, 230, .08);
  background: #0a101c;
}

/* ── 유리 막대: 목차 · 예시 · 지금 장 · 닫기 (화면당 머리 하나) ── */
html body dialog.ex-sheet .ex-top {
  position: absolute; z-index: 3;
  top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; right: 12px;
  max-width: 680px; margin: 0 auto;
  min-height: 58px; padding: 7px 7px 7px 6px; gap: 6px;
  border: 0; border-radius: 999px;
  background: rgba(14, 21, 36, .72);
  -webkit-backdrop-filter: blur(22px) saturate(1.75) brightness(1.06);
  backdrop-filter: blur(22px) saturate(1.75) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 30px -16px rgba(0, 0, 0, .7);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body dialog.ex-sheet .ex-top { background: rgba(14, 21, 36, .94); }
}
html body dialog.ex-sheet .ex-top-t { padding-left: 14px; color: var(--exr-label-2); }
html body dialog.ex-sheet .exr-toc-b {
  flex: none; min-width: 44px; height: 44px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none;
  color: var(--exr-gold); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
html body dialog.ex-sheet .exr-mid { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 7px; margin: 0; font-size: 15px; line-height: 1.4; }
html body dialog.ex-sheet .exr-tag {
  flex: none; padding: 1px 7px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(239, 237, 230, .22);
  font-size: 11.5px; font-weight: 600; color: var(--exr-label-2);
}
html body dialog.ex-sheet .exr-no { flex: none; font-size: 13px; font-weight: 700; color: var(--exr-gold); font-variant-numeric: tabular-nums; }
html body dialog.ex-sheet .exr-mid strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 650; color: var(--exr-label); }
html body dialog.ex-sheet .ex-top .ex-x { flex: none; width: 44px; height: 44px; font-size: 22px; }
/* 읽은 만큼 — 막대 아래 금 실선 하나(지금 장 본문 기준) */
html body dialog.ex-sheet .exr-prog {
  position: absolute; left: 30px; right: 30px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--exr-gold); transform-origin: 0 50%; transform: scaleX(var(--exr-p, 0));
  opacity: .9; pointer-events: none;
}

/* 막대 위 틈으로 글이 비치지 않게 — 맨 위 옅은 가림(v5.7 rd-top-edge) */
html body dialog.ex-sheet::before {
  content: ""; position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) + 40px);
  background: linear-gradient(#0a101c 45%, rgba(10, 16, 28, 0)); pointer-events: none;
}

/* ── 읽는 자리 ── */
html body dialog.ex-sheet .ex-scroll { padding-top: calc(env(safe-area-inset-top, 0px) + 96px); scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
html body dialog.ex-sheet .ex-doc, html body dialog.ex-sheet .ex-toc, html body dialog.ex-sheet .ex-status,
html body dialog.ex-sheet .ex-back, html body dialog.ex-sheet .exr-next { max-width: 640px; }
/* 가상 인물 안내 — v5.7 근거 카드의 면 */
html body dialog.ex-sheet .ex-head {
  margin: 0 0 28px; padding: 16px 18px; border-radius: 20px; background: var(--exr-card);
  box-shadow: inset 0 1px 0 rgba(244, 222, 168, .10), inset 0 0 0 1px rgba(255, 255, 255, .04);
  font-size: 14px; line-height: 1.6; color: var(--exr-label-2);
}
html body dialog.ex-sheet .ex-pick { margin-bottom: 40px; }
html body dialog.ex-sheet .ex-pick-h { color: var(--exr-label-3); }
html body dialog.ex-sheet .ex-pick-b { min-height: 44px; background: rgba(239, 237, 230, .07); color: var(--exr-label-2); }
html body dialog.ex-sheet .ex-pick-b[aria-pressed="true"] { background: rgba(213, 182, 129, .18); color: var(--exr-label); }

/* 장 머리: 장 번호(금) · 막 이름 한 줄 → 큰 제목 → 몇 번째 장 · 분량 */
html body dialog.ex-sheet .exr-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline;
  margin: 0 0 32px; scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 84px);
}
html body dialog.ex-sheet .exr-head-no { grid-column: 1; grid-row: 1; font-size: 15px; font-weight: 700; color: var(--exr-gold); font-variant-numeric: tabular-nums; }
html body dialog.ex-sheet .exr-head-topic { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 600; color: var(--exr-label-2); word-break: keep-all; }
html body dialog.ex-sheet .exr-head h2 {
  grid-column: 1 / -1; grid-row: 2; margin: 10px 0 0;
  font-size: 29px; font-weight: 700; line-height: 1.28; letter-spacing: -.028em; color: var(--exr-label);
  text-wrap: balance; word-break: keep-all;
}
html body dialog.ex-sheet .exr-head .ex-kicker { grid-column: 1 / -1; grid-row: 3; margin: 14px 0 0; font-size: 14px; font-weight: 500; color: var(--exr-label-3); }

/* 본문 — v5.7 읽는 문단 */
html body dialog.ex-sheet .ex-body .ex-p { margin: 0 0 1.05em; }
html body dialog.ex-sheet .ex-body .ex-p p { font-size: 17px !important; line-height: 1.8 !important; color: var(--exr-ink); letter-spacing: 0; }

/* 장 끝: 다음 장 */
html body dialog.ex-sheet .exr-next { margin: 40px auto 0; }
html body dialog.ex-sheet .exr-next-b {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  width: 100%; min-height: 72px; padding: 16px 20px; border: 0; border-radius: 20px;
  background: var(--exr-card); color: var(--exr-label); font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: background-color .1s ease;
}
html body dialog.ex-sheet .exr-next-k { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--exr-label-3); }
html body dialog.ex-sheet .exr-next-t { display: block; font-size: 17px; font-weight: 650; line-height: 1.4; word-break: keep-all; }
html body dialog.ex-sheet .exr-next-t b { margin-right: 6px; color: var(--exr-gold); font-weight: 700; font-variant-numeric: tabular-nums; }
html body dialog.ex-sheet .exr-next-c { font-size: 22px; color: var(--exr-label-3); }
html body dialog.ex-sheet .exr-next-b:active { background: #28354d; }
@media (hover: hover) { html body dialog.ex-sheet .exr-next-b:hover { background: var(--exr-card-2); } }

/* 15장 목차 — 둥근 묶음 한 장, 읽을 수 있는 장 번호만 금 */
html body dialog.ex-sheet .ex-toc { margin-top: 48px; padding: 22px 20px 8px; border-radius: 20px; background: var(--exr-card); scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 84px); }
html body dialog.ex-sheet .ex-toc h3 { font-size: 19px; font-weight: 650; color: var(--exr-label); outline: none; }
html body dialog.ex-sheet .ex-toc-note { color: var(--exr-label-3); }
html body dialog.ex-sheet .ex-toc li { border-top-color: var(--exr-line); color: #7d8799; }
html body dialog.ex-sheet .ex-toc .ex-no { color: #6b7486; }
html body dialog.ex-sheet .ex-toc li.is-can .ex-no, html body dialog.ex-sheet .ex-toc li.is-here .ex-no { color: var(--exr-gold); }
html body dialog.ex-sheet .ex-toc-go { min-height: 44px; color: var(--exr-ink); }
html body dialog.ex-sheet .ex-toc li.is-here { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 12px; background: rgba(239, 237, 230, .06); color: var(--exr-label); }
html body dialog.ex-sheet .ex-toc li.is-here + li { border-top-color: transparent; }
html body dialog.ex-sheet .ex-chip.is-here { background: rgba(213, 182, 129, .18); }
/* 디자인 고침 11(2026-10-31, 감사 G-1): 예시에 없는 장은 같은 줄 끝에 「예시에 없음」 — 줄 높이 그대로, 둥근 테 없이 줄 글자와 같은 색 */
html body dialog.ex-sheet .ex-toc li.is-off { grid-template-columns: 1.6em minmax(0, 1fr) auto; }
html body dialog.ex-sheet .ex-chip.is-off { grid-column: 3; grid-row: 1; margin: 0; padding: 0; box-shadow: none; background: none; font-size: 12px; font-weight: 500; color: inherit; white-space: nowrap; }
html body dialog.ex-sheet .ex-status { color: var(--exr-label-3); }

/* 맨 위로 — 한 화면 넘게 읽었을 때만 */
html body dialog.ex-sheet .exr-up {
  position: absolute; z-index: 3; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(14, 21, 36, .6); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(255, 255, 255, .06);
  color: var(--exr-label); font: inherit; font-size: 18px; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
html body dialog.ex-sheet[data-exr-up="1"] .exr-up { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
/* 디자인 고침 1(2026-10-28, 감사 G-3 · R4-11②): 끝까지 내리면 떠 있는 ↑ 단추가 「예시 닫기」 오른쪽 끝을 덮었다. 끝에 ↑ 단추 높이만큼 빈 줄을 둔다 */
html body dialog.ex-sheet .ex-scroll { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); }

html body dialog.ex-sheet :is(.exr-toc-b, .exr-next-b, .exr-up):focus-visible { outline: 2px solid rgba(244, 239, 228, .85); outline-offset: 3px; }

@media (min-width: 760px) {
  html body dialog.ex-sheet .ex-scroll { padding-top: calc(env(safe-area-inset-top, 0px) + 112px); }
  html body dialog.ex-sheet .exr-head h2 { font-size: 36px; line-height: 1.24; letter-spacing: -.03em; }
  html body dialog.ex-sheet .ex-body .ex-p p { font-size: 18px !important; }
  html body dialog.ex-sheet .exr-up { right: 24px; bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html body dialog.ex-sheet .exr-up, html body dialog.ex-sheet .exr-next-b { transition: none; }
}
/* 강제 색 모드: 배경 · 그림자로 그린 경계가 사라지므로 시스템 색 테두리로 되살린다 */
@media (forced-colors: active) {
  html body dialog.ex-sheet .ex-top, html body dialog.ex-sheet .exr-next-b, html body dialog.ex-sheet .ex-toc,
  html body dialog.ex-sheet .ex-head, html body dialog.ex-sheet .exr-up, html body dialog.ex-sheet .exr-tag { border: 1px solid CanvasText; }
  html body dialog.ex-sheet .exr-prog { background: Highlight; }
  html body dialog.ex-sheet .ex-toc li.is-here { outline: 1px solid Highlight; }
}
