* {box-sizing:border-box}
body {margin:0;background:#10171c;color:#e8e8e3;font:16px/1.55 "Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif}
button,input {font:inherit;color:inherit}
button {cursor:pointer}
button:focus-visible,input:focus-visible {outline:2px solid #f1d49f;outline-offset:-2px}
.book-wrap {width:min(90%,1250px);margin-inline:auto}
.book-hero {background:linear-gradient(90deg,#101820ee,#18222986 50%,#24202218),url(media/citadel-gallery.webp) center 40%/cover;border-bottom:1px solid #b0926259}
.book-hero .book-wrap {padding-block:clamp(38px,5vw,84px)}
h1,h2,h3,p,dl,dd {margin:0}
h1 {font-size:clamp(38px,4.2vw,68px);line-height:1.15;letter-spacing:-.05em;color:#f7e5c2}
.book-search {margin-top:24px;display:flex;align-items:center;gap:14px;max-width:510px;background:#0f171ef2;border:1px solid #b1966b;padding:0 18px}
.book-search span {width:15px;height:15px;border:1.8px solid var(--gold);border-radius:50%;position:relative}
.book-search span::after {content:'';position:absolute;width:7px;height:2px;right:-6px;bottom:-3px;background:var(--gold);transform:rotate(45deg)}
.book-search input {flex:1;min-width:0;padding:14px 4px;background:transparent;border:none}
.book-search input::placeholder {color:#b7bfc0}
.catalog {padding-bottom:70px}
#tabs {display:flex;flex-wrap:wrap;border-bottom:1px solid var(--rule);margin:0 0 28px}
#tabs button {background:transparent;border:0;border-bottom:2px solid transparent;padding:20px clamp(12px,2.4vw,36px);color:#bec5c7}
#tabs .on {color:var(--gold);border-bottom-color:var(--gold)}
#armor-parts:not([hidden]) {display:flex;flex-wrap:wrap;gap:6px;margin:-8px 0 24px}
#armor-parts button {padding:6px 14px;min-height:36px;border:1px solid #425059;background:#182228;color:#c8ced0}
#armor-parts button:hover {border-color:#9b885f}
#armor-parts button[aria-pressed="true"] {color:var(--gold);border-color:#ad9268;background:#322e26}
.catalog-grid {display:grid;grid-template-columns:minmax(230px, .85fr) minmax(0,2fr);gap:clamp(16px,2.5vw,40px);align-items:start}
.entries,#detail {background:#1a232a;border-top:2px solid #a88b5e}
.entries h2 {font-size:17px;padding:15px 20px;background:#222d33}
#count {color:var(--gold);font-size:14px;margin-left:5px}
#list {overflow:auto;max-height:65vh;scrollbar-color:#647373 #182126}
#list button {display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;text-align:left;padding:8px 14px;background:transparent;border:0;border-bottom:1px solid #ffffff12}
#list button:hover,#list .sel {background:#36332c}
#list .sel {box-shadow:inset 3px 0 var(--gold);color:var(--gold)}
#list small {color:#acb9bb}
#detail {min-height:280px;padding:clamp(20px,3vw,42px);background:linear-gradient(130deg,#252c30,#182228 55%)}
.entry-heading small {color:var(--gold);font-weight:700}
#detail h2 {font-size:clamp(28px,3vw,44px);letter-spacing:-.04em;line-height:1.18;margin:4px 0}
#detail dl {display:grid;grid-template-columns:minmax(110px,.8fr) 1.2fr}
#detail dt,#detail dd {padding:10px 4px;border-bottom:1px solid #ffffff16}
#detail dt {color:#b8c3c5}
#detail dd {text-align:right;font-weight:600}
#detail h3 {margin:26px 0 12px;font-size:18px;color:#e9d1a9}
.book-art {display:block;object-fit:contain;background:radial-gradient(ellipse at 50% 70%,#353c3c,#171e24 78%);border:1px solid #9c8b633b}
.entry-heading {display:flex;align-items:center;gap:clamp(16px,2vw,30px);margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--rule)}
.entry-heading .book-art {flex:none;width:clamp(88px,11vw,128px);height:auto;aspect-ratio:1;border-color:#a489576e}
.entry-heading p {margin-top:8px;color:#c8ced0}
.drop-links {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:6px}
#detail button {display:flex;align-items:center;gap:9px;text-align:left;border:1px solid #37504f;background:#203034;color:#c5e6df;padding:5px 8px}
.drop-links .book-art {flex:none}
#detail button:hover {background:#304a4c}
@media(max-width:680px){
 .book-wrap{width:92%}.catalog-grid{grid-template-columns:1fr}
 #tabs button{flex:1 0 auto;padding:14px 6px;font-size:14px}
 #list{max-height:190px}.entries h2{padding:9px 16px}
}

#monster-region-filter:not([hidden]) {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:-8px 0 24px;color:var(--gold)}
#monster-region {max-width:100%;min-height:40px;padding:6px 12px;color:#e9e3da;background:#182228;border:1px solid #74674e;font:inherit}
