
/* Layout: KRDS public-service page — header, page title, a bordered bookcase panel (spines by KDC number), then the opened book as a bordered content card with a structured info list beside it. */
@font-face{font-family:"Pretendard GOV";src:url("/assets/fonts/PretendardGOV-Regular.subset.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Pretendard GOV";src:url("/assets/fonts/PretendardGOV-Medium.subset.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Pretendard GOV";src:url("/assets/fonts/PretendardGOV-Bold.subset.woff2") format("woff2");font-weight:700;font-display:swap}
:root{
  /* KRDS 의미 토큰 · 기본 화면 */
  --background-white:#ffffff; --background-gray-subtler:#f4f5f6; --background-gray-subtle:#e6e8ea;
  --text-basic:#1e2124; --text-bolder:#131416; --text-subtle:#464c53; --text-primary:#0b50d0; --text-point:#ab2b36;
  --text-inverse-static:#ffffff; --text-basic-inverse:#ffffff;
  --border-gray-light:#cdd1d5; --border-gray:#b1b8be; --border-gray-darker:#1e2124; --border-primary:#256ef4; --border-inverse:#ffffff;
  --surface-primary-subtler:#ecf2fe; --surface-inverse:#1e2124;
  --element-primary:#256ef4; --element-primary-lighter:#ecf2fe; --element-point:#d63d4a; --element-gray-light:#e6e8ea;
  --link-default:#256ef4; --link-visited:#5917b8;
  --shadow-focus:0 0 0 4px #256ef4; --shadow-dropdown:0 0 2px 0 #0000000d,0 4px 8px 0 #00000014;
  --font-sans:"Pretendard GOV","Pretendard",system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  --radius-small2:4px; --radius-medium3:8px; --radius-xlarge1:12px;
  --gutter:24px;
}
/* 어두운 화면 = KRDS 선명한 화면(high-contrast) */
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --background-white:#000000; --background-gray-subtler:#131416; --background-gray-subtle:#1e2124;
  --text-basic:#f4f5f6; --text-bolder:#e6e8ea; --text-subtle:#cdd1d5; --text-primary:#b1cefb; --text-point:#ebadb2;
  --text-basic-inverse:#1e2124;
  --border-gray-light:#33363d; --border-gray:#464c53; --border-gray-darker:#e6e8ea; --border-inverse:#000000;
  --surface-primary-subtler:#020f27; --surface-inverse:#e6e8ea;
  --element-primary-lighter:#020f27; --element-gray-light:#1e2124;
  --link-default:#86aff9; --link-visited:#c49ff9;
  --shadow-dropdown:0 0 2px 0 #0000001f,0 4px 8px 0 #00000033; color-scheme:dark }}
:root[data-theme="dark"]{
  --background-white:#000000; --background-gray-subtler:#131416; --background-gray-subtle:#1e2124;
  --text-basic:#f4f5f6; --text-bolder:#e6e8ea; --text-subtle:#cdd1d5; --text-primary:#b1cefb; --text-point:#ebadb2;
  --text-basic-inverse:#1e2124;
  --border-gray-light:#33363d; --border-gray:#464c53; --border-gray-darker:#e6e8ea; --border-inverse:#000000;
  --surface-primary-subtler:#020f27; --surface-inverse:#e6e8ea;
  --element-primary-lighter:#020f27; --element-gray-light:#1e2124;
  --link-default:#86aff9; --link-visited:#c49ff9;
  --shadow-dropdown:0 0 2px 0 #0000001f,0 4px 8px 0 #00000033; color-scheme:dark }

*{box-sizing:border-box}
body{background:var(--background-white);color:var(--text-basic);font-family:var(--font-sans);font-size:17px;line-height:1.5;
  padding-block:0;padding-left:0;padding-right:0}
.inner{max-width:1200px;margin:0 auto;padding-left:max(var(--gutter),env(safe-area-inset-left,0px));padding-right:max(var(--gutter),env(safe-area-inset-right,0px))}
h1,h2,h3,h4{margin:0;font-weight:700;color:var(--text-bolder);line-height:1.5;text-wrap:balance}
p{margin:0}
a{color:var(--link-default);text-decoration:underline;text-underline-offset:3px}
a:focus-visible,button:focus-visible{outline:2px solid var(--border-inverse);outline-offset:0;box-shadow:var(--shadow-focus);border-radius:var(--radius-small2)}

/* 머리글 */
.site-head{border-bottom:1px solid var(--border-gray-light)}
.site-head .inner{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:72px;flex-wrap:wrap;padding-block:12px}
.logo{font-size:22px;font-weight:700;color:var(--text-bolder);display:flex;align-items:center;gap:10px}
.logo i{width:6px;height:26px;background:var(--element-primary);border-radius:2px;display:inline-block;box-shadow:9px 0 0 var(--element-point),18px 0 0 var(--border-gray)}
.logo span{margin-left:18px}
.head-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap}

/* KRDS 버튼·배지 */
.krds-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:40px;padding:0 16px;border-radius:6px;font:inherit;font-size:15px;
  border:1px solid var(--border-gray);background:var(--background-white);color:var(--text-basic);cursor:pointer;transition:background-color .4s ease-in-out}
.krds-btn:hover{background:var(--background-gray-subtler)}
.krds-btn[aria-pressed="true"]{border-color:var(--border-primary);color:var(--text-primary);background:var(--surface-primary-subtler)}
.krds-badge{display:inline-flex;align-items:center;height:24px;line-height:24px;padding:0 8px;border-radius:var(--radius-small2);font-size:15px;border:1px solid transparent;white-space:nowrap}
.krds-badge.bg-light-primary{background:var(--element-primary-lighter);color:var(--text-primary)}
.krds-badge.outline-gray{border-color:var(--border-gray);color:var(--text-subtle)}
.krds-badge.outline-point{border-color:var(--element-point);color:var(--text-point)}
.krds-badge-wrap{display:flex;flex-wrap:wrap;gap:8px}

/* 페이지 제목 */
main{display:flex;flex-direction:column;gap:48px;padding-block:40px 64px}
.page-title{display:flex;flex-direction:column;gap:16px}
.page-title h1{font-size:40px}
.page-title p{color:var(--text-subtle);max-width:60ch}

/* 서가 */
.case{border:1px solid var(--border-gray-light);border-radius:var(--radius-xlarge1);background:var(--background-gray-subtler);padding:20px;display:flex;flex-direction:column;gap:12px}
.case-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px}
.case-head h2{font-size:19px}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:15px;color:var(--text-subtle)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:12px;height:12px;border-radius:2px;display:inline-block}
.shelves{display:flex;flex-wrap:wrap;gap:24px 20px}
.unit{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;min-width:0}
.unit-label{font-size:15px;font-weight:700;color:var(--text-bolder);display:flex;gap:8px;align-items:baseline;padding:0 6px}
.unit-label small{font-size:13px;font-weight:400;color:var(--text-subtle);font-variant-numeric:tabular-nums}
.row{display:flex;flex-wrap:wrap;align-items:flex-end;column-gap:4px;padding:0 6px;
  background:repeating-linear-gradient(to bottom,transparent 0 202px,var(--border-gray) 202px 208px)}
.slot{height:208px;padding-bottom:6px;display:flex;align-items:flex-end}
.spine{all:unset;cursor:pointer;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  width:var(--w);border-radius:3px 3px 0 0;padding:14px 0 8px;color:#ffffff;
  box-shadow:inset -3px 0 0 rgba(0,0,0,.2);transition:transform .25s ease,box-shadow .25s ease,opacity .2s}
.spine .t{writing-mode:vertical-rl;font-size:14px;font-weight:500;letter-spacing:.04em;line-height:1.2;white-space:nowrap}
.spine .call{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;background:#ffffff;color:#1e2124;padding:0 3px;border-radius:2px}
.spine.soon{opacity:.6}
.spine:hover{transform:translateY(-6px);opacity:1}
.spine:focus-visible{outline:2px solid var(--border-inverse);box-shadow:var(--shadow-focus)}
.spine[aria-pressed="true"]{transform:translateY(-24px);opacity:1;box-shadow:0 0 0 3px var(--border-primary),var(--shadow-dropdown)}

/* 펼친 책 */
.desk{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:40px;align-items:start}
.book{display:flex;flex-direction:column;gap:48px;min-width:0}
.book-head{display:flex;flex-direction:column;gap:12px;padding-bottom:24px;border-bottom:2px solid var(--border-gray-darker)}
.book-head h2{font-size:32px}
.book-head .by{color:var(--text-subtle);font-size:15px}
.sec{display:flex;flex-direction:column;gap:20px}
.sec h3{font-size:24px;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.sec h3 small{font-size:15px;font-weight:400;color:var(--text-subtle)}
.quote{background:var(--surface-primary-subtler);border-left:4px solid var(--border-primary);border-radius:0 var(--radius-medium3) var(--radius-medium3) 0;padding:24px 28px;display:flex;flex-direction:column;gap:16px}
.orig{font-size:21px;line-height:1.6;color:var(--text-bolder)}
.trans{font-size:19px;font-weight:500;color:var(--text-basic);max-width:60ch}
.src{font-size:15px;color:var(--text-subtle)}
.ck{all:unset;cursor:pointer;border-bottom:2px dotted var(--border-gray);border-radius:2px;transition:background-color .2s}
.ck:hover{background:var(--element-gray-light)}
.ck.on{background:var(--background-white);border-bottom:2px solid var(--border-primary);color:var(--text-primary)}
.ck.hid{color:transparent;background:var(--background-gray-subtle);border-bottom-color:transparent}
.ck.got{border-bottom:2px solid var(--element-point)}
.ck:focus-visible,.wbtn:focus-visible{outline:2px solid var(--border-inverse);box-shadow:var(--shadow-focus)}
.said{min-height:56px;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;padding:12px 16px;background:var(--background-white);border:1px solid var(--border-gray-light);border-radius:var(--radius-medium3)}
.said b{font-size:19px;color:var(--text-bolder)}
.said .pron{color:var(--text-primary);font-weight:500}
.said .mean{color:var(--text-subtle)}
.said-hint{color:var(--text-subtle);font-size:15px}
.tools{display:flex;flex-wrap:wrap;gap:8px}
.krds-btn.primary-btn{background:var(--element-primary);border-color:var(--element-primary);color:var(--text-inverse-static);font-size:17px}
.krds-btn.primary-btn:hover{background:#0b50d0;border-color:#0b50d0}
.vnote{font-size:15px;color:var(--text-subtle)}
.vnote:empty{display:none}
.words h4{font-size:17px;margin-bottom:8px}
.tbl{overflow-x:auto;border-top:1px solid var(--border-gray-darker)}
.tbl table{width:100%;border-collapse:collapse;font-size:15px}
.tbl th{text-align:left;font-weight:700;color:var(--text-bolder);padding:10px 12px;background:var(--background-gray-subtler);border-bottom:1px solid var(--border-gray-light);white-space:nowrap}
.tbl td{padding:10px 12px;border-bottom:1px solid var(--border-gray-light);vertical-align:top}
.tbl td:nth-child(2){color:var(--text-primary)}
.wbtn{all:unset;cursor:pointer;font-weight:500;color:var(--text-bolder);text-decoration:underline dotted;text-underline-offset:4px}
.wbtn:hover{color:var(--text-primary)}
.tip{display:flex;flex-direction:column;gap:4px;padding:16px 20px;border:1px solid var(--border-gray-light);border-left:4px solid var(--element-point);border-radius:0 var(--radius-medium3) var(--radius-medium3) 0}
.tip b{font-size:15px;color:var(--text-point)}
.toc{list-style:none;margin:0;padding:0;border-top:1px solid var(--border-gray-darker)}
.toc li{display:grid;grid-template-columns:120px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--border-gray-light)}
.toc .no{font-weight:700;color:var(--text-primary)}
.toc .no small{display:block;font-weight:500;font-size:15px;color:var(--text-bolder)}
.points{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px;counter-reset:p}
.points li{counter-increment:p;display:grid;grid-template-columns:32px minmax(0,1fr);gap:12px;max-width:68ch}
.points li::before{content:counter(p);width:28px;height:28px;border-radius:1000px;background:var(--element-primary);color:var(--text-inverse-static);font-size:15px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:1px}
.points b{font-weight:700;color:var(--text-bolder)}
.today{background:var(--background-gray-subtler);border:1px solid var(--border-gray-light);border-radius:var(--radius-xlarge1);padding:28px;display:flex;flex-direction:column;gap:12px}
.today p{max-width:66ch}
.ask{margin-top:4px;padding-top:16px;border-top:1px solid var(--border-gray-light);font-size:19px;font-weight:700;color:var(--text-primary)}

/* 옆 정보 */
.side{display:flex;flex-direction:column;gap:32px;position:sticky;top:24px}
.info{border:1px solid var(--border-gray-light);border-radius:var(--radius-xlarge1);padding:20px 24px}
.info h4,.near h4{font-size:17px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}
.info dl{margin:0}
.info .row{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:10px 0;border-top:1px solid var(--border-gray-light);font-size:15px}
.info dt{color:var(--text-subtle)}
.info dd{margin:0;color:var(--text-basic);font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}
.near ul{list-style:none;margin:0;padding:0;border-top:1px solid var(--border-gray-darker)}
.near li{border-bottom:1px solid var(--border-gray-light)}
.near a{display:flex;flex-direction:column;gap:2px;padding:12px 2px;text-decoration:none}
.near a b{font-weight:700;text-decoration:underline;text-underline-offset:3px}
.near a span{color:var(--text-subtle);font-size:15px}

/* 준비 중 */
.soonbox{border:1px solid var(--border-gray-light);border-radius:var(--radius-xlarge1);padding:32px;display:flex;flex-direction:column;gap:16px;align-items:flex-start}
.soonbox h2{font-size:32px}
.soonbox .meta{color:var(--text-subtle);font-size:15px}

/* 바닥글 */
.site-foot{background:var(--surface-inverse);color:var(--text-basic-inverse)}
.site-foot .inner{padding-block:32px 40px;display:flex;flex-direction:column;gap:8px;font-size:15px}
.site-foot b{font-size:17px}

@media (max-width:1024px){.desk{grid-template-columns:minmax(0,1fr)}.side{position:static}}
@media (max-width:768px){
  :root{--gutter:16px}
  main{gap:32px;padding-block:32px 40px}
  .page-title h1{font-size:28px}
  .book-head h2,.soonbox h2{font-size:24px}
  .sec h3{font-size:22px}
  .orig{font-size:19px}
  .quote{padding:20px}
  .toc li{grid-template-columns:minmax(0,1fr);gap:4px}
  .case{padding:16px 12px}
}
@media (max-width:480px){.spine{width:calc(var(--w) * .8)}.spine .t{font-size:13px}.row{column-gap:3px;padding:0 2px}}
@media (prefers-reduced-motion:reduce){.spine{transition:none}}

/* 사이트 공통 추가 */
a.spine{text-decoration:none}
a.logo{text-decoration:none}
.site-nav{display:flex;gap:16px;font-size:15px}
.site-nav a{color:var(--text-basic);text-decoration:none}
.site-nav a:hover{text-decoration:underline}
.crumb{font-size:15px;color:var(--text-subtle);display:flex;gap:8px;flex-wrap:wrap}
.crumb a{color:var(--text-subtle)}
.back{display:flex;justify-content:center}
.back a{display:inline-flex;align-items:center;height:48px;padding:0 24px;border:1px solid var(--border-gray);border-radius:6px;color:var(--text-basic);text-decoration:none;font-size:17px}
.back a:hover{background:var(--background-gray-subtler)}
.prose{max-width:720px;display:flex;flex-direction:column;gap:20px}
.prose h1{font-size:40px}
.prose h2{font-size:24px;margin-top:16px}
.prose ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:6px}
.prose .muted{color:var(--text-subtle);font-size:15px}
.site-foot a{color:var(--text-basic-inverse)}
@media (max-width:768px){.prose h1{font-size:28px}.prose h2{font-size:22px}}

.h3{font-size:24px;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.h3 small{font-size:15px;font-weight:400;color:var(--text-subtle)}
.h4{font-size:17px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}
.book-head h1{font-size:32px}
main>.case{margin-top:16px}
.spine[aria-current="page"]{transform:translateY(-24px);opacity:1;box-shadow:0 0 0 3px var(--border-primary),var(--shadow-dropdown)}
@media (max-width:768px){.h3{font-size:22px}.book-head h1{font-size:24px}}
