/* Scoped to the new menu only. Existing campaign layout remains locked. */
#homeView .codex-entry{margin-top:5px}
#codexView{width:min(1120px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:linear-gradient(145deg,#26232e,#151b25 65%);border:1px solid #ad8d62;box-shadow:inset 0 0 0 3px #171a22,0 12px 40px #0008;color:#e9e0cd;scrollbar-color:#806b50 #151b25}
#codexView .codex-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid #695948;padding-bottom:14px}
#codexView h2{font:700 32px Georgia,serif;color:#f6dcb0;margin:8px 0}#codexView p{font:13px/1.5 system-ui;color:#bac4ce;margin:6px 0}#codexView .codex-header p{max-width:65ch}
#codexTabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}#codexTabs button{font:600 13px system-ui!important;padding:8px 12px;min-height:36px}#codexTabs button[aria-pressed=true]{background:#31585b;border-color:#87c9c6!important;color:#e4fff4}
#codexView .codex-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}#codexView .codex-tools label{display:flex;align-items:center;gap:8px;font:12px system-ui;margin:0}#codexView input,#codexView select{font:13px system-ui;background:#121a24;border:1px solid #6d6455;color:#f3e5cc;padding:9px;max-width:100%}#codexSearch{width:260px}#codexView #codexCount{font:12px system-ui;color:#9fcac7;margin:12px 0}
#codexContent{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#codexContent .codex-entry{min-width:0;padding:14px;background:#121923;border:1px solid #524b46;border-left:2px solid #a88b5b;border-radius:3px;display:flex;flex-direction:column;gap:5px}
#codexView .codex-entry-top{display:flex;align-items:center;gap:12px}#codexView .codex-picture{position:relative;flex:none;width:80px;height:80px;border:1px solid #65533f;background:radial-gradient(#303848,#131924);display:grid;place-items:center;color:#d6b579;font:32px Georgia,serif}#codexView .codex-picture img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}#codexView .codex-rune svg{width:75%;height:75%}#codexView .codex-entry-top small{font:10px system-ui;text-transform:uppercase;letter-spacing:.06em;color:#99c4c5}#codexView h3{font:700 19px Georgia,serif;color:#f1d7ac;margin:4px 0}#codexView .codex-note{border-top:1px solid #3e454b;padding-top:8px;margin-top:auto;color:#c6b89f;font-size:12px}
#codexView .codex-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:5px 0}#codexView .codex-facts div{padding:7px;background:#1c2530;border:1px solid #3a4854;min-width:0}#codexView dt{font:10px system-ui;color:#aabac3}#codexView dd{font:600 13px system-ui;margin:3px 0 0;color:#e9d3ad;overflow-wrap:anywhere}#codexView .codex-table-wrap{overflow-x:auto}#codexView table.codex-table{font:12px system-ui;margin:6px 0;min-width:340px}#codexView .codex-table th,#codexView .codex-table td{padding:7px 4px;text-align:left;border-bottom:1px solid #39434d;color:#dfdfd3;white-space:nowrap}#codexView .codex-table thead th{font-size:10px;color:#a9c9cb}#codexView .codex-table tbody th{color:#e6be7a}
@media(min-width:1600px) and (min-height:850px){#codexView{max-height:calc((100dvh - 32px) / var(--ui-scale));width:min(1120px,calc((100vw - 40px) / var(--ui-scale)))}}
@media(max-width:760px){#codexView{padding:12px}#codexContent{grid-template-columns:1fr}#codexView .codex-header{flex-wrap:wrap}#codexView .codex-tools label{flex-wrap:wrap}#codexView .codex-facts{grid-template-columns:repeat(2,minmax(0,1fr))}#codexView .codex-picture{width:64px;height:64px}}
