
/* 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.logo{text-decoration:none}
.logo i{background:var(--element-primary)}
.site-nav{display:flex;gap:16px;font-size:15px;flex-wrap:wrap}
.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;margin:24px 0 8px}
.crumb a{color:var(--text-subtle)}
main.inner{padding-bottom:64px}
.lead{max-width:760px;display:flex;flex-direction:column;gap:12px;padding:40px 0 24px}
.lead h1{font-size:40px;line-height:1.3;margin:0;text-wrap:balance}
.lead p{margin:0;font-size:19px;line-height:1.7;color:var(--text-subtle)}
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:8px 0 40px;padding:0;list-style:none}
.steps li{border:1px solid var(--border-gray-light);border-radius:8px;padding:18px 20px;display:flex;flex-direction:column;gap:4px}
.steps b{font-size:17px}
.steps span{color:var(--text-subtle);font-size:15px;line-height:1.6}
.steps small{color:var(--text-primary);font-weight:700;font-size:13px;letter-spacing:.04em}
h2.sh{font-size:24px;margin:32px 0 16px}
.cities{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0;padding:0;list-style:none}
.cities a,.cities .soon{display:flex;flex-direction:column;gap:4px;padding:18px 20px;border:1px solid var(--border-gray-light);border-radius:8px;text-decoration:none;color:var(--text-basic);min-height:100%}
.cities a:hover{border-color:var(--border-primary)}
.cities b{font-size:20px}
.cities span{font-size:15px;color:var(--text-subtle)}
.cities .soon{background:var(--background-gray-subtler)}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin:0;padding:0;list-style:none}
.cards a{display:flex;flex-direction:column;border:1px solid var(--border-gray-light);border-radius:8px;overflow:hidden;text-decoration:none;color:var(--text-basic);height:100%}
.cards a:hover{border-color:var(--border-primary)}
.cards .pic{background:var(--background-gray-subtler);display:flex;justify-content:center;padding:16px}
.cards .pic svg{height:140px;width:auto;max-width:100%}
.cards .pic:has(img){padding:0}
.cards .pic img{display:block;width:100%;height:200px;object-fit:cover;object-position:center 30%}
.art img{display:block;max-width:100%;max-height:520px;width:auto;height:auto;margin:0 auto 20px;border-radius:4px}
.art-cap a{color:var(--text-subtle)}
.cards .txt{padding:16px 18px;display:flex;flex-direction:column;gap:6px}
.cards b{font-size:19px}
.cards .where-s{font-size:14px;color:var(--text-primary);font-weight:500}
.cards p{margin:0;font-size:15px;line-height:1.6;color:var(--text-subtle)}
/* 유물 카드 */
.item{max-width:760px;border:1px solid var(--border-gray-light);border-radius:8px;overflow:hidden;margin-top:8px}
.art{background:var(--background-gray-subtler);display:flex;justify-content:center;padding:28px 16px 8px}
.art svg{width:100%;max-width:260px;height:auto}
.art-cap{font-size:13px;color:var(--text-subtle);text-align:center;margin:0;padding:6px 16px 16px;background:var(--background-gray-subtler)}
.plaque{padding:24px;border-bottom:1px solid var(--border-gray-light);display:flex;flex-direction:column;gap:2px}
.plaque h1{font-size:32px;margin:0;line-height:1.3;text-wrap:balance}
.plaque .orig{color:var(--text-subtle)}
.plaque dl{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;margin:12px 0 0;font-size:16px}
.plaque dt{color:var(--text-subtle)}
.plaque dd{margin:0}
.item section{padding:24px;border-bottom:1px solid var(--border-gray-light);display:flex;flex-direction:column;gap:12px;min-width:0}
.item section:last-child{border-bottom:0}
.item h2{margin:0;font-size:14px;letter-spacing:.06em;color:var(--text-subtle);font-weight:700}
.item p{margin:0;line-height:1.8}
.item ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:8px;line-height:1.7}
.where{background:var(--surface-primary-subtler);border-radius:8px;padding:16px 18px;display:flex;flex-direction:column;gap:6px}
.where b{font-size:18px}
.checked{font-size:14px;color:var(--text-subtle)}
mark.key{background:linear-gradient(transparent 55%,#ffe17a 55%);color:inherit;padding:0 2px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
:root[data-theme="dark"] mark.key{background:#ffd400;color:#000}
.toggle{display:inline-flex;border:1px solid var(--border-gray);border-radius:999px;padding:3px;gap:3px;align-self:flex-start}
.toggle button{font:inherit;font-size:15px;border:0;background:transparent;color:var(--text-basic);padding:8px 16px;border-radius:999px;cursor:pointer;min-height:40px}
.toggle button[aria-pressed="true"]{background:var(--text-bolder);color:var(--background-white)}
.kid{background:#e3f4ee;border-radius:8px;padding:18px 20px;display:flex;flex-direction:column;gap:12px;font-size:18px}
:root[data-theme="dark"] .kid{background:#16302a}
.missions{display:flex;flex-direction:column;gap:8px}
.missions label{display:flex;gap:12px;align-items:flex-start;background:var(--background-gray-subtler);border-radius:8px;padding:14px 16px;cursor:pointer;line-height:1.6}
.missions input{width:22px;height:22px;margin-top:2px;flex:none;accent-color:#0a7a5a}
.missions input:checked+span{color:#0a7a5a;font-weight:700}
:root[data-theme="dark"] .missions input:checked+span{color:#5fd3a9}
.src{font-size:14px;color:var(--text-subtle);line-height:1.7}
.src a{color:var(--text-subtle)}
.more{margin-top:40px}
.prose{max-width:720px;display:flex;flex-direction:column;gap:16px;padding-top:32px}
.prose h1{font-size:36px;margin:0}
.prose h2{font-size:22px;margin:16px 0 0}
.prose p{margin:0;line-height:1.8}
.prose ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:6px;line-height:1.7}
.muted{color:var(--text-subtle);font-size:15px}
.site-foot a{color:var(--text-basic-inverse)}
.notice{font-size:14px;color:var(--text-subtle);margin-top:24px;max-width:760px;line-height:1.7}
@media (max-width:768px){.lead h1{font-size:28px}.lead p{font-size:17px}.plaque h1{font-size:26px}.prose h1{font-size:28px}}
