.bestiary-page { --bg:#080b08; --panel:#10150f; --border:#3b4435; --muted:#b8c1ad; }
.bestiary-page .site-header { background:#0a0d09; }
.bestiary-page .bestiary { max-width:1380px; padding:38px 28px 44px; }
.bestiary-heading { display:flex; align-items:center; justify-content:space-between; gap:28px; margin-bottom:28px; }
.bestiary-page h1 { color:#f3edda; font-size:46px; margin-bottom:8px; }
.bestiary-intro { margin:0; font-size:16px; }
.bestiary-page .coverage { display:flex; flex-direction:column; margin:0; padding-left:24px; border-left:1px solid #6e7150; font-size:12px; white-space:nowrap; }
.coverage strong { color:var(--gold); font-family:Georgia,"Times New Roman",serif; font-size:27px; font-weight:400; }
.bestiary-controls { margin-bottom:24px; padding:19px 20px 15px; background:#11170f; border:1px solid var(--border); border-radius:8px; }
.search-label { display:block; font-size:12px; font-weight:600; margin-bottom:7px; color:var(--muted); }
.search-field { position:relative; }
.search-field svg { position:absolute; top:13px; left:13px; width:20px; height:20px; color:var(--gold); pointer-events:none; }
.lands-page .search-field input { padding:11px 13px 11px 42px; min-height:47px; background:#090e08; border-color:#59624d; }
.filter-line { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
.category-filters { display:flex; gap:7px; flex-wrap:wrap; }
.category-filter { display:inline-flex; align-items:center; gap:9px; min-height:42px; padding:8px 14px; border:1px solid #434e3c; border-radius:5px; background:transparent; color:var(--muted); font:inherit; font-size:14px; cursor:pointer; }
.category-filter span { font-size:11px; opacity:.8; }
.category-filter:hover { border-color:var(--gold); color:var(--text); }
.category-filter[aria-pressed="true"] { background:#d4c38f; border-color:#d4c38f; color:#202418; font-weight:600; }
.bestiary-page .result-count { margin:0; color:var(--muted); font-size:12px; white-space:nowrap; }
.creature-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.creature-card { display:flex; flex-direction:column; min-width:0; width:100%; padding:0; border:1px solid var(--border); border-radius:7px; overflow:hidden; background:var(--panel); color:var(--text); text-align:left; font:inherit; cursor:pointer; transition:border-color .15s,background .15s; }
.creature-card:hover { border-color:#bdad78; background:#172013; }
.creature-art { display:grid; position:relative; place-items:center; flex:none; width:100%; aspect-ratio:1; overflow:hidden; background:#080b07; }
.creature-art img { display:block; width:100%; height:100%; object-fit:contain; }
.art-unavailable { padding:24px; color:var(--muted); font-size:14px; text-align:center; }
.creature-copy { display:flex; flex-direction:column; flex:1; width:100%; padding:16px 17px 0; border-top:1px solid var(--border); }
.creature-kind { display:block; margin:0 0 6px; color:var(--gold); font-size:11px; }
.creature-name { display:block; margin-bottom:3px; font:400 25px/1.2 Georgia,"Times New Roman",serif; overflow-wrap:anywhere; }
.creature-english { display:block; margin-bottom:16px; color:var(--muted); font-size:12px; }
.card-stats { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 8px; margin-top:auto; padding:11px 0 12px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; }
.card-stats b { margin-left:3px; color:var(--text); font-weight:600; }
.bestiary-empty { padding:55px 15px; text-align:center; border:1px solid var(--border); border-radius:7px; }
.bestiary-empty p { margin-bottom:20px; }
.bestiary-footer { margin-top:34px; padding-top:20px; border-top:1px solid var(--border); }
.bestiary-footer p { max-width:100ch; margin:0 0 8px; font-size:12px; }
.bestiary-footer a,.source-note a { color:var(--gold); text-underline-offset:3px; }
.has-creature-dialog { overflow:hidden; }
.creature-dialog { position:fixed; width:min(1040px,calc(100% - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:0; overflow:auto; border:1px solid #777454; border-radius:9px; background:#11160f; color:var(--text); scrollbar-color:#6e785c #11160f; }
.creature-dialog::backdrop { background:rgba(0,0,0,.82); backdrop-filter:blur(4px); }
.detail-close { position:sticky; z-index:2; display:grid; place-items:center; width:44px; height:44px; margin:10px 10px -54px auto; top:10px; border:1px solid #81816a; border-radius:50%; background:#141a11; color:#f3edda; cursor:pointer; }
.detail-close:hover { background:#313c27; border-color:var(--gold); }
.detail-close svg { width:22px; height:22px; }
.detail-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); align-items:start; }
.detail-art { position:sticky; top:0; max-height:calc(100dvh - 34px); }
.detail-copy { min-width:0; padding:32px 30px 25px; }
.detail-copy > .creature-kind { margin:1px 36px 9px 0; }
.bestiary-page .detail-copy h2 { color:#f3edda; margin:0 26px 15px 0; font-size:36px; }
.creature-description { font-size:14px; line-height:1.65; margin-bottom:22px; }
.attribute-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:0 0 10px; padding:13px 0; border-top:1px solid #677052; border-bottom:1px solid #677052; }
.attribute-grid > div { text-align:center; border-right:1px solid var(--border); }
.attribute-grid > div:last-child { border:0; }
.attribute-grid dt { color:var(--muted); font-size:11px; }
.attribute-grid dd { margin:4px 0 0; color:#ede2bc; font:400 28px/1.2 Georgia,"Times New Roman",serif; overflow-wrap:anywhere; }
.secondary-stats { display:flex; gap:26px; margin:0 0 22px; font-size:13px; }
.secondary-stats > div { display:flex; gap:8px; }
.secondary-stats dt { color:var(--muted); }
.secondary-stats dd { margin:0; font-weight:600; }
.bestiary-page .detail-section h3 { margin:0 0 9px; color:var(--gold); font:600 12px/1.5 system-ui,sans-serif; }
.detail-section { margin-top:21px; }
.creature-skills { list-style:none; display:flex; flex-wrap:wrap; gap:7px 16px; margin:0; padding:0; font-size:13px; }
.creature-skills strong { margin-left:4px; color:#ede2bc; font-weight:600; }
.weapon-line { display:flex; flex-direction:column; gap:3px; margin:0; font-size:13px; }
.weapon-line strong { font-weight:500; color:var(--text); }
.weapon-line span { color:var(--muted); }
.creature-trait { margin:13px 0 0; }
.bestiary-page .creature-trait h3 { margin:0 0 3px; color:var(--text); font-size:13px; font-weight:600; }
.creature-trait p { margin:0; font-size:13px; line-height:1.6; }
.bestiary-page .source-note { margin:24px 0 0; padding-top:15px; border-top:1px solid var(--border); font-size:11px; line-height:1.7; }
.source-note span { display:block; margin-top:5px; }
@media (max-width:1100px) { .creature-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; } }
@media (max-width:800px) { .bestiary-page .bestiary { padding:28px 18px 32px; } .creature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } .detail-layout { grid-template-columns:1fr; } .detail-art { position:relative; max-height:none; aspect-ratio:4/3; } .detail-copy { padding:24px; } .detail-copy > .creature-kind { margin-right:0; } }
@media (max-width:540px) { .bestiary-page .site-header { padding:13px 14px; } .bestiary-page .brand { gap:12px; } .bestiary-page .nav-link { font-size:12px; } .bestiary-page .site-header > .nav-link { display:none; } .bestiary-page .bestiary { padding:24px 14px 30px; } .bestiary-heading { display:block; margin-bottom:20px; } .bestiary-page h1 { font-size:38px; } .bestiary-page .eyebrow { font-size:10px; } .bestiary-intro { font-size:14px; } .bestiary-page .coverage { display:flex; flex-direction:row; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin-top:16px; padding:12px 0 0; border-left:0; border-top:1px solid var(--border); font-size:11px; white-space:normal; } .coverage strong { font-family:inherit; font-size:12px; font-weight:600; } .coverage > span:last-child { color:var(--muted); } .bestiary-controls { padding:13px; margin-bottom:16px; } .lands-page .search-field input { font-size:13px; } .filter-line { flex-wrap:wrap; gap:10px; margin-top:12px; } .category-filters { gap:5px; } .category-filter { padding:8px 10px; gap:6px; font-size:12px; } .bestiary-page .result-count { font-size:11px; } .creature-grid { gap:12px; } .creature-copy { padding:12px 10px 0; } .creature-kind { font-size:10px; } .creature-name { font-size:22px; } .creature-english { font-size:11px; margin-bottom:12px; } .card-stats { font-size:10px; gap:4px 9px; justify-content:flex-start; } .creature-dialog { width:calc(100% - 20px); max-height:calc(100dvh - 20px); border-radius:7px; } .detail-art { aspect-ratio:1; } .detail-copy { padding:21px 18px; } .bestiary-page .detail-copy h2 { font-size:31px; } .attribute-grid dt { font-size:10px; } .attribute-grid dd { font-size:25px; } .secondary-stats { gap:18px; font-size:12px; } }
@media (max-width:540px) { .attribute-grid { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:14px; } .attribute-grid > div:nth-child(2) { border-right:0; } }
@media (max-width:350px) { .creature-grid { grid-template-columns:1fr; } .creature-art { aspect-ratio:4/3; } .creature-name { font-size:25px; } .card-stats { font-size:11px; justify-content:space-between; } .category-filter { padding:8px; } .detail-art { aspect-ratio:1; } }
@media (prefers-reduced-motion:reduce) { .creature-card { transition:none; } }

.scope-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.encounter-notice { margin:0 0 18px; padding:12px 14px; border-left:2px solid var(--gold); background:#0b1009; }
.encounter-notice p { margin:0; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.encounter-notice a { color:var(--gold); text-underline-offset:3px; }
.encounter-retry { margin-top:12px; min-height:44px; font-size:13px; }
.encounter-source { color:var(--muted); font-size:12px; margin:10px 0 16px; }
.encounter-art { background:radial-gradient(ellipse at center,#202b1a,#0b1009 75%); }
.encounter-art .art-unavailable { max-width:25ch; line-height:1.6; }
.encounter-art[data-art-status="generating"] { border-bottom:2px solid #b6a471; }
.encounter-error { color:#ead0b8; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.unknown-rules { padding:14px 0; color:var(--muted); font-size:13px; border-block:1px solid var(--border); }
[data-encounter-art] { min-width:0; position:sticky; top:0; }
[data-encounter-art] .detail-art { position:relative; }
.bestiary-page [hidden] { display:none !important; }
@media(max-width:800px) { [data-encounter-art] { position:relative; } }
@media(max-width:350px) { .scope-filters { gap:6px; } .scope-filters .category-filter { flex:1; justify-content:center; font-size:12px; } }
