/* lawbook.<도메인> — 종이 같은 밝은 화면(기본)과 밤 화면. 본문은 명조(Noto Serif KR), 화면 글자는 Pretendard.
   틀: web/templates/lawbook/base.html, 동작: law.js */
:root {
  --bg: #f7f4ec; --bg2: #efe9da; --card: #fffdf7; --line: #e2dac6; --ink: #1d2433; --ink2: #4a5468; --mute: #7d8496;
  --seal: #1d2a44; --gold: #e2b85c; --acc: #8a5a12; --link: #1f4fa3; --rv: #8d8f99; --hl: #fff1c2;
  --fs: 1.06rem;
  color-scheme: light;
}
: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; } }

.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', 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; }
.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); }
.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 1fr; 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', 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', 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', 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; }
.atext .rv { color: var(--rv); font-size: .84em; white-space: nowrap; }
.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', 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-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.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); }
.tr-note { font-size: .78rem; color: var(--mute); margin: 12px 0 0; line-height: 1.55; }
.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', 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; } }
