/* Art slots only; existing paper, navigation, prose and unlock layout stay in place. */
.collection-art { image-rendering:pixelated; }
.codex-art-button { padding:0; margin:0; border:0; background:none; width:100%; max-width:160px; aspect-ratio:1; cursor:zoom-in; }
.codex-art-image { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; }
.collection-art-dialog { box-sizing:border-box; width:min(640px,calc(100vw - 24px)); max-height:92dvh; overflow:auto; padding:16px; background:var(--paper,#eee4cb); color:var(--ink,#35291e); border:1px solid var(--rule,#a58f73); }
.collection-art-dialog::backdrop { background:#17131bcc; }
.monster-memory-dialog { text-align:left; overflow-wrap:anywhere; }
.monster-memory-dialog > .mini { position:sticky; top:0; float:right; z-index:1; background:var(--paper,#eee4cb); }
.monster-memory-dialog .mem-list { padding:0; list-style:none; }
.monster-memory-dialog .mem-list li { display:flex; flex-direction:column; gap:6px; margin:12px 0; padding:12px; border:1px solid #a58f7366; }
.monster-memory-dialog .monster-memory-bonus { font-weight:bold; }
.unknown .specimen-art .codex-art-button img { filter:grayscale(1); }
.codex-art-large { display:block; width:100%; height:auto; object-fit:contain; }
.ending-scene-cut,.ending-reader-cut { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:contain; background:#1d1720; }
.ending-scene-cut { position:relative; }
.collection-scene-hidden { display:none !important; }
.ending-reader-cut { margin:12px 0 20px; }
.ending-thumb.collection-art { object-fit:contain; }
.ending-art-locked { height:110px; background:#252129; }
@media(max-width:480px){ .ending-art-locked { height:88px; } }

/* Specimen-book reference 03: asymmetric engraving, foliate tabs and larger captions. */
body.sheet-open .meta-sheet.codex-sheet .sheet-panel { height:96dvh; max-height:96dvh; max-width:650px; container-type:inline-size; }
.meta-sheet.codex-sheet .sheet-head { position:relative; padding-inline:15px; }
.meta-sheet.codex-sheet .sheet-head::after { content:'✣  모험가의 표본집  ✣'; position:absolute; top:10px; left:30%; right:12%; text-align:center; color:#705535; font-size:clamp(10px,2.6cqw,17px); letter-spacing:.07em; pointer-events:none; }
.meta-sheet.codex-sheet #sheet-close { font-size:clamp(12px,2.7cqw,18px); }
.meta-sheet.codex-sheet .sheet-head h2 { font-size:clamp(33px,7.9cqw,51px); margin:4px 0 13px; line-height:1.3; }
.meta-sheet.codex-sheet .meta-tabs { position:relative; margin:8px 0 16px; gap:5px; border-color:#ac9067; }
.meta-sheet.codex-sheet .meta-tabs::before,.meta-sheet.codex-sheet .meta-tabs::after { content:'❖'; position:absolute; bottom:-7px; color:#a58a60; font-size:10px; }
.meta-sheet.codex-sheet .meta-tabs::before { left:-3px; }
.meta-sheet.codex-sheet .meta-tabs::after { right:-3px; }
.meta-sheet.codex-sheet .meta-tabs button { font-size:clamp(15px,3.5cqw,23px); padding:12px 4px; }
.meta-sheet.codex-sheet .meta-tabs button[aria-selected=true] { position:relative; border:1px solid #b59a70; border-bottom:4px solid #973c28; background:#fff5db26; }
.meta-sheet.codex-sheet .meta-tabs button[aria-selected=true]::before { content:''; position:absolute; bottom:0; right:100%; width:clamp(21px,6cqw,39px); height:90%; background:url('../assets/ui/codex-specimen/tab-flourish.svg') right bottom/contain no-repeat; pointer-events:none; }
.meta-sheet.codex-sheet .meta-tabs button[aria-selected=true]::after { content:''; position:absolute; bottom:0; left:100%; width:clamp(21px,6cqw,39px); height:90%; background:url('../assets/ui/codex-specimen/tab-flourish.svg') right bottom/contain no-repeat; transform:scaleX(-1); pointer-events:none; }
.meta-sheet.codex-sheet .meta-tabs button[aria-selected=true] { background-image:url('../assets/ui/codex-specimen/crest.svg'); background-size:35px 16px; background-repeat:no-repeat; background-position:center -1px; }
.meta-sheet .specimen-heading { display:flex; align-items:center; gap:9px; border:0; padding:0; margin:14px 0 13px; font-size:clamp(20px,4cqw,27px); }
.specimen-heading span { flex:1; height:20px; font-size:0; background:url('../assets/ui/codex-specimen/divider.svg') center/100% 18px no-repeat; }
.meta-sheet .bestiary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(6px,1.5cqw,10px); }
.bestiary li.specimen-card { position:relative; min-width:0; min-height:0; padding:4px clamp(6px,1.7cqw,11px) clamp(10px,2cqw,14px); gap:3px; justify-content:flex-start; color:#39291b; border:0; background:linear-gradient(110deg,#fff4d921,#b48d4208); box-shadow:none; }
.specimen-card::before { content:''; position:absolute; inset:0; pointer-events:none; background:url('../assets/ui/codex-specimen/frame.svg') center/100% 100% no-repeat; }
.specimen-number { display:flex; align-items:center; justify-content:center; gap:4px; width:100%; height:clamp(13px,2.7cqw,18px); font-size:clamp(10px,2.1cqw,14px); line-height:1; color:#806849; font-variant-numeric:tabular-nums; }
.specimen-number::before,.specimen-number::after { content:''; width:19px; height:7px; background:url('../assets/ui/codex-specimen/divider.svg') left center/90px 7px no-repeat; opacity:.65; }
.specimen-number::after { transform:scaleX(-1); }
.specimen-art { position:relative; width:100%; aspect-ratio:1.1; background:#b5a38522; }
.specimen-art > img,.specimen-art > button,.specimen-art > canvas { position:absolute; inset:0; }
.specimen-art .codex-art-button { display:block; max-width:none; height:100%; min-height:0; aspect-ratio:auto; border-radius:0; }
.specimen-art .codex-art-image { height:100%; width:100%; aspect-ratio:auto; object-fit:cover; }
.specimen-art canvas { display:block; width:100%; height:100%; object-fit:contain; }
.unknown .specimen-art > img,.unknown .specimen-art > canvas { filter:grayscale(1); opacity:.92; }
.specimen-name { font-size:clamp(12px,2.95cqw,20px); line-height:1.35; font-weight:700; margin-top:1px; overflow-wrap:anywhere; }
.specimen-status { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:6px; margin-top:auto; max-width:100%; font-size:clamp(11px,2.7cqw,18px); line-height:1.5; color:#806849; white-space:normal; overflow-wrap:anywhere; }
.specimen-status img { width:clamp(10px,2.2cqw,15px); height:clamp(13px,2.8cqw,19px); }
.specimen-card.discovered .specimen-status { font-size:clamp(9px,2.5cqw,16px); letter-spacing:-.04em; }
