@font-face { font-family: 'UnaGungsuh'; src: url('/assets/fonts/ChosunGs.TTF') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
/* 결과 본문 전용 조판: 기존 입력·로그인·잔액 화면에는 적용하지 않는다. */
.urp-reading { --urp-paper: #fbf8f1; --urp-ink: #263c34; --urp-muted: #636c65; --urp-line: #d5cbbb; color: var(--urp-ink); scroll-margin-top: 24px; }
.urp-reading *, .urp-reading *::before, .urp-reading *::after { box-sizing: border-box; }
.urp-cover { margin: 0 0 28px; overflow: hidden; border: 1px solid var(--urp-line); border-radius: 6px; background: #ede7db; }
.urp-scene { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 858; object-fit: contain; }
.urp-cover-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; padding: 17px 22px; border-top: 1px solid var(--urp-line); background: var(--urp-paper); }
.urp-brand { color: var(--urp-muted); font-family: var(--sans, sans-serif); font-size: 10px; letter-spacing: .13em; }
.urp-kind { color: var(--urp-ink); font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 19px; font-weight: 500; }
.urp-subject { color: var(--urp-ink); font-size: 13px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.urp-cover-element { display: inline-block; padding: 6px 11px; border: 1px solid #c1b18b80; border-radius: 2px; color: #e2d3af; font-size: 12px; line-height: 1.5; }
.urp-scene-note { color: var(--urp-muted); font-family: var(--sans, sans-serif); font-size: 11px; }
.urp-cover-portrait { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: 22px; padding: 28px; background: radial-gradient(ellipse at 5% 100%, #365348 0, #1b332d 80%); }
.urp-cover-portrait .urp-scene { grid-column: 2; grid-row: 1; max-height: 360px; aspect-ratio: 720 / 1074; border: 1px solid #bba47b; box-shadow: 0 10px 26px #071b2060; }
.urp-cover-portrait .urp-cover-caption { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 0; border: 0; background: transparent; }
.urp-cover-portrait .urp-brand, .urp-cover-portrait .urp-scene-note { color: #d1cbbd; }
.urp-cover-portrait .urp-subject { margin-bottom: -12px; color: #e4dfd2; font-size: 15px; }
.urp-cover-portrait .urp-kind { color: #faf5e8; font-size: clamp(24px, 4vw, 36px); line-height: 1.5; }
.urp-profile { margin: 0 0 32px; padding: 26px; border: 1px solid var(--urp-line); border-radius: 4px; background: linear-gradient(135deg, #fffdf7, #f4f0e5); }
.urp-profile-heading { margin-bottom: 20px; }
.urp-profile-eyebrow { display: block; margin-bottom: 7px; color: #7c755f; font-size: 10px; letter-spacing: .1em; }
.urp-profile-heading h3 { margin: 0; color: var(--urp-ink); font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 22px; font-weight: 500; line-height: 1.5; letter-spacing: -.035em; }
.urp-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.urp-profile-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.urp-profile-card { min-width: 0; }
.urp-profile-pair .urp-profile-card + .urp-profile-card { padding-left: 22px; border-left: 1px solid var(--urp-line); }
.urp-profile-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 15px; margin-bottom: 15px; }
.urp-profile-name { color: var(--urp-ink); font-size: 15px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.urp-day-element { color: var(--urp-muted); font-size: 12px; line-height: 1.7; }
.urp-profile-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.urp-profile-pillar { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; min-height: 118px; padding: 13px 4px 12px; border: 1px solid #ded7ca; border-radius: 3px; background: #fffdf7; }
.urp-profile-pillar.is-day { border-color: #8c9b80; background: #edf0e7; }
.urp-pillar-label { color: #737767; font-size: 10px; line-height: 1.5; }
.urp-pillar-glyph { color: var(--urp-element); font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 24px; font-weight: 500; line-height: 1.1; }
.urp-hour-unknown { margin: auto 0; color: #8b8c80; font-family: var(--sans, sans-serif); font-size: 11px; line-height: 1.7; text-align: center; word-break: keep-all; }
.urp-composition { margin-top: 20px; }
.urp-composition-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 11px; }
.urp-composition-heading strong { color: #455447; font-size: 12px; font-weight: 500; line-height: 1.5; }
.urp-composition-heading > span { color: #777d70; font-size: 10px; line-height: 1.5; }
.urp-element-ribbon { display: flex; gap: 3px; height: 18px; overflow: hidden; border-radius: 2px; }
.urp-element-unit { flex: 1 1 0; min-width: 0; background: var(--urp-element); }
.urp-element-mok { --urp-element: #4e7158; }
.urp-element-hwa { --urp-element: #b2614c; }
.urp-element-to { --urp-element: #a48642; }
.urp-element-geum { --urp-element: #7a8083; }
.urp-element-su { --urp-element: #486d8b; }
.urp-element-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 13px 0 0; }
.urp-element-item { min-width: 0; }
.urp-element-item dt { display: flex; align-items: center; gap: 5px; margin: 0 0 5px; color: #73796e; font-size: 10px; line-height: 1.4; }
.urp-element-item dt::before { content: ''; flex: 0 0 5px; width: 5px; height: 5px; background: var(--urp-element); }
.urp-element-item dd { margin: 0 0 0 10px; color: #34483d; font-size: 14px; font-weight: 500; line-height: 1.5; }
.urp-profile-note { margin: 18px 0 0; padding-top: 13px; border-top: 1px solid #ddd7ca; color: #72796e; font-family: var(--sans, sans-serif); font-size: 11px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.urp-nav { margin: 0 0 32px; padding: 0 0 20px; border-bottom: 1px solid var(--urp-line); }
.urp-nav-label { display: block; margin-bottom: 12px; color: var(--urp-muted); font-size: 11px; letter-spacing: .05em; }
.urp-nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.urp-nav-link { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; border: 1px solid var(--urp-line); border-radius: 3px; background: #ffffff65; color: var(--urp-ink); font-family: var(--sans, sans-serif); font-size: 12px; line-height: 1.5; text-decoration: none; }
.urp-nav-link:hover { border-color: #829487; background: #fffdf8; }
.urp-nav-link:focus-visible, .urp-record-link:focus-visible { outline: 2px solid #416657; outline-offset: 3px; }
.urp-chapter { scroll-margin-top: 24px; }
.urp-chapter:focus { outline: none; }
body .urp-reading :is(.sr-reading-headline, .wsh-result-headline, .fortune-result-headline, .tw-result-headline, .result-headline, .myr-tab-detail-title) { max-width: 25ch; margin: 0 0 30px; color: var(--urp-ink); font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: clamp(23px, 3.4vw, 32px); font-weight: 500; line-height: 1.65; letter-spacing: -.04em; word-break: keep-all; overflow-wrap: anywhere; }
body .urp-reading :is(.sr-section, .fortune-result-section, .wsh-card, .gh-result-card) { margin: 0 0 28px; padding: 22px 24px; border: 1px solid var(--urp-line); border-radius: 4px; background: var(--urp-paper); box-shadow: none; }
body .urp-reading .sr-section-header { margin: 0 0 18px; }
body .urp-reading :is(.sr-section-label, .fortune-result-label, .wsh-card-title, .wsh-card-headline, .gh-result-card-title) { color: var(--urp-ink); font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 19px; font-weight: 500; line-height: 1.55; letter-spacing: -.02em; }
body .urp-reading :is(.sr-section-body, .fortune-result-section > p, .wsh-card-body, .gh-result-card-body, .tdy-result, .tw-reading, .tw-summary > p, .reading, .summary > p) { margin: 0; padding: 0; color: #344139; font-family: var(--sans, 'Noto Sans KR', sans-serif); font-size: 16px; font-weight: 400; line-height: 2; letter-spacing: -.02em; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
body .urp-reading :is(.wsh-cards-grid, .gh-result-cards) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
body .urp-reading :is(.sr-closing, .fortune-result-closing, .wsh-closing) { margin: 30px 0 22px; padding: 18px 20px; border-left: 2px solid #9a8560; background: #f8f4e9; color: #3f4f43; font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 16px; font-weight: 400; line-height: 1.95; }
.urp-record-link { display: inline-flex; align-items: center; min-height: 44px; margin: 26px 0 12px; padding: 11px 15px; border: 1px solid #b6bcae; border-radius: 3px; color: #304a3b; font-family: var(--sans, sans-serif); font-size: 13px; line-height: 1.6; text-decoration: none; }
.url-body.urp-reading { padding: clamp(16px, 4vw, 28px); }
.urp-reading > .url-part.urp-chapter { margin: 0 0 26px; padding-top: 24px; border-top: 1px solid var(--urp-line); }
.urp-reading > .url-part > h4 { margin-bottom: 16px; font-family: var(--serif-kr, serif); font-size: 19px; font-weight: 500; }
.urp-reading .url-part p { color: #344139; font-size: 16px; font-weight: 400; line-height: 2; word-break: keep-all; overflow-wrap: anywhere; }
.urp-reading > .url-part > .url-part { margin-left: 0; }
.urp-reading > .url-part > .url-part > h4 { font-size: 14px; }
.urp-reading .tw-card-result { padding: 22px; margin: 0 0 22px; border: 1px solid var(--urp-line); background: var(--urp-paper); }
.urp-reading .tw-card-result img { height: auto; max-width: 100%; }
/* 풀이가 열린 동안만 명식 머리글을 줄여 삽화와 본문까지 이어서 읽게 한다. */
#srOverlay:has(#srReading[style*="display: block"]) .sr-subjects { margin-bottom: 22px; }
#srOverlay:has(#srReading[style*="display: block"]) .sr-pillars { margin-bottom: 18px; }
#srOverlay:has(#srReading[style*="display: block"]) .sr-pillar { padding: 14px 6px 10px; }
#srOverlay:has(#srReading[style*="display: block"]) .sr-meta { flex-direction: row; gap: 18px; margin-bottom: 12px; padding: 12px 0; }
#srOverlay:has(#srReading[style*="display: block"]) .sr-reading { padding-top: 18px; }
@media (max-width: 540px) {
  .urp-cover { margin-bottom: 24px; }
  .urp-cover-caption { gap: 6px 12px; padding: 13px 16px; }
  .urp-scene-note { width: 100%; }
  .urp-cover-portrait { gap: 15px; padding: 20px 18px; }
  .urp-cover-portrait .urp-cover-caption { gap: 15px; }
  .urp-cover-portrait .urp-brand { font-size: 9px; letter-spacing: .05em; }
  .urp-cover-portrait .urp-kind { font-size: 23px; }
  .urp-cover-portrait .urp-scene-note { font-size: 10px; line-height: 1.7; }
  .urp-cover-portrait .urp-subject { font-size: 12px; margin-bottom: -8px; }
  .urp-cover-element { padding: 4px 8px; font-size: 10px; }
  .urp-profile { padding: 20px 16px; margin-bottom: 24px; }
  .urp-profile-heading { margin-bottom: 17px; }
  .urp-profile-heading h3 { font-size: 20px; }
  .urp-profile-pair { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .urp-profile-pair .urp-profile-card + .urp-profile-card { padding: 24px 0 0; border: 0; border-top: 1px solid var(--urp-line); }
  .urp-profile-pillars { gap: 6px; }
  .urp-profile-pillar { min-height: 110px; padding-top: 11px; }
  .urp-pillar-glyph { font-size: 23px; }
  .urp-profile-note { font-size: 10px; }
  .urp-nav { margin-bottom: 24px; }
  .urp-nav-link { min-height: 40px; font-size: 11px; padding: 8px 10px; }
  body .urp-reading :is(.sr-section, .fortune-result-section, .wsh-card, .gh-result-card) { padding: 18px 16px; margin-bottom: 18px; }
  body .urp-reading :is(.sr-section-label, .fortune-result-label, .wsh-card-title, .wsh-card-headline, .gh-result-card-title) { font-size: 17px; }
  .urp-reading .tw-card-result { padding: 16px; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-sheet { padding: 28px 20px; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-title { font-size: 20px; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-subjects { margin-bottom: 20px; font-size: 11px; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-pillar-label { font-size: 8px; letter-spacing: .03em; margin-bottom: 8px; }
  #srOverlay:has(#srReading[style*="display: block"]) :is(.sr-pillar-stem, .sr-pillar-branch) { font-size: 25px; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-pillar.is-day::after { padding: 3px 6px; letter-spacing: .02em; white-space: nowrap; }
  #srOverlay:has(#srReading[style*="display: block"]) .sr-meta-label { font-size: 9px; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  .urp-reading { animation: none !important; scroll-behavior: auto; }
}
@media print {
  .urp-nav, .urp-record-link { display: none !important; }
  .urp-cover { break-inside: avoid; margin-bottom: 8mm !important; box-shadow: none; }
  .urp-scene { max-height: 65mm; width: 100%; object-fit: contain; }
  .urp-cover-portrait { display: grid !important; grid-template-columns: 1fr 42mm; padding: 4mm; background: #f8f5ed !important; }
  .urp-cover-portrait .urp-scene { max-height: 65mm; width: 42mm; }
  .urp-cover-portrait .urp-brand, .urp-cover-portrait .urp-kind, .urp-cover-portrait .urp-scene-note { color: #253a32 !important; }
  .urp-cover-portrait .urp-subject, .urp-cover-element { color: #253a32 !important; }
  .urp-cover-caption { padding: 3mm; }
  .urp-profile { break-inside: avoid; padding: 5mm; margin-bottom: 6mm; background: #fffdf7 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .urp-profile-heading { margin-bottom: 3mm; }
  .urp-profile-heading h3 { font-size: 15pt; }
  .urp-profile-pillars { gap: 2mm; }
  .urp-profile-pillar { min-height: 25mm; padding: 2mm; gap: 1.5mm; }
  .urp-pillar-glyph { font-size: 18pt; }
  .urp-composition { margin-top: 3mm; }
  .urp-element-ribbon { height: 3mm; }
  .urp-element-legend { margin-top: 2mm; }
  .urp-profile-note { margin-top: 3mm; padding-top: 2mm; font-size: 8pt; }
  body .urp-reading :is(.sr-section-body, .fortune-result-section > p, .wsh-card-body, .gh-result-card-body, .tdy-result, .tw-reading, .tw-summary > p, .reading, .summary > p), .urp-reading .url-part p { font-size: 10.5pt !important; line-height: 1.8 !important; }
  body .urp-reading :is(.sr-section, .fortune-result-section, .wsh-card, .gh-result-card) { break-inside: auto !important; padding: 4mm !important; }
}

.urp-reading .card-result { margin-bottom: 24px; padding: 22px; border: 1px solid var(--urp-line); background: var(--urp-paper); }
.urp-reading .myr-detail-section { padding: 20px 0; border-top: 1px solid var(--urp-line); }
.urp-reading .myr-detail-section h5 { font-family: var(--serif-kr, serif); font-size: 17px; font-weight: 500; }
.urp-reading .myr-detail-section p { font-size: 16px; font-weight: 400; line-height: 2; }

/* 12장 사주책 — 새 책과 보관함에 같은 본문·목차·사주표를 쓴다. */
.urp-book { padding: clamp(18px, 4vw, 36px); background: var(--urp-paper); }
/* A3의 뒤쪽 .bv-body { padding: 0 } 규칙보다 구체적으로 책 바깥 여백을 지킨다. */
#bvBody.urp-book { padding: 24px; }
.urp-book .urp-cover { margin-bottom: 24px; }
.urp-book .urp-nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.urp-book .urp-nav-link { align-items: flex-start; overflow-wrap: anywhere; word-break: keep-all; }
.urp-book-cover-detail { color: #4b5e50; font-size: 13px; line-height: 1.7; }
.urp-book-cover-meta { color: #687366; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.urp-cover-portrait .urp-book-cover-detail { color: #eee4d0; }
.urp-cover-portrait .urp-book-cover-meta { color: #d1cbbd; }
.urp-book-intro, .urp-book-flow { margin: 0 0 32px; padding: 22px 24px; border: 1px solid var(--urp-line); background: #f3efe3; }
.urp-book :is(.urp-book-intro, .urp-book-flow) h2 { margin: 0 0 12px; color: var(--urp-ink); font-size: 18px; font-weight: 500; }
.urp-book :is(.urp-book-intro, .urp-book-flow) p { margin: 8px 0; color: #536055; font-size: 13px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book .urp-book-meta { color: #7b6039; font-weight: 500; }
.urp-book .urp-book-caution { font-size: 11px; color: #74796f; }
.urp-book-flow-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.urp-book-flow-cell { display: flex; flex-direction: column; gap: 6px; padding: 12px 4px; border: 1px solid var(--urp-line); text-align: center; background: #fffdf7; }
.urp-book-flow-cell span { font-size: 10px; color: #707867; }
.urp-book-flow-cell strong { font-family: var(--serif-kr, serif); font-size: 18px; color: var(--urp-ink); font-weight: 500; }
.urp-book-chapter { margin: 0 0 36px; padding-top: 28px; border-top: 1px solid #bbaa86; scroll-margin-top: 70px; }
.urp-book-chapter-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 6px 14px; margin-bottom: 24px; }
.urp-book-chapter-number { grid-row: 1 / span 2; color: #967c4c; font-family: 'UnaGungsuh', var(--serif-kr, serif); font-size: 36px; line-height: 1; }
.urp-book .urp-book-chapter-title { margin: 0; color: var(--urp-ink); font-family: 'UnaGungsuh', var(--serif-kr, 'Noto Serif KR', serif); font-size: 25px; font-weight: 500; line-height: 1.5; letter-spacing: -.04em; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book .urp-book-subtitle { grid-column: 2; margin: 0; color: #7c715a; font-size: 13px; line-height: 1.8; }
.urp-book-art { display: grid; grid-template-columns: 38% minmax(0, 1fr); align-items: center; gap: 20px; margin: 0 0 26px; padding: 12px; background: #f0ebdf; }
.urp-book-art .urp-book-scene { display: block; width: 100%; height: 128px; object-fit: contain; }
.urp-book-art-caption { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #6b7367; font-size: 12px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book-art-caption strong { color: #3d5745; font-family: var(--serif-kr, serif); font-size: 16px; font-weight: 500; }
.urp-book-section { margin: 22px 0; }
.urp-book .urp-book-section > h3, .urp-book-astro > h3 { margin: 0 0 12px; color: #3d5745; font-family: var(--serif-kr, serif); font-size: 17px; font-weight: 500; line-height: 1.8; }
.urp-book .urp-book-prose { margin: 0 0 17px; color: #344139; font-family: var(--serif-kr, 'Noto Serif KR', serif); font-size: 16px; font-weight: 400; line-height: 2; letter-spacing: -.02em; text-align: left; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book-prose strong { font-weight: 600; color: #263c34; }
.urp-book-action { border: 1px solid #c8d1bc; padding: 20px; background: #eef2e7; border-radius: 3px; }
.urp-book-action > :last-child { margin-bottom: 0; }
.urp-book .urp-book-quote { margin: 24px 0; padding: 17px 21px; border-left: 3px solid #a58c5a; background: #f2eadb; color: #4b4c39; font-family: var(--serif-kr, serif); font-size: 16px; line-height: 1.9; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book .urp-book-note { margin: 12px 0; color: #6b7367; font-size: 12px; line-height: 1.9; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.urp-book-astro { margin: 24px 0; padding: 20px; border: 1px solid #cbbb97; background: #f2ebdc; }
.urp-book-astro > h3 { color: #7b6039; }
.urp-book-astro .urp-book-prose { font-size: 14px; }
.urp-book-appendix { margin: 0 0 36px; padding-top: 28px; border-top: 1px solid #bbaa86; scroll-margin-top: 70px; }
.urp-book-appendix > h3, .urp-book-tarot-card > h3 { color: #3d5745; font-family: var(--serif-kr, serif); font-size: 17px; font-weight: 500; line-height: 1.8; }
.urp-book-tarot-card { margin: 24px 0; }
.urp-book-tarot-image { display: block; width: auto; height: 245px; max-width: 100%; object-fit: contain; margin: 22px auto; }
/* 카드 방향은 글자로 보존하고 수묵 원화는 정방향으로 감상한다. */
@media (max-width: 540px) {
  #bvBody.urp-book { padding: 16px; }
  .urp-book .urp-nav-links { gap: 7px; }
  .urp-book .urp-nav-link { font-size: 11px; padding: 9px; }
  .urp-book-intro, .urp-book-flow { padding: 18px 16px; }
  .urp-book-flow-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .urp-book-chapter-head { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 10px; }
  .urp-book-chapter-number { font-size: 29px; }
  .urp-book .urp-book-chapter-title { font-size: 22px; }
  .urp-book-art { gap: 12px; padding: 10px; }
  .urp-book-art .urp-book-scene { height: 104px; }
  .urp-book-art-caption { font-size: 11px; gap: 6px; }
  .urp-book-art-caption strong { font-size: 14px; }
  .urp-book-action, .urp-book-astro { padding: 16px; }
}
@media print {
  .urp-book { padding: 0 !important; background: white !important; }
  .urp-book .urp-nav { display: block !important; padding-bottom: 4mm; margin-bottom: 5mm; break-inside: avoid; }
  .urp-book .urp-nav-label { font-size: 9pt; }
  .urp-book .urp-nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1mm; }
  .urp-book .urp-nav-link { min-height: 0; padding: 1mm 2mm; font-size: 8.5pt; }
  .urp-book-cover-detail, .urp-book-cover-meta { color: #344139 !important; }
  .urp-book-intro, .urp-book-flow { padding: 4mm; margin-bottom: 5mm; break-inside: avoid; }
  .urp-book :is(.urp-book-intro, .urp-book-flow) h2 { font-size: 12pt; }
  .urp-book :is(.urp-book-intro, .urp-book-flow) p { font-size: 9pt; }
  .urp-book-flow-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .urp-book-chapter { break-before: page; padding-top: 4mm; margin-bottom: 6mm; }
  .urp-book-chapter-head { break-inside: avoid; break-after: avoid; margin-bottom: 5mm; }
  .urp-book .urp-book-chapter-title { font-size: 17pt; }
  .urp-book-art { margin-bottom: 4mm; padding: 2mm; gap: 4mm; break-inside: avoid; break-after: avoid; }
  .urp-book-art .urp-book-scene { height: 32mm; }
  .urp-book-art-caption { font-size: 8.4pt; gap: 2mm; }
  .urp-book-art-caption strong { font-size: 10pt; }
  .urp-book .urp-book-prose { font-size: 10.5pt; line-height: 1.85; orphans: 3; widows: 3; }
  .urp-book-section { margin: 5mm 0; }
  .urp-book .urp-book-section > h3 { break-after: avoid; font-size: 12pt; }
  .urp-book-action { padding: 4mm; break-inside: auto; }
  .urp-book-astro { padding: 4mm; break-inside: avoid; }
  .urp-book .urp-book-quote { font-size: 11pt; break-inside: avoid; }
  .urp-book .urp-book-note { font-size: 9pt; }
  .urp-book-appendix { break-before: page; padding-top: 4mm; }
  .urp-book-appendix > h3, .urp-book-tarot-card > h3 { font-size: 12pt; break-after: avoid; }
  .urp-book-tarot-image { height: 64mm; margin: 4mm auto; break-inside: avoid; break-after: avoid; }
}

/* 운하 타로 공통 조판: 원래 수묵 원화, 한국어 이름, 얇은 둥근 프레임. */
.urp-book .urp-kind, .urp-tarot-reading h3, .urp-book-tarot-card > h3,
.card-result.urp-tarot-row .card-name, #tarot .tw-card-result.urp-tarot-row .tw-card-name,
.tcard.urp-tarot-row .tcn, .tarot-inline .ti-card.urp-tarot-row .ti-nm {
  font-family: 'UnaGungsuh', var(--serif-kr, serif); font-weight: 400;
}
.urp-tarot-frame { position: relative; isolation: isolate; display: flex; flex-direction: column; box-sizing: border-box; width: min(100%, 260px); aspect-ratio: 7 / 12; margin: 22px auto; padding: 12px 10px 15px; background: #faf8f2; color: #243f45; overflow: hidden; }
.urp-tarot-frame::before { content: ''; position: absolute; z-index: -1; inset: 8px; border: 1px solid #bba575; border-radius: 12px; pointer-events: none; }
.urp-tarot-rank { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 1px 12px 0; font-family: 'UnaGungsuh', serif; font-size: 16px; line-height: 1.5; flex: 0 0 auto; }
.urp-tarot-rank::before, .urp-tarot-rank::after { content: ''; height: 1px; flex: 1; background: #c9b98f; }
.urp-tarot-art-window { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.urp-tarot-frame .urp-tarot-art { display: block; width: 100% !important; height: 100% !important; max-width: 100%; min-height: 0; object-fit: contain; margin: 0 !important; border: 0 !important; border-radius: 0 !important; transform: none !important; flex: initial !important; cursor: default; }
.urp-tarot-caption { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 0 0 auto; padding: 9px 5px 2px; text-align: center; }
.urp-tarot-caption::before { content: ''; width: 34px; height: 1px; background: #c9b98f; }
.urp-tarot-name { color: #243f45; font-family: 'UnaGungsuh', serif; font-size: 20px; font-weight: 400; line-height: 1.5; word-break: keep-all; }
.urp-tarot-brand { font-family: 'UnaGungsuh', serif; font-size: 13px; color: #857d6e; line-height: 1.5; }
.urp-tarot-reading { color: #344139; }
/* A3의 후행 기존 스타일보다 우선하도록 데스크톱과 모바일에 같은 복합 선택자를 유지한다. */
body .urp-tarot-row, #tarot .tw-card-result.urp-tarot-row, .card-result.urp-tarot-row, .tcard.urp-tarot-row, .tarot-inline .ti-card.urp-tarot-row { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 24px; align-items: start; margin: 24px 0; }
.urp-tarot-row > .urp-tarot-frame { width: 100%; margin: 0 auto; }
.urp-tarot-details { min-width: 0; }
.urp-tarot-reading .urp-book-prose { white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; font-size: 15px; line-height: 1.95; }
.urp-tarot-reading .urp-book-note { color: #74796f; font-size: 12px; line-height: 1.8; }
.urp-tarot-reading .urp-book-quote { padding: 16px 18px; border-left: 2px solid #a58c5a; background: #f2eadb; line-height: 1.9; }
@media (max-width: 540px) {
  body .urp-tarot-row, #tarot .tw-card-result.urp-tarot-row, .card-result.urp-tarot-row, .tcard.urp-tarot-row, .tarot-inline .ti-card.urp-tarot-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .urp-tarot-row > .urp-tarot-frame { width: min(100%, 220px); }
}
@media print {
  .urp-tarot-frame { width: 64mm; margin: 4mm auto; break-inside: avoid; }
  .urp-tarot-rank { font-size: 11pt; }
  .urp-tarot-name { font-size: 14pt; }
  .urp-tarot-brand { font-size: 9pt; }
  .urp-tarot-row { break-inside: avoid; }
}

.urp-tarot-row > div:only-child { grid-column: 1 / -1; }
