/* lawbook.<도메인> — 종이 같은 밝은 화면(기본)과 밤 화면. 본문은 명조(Noto Serif KR), 화면 글자는 Pretendard.
   틀: web/templates/lawbook/base.html, 동작: law.js */
/* 명조 웹 글꼴이 늦게 오면 기기 명조(AppleMyungjo)로 먼저 그렸다가 바뀌며 줄바꿈이 달라졌다(해석례 CLS 0.10) — 성경과 같은 metric 맞춤 면(값은 bible.css 에서 잰 것). */
@font-face { font-family: 'Noto Serif KR fb AppleMyungjo'; src: local('AppleMyungjo'); font-style: normal; font-weight: 400; size-adjust: 92.14%; ascent-override: 124.92%; descent-override: 31.04%; line-gap-override: 0%; unicode-range: U+0020-007E, U+00A0-00FF, U+1100-11FF, U+2010-2027, U+3000-303F, U+3131-318E, U+AC00-D7A3; }
:root {
  --bg: #f7f4ec; --bg2: #efe9da; --card: #fffdf7; --line: #e2dac6; --ink: #1d2433; --ink2: #4a5468; --mute: #5f6678;
  --seal: #1d2a44; --gold: #e2b85c; --acc: #8a5a12; --link: #1f4fa3; --rv: #8d8f99; --hl: #fff1c2;
  --fs: 1.06rem;
  color-scheme: light;
}
/* 공용 조각(_site_guide 설명·FAQ, _related 관련 도구, _site_foot)은 --text·--muted·--border·--accent 를 읽는다 — 법령집은 이 이름을 안 정해
   기본값(어두운 화면용 밝은 글자 #e8e8f0)으로 나와 밝은 종이 바탕에서 거의 안 보였다(대비 1.1, 2026-10-17). 법령집 색으로 잇는다(밤 화면도 따라감).
   --mute 는 #7d8496(대비 3.4) → #5f6678(4.7~5.6, WCAG AA). */
:root { --text: var(--ink); --text-sub: var(--ink2); --muted: var(--mute); --faint: var(--mute); --border: var(--line); --accent: var(--acc); --accent2: var(--gold); }
:root[data-theme="dark"] {
  --bg: #10141d; --bg2: #161b26; --card: #1a2030; --line: #2a3246; --ink: #e8e4d8; --ink2: #b9bccb; --mute: #8a90a3;
  --seal: #26324d; --gold: #e2b85c; --acc: #e2b85c; --link: #8fb4ff; --rv: #7a8093; --hl: #3a3420;
  color-scheme: dark;
}
:root[data-fs="1"] { --fs: 1.16rem; } :root[data-fs="2"] { --fs: 1.28rem; } :root[data-fs="3"] { --fs: 1.42rem; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body.lw { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65; }
body.lw::before { display: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--mute); }

.lw-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lw-nav-in { max-width: 1080px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; }
.lw-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; letter-spacing: -.01em; min-width: 0; }
.lw-brand:hover { text-decoration: none; }
.lw-brand-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-logo { display: flex; flex: none; }
.lw-tabs { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.lw-tabs a, .lw-tabs button { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 10px; color: var(--ink2); font: inherit; font-size: .9rem; font-weight: 600; background: none; border: 0; cursor: pointer; position: relative; }
.lw-tabs a:hover, .lw-tabs button:hover { background: var(--bg2); text-decoration: none; }
.lw-tabs a.on { color: var(--acc); background: var(--bg2); }
.lw-tabs svg { width: 19px; height: 19px; flex: none; }
.lw-tabs .ic { padding: 7px 8px; }
.lw-cnt { font-size: .68rem; background: var(--acc); color: var(--card); border-radius: 9px; padding: 0 5px; line-height: 1.5; }
:root[data-theme="dark"] .i-dark, :root:not([data-theme="dark"]) .i-light { display: none; }
@media (max-width: 520px) { .lw-tabs a span { display: none; } .lw-tabs a { padding: 7px 8px; } }
@media (max-width: 430px) { .lw-tabs a, .lw-tabs .ic { padding: 7px 6px; } .lw-tabs a.tpx { display: none; } }

.lw-main { min-height: 60vh; }
.lw-wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 48px; }
.lw-wrap.narrow { max-width: 760px; }
.lw-langnote { max-width: 760px; margin: 12px auto 0; padding: 8px 14px; font-size: .88rem; color: var(--ink2); background: var(--bg2); border-radius: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.kicker { margin: 0 0 6px; font-size: .82rem; font-weight: 700; color: var(--acc); letter-spacing: .02em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kdot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--seal); color: var(--gold); font-size: .76rem; }
.lead { color: var(--ink2); margin: 6px 0 0; }
.sec { margin-top: 34px; }
.sec-h { font-size: 1.12rem; margin: 26px 0 12px; }
.sec-k { margin: 0 0 4px; font-size: .78rem; font-weight: 700; color: var(--acc); }

/* 홈 */
.hero { padding: 26px 0 8px; }
.hero h1 { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; font-size: clamp(1.7rem, 5.4vw, 2.6rem); line-height: 1.25; margin: 4px 0 8px; letter-spacing: -.02em; }
.sbox { display: flex; gap: 8px; margin-top: 16px; max-width: 620px; position: relative; }
.sbox input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.sbox input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 28%, transparent); } /* 테두리 색만 바뀌어 키보드로 들어왔을 때 잘 안 보였다 */
.sbox button { flex: none; width: 50px; border: 0; border-radius: 12px; background: var(--seal); color: var(--gold); cursor: pointer; display: grid; place-items: center; }
.sbox svg { width: 22px; height: 22px; }
.hint { font-size: .82rem; color: var(--mute); margin: 8px 0 0; }
.today { margin-top: 22px; }
.today h2 { font-size: 1.1rem; margin: 0 0 8px; }
.today h2 a { color: var(--ink); }
.more { margin: 10px 0 0; font-size: .9rem; }
.recent { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { padding: 5px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: .86rem; color: var(--ink2); }
.pop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 6px; align-items: baseline; padding: 8px 11px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.pk:hover { border-color: var(--acc); text-decoration: none; }
.pk small { grid-column: 1 / -1; font-size: .74rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk b { font-size: .95rem; white-space: nowrap; }
.pk span { font-size: .88rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cats a { padding: 6px 12px; border-radius: 99px; background: var(--bg2); color: var(--ink); font-size: .88rem; font-weight: 600; display: flex; gap: 5px; }
.grp { margin-top: 22px; }
.grp h3 { font-size: 1rem; margin: 0 0 10px; }
.grp h3 small { color: var(--mute); font-weight: 500; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.lk { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.lk:hover { border-color: var(--acc); text-decoration: none; }
.lk b { font-size: .97rem; line-height: 1.4; }
.lk small { color: var(--mute); font-size: .78rem; margin-top: 3px; }

/* 법령 화면 */
.page-h { padding: 10px 0 6px; }
.page-h h1 { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; font-size: clamp(1.45rem, 4.6vw, 2.1rem); line-height: 1.3; margin: 2px 0 8px; letter-spacing: -.02em; word-break: keep-all; }
.alias { font-size: .6em; color: var(--mute); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: .88rem; }
.meta div { display: flex; gap: 6px; } .meta dt { color: var(--mute); } .meta dd { margin: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--acc); text-decoration: none; }
.btn .s1 { display: none; } .btn[aria-pressed="true"] .s0 { display: none; } .btn[aria-pressed="true"] .s1 { display: inline; }
.btn[aria-pressed="true"] { color: var(--acc); border-color: var(--acc); }
.toc { margin-top: 18px; padding: 12px 18px; }
.toc summary { cursor: pointer; font-weight: 700; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; columns: 2 260px; column-gap: 20px; }
.toc li { break-inside: avoid; padding: 2px 0; font-size: .9rem; }
.toc li.t2 { padding-left: 12px; } .toc li.t1 { font-weight: 700; margin-top: 4px; }
.filter { margin: 16px 0 4px; }
.filter input { width: 100%; font: inherit; padding: 10px 13px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.arts { margin-top: 12px; }
.th { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; margin: 26px 0 8px; color: var(--ink); }
.th.h1 { font-size: 1.22rem; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.th.h2 { font-size: 1.08rem; }
.th.h3, .th.h4 { font-size: .98rem; color: var(--ink2); }
.arts.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 14px; }
.arts.list .th { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .95rem; }
.row b { flex: none; min-width: 5.6em; color: var(--acc); font-weight: 700; }
.row span { min-width: 0; }
.row.gone { color: var(--mute); } .row.gone b { color: var(--mute); }
.row:hover { background: var(--bg2); text-decoration: none; }
.row[hidden], .th[hidden] { display: none; }
.art { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.art h3 { margin: 0 0 6px; font-size: 1rem; }
.art h3 a { color: var(--ink); }
.at { font-weight: 600; margin-left: 2px; }
.reason { margin-top: 26px; }
.reason summary { cursor: pointer; font-weight: 700; }
.reason small { color: var(--mute); font-weight: 500; }
.rs { margin-top: 10px; font-size: .92rem; color: var(--ink2); white-space: normal; }

/* 조문 본문 — 항·호·목 들여쓰기 */
.atext { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; font-size: var(--fs); line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.atext p { margin: 0 0 .35em; }
.atext .h { padding-left: 1.3em; text-indent: -1.3em; }
.atext .ho { padding-left: 2.6em; text-indent: -1.3em; }
.atext .mk { padding-left: 3.9em; text-indent: -1.3em; }
.atext .mk2 { padding-left: 5.1em; text-indent: -1.3em; }
.atext .rf { color: var(--rv); font-size: .86em; margin-top: .4em; }
/* 개정 날짜가 많으면 한 줄로 두면 폰에서 옆으로 넘친다(320px 영어 첫 화면 오늘의 조문, 2026-11-03) — 쉼표 뒤에서 줄바꿈 */
.atext .rv { color: var(--rv); font-size: .84em; }
.atext .fn { color: var(--ink2); font-size: .86em; line-height: 1.7; border-top: 1px solid var(--line); padding-top: .5em; margin-top: .8em; }
.atext sup.fr { color: var(--ink2); font-size: .68em; line-height: 0; padding: 0 1px; }
.atext a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; }
.atext.big { font-size: calc(var(--fs) * 1.06); }
.atext p:target { background: var(--hl); border-radius: 6px; }

.where { font-size: .86rem; color: var(--mute); margin: 6px 0 10px; }
.artc { padding: 22px 22px 18px; }
.artc h1 { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; font-size: clamp(1.3rem, 4.4vw, 1.8rem); line-height: 1.35; margin: 0 0 14px; word-break: keep-all; }
.artc h1 .ln { color: var(--acc); }
.artc.gone .atext { color: var(--mute); }
.eff { font-size: .82rem; color: var(--mute); margin: 12px 0 0; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pn a { display: flex; flex-direction: column; padding: 11px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); min-width: 0; }
.pn a:hover { border-color: var(--acc); text-decoration: none; }
.pn .n { text-align: right; grid-column: 2; }
.pn small { color: var(--mute); font-size: .76rem; }
.pn span { font-size: .86rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { text-align: center; margin: 18px 0 0; font-size: .92rem; }

.addenda { font-size: .94rem; }
.addenda .ad { padding: 10px 0; border-bottom: 1px solid var(--line); }
.addenda h3 { font-size: .98rem; margin: 0 0 6px; }
.addenda p { margin: 0 0 4px; }

.jump { display: flex; flex-direction: column; margin: 8px 0 6px; color: var(--ink); border-color: var(--acc); }
.jump:hover { text-decoration: none; }
.jump small { color: var(--acc); font-weight: 700; font-size: .78rem; }
.jump span { color: var(--ink2); font-size: .9rem; margin-top: 4px; }
.hits { list-style: none; padding: 0; margin: 0; }
.hits li a { display: flex; flex-direction: column; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.hits li a:hover { background: var(--bg2); text-decoration: none; }
.hits span { font-size: .88rem; color: var(--ink2); margin-top: 2px; }
.hits mark, .row mark { background: var(--hl); color: inherit; border-radius: 3px; }

.mylist .card { margin-bottom: 12px; }
.mylist h2 { font-size: 1.02rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.mylist h2 a { color: var(--ink); }
.mylist .x { margin-left: auto; border: 0; background: none; color: var(--mute); cursor: pointer; font-size: .85rem; }

.lw-empty { text-align: center; padding: 40px 20px; }
.lw-empty-i { font-size: 2.4rem; }
.lw-foot { max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; color: var(--mute); font-size: .84rem; }
.lw-note, .lw-src { line-height: 1.6; }
.lw-crumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.lw-crumb a { color: var(--ink2); }
.lw-guide { margin: 12px 0 4px; font-size: .92rem; }
.lw-guide a { color: var(--link); }
.lw-legal { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.lw-legal a { color: var(--mute); }
.lw-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--seal); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: .9rem; z-index: 50; }
@media (max-width: 520px) { .card { padding: 15px 15px; } .artc { padding: 18px 15px 15px; } .arts.list { grid-template-columns: 1fr; } }

/* ── 영어 번역(한·영 대조) — 낱말 위 한글 발음(rt)은 바이블·꾸란과 같은 표지(bible.rs rt_html) */
:root { --rt: #8a5a12; --rt-hi: #5a3500; --en: #1d3466;
  --rt-font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif; }
:root[data-theme="dark"] { --rt: #e2b85c; --rt-hi: #ffe2a0; --en: #b9d0ff; }
.en-h { margin: -6px 0 12px; color: var(--en); font-size: .95rem; font-weight: 600; }
.enb { display: inline-block; font-style: normal; font-size: .68rem; font-weight: 800; padding: 0 6px; border-radius: 6px; background: var(--bg2); color: var(--acc); vertical-align: 1px; }
.en-k small[lang="en"] { color: var(--en); }
.fam { margin: 12px 0 0; font-size: .88rem; color: var(--mute); }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cats.ini a { min-width: 2.2em; justify-content: center; }
.vbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.vbar button { font: inherit; font-size: .84rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.vbar button.on, .vbar button[aria-pressed="true"] { background: var(--seal); color: var(--gold); border-color: var(--seal); }
.vbar .play { margin-left: auto; }
.vbar svg { width: 15px; height: 15px; }
.bi .ln { margin: 0 0 .6em; }
.bi .ln p { margin: 0; }
.bi .ln.sh { margin-top: 1.1em; } .bi .ln.sh .ko { font-weight: 700; }
.bi .ln.h, .bi .ln.ho, .bi .ln.mk, .bi .ln.mk2 { padding-left: 1.3em; text-indent: -1.3em; }
.bi .ln.ho { margin-left: 1.3em; } .bi .ln.mk { margin-left: 2.6em; } .bi .ln.mk2 { margin-left: 3.8em; }
.bi .en { font-family: Georgia, 'Times New Roman', serif; color: var(--en); font-size: .96em; line-height: 1.5; margin-top: .25em !important; text-indent: 0; }
.bi .ln.h .en, .bi .ln.ho .en, .bi .ln.mk .en, .bi .ln.mk2 .en { padding-left: 0; }
.bi[data-view="ko"] .en, .bi[data-view="en"] .ko { display: none; }
.bi .en ruby { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; white-space: nowrap; line-height: 1.22; margin: .1em 0; border-radius: 6px; text-indent: 0; }
.bi .en ruby > rt { display: block; order: -1; font: 500 max(11.5px, .58em)/1.2 var(--rt-font); color: var(--rt); letter-spacing: -.015em; text-align: center; white-space: nowrap; margin-bottom: .1em; user-select: none; -webkit-user-select: none; }
.bi .en rt b { font-weight: 800; font-size: 1.12em; color: var(--rt-hi); }
.bi .en rt b.a::before { content: "ˈ"; font-weight: 600; opacity: .85; margin-right: .03em; }
.bi .en rt b.s { font-weight: 650; font-size: 1em; color: inherit; }
.bi .en rt i { font-style: normal; font-weight: 400; font-size: .92em; opacity: .66; }
.bi .en rt i.e { font-size: .7em; opacity: .5; }
.bi .en rt i.f { font-size: .92em; opacity: .62; }
.bi .en rt sup.c { font-size: .62em; line-height: 0; vertical-align: .55em; margin-right: .06em; color: var(--acc); font-weight: 700; font-family: system-ui, sans-serif; }
.ruby-off .bi .en ruby > rt { display: none; }
.ruby-off .bi .en ruby { margin: 0; display: inline; }
.bi .en.say { background: var(--hl); border-radius: 6px; }
.bi .en ruby.say { background: var(--hl); }
/* 지금 읽는 낱말·어절(law.js tracker) — 줄 강조(.say)보다 한 단계 진하게. 행간 보기면 로마자·뜻까지 한 덩어리 */
.kw { border-radius: 5px; }
.bi .en ruby.tts-w, .atext .kw.tts-w { background: color-mix(in srgb, var(--acc) 26%, var(--hl)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 26%, var(--hl)); }
.tr-note { font-size: .78rem; color: var(--mute); margin: 12px 0 0; line-height: 1.55; }
.bi .en ruby { cursor: pointer; }
.bi .en ruby:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
/* 낱말 뜻 풍선(law.js wordPop — 공용 /static/shared/endict.js 가 채운다) */
.wm-pop { position: absolute; z-index: 2147483602; max-width: min(320px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.5;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .45); }
.wm-pop > b { font: 600 1.1rem Georgia, 'Times New Roman', serif; color: var(--en); }
.wm-pop .p { color: var(--rt); font-weight: 700; margin-left: 8px; }
.wm-pop .p sup.c { font: 700 .62em/0 system-ui, sans-serif; vertical-align: .62em; color: var(--acc); margin-right: .06em; }
.wm-pop .wm { margin-top: 6px; overflow-wrap: anywhere; }
.wm-pop .wm-ctx { font-weight: 800; color: var(--acc); }
.wm-pop .wm-s { margin: 4px 0 0; padding-left: 1.3em; }
.wm-pop .wm-s li + li { margin-top: 2px; }
.wm-pop .wm-base, .wm-pop .wm-none { margin-top: 5px; font-size: .8rem; color: var(--mute); }
.wm-pop .wm-base b { font-family: Georgia, serif; margin-right: 2px; }
.wm-pop .wm-src { display: inline-block; margin-top: 6px; font-size: .74rem; color: var(--mute); }
@media (pointer: coarse) {
  .wm-pop a.wm-src { display: flex; align-items: center; min-height: 44px; margin-top: 2px; }
  .bi .en ruby { min-height: 44px; justify-content: flex-end; }
  .ruby-off .bi .en ruby { min-height: 0; }
}
.lgrid .lk[hidden] { display: none; }

/* ── 듣고 따라쓰기(/practice — lawpx.js) */
.px .px-hero { margin-top: 8px; }
.px-sum { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--bg2) 0); transition: --p .6s; }
.ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ring b, .ring small { position: relative; line-height: 1; }
.ring b { font-size: 1.5rem; font-weight: 800; margin-top: 6px; }
.ring small { font-size: .7rem; color: var(--mute); margin-top: -18px; }
.px-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.px-stats div { display: flex; flex-direction: column; }
.px-stats b { font-size: 1.25rem; }
.px-stats span { font-size: .78rem; color: var(--mute); }
.px-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 10px; }
.px-mode { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.px-mode > span { grid-row: 1 / span 2; font-size: 1.3rem; align-self: center; }
.px-mode small { color: var(--mute); font-size: .76rem; }
.px-mode.on { border-color: var(--acc); background: var(--bg2); }
.px-mode[hidden] { display: none; }
.px-note { font-size: .84rem; color: var(--acc); margin: 6px 0; }
.px-src { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; color: var(--mute); margin: 10px 0; }
.px-src select { font: inherit; font-size: .95rem; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.btn.gold { background: var(--seal); color: var(--gold); border-color: var(--seal); }
.btn.gold:disabled { opacity: .45; cursor: default; }
.px-start { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-top: 4px; }
.px-start[hidden] { display: none; }
.pill { font: inherit; font-size: .84rem; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer; }
.pill[aria-pressed="true"], .pill.on { background: var(--bg2); color: var(--acc); border-color: var(--acc); }
.pill:disabled { opacity: .45; }
.px-stage { margin-top: 14px; }
.px-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .86rem; color: var(--mute); }
.px-top a { color: var(--ink); font-weight: 700; }
.px-x { border: 0; background: none; color: var(--mute); font-size: 1rem; cursor: pointer; margin-left: 6px; }
.px-bar { height: 5px; border-radius: 3px; background: var(--bg2); margin: 8px 0 14px; overflow: hidden; }
.px-bar i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.px-tools, .px-hintbar, .px-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.px-tools [data-px-play].on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }
.px-hintbar > span:first-child { font-size: .84rem; color: var(--mute); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.seg button { font: inherit; font-size: .8rem; padding: 5px 9px; border: 0; background: var(--card); color: var(--ink2); cursor: pointer; }
.seg button.on { background: var(--seal); color: var(--gold); }
.px-rate { font-size: .84rem; display: inline-flex; align-items: center; gap: 4px; }
.px-ko { font-family: 'Noto Serif KR', 'Noto Serif KR fb AppleMyungjo', serif; color: var(--ink2); font-size: .95rem; margin: 6px 0; line-height: 1.7; }
.px-prev { color: var(--mute); font-size: .9rem; margin: 4px 0; font-family: Georgia, serif; }
.px-hints { font-family: Georgia, serif; font-size: 1.05rem; line-height: 2.4; margin: 6px 0; }
.px-hw { display: inline-flex; flex-direction: column; align-items: center; margin-right: 4px; vertical-align: bottom; }
.px-hw b { font-weight: 600; letter-spacing: .04em; }
.pm { font: 500 .74rem/1.2 var(--rt-font); color: var(--rt); font-style: normal; white-space: nowrap; }
.pm b { font-weight: 800; color: var(--rt-hi); } .pm b.a::before { content: "ˈ"; } .pm i { font-style: normal; opacity: .66; } .pm i.e { font-size: .75em; opacity: .5; }
.pm sup.c { font-size: .62em; vertical-align: .55em; line-height: 0; color: var(--acc); font-weight: 700; }
.px-type { width: 100%; font: 1.05rem/1.6 Georgia, serif; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); resize: vertical; }
.px-type:focus { outline: none; border-color: var(--acc); }
.px-kbd { font-size: .76rem; color: var(--mute); margin: 4px 0 0; }
.px-diff { font: 1.05rem/2 Georgia, serif; margin: 10px 0; }
.px-diff .ok { color: #15803d; } .px-diff .miss { color: #be123c; text-decoration: underline wavy; } .px-diff .extra { color: var(--mute); text-decoration: line-through; }
:root[data-theme="dark"] .px-diff .ok { color: #4ade80; } :root[data-theme="dark"] .px-diff .miss { color: #fb7185; }
.px-score { font-size: 2rem; font-weight: 800; margin: 6px 0; }
.px-score small { font-size: .9rem; color: var(--mute); margin-left: 2px; }
.burst { font-size: .86rem; color: var(--acc); font-weight: 800; }
.px-answer { font-family: Georgia, serif; color: var(--en); font-size: 1.05rem; line-height: 1.5; }
.px-answer ruby { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; white-space: nowrap; line-height: 1.22; margin: .1em 0; }
.px-answer ruby > rt { display: block; order: -1; font: 500 max(11.5px, .6em)/1.2 var(--rt-font); color: var(--rt); text-align: center; white-space: nowrap; margin-bottom: .1em; }
.px-answer rt b { font-weight: 800; font-size: 1.12em; color: var(--rt-hi); } .px-answer rt b.a::before { content: "ˈ"; opacity: .85; }
.px-answer rt b.s { font-weight: 650; font-size: 1em; color: inherit; } .px-answer rt i { font-style: normal; opacity: .66; } .px-answer rt i.e { font-size: .7em; opacity: .5; }
.px-answer rt sup.c { font-size: .62em; line-height: 0; vertical-align: .55em; color: var(--acc); font-weight: 700; }
.px-tip { font-size: .84rem; color: var(--mute); }
.px-ans { display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; padding: 8px; border-radius: 12px; border: 1.5px dashed var(--line); margin: 6px 0 10px; }
.px-slot { min-width: 2.4em; min-height: 1.9em; padding: 3px 6px; border-radius: 8px; background: var(--bg2); display: inline-flex; align-items: center; justify-content: center; font-family: Georgia, serif; }
.px-slot.ok { background: color-mix(in srgb, #15803d 14%, var(--card)); }
.px-slot.cur { box-shadow: 0 0 0 2px var(--acc); }
.px-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.px-chip { display: inline-flex; flex-direction: column-reverse; align-items: center; padding: 6px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 1rem Georgia, serif; cursor: pointer; }
.px-chip.used { opacity: .25; } .px-chip.bad { animation: pxshake .35s; border-color: #be123c; }
@keyframes pxshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.px-miss { font-size: .84rem; color: #be123c; margin-right: auto; }
.px-heard { font-family: Georgia, serif; color: var(--mute); min-height: 1.4em; }
.px-vd-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.px-vd-top > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.px-done { text-align: center; padding: 20px 0; }
.px-done .big { font-size: 2.6rem; } .px-done .px-ctl { justify-content: center; }
.px-list { display: flex; flex-direction: column; }
.px-item { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.px-item > a { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); }
.px-item > a span { font-size: .84rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-bs { display: flex; gap: 4px; flex: none; }
.px-b { font-style: normal; font-size: .72rem; padding: 2px 6px; border-radius: 8px; background: var(--bg2); color: var(--mute); white-space: nowrap; }
.px-b.none { opacity: .45; } .px-b.good { color: var(--acc); } .px-b.full { background: var(--seal); color: var(--gold); }
.px-how { margin-top: 22px; font-size: .92rem; } .px-how h2 { font-size: 1.05rem; margin: 0 0 8px; }
@media (max-width: 520px) { .px-bs .px-b { padding: 2px 4px; } .px-item > a span { display: none; } }

/* 한국어 듣기 — 읽는 줄 표시, 누르면 그 줄만 */
#lwKo p:not(.rf), .bi .ko { cursor: pointer; }
#lwKo p.say, .bi .ko.say { background: var(--hl); border-radius: 6px; }
/* 판례(/판례·/판례/사건번호) */
.pg-h { font-size: 1.5rem; margin: 8px 0 6px; }
.sbox.ps-s { margin: 14px 0 12px; }
.chips.pkind a.on { background: var(--seal); color: #fff; border-color: var(--seal); }
.chips.pkind small { opacity: .7; }
.precl b small { display: block; font-weight: 400; color: var(--mute); font-size: .8rem; margin-top: 2px; }
.precc h1 { font-size: 1.3rem; line-height: 1.45; margin: 0 0 6px; }
.precc .pt { display: block; }
.precc .pn2 { display: block; font-size: .92rem; font-weight: 500; color: var(--mute); margin-top: 4px; }
.psub { color: var(--ink2); font-size: .95rem; margin: 4px 0 8px; line-height: 1.6; word-break: keep-all; }
.ps h2 { font-size: 1rem; color: var(--acc); margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.ps .atext p { margin: 0 0 .9em; }
.refs { line-height: 1.8; word-break: keep-all; margin: 0; }
.pbody { font-size: calc(var(--fs) * .94); }
.pbody p { content-visibility: auto; contain-intrinsic-size: auto 160px; } /* 긴 판결문(수십만 자)도 화면 밖 문단은 그리지 않는다 */
.small { font-size: .82rem; }
.lk.wide { margin-bottom: 10px; }

/* 본문 속 '제N조' 미리 보기 창(law.js peek) — 좁은 화면은 아래에서 올라오는 시트, 넓은 화면은 가운데 */
.lw-peek { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--card); color: var(--ink); width: min(640px, calc(100vw - 32px)); max-height: min(78vh, 720px); box-shadow: 0 18px 48px rgba(0,0,0,.28); }
.lw-peek[open] { display: flex; flex-direction: column; }
.lw-peek::backdrop { background: rgba(10,14,22,.45); }
.lw-peek .pk-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.lw-peek .pk-h b { flex: 1; min-width: 0; font-size: 1rem; line-height: 1.4; }
.lw-peek .pk-h button { flex: none; min-width: 40px; min-height: 40px; border: 0; border-radius: 10px; background: var(--bg2); color: var(--ink); font: inherit; cursor: pointer; }
.lw-peek .pk-h button[hidden] { display: none; }
.lw-peek .pk-b { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 8px; position: relative; }
.lw-peek .pk-hl { background: var(--hl); border-radius: 6px; box-shadow: 0 0 0 4px var(--hl); }
.lw-peek .pk-f { padding: 10px 16px 14px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
@media (max-width: 640px) {
  .lw-peek { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0; max-height: 82vh; padding-bottom: env(safe-area-inset-bottom); }
  .lw-peek .pk-f .btn { flex: 1; text-align: center; }
}

/* 검색 칸 아래 제안(law.js) — 법령 이름·조문 바로 가기 */
.lw-sug { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); max-height: min(60vh, 420px); overflow-y: auto; }
.lw-sug[hidden] { display: none; }
.lw-sug a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--ink); min-height: 44px; box-sizing: border-box; }
.lw-sug a:hover, .lw-sug [aria-selected="true"] a { background: var(--bg2); text-decoration: none; }
.lw-sug b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-sug b span { font-weight: 400; color: var(--ink2); }
.lw-sug small { flex: none; color: var(--mute); font-size: .78rem; }

/* 이 조문을 가리키는 조문(article.html .xref) — 누르면 미리 보기 창(law.js peek) */
.xref .xr-h { margin: 14px 0 6px; font-size: .92rem; font-weight: 700; }
.xref .xr-h small { color: var(--mute); font-weight: 500; }
.xref .xr, .tdefs .xr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px; }
.xref .xr a, .tdefs .xr a { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; min-height: 44px; box-sizing: border-box; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.xref .xr a:hover, .tdefs .xr a:hover { border-color: var(--acc); text-decoration: none; }
.xref .xr b, .tdefs .xr b { flex: none; font-weight: 700; }
.xref .xr span, .tdefs .xr span { min-width: 0; color: var(--ink2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 검색 결과에서 찾은 낱말(law.js) */
.hits mark { background: var(--hl); color: inherit; border-radius: 3px; padding: 0 1px; }

/* 이 조문에 나오는 용어(article.html .dfns) — 본문의 첫 자리는 점선(law.js), 누르면 미리 보기 창에 뜻 */
.dfns dl { margin: 0; display: grid; gap: 6px; }
.dfns .df { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.dfns dt { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.dfns dt a { font-size: .85rem; color: var(--mute); }
.dfns dd { margin: 4px 0 0; color: var(--ink2); font-size: .92rem; line-height: 1.6; }
.dfns .df.on { border-color: var(--acc); }
/* 버튼은 줄 안 블록이라 항의 내어쓰기(음수 text-indent)를 물려받으면 글자가 겹친다 */
.atext .dfn { all: unset; text-indent: 0; cursor: pointer; text-decoration: underline dotted; text-decoration-color: var(--acc); text-underline-offset: 3px; }
.atext .dfn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 3px; }
.lw-peek .pk-df { margin: 0; line-height: 1.7; }
.sdefs details, .tdefs details { margin-top: 6px; }
.sdefs summary, .tdefs summary { cursor: pointer; padding: 10px 2px; min-height: 44px; box-sizing: border-box; color: var(--acc); font-weight: 600; }

/* 용어 사전(term.html·terms.html) — 다른 법 정의를 그대로 따르는 것은 옅게, 용어 칩의 숫자는 뜻을 정한 법령 수 */
.tdefs .df.cite { background: transparent; }
.tdefs .tag { font-size: .75rem; color: var(--mute); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }
.tdefs details ul { margin-top: 6px; }
.chips a small { opacity: .65; margin-left: 2px; }
.chips a { min-height: 32px; box-sizing: border-box; }
.dfns dt .tm { font-size: .82rem; }

/* 이 조문을 가리키는 시행령·시행규칙 — 가리킨 줄을 링크 아래에(한 줄에 하나), 이 조문이 따르는 위 조문(.ups)은 .dfns 모양 */
.xref .xr.sn { grid-template-columns: 1fr; }
.xref .xr.sn li { border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.xref .xr.sn a { border: 0; background: transparent; }
.xref .xr.sn p { margin: -4px 12px 10px; color: var(--ink2); font-size: .9rem; line-height: 1.6; white-space: pre-line; }
.xmore summary { cursor: pointer; padding: 10px 2px; min-height: 44px; box-sizing: border-box; color: var(--acc); font-weight: 600; }
.ups { margin-top: 18px; }

/* 판례의 참조조문(prec.html .parts) — 지금 조문 글, 선고 뒤 개정 표시가 있으면 테두리 강조 */
.parts dt a { color: var(--ink); font-size: 1rem; }
.parts dt a b { color: var(--acc); }
.parts .df.after { border-color: var(--link); }
.parts .df.old dd { opacity: .7; }
.parts .df.old { border-style: dashed; }
.parts .tag { font-size: .75rem; color: var(--link); border: 1px solid currentColor; border-radius: 99px; padding: 1px 7px; }
.parts .chips { margin-top: 8px; }
.oldp { margin: 4px 0 8px; }

/* 법령 쪽 '이 법이 뜻을 정한 용어'(law.html .lterms) */
.lterms { margin-top: 18px; }
.lterms .chips { margin: 8px 0; }

/* 판례에서 함께 인용된 조문(article.html .xr.co) — 함께 나온 판례 수는 오른쪽 끝 */
.xref .xr.co a { flex-wrap: nowrap; }
.xref .xr.co b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xref .xr.co small { margin-left: auto; flex: none; color: var(--mute); font-size: .8rem; }

/* ── 행간 보기(/static/shared/interlinear.js, 성경과 같은 위계): 원문 > 발음 > 뜻 ── */
.bi .en ruby > .ig, .bi .ko.il .ig, .bi-en ruby > .ig, .px-ko.il .ig { display: block; order: 2; font: 500 max(11px, .52em)/1.15 system-ui, -apple-system, sans-serif; color: var(--mute);
  white-space: normal; max-width: 8.5em; text-align: center; margin-top: .1em; text-indent: 0; }
.bi .ko.il, .px-ko.il { text-indent: 0; }
.bi .ko.il .kw, .px-ko.il .kw { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; margin: .1em 0; }
.bi .ko.il .kr, .px-ko.il .kr { font: 500 max(11px, .58em)/1.2 var(--rt-font); color: var(--rt); white-space: nowrap; margin-bottom: .1em; }
.bi .ko.il .kt, .px-ko.il .kt { white-space: nowrap; }
.bi .en ruby > .ig:empty, .bi .ko.il .ig:empty, .bi-en ruby > .ig:empty, .px-ko.il .ig:empty { min-height: 1.15em; }
.bi .en ruby > .ig.f, .bi-en ruby > .ig.f { opacity: .62; }   /* 기능어 문법 뜻 — 한 단계 옅게 */
/* 뜻의 발음(2026-11-08): 한국어 뜻 아래 로마자, 영어 뜻 아래 한글 발음 */
.ig .igp b { font-weight: 800; color: var(--rt-hi); }
.ig .igp b.a::before { content: "ˈ"; font-weight: 600; opacity: .85; }
.ig .igp b.s { font-weight: 650; color: inherit; }
.ig .igp i { font-style: normal; opacity: .66; }
.ig .igp i.e { font-size: .72em; opacity: .55; }
.ig .igp i.f { opacity: .62; }
.ig .igp { display: block; font-size: .84em; line-height: 1.15; opacity: .88; font-weight: 400; white-space: nowrap; }
.il-note { font-size: .74rem; color: var(--mute); margin: 10px 0 0; line-height: 1.5; }
.ruby-off .bi .en ruby > .ig, .ruby-off .bi .ko.il .ig, .ruby-off .bi .ko.il .kr, .ruby-off .bi-en ruby > .ig, .ruby-off .px-ko.il .ig, .ruby-off .px-ko.il .kr { display: none; }
/* 한국어 어절 풍선(2026-11-08) */
.wm-pop .gl-ip b { color: var(--rt-hi); font-weight: 800; } .wm-pop .gl-ip b.a::before { content: "ˈ"; } .wm-pop .gl-ip i { font-style: normal; opacity: .66; } .wm-pop .gl-ip i.e { font-size: .75em; opacity: .55; } .wm-pop .gl-ip i.f { opacity: .62; }
.wm-pop .gl-say { margin-left: 6px; border: 0; background: none; cursor: pointer; font-size: 1em; padding: 0 2px; }
.ko.il .kw, .en ruby > .ig { cursor: pointer; }

/* 연음(2026-11-08): 다음 낱말로 소리가 이어지는 낱말의 발음 끝에 작은 ‿ (자리를 넓히지 않게 absolute) */
/* 연음 낱말(ruby.lk)이 법령 목록 칸 .lk(상자) 모양을 받지 않게(2026-11-16 — 연음을 켜면 낱말마다 상자가 생겼다) */
.bi .en ruby.lk { display: inline-flex; padding: 0; border: 0; background: none; color: inherit; }
.ruby-off .bi .en ruby.lk { display: inline; }
ruby.lk > rt { position: relative; }
ruby.lk > rt::after { content: "‿"; position: absolute; right: -.7em; bottom: -.15em; font-weight: 400; opacity: .75; color: var(--rt); pointer-events: none; }

/* ── 문장 성분(2026-11-16 bible.css 에서 옮김 — 성경 규칙: 기본 숨김, '성분' 단추로) ── */
.bi { --sans: system-ui, -apple-system, 'Segoe UI', sans-serif; --sapphire: #2f6fd6; --ruby: #c8402f; --gold-text: #a87414; --emerald: #23905a; --amethyst: #8656d0; }   /* 성분 색(종이·밤 둘 다 읽히는 중간 톤) */
[data-theme="dark"] .bi { --sapphire: #7aa7ff; --ruby: #ff8a7a; --gold-text: #f0c060; --emerald: #5fd39a; --amethyst: #b99cff; }
/* 문장 성분(2026-11-08): 낱말·어절 맨 위 작은 꼬리표 — 주어 파랑·목적어 빨강·동사 금색·보어 초록·부사어 보라·꾸밈/접속 옅게. 누르면 풍선(interlinear.js showRole) */
.irl { display: block; order: -2; font: 700 max(11px, .46em)/1.25 var(--sans); letter-spacing: .02em; white-space: nowrap; min-height: 1.25em;
  color: var(--faint); border-radius: 4px; padding: 0 .3em; margin-bottom: .05em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.irl:empty { cursor: default; }
.irl.r-s, .ir-k.r-s, .ir-n.r-s { color: var(--sapphire); } .irl.r-o, .ir-k.r-o, .ir-n.r-o { color: var(--ruby); }
.irl.r-v, .ir-k.r-v, .ir-n.r-v { color: var(--gold-text); } .irl.r-c, .ir-k.r-c, .ir-n.r-c { color: var(--emerald); }
.irl.r-a, .ir-k.r-a, .ir-n.r-a { color: var(--amethyst); } .irl.r-m, .irl.r-j, .irl.r-i { color: var(--muted); }
.irl.sub { opacity: .72; }
.irl:hover, .irl:focus-visible { background: color-mix(in srgb, currentColor 14%, transparent); outline: none; }
.ir-ph { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; }
.ir-hd { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 6px; }
.ir-pop .ir-n { font-size: 1.05em; margin-right: 8px; } .ir-pop .ir-en { font-weight: 700; }
.ir-pop .ir-ph-t, .ir-pop .ir-rel { margin-top: 6px; font-size: .92em; } .ir-pop .ir-ph-t span { color: var(--muted); margin-right: 4px; }
.ir-pop .ir-k { font-size: .85em; font-weight: 700; margin-left: 2px; }
.ir-pop .gl-ip b { color: var(--rt-hi); font-weight: 800; } .ir-pop .gl-ip b.a::before { content: "ˈ"; } .ir-pop .gl-ip i { font-style: normal; opacity: .66; } .ir-pop .gl-ip i.e { font-size: .75em; opacity: .55; }
.ruby-off .irl, html:not(.roles-on) .irl { display: none; }   /* 성분 꼬리표는 '성분' 단추로 켤 때만(2026-11-16) */
@media (pointer: coarse) { .irl { min-height: 1.6em; line-height: 1.6; padding: 0 .45em; } }


/* ── 법령집 정체성(2026-11-16, 운영자 「메인 컨텐츠 디자인 강화」): 단정한 남색·아주 옅은 대리석 결·기둥과 저울 ──
   대문 머리는 남색 대리석 판 + 오른쪽 기둥·저울 그림(인라인 SVG, 요청 0). 조문은 신문처럼: 위 굵은 남색 줄, 제목 아래 두 겹 가는 줄.
   본문(.atext) 글자 크기·행간은 그대로. 흐림(backdrop-filter)은 헌법 8 에 맞춰 뺐다. 움직임 없음. uslaw 도 이 파일을 함께 쓴다(링크). */
:root {
  --seal: #17233f; --navy2: #24365e;
  --lw-emb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 170'%3E%3Cg fill='none' stroke='%23e2b85c' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M20 58L100 14L180 58Z' fill='%23e2b85c' fill-opacity='.08'/%3E%3Cpath d='M16 58H184V70H16Z'/%3E%3Cpath d='M30 70H56M68 70H94M106 70H132M144 70H170' stroke-width='3'/%3E%3Cpath d='M34 74V140M52 74V140M72 74V140M90 74V140M110 74V140M128 74V140M148 74V140M166 74V140'/%3E%3Cpath d='M43 80V134M81 80V134M119 80V134M157 80V134' stroke-opacity='.45' stroke-width='1.2'/%3E%3Cpath d='M12 140H188V148H12ZM4 148H196V156H4Z'/%3E%3Cpath d='M100 26V50M80 38H120M80 38L73 49M80 38L87 49M120 38L113 49M120 38L127 49' stroke-width='1.6'/%3E%3Cpath d='M71 49Q80 56 89 49ZM111 49Q120 56 129 49Z' stroke-width='1.6' fill='%23e2b85c' fill-opacity='.25'/%3E%3Ccircle cx='100' cy='24' r='2.4' fill='%23e2b85c'/%3E%3C/g%3E%3C/svg%3E");
  --lw-col: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%2317233f' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 8.5L12 3.5L21 8.5ZM4 8.5H20M6 11V18M10 11V18M14 11V18M18 11V18M3.5 20.5H20.5'/%3E%3C/g%3E%3C/svg%3E");
  --lw-frieze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cg fill='none' stroke='%2317233f' stroke-width='1'%3E%3Cpath d='M0 1.5H24M0 10.5H24'/%3E%3Cpath d='M5 3.5V8.5M8 3.5V8.5' /%3E%3Cpath d='M14 6H22' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  --lw-vein: rgba(23, 35, 63, .028);
}
:root[data-theme="dark"] {
  --seal: #1b2a4c; --navy2: #2a3d68;
  --lw-col: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23e2b85c' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 8.5L12 3.5L21 8.5ZM4 8.5H20M6 11V18M10 11V18M14 11V18M18 11V18M3.5 20.5H20.5'/%3E%3C/g%3E%3C/svg%3E");
  --lw-frieze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cg fill='none' stroke='%23e2b85c' stroke-width='1'%3E%3Cpath d='M0 1.5H24M0 10.5H24'/%3E%3Cpath d='M5 3.5V8.5M8 3.5V8.5' /%3E%3Cpath d='M14 6H22' stroke-opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  --lw-vein: rgba(255, 255, 255, .018);
}
/* 종이 바탕에 대리석 결 몇 가닥(아주 옅게, 그림 파일 없이 그라디언트만) — 첫 1400px 에만(긴 조문 목록에서 줄이 세로로 늘어지지 않게, 고정 배경은 스크롤마다 다시 칠해서 안 씀) */
body.lw { background:
  linear-gradient(118deg, transparent 31%, var(--lw-vein) 32%, transparent 34.5%),
  linear-gradient(104deg, transparent 58%, var(--lw-vein) 59%, transparent 60.2%),
  linear-gradient(131deg, transparent 76%, var(--lw-vein) 77%, transparent 79%),
  var(--bg); background-size: 100% 1400px, 100% 1400px, 100% 1400px, auto; background-repeat: no-repeat; }
.lw-nav { background: color-mix(in srgb, var(--bg) 97%, transparent); -webkit-backdrop-filter: none; backdrop-filter: none; }
.lw-nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); opacity: .7; }
.lw-tabs a.on { color: var(--gold); background: var(--seal); }

/* 대문 머리: 남색 대리석 판 + 기둥·저울 */
.hero { position: relative; margin-top: 6px; padding: 30px 28px 26px; border-radius: 20px; color: #f3efe3; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(116deg, transparent 22%, rgba(255,255,255,.045) 23%, transparent 25.5%),
    linear-gradient(98deg, transparent 47%, rgba(255,255,255,.03) 48%, transparent 49.3%),
    linear-gradient(128deg, transparent 63%, rgba(226,184,92,.06) 64%, transparent 66%),
    radial-gradient(90% 120% at 85% 0%, var(--navy2), transparent 70%),
    linear-gradient(160deg, #1d2c4f, #121c33);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 12px 28px -18px rgba(18, 28, 51, .7); }
.hero::before { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(226, 184, 92, .28); border-radius: 14px; pointer-events: none; z-index: -1; }
.hero::after { content: ''; position: absolute; z-index: -1; right: 34px; top: 50%; width: 230px; height: 196px; transform: translateY(-50%); background: var(--lw-emb) center / contain no-repeat; opacity: .92; pointer-events: none; }
.hero .kicker { color: var(--gold); }
.hero h1 { color: #fbf7ec; }
.hero .lead, .hero .hint { color: #c9cfdd; }
.hero .lead a, .hero .hint a { color: #ffe2a0; }
.hero .sbox input { border-color: transparent; background: #fffdf7; color: #1d2433; }
.hero .sbox input::placeholder { color: #6b7184; }
.hero .sbox button { background: linear-gradient(135deg, #f3d78f, #e2b85c 55%, #b98a2a); color: #17233f; }
@media (min-width: 860px) { .hero > * { max-width: calc(100% - 270px); } .hero .sbox { max-width: 600px; } }
@media (max-width: 859px) { .hero::after { top: 16px; right: 14px; width: 92px; height: 78px; transform: none; opacity: .5; } .hero h1 { padding-right: 70px; } }
@media (max-width: 520px) { .hero { padding: 24px 18px 20px; border-radius: 16px; } }

/* 섹션 제목: 작은 기둥 + 가는 줄 */
.sec-h { display: flex; align-items: center; gap: 8px; }
.sec-h::before { content: ''; flex: none; width: 20px; height: 20px; background: var(--lw-col) center / contain no-repeat; }
.sec-h::after { content: ''; flex: 1 1 auto; min-width: 20px; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* 오늘의 조문: 신문 1면처럼 — 위 굵은 줄 + 가는 줄 */
.today { border-top: 0; position: relative; padding-top: 22px; }
.today::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; border-radius: 16px 16px 0 0;
  background: linear-gradient(var(--seal) 0 4px, transparent 4px 5px, var(--seal) 5px 6px, transparent 6px); }
.today h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); } /* 글꼴은 그대로(명조 웹 글꼴이 늦게 오면 줄바꿈이 바뀌어 CLS 0.03 이었다) */
.today .atext { font-size: calc(var(--fs) * 1.04); }

/* 자주 찾는 조문 칸: 왼쪽 남색 띠 */
.pk { border-left: 3px solid var(--seal); }
:root[data-theme="dark"] .pk { border-left-color: var(--gold); }
.lk { border-top: 2px solid color-mix(in srgb, var(--seal) 70%, transparent); }
:root[data-theme="dark"] .lk { border-top-color: color-mix(in srgb, var(--gold) 55%, transparent); }

/* 법령 목차 머리: 아래에 기둥 띠(프리즈) */
.page-h { position: relative; padding-bottom: 22px; }
.page-h::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 12px; background: var(--lw-frieze) 0 50% / 24px 12px repeat-x; opacity: .45; }
.th.h1 { border-bottom: 0; padding-bottom: 8px; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 calc(100% - 4px) / 100% 1px no-repeat; }

/* 조문 화면: 신문 기사처럼 — 위 굵은 남색 줄, 제목 아래 두 겹 가는 줄, 항 사이 숨 */
.artc { position: relative; padding-top: 26px; }
.artc::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 7px; border-radius: 16px 16px 0 0;
  background: linear-gradient(var(--seal) 0 4px, transparent 4px 5px, var(--seal) 5px 6px, transparent 6px); }
:root[data-theme="dark"] .artc::before, :root[data-theme="dark"] .today::before { background: linear-gradient(var(--gold) 0 3px, transparent 3px 5px, var(--gold) 5px 6px, transparent 6px); opacity: .8; }
.artc h1 { padding-bottom: 12px; border-bottom: 1px solid var(--line); box-shadow: 0 3px 0 -2px var(--line); margin-bottom: 16px; }
.artc .atext p { margin-bottom: .5em; }
.where { letter-spacing: .01em; }
.where::before { content: ''; display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; background: var(--lw-col) center / contain no-repeat; opacity: .8; }
@media print { .hero { background: none; color: #000; box-shadow: none; } .hero::after, .hero::before { display: none; } body.lw { background: #fff; } }
