/* 운율담 모바일 리포트 — 페이지 틀. 부품 모양은 uc-components.css(Codex v1.1)를 따른다. */
@font-face { font-family: 'Noto Serif KR'; src: url('../fonts/NotoSerifKR-500.woff') format('woff'); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #293447; --paper: #FBF8F0; --line: #DDD9CF; --muted: #66717B;
  --gold: #80613B; --teal: #4B6574; --rest: #8B513E; --navy: #293447;
  --sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #E8E8E3; color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.75; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4, .ry-hanja-lg, .uc-hanja, .uc-cycle-hanja, .uc-element-badge { font-family: var(--serif); font-weight: 500; }
.uc-component, .uc-component p { font-family: var(--sans); }
.uc-gridlines text, .uc-axis-label, .uc-score-label { font-family: var(--sans) !important; }
.uc-empty { font-family: var(--sans); }

/* 위 막대 */
.ry-top { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; padding-top: env(safe-area-inset-top);
  background: rgba(251, 248, 240, .96); border-bottom: 1px solid var(--line); max-width: 480px; margin: 0 auto; backdrop-filter: blur(6px); }
.ry-brand { display: flex; align-items: center; gap: 6px; text-decoration: none; font-family: var(--serif); font-size: 18px; letter-spacing: 1px; }
.ry-top-title { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ry-toc-btn { font: inherit; font-size: 14px; min-height: 40px; padding: 0 14px; border: 1px solid #B6B4AE; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.ry-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.ry-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .1s linear; }

.ry-wrap { max-width: 480px; margin: 0 auto; background: var(--paper); min-height: 100vh; }

/* 표지 */
.ry-cover { padding: 36px 24px 40px; background: var(--navy); color: var(--paper); }
.ry-eyebrow { font-size: 13px; letter-spacing: .08em; color: #D8B783; margin: 0; }
.ry-cover h1 { font-size: 34px; line-height: 1.45; letter-spacing: -1px; margin: 10px 0 12px; }
.ry-cover-lead { font-size: 18px; color: #D5D9DE; margin: 0 0 8px; }
.ry-cover-art { display: block; width: 78%; margin: 12px auto 4px; background: var(--paper); border-radius: 50%; }
.ry-who-box { margin: 20px 0 0; border-top: 1px solid #4A5568; }
.ry-who-box > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #4A5568; }
.ry-who-box dt { font-size: 15px; color: #D8B783; }
.ry-who-box dd { margin: 0; font-size: 15px; line-height: 1.6; color: #E9ECEF; }
.ry-question { margin: 20px 0 0; padding: 16px 18px; border-radius: 10px; background: #F4EEE0; color: var(--ink); }
.ry-cover .ry-question { background: #334053; color: var(--paper); }
.ry-question b { display: block; font-size: 14px; color: var(--gold); margin-bottom: 4px; }
.ry-cover .ry-question b { color: #D8B783; }
.ry-question p { margin: 0; font-size: 17px; }
.ry-cover-para { color: #D5D9DE; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 16px; border-radius: 8px; background: var(--gold); color: #fff; font-size: 18px; font-weight: 500; text-decoration: none; }
.ry-start { margin-top: 28px; }

/* 목차 */
.ry-toc { padding: 36px 24px 28px; border-bottom: 1px solid var(--line); }
.ry-toc h2 { font-size: 24px; margin: 0 0 8px; }
.ry-toc-group h3 { font-family: var(--sans); font-size: 13px; letter-spacing: .06em; color: var(--gold); margin: 22px 0 6px; font-weight: 600; }
.ry-toc ol { list-style: none; margin: 0; padding: 0; }
.ry-toc li a { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; min-height: 44px; border-bottom: 1px solid #ECE8DF; text-decoration: none; font-size: 16px; }
.ry-toc li a span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 20px; }
.ry-legend { margin-top: 24px; }
.ry-legend .uc-key { margin: 0; }

/* 소절 */
.ry-bar { padding: 40px 24px 28px; border-bottom: 1px solid var(--line); }
.ry-bar-head { margin-bottom: 16px; }
.ry-bar-no { font-size: 13px; color: var(--gold); letter-spacing: .04em; }
.ry-bar-no i { font-style: normal; color: #C9BFAE; }
.ry-bar h2 { font-size: 25px; line-height: 1.5; letter-spacing: -.5px; margin: 6px 0 0; }
.ry-lead { font-family: var(--serif); font-size: 19px !important; line-height: 1.75 !important; margin: 0 0 24px !important; padding: 2px 0 2px 16px; border-left: 3px solid var(--gold); color: var(--ink); }
.ry-para { font-size: 18px; line-height: 1.9; margin: 20px 0 0 !important; }
.ry-gap { height: 20px; }
.ry-who { margin: 24px 0 0 !important; }
.ry-ko { display: block; font-family: var(--sans); font-size: 12px; line-height: 1.3; color: var(--muted); }
.uc-pillars .uc-hanja { padding: 10px 2px 8px; }
.ry-hanja-lg { font-size: 26px !important; margin: 4px 0 !important; }
.ry-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.ry-chips span { font-size: 14px; padding: 6px 12px; border: 1px solid #CFC6B8; border-radius: 999px; background: #fff; }
.ry-chips b { font-weight: 600; color: var(--teal); }
.ry-keywords { margin: 20px 0; }
.uc-compare { margin: 16px 0; }
.uc-compare .uc-mini-card h4 { margin-bottom: 4px; }
.uc-mini-card .uc-mark { margin-top: 8px; }
.ry-gold { border-color: #BDA782 !important; background: #FBF5E8 !important; }
.ry-gold .uc-card-index { color: var(--gold); font-weight: 600; }
.uc-tags .ry-tag-rest { color: var(--rest); border-color: #D9C1B4; }
.uc-card-stack { margin-top: 8px; }
.uc-generic-card h4 { font-size: 19px; }
.uc-generic-card p { font-size: 17px; }
.uc-month-cell p { font-size: 15px; }
.uc-calendar { margin-top: 8px; }

/* 근거 펼치기 */
.ry-why { margin: 24px 0 0; padding: 0 16px; border: 1px dashed #CFC6B8; border-radius: 10px; background: #fff; }
.ry-why summary { font-size: 15px; color: var(--teal); min-height: 48px; display: flex; align-items: center; cursor: pointer; }
.ry-why p { font-size: 16px !important; line-height: 1.8; color: #4A5560; margin: 0 0 16px !important; }

.ry-bar-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; font-size: 14px; }
.ry-bar-nav a { color: var(--teal); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ry-to-toc { color: var(--muted) !important; }

.ry-end-art { display: block; width: 120px; margin: 28px auto 0; }
.ry-notice { margin-top: 20px; padding: 18px; border-radius: 10px; background: #F0EEE7; }
.ry-notice p { font-size: 13px !important; line-height: 1.75 !important; color: var(--muted); margin: 0 0 8px !important; }
.ry-notice p:last-child { margin: 0 !important; }

.ry-footer { padding: 32px 24px calc(48px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 13px; }
.ry-footer img { display: block; margin: 0 auto 12px; }
.ry-footer p { margin: 4px 0; }

.ry-resume { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  background: var(--navy); color: var(--paper); text-decoration: none; padding: 12px 20px; border-radius: 999px; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.2); white-space: nowrap; }

@media (max-width: 360px) {
  body { font-size: 17px; }
  .ry-bar, .ry-cover, .ry-toc { padding-left: 18px; padding-right: 18px; }
  .uc-pillars .uc-hanja { font-size: 24px; }
}
@media print { .ry-top, .ry-bar-nav, .ry-resume, .btn { display: none !important; } body { background: #fff; } }
.ry-save { margin: 20px 0 0; padding: 18px; border: 1px solid #BDA782; border-radius: 12px; background: #FBF5E8; color: var(--ink); text-align: left; }
.ry-save p { font-size: 15px; margin: 0 0 12px; }
.ry-save .btn { min-height: 48px; font-size: 16px; }

.ry-next { margin: 8px 16px 0; padding: 24px 20px; border: 1px solid #DDD9CF; border-radius: 16px; background: #fff; }
.ry-next h3 { font-family: 'Noto Serif KR', serif; font-weight: 500; font-size: 21px; margin: 0 0 6px; color: var(--ink); }
.ry-next p { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.ry-next .btn { display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 8px; background: #80613B; color: #fff; font-size: 17px; text-decoration: none; }
.ry-next-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-top: 1px solid #EAE6DC; text-decoration: none; color: var(--ink); }
.ry-next-item b { font-family: 'Noto Serif KR', serif; font-weight: 500; font-size: 18px; }
.ry-next-item span { grid-column: 1; font-size: 14px; color: var(--muted); }
.ry-next-item i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; color: #80613B; }
.ry-next-free b { color: #4B6574; }
.ry-sample-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #202B3B; color: #FBF8F0; font-size: 13px; }
.ry-sample-cta a { flex-shrink: 0; padding: 10px 16px; border-radius: 8px; background: #D8B783; color: #202B3B; font-size: 15px; font-weight: 600; text-decoration: none; }
