.item-codex{min-width:0}.codex-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(3,minmax(130px,1fr));gap:14px;align-items:end;padding:20px;background:var(--h-panel);border:1px solid var(--h-line);border-radius:var(--h-radius)}
.codex-filters .field{margin:0}.codex-search>span{display:block;font-size:12px;color:var(--h-muted);margin-bottom:7px}.codex-search .search-box{margin:0}.codex-scope{margin:14px 0 20px}.codex-results-head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:42px;margin-bottom:14px;color:var(--h-muted);font-size:12px}.codex-results-head strong{color:var(--h-text)}
.codex-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}.codex-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid var(--h-line);border-radius:var(--h-radius);background:linear-gradient(145deg,var(--h-panel-2),var(--h-panel));position:relative}.codex-card:hover{border-color:#d7bd8055}.codex-card-main{display:flex;flex:1;flex-direction:column;border:0;background:none;padding:0;text-align:left;min-width:0}.codex-card-art{height:130px;width:100%;display:grid;place-items:center;background:radial-gradient(ellipse at center,#d9c59a13,transparent 70%);padding:17px;border-bottom:1px solid var(--h-line)}.codex-art{display:block;width:100%;height:100%;max-width:180px;object-fit:contain}.codex-card-art>.icon{width:48px;height:48px;color:var(--h-faint)}.codex-card-copy{padding:16px;width:100%}.codex-card h2{font-family:var(--h-heading);font-size:21px;line-height:1.2;overflow-wrap:anywhere}.codex-type{font-size:10px;letter-spacing:.5px;color:var(--h-muted);margin-bottom:6px}.codex-availability{font-size:10px;color:var(--h-green);margin-top:9px!important}.codex-unverified{color:var(--h-gold)}.codex-card-stats{font-size:11px;margin:14px 0 0;display:grid;gap:5px}.codex-card-stats>div{display:flex;gap:8px;justify-content:space-between;align-items:baseline}.codex-card-stats dt{color:var(--h-muted);font-weight:400;line-height:1.3}.codex-card-stats dd{margin:0;white-space:nowrap;color:var(--h-text);font-variant-numeric:tabular-nums}.codex-compare-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px;margin:0 12px 12px;border:1px solid var(--h-line);border-radius:5px;background:transparent;font-size:11px;color:var(--h-muted)}.codex-compare-toggle .icon{width:15px;height:15px}.codex-compare-toggle.selected{color:var(--h-gold);border-color:#dfbe8355;background:#dfbe8310}.codex-card-spacer{height:12px}.codex-card[data-rarity=uncommon]{border-top-color:#8cb68180}.codex-card[data-rarity=rare]{border-top-color:#83aadaaa}.codex-card[data-rarity=epic]{border-top-color:#b69bd6aa}.codex-card[data-rarity=legendary]{border-top-color:#dfbe83aa}.codex-more{text-align:center;margin:25px 0}
.codex-compare-bar{position:sticky;bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:22px;padding:16px 18px;background:#243027f5;border:1px solid #dfbe8355;border-radius:8px;box-shadow:0 6px 30px #0006;z-index:4;backdrop-filter:blur(12px)}.codex-compare-bar[hidden]{display:none}.codex-compare-bar strong{font-size:12px}.codex-selected{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.codex-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--h-line);background:#c5ccb908;border-radius:5px;padding:7px 9px;font-size:11px;text-align:left;max-width:100%;overflow-wrap:anywhere}.codex-chip img,.codex-chip .icon{width:22px;height:22px;object-fit:contain;flex:none}.codex-chip>.icon:last-child{width:12px;height:12px}.codex-chip:hover{background:#c5ccb918}.codex-detail{min-width:0}.codex-detail-intro{display:flex;align-items:center;gap:24px;margin-bottom:24px}.codex-detail-intro>div{min-width:0;flex:1}.codex-detail-intro p{margin-top:12px}.codex-detail-art{width:132px;height:132px;object-fit:contain;flex:none;background:radial-gradient(ellipse,#d9c59a11,transparent 75%);padding:6px}.codex-detail-intro>.icon{width:70px;height:70px;margin:25px;color:var(--h-muted)}.codex-section{margin-top:24px;padding-top:20px;border-top:1px solid var(--h-line)}.codex-section h3{font-size:17px;margin-bottom:12px}.codex-section p{margin-bottom:12px}.codex-section li+li{margin-top:7px}.codex-subsection{margin-top:20px}.codex-subsection h4{color:var(--h-gold);margin-bottom:10px;font-size:12px}.codex-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:0;border:1px solid var(--h-line);border-radius:6px;overflow:hidden;background:var(--h-line)}.codex-stat-grid>div{padding:13px 15px;background:var(--h-panel)}.codex-stat-grid dt{color:var(--h-muted);font-size:11px;line-height:1.3;margin-bottom:7px}.codex-stat-grid dd{margin:0;font-size:19px;line-height:1.15;font-variant-numeric:tabular-nums;color:var(--h-gold)}
.codex-table-scroll{overflow-x:auto;max-width:100%;margin:16px 0;border:1px solid var(--h-line);border-radius:6px}.codex-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;min-width:360px}.codex-table th,.codex-table td{padding:11px 14px;border-bottom:1px solid var(--h-line);vertical-align:top}.codex-table th{font-weight:500}.codex-table thead{background:var(--h-panel-2);color:var(--h-muted)}.codex-table tr:last-child>th,.codex-table tr:last-child>td{border-bottom:0}.codex-table td{font-variant-numeric:tabular-nums}.codex-comparison{min-width:510px}.codex-comparison th:not(:first-child){min-width:140px;max-width:200px}.codex-comparison th>.codex-small-art{display:block;margin:0 0 8px}.codex-small-art{width:42px;height:42px;object-fit:contain;flex:none}.codex-recipe{padding:14px 0;border-bottom:1px solid var(--h-line)}.codex-recipe:last-child{border-bottom:0}.codex-recipe>div:first-child{display:flex;align-items:center;gap:12px}.codex-recipe>div:first-child>div{flex:1;min-width:0}.codex-recipe strong{font-size:13px}.codex-recipe .help{margin:4px 0 0}.codex-ingredients{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}.codex-link-list>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--h-line)}.codex-link-list>div:last-child{border-bottom:0}.codex-link-list>div>span{font-size:13px;min-width:0}.codex-inline{background:none;border:0;padding:0;color:var(--h-gold);text-decoration:underline;text-underline-offset:3px}.codex-reference{font-size:11px;margin-top:16px}.codex-reference dt{color:var(--h-muted);margin-top:10px}.codex-reference dd{margin:4px 0 0;overflow-wrap:anywhere}
dialog:has(.codex-detail) .dialog-footer{flex-wrap:wrap}.codex-footer-message{flex-basis:100%;margin:0}
@media(max-width:1050px){.codex-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.codex-search{grid-column:1/-1}.codex-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.codex-filters{padding:14px;gap:12px;grid-template-columns:1fr 1fr}.codex-filters>label:last-child{grid-column:1/-1}.codex-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.codex-card-art{height:100px;padding:12px}.codex-card-copy{padding:12px}.codex-card h2{font-size:18px}.codex-card-stats>div{display:block}.codex-card-stats dd{margin-top:2px}.codex-type{font-size:9px}.codex-compare-bar{align-items:stretch;flex-direction:column;gap:12px;bottom:7px;padding:13px}.codex-compare-bar .button-row{justify-content:flex-end}.codex-detail-intro{gap:14px;align-items:flex-start}.codex-detail-art{width:86px;height:100px}.codex-stat-grid>div{padding:11px}.codex-stat-grid dd{font-size:17px}.codex-recipe>div:first-child{flex-wrap:wrap}.codex-link-list>div{align-items:flex-start}.codex-link-list .button{flex:none}.codex-results-head{align-items:flex-start}.codex-detail-intro>.icon{width:40px;height:40px;margin:15px}.codex-recipe .codex-small-art{width:34px;height:34px}}@media(prefers-reduced-motion:reduce){.item-codex *{scroll-behavior:auto}}

.codex-swipe-hint{display:none}@media(max-width:600px){.codex-swipe-hint{display:block}}
.codex-source-comparison{margin-top:25px;padding-top:22px;border-top:1px solid var(--h-line)}.codex-source-comparison>h4{font-family:var(--h-heading);font-size:24px;font-weight:400;margin-bottom:12px}.codex-source-comparison>p{font-size:12px;color:var(--h-muted);line-height:1.7}.codex-source-basis{margin-top:25px}.codex-source-basis>h4{font-size:14px;color:var(--h-gold);margin-bottom:9px}.codex-source-basis>.help{font-size:11px;max-width:760px}.codex-sources-table{min-width:600px;table-layout:fixed}.codex-sources-table th:first-child{width:30%}.codex-sources-table th:nth-child(2){width:23%}.codex-sources-table th:nth-child(3){width:47%}.codex-sources-table th,.codex-sources-table td{overflow-wrap:anywhere;font-size:11px;line-height:1.55}.codex-sources-table tbody th{font-weight:400}.codex-sources-table strong{font-weight:500}.codex-sources-table small{display:block;color:var(--h-muted);font-size:10px;margin-top:5px}.codex-sources-table .button{padding:6px 0;justify-content:flex-start;text-align:left;margin-top:8px;font-size:10px;color:var(--h-gold)}.codex-sources-table .button .icon{width:13px;height:13px}.codex-source-chance{font-variant-numeric:tabular-nums;font-size:15px!important;color:var(--h-text)}.codex-source-chance .codex-source-best{color:var(--h-gold);font-size:9px;line-height:1.4}.codex-source-access{font-size:10px!important;margin:9px 0 0!important}.codex-source-conditions{font-size:10px;color:var(--h-muted);margin-top:8px}.codex-source-conditions summary{cursor:pointer;color:var(--h-gold)}.codex-source-conditions ul{padding-left:15px;margin:9px 0}.codex-source-conditions p{margin-top:9px}.codex-source-conditions li+li{margin-top:7px}.codex-development-sources{margin-top:16px}.codex-development-sources>.help{margin-bottom:5px}.codex-unmapped-sources{color:var(--h-muted)}.codex-unmapped-sources>.help{margin-top:12px}

.codex-collection{border:1px solid #d5b57933;border-radius:7px;background:#d5b57908;padding:18px 20px;margin:20px 0}.codex-collection h3{font-size:15px;margin-bottom:9px}.codex-collection .button-row{margin-top:13px}.codex-collection .help{font-size:12px}.codex-acquisition-caution{color:var(--h-gold)!important;margin-top:12px!important;line-height:1.7}.codex-suppliers{margin:8px 0 15px;border:1px solid var(--h-line);border-radius:6px;padding:0 17px}.codex-supplier{padding:14px 0;border-bottom:1px solid var(--h-line)}.codex-supplier:last-child{border-bottom:0}.codex-supplier>strong{font-size:13px;font-weight:500}.codex-supplier>.help{font-size:11px;margin:6px 0}.codex-supplier ul{margin:8px 0 0;padding-left:18px;font-size:11px;color:var(--h-muted)}.codex-supplier li+li{margin-top:6px}.codex-supplier .button{padding:4px 7px;font-size:10px;margin-left:4px}.codex-supplier .button .icon{width:13px;height:13px}

.codex-source-map-filter{margin:16px 0}.codex-source-map-filter .button-row{flex-wrap:wrap}
@media(max-width:600px){
 .codex-sources-scroll{overflow:visible}
 .codex-sources-table{display:block;min-width:0;width:100%}
 .codex-sources-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .codex-sources-table tbody{display:block}
 .codex-sources-table tr{display:block;margin:14px 0;border:1px solid var(--h-line);border-radius:8px;padding:12px}
 .codex-sources-scroll .codex-sources-table tbody th,.codex-sources-scroll .codex-sources-table tbody td{display:block;width:100%;padding:8px 0;border:0}
 .codex-sources-table td[data-label]::before{content:attr(data-label);display:block;font-size:10px;color:var(--h-muted);margin-bottom:4px}
 .codex-sources-table .button{min-height:44px}
 .codex-source-map-filter .button{min-height:44px}
}

.codex-source-map-filter .button-row + .button-row{margin-top:8px}
