/* Card-book typography trial: original Crimson Pro, SIL OFL 1.1.
   Self-hosted: no Google request or third-party font dependency at runtime. */
@font-face{font-family:'Crimson Pro';src:url('fonts/crimson-pro/CrimsonPro-Variable.ttf') format('truetype');font-style:normal;font-weight:200 900;font-display:swap}
:root{--font-card:'Crimson Pro',Georgia,'Times New Roman',serif;--font-numbers:'Crimson Pro',Georgia,serif}
body{font-family:var(--font-card);font-weight:400;font-size:16px}
/* Override legacy font shorthands without changing their component dimensions.
   Debug labels retain their existing monospace font. */
body :is(.sheet,.panel,header,#hud,#m-drawer) :is(h1,h2,h3,h4,p,button,input,select,textarea,label,small,span,strong,b,dt,dd,summary){font-family:var(--font-card)!important}
/* Owner's mix: keep the former Georgia display face for large text;
   Crimson Pro remains on descriptions, small labels and numeric details. */
body :is(.sheet,.panel,header,#hud,#m-drawer) :is(h1,h2,h3,.gear-section-title,.gear-equip){font-family:Georgia,'Times New Roman',serif!important}
body :is(button,input,select,textarea){font-family:var(--font-card)}
.equipment-modal:has(.gear-main-bust){--noir-serif:var(--font-card)}
body :is(h1,h2,h3,h4){font-weight:650;letter-spacing:.15px}
body :is(p,.item-skill-line,.item-passive-description,.trade-detail-skill){font-weight:400;letter-spacing:0}
body :is(button,.item-skill-heading,.item-skill-name){font-weight:600}
body :is(.inventory-count,.inventory-level,.gear-item-count,.gear-item-level,.trade-item-icon>b,.trade-item-icon>small,.gear-stat-table b,.trade-detail-stats dd){font-family:var(--font-numbers)!important;font-variant-numeric:lining-nums tabular-nums;font-weight:600}
/* Body copy uses mixed case, normal weight and comfortable leading. */
.equipment-modal:has(.gear-main-bust) .gear-inspector :is(p,.gear-compare,.detail-item-stats){font-size:15px;line-height:1.35;font-weight:400}
.equipment-modal:has(.gear-main-bust) .gear-inspector .item-skill-line{line-height:1.35}
.equipment-modal:has(.gear-main-bust) .gear-inspector .item-skill-heading{font-size:15px;font-weight:600}
.equipment-modal:has(.gear-main-bust) .gear-option{font-size:14px;font-weight:400}
.equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:14px;font-weight:400;line-height:1.15}
.equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:15px}
.equipment-modal:has(.gear-main-bust) .gear-section-title{font-weight:650;letter-spacing:.3px}
.bag-details :is(.trade-detail-skill,.trade-detail-stats,p),.community-detail :is(p,.community-skills){font-size:16px;line-height:1.4;font-weight:400}
.bag-details .item-skill-line{line-height:1.4}
.bag-details h3{font-size:27px;font-weight:650}
.bag-details h4{font-size:14px;font-weight:600}
.trade-inventory-filters :is(input,select){font-size:14px}
.community-history{font-size:15px;line-height:1.4}
@media(max-height:900px), (max-width:1100px){
 .equipment-modal:has(.gear-main-bust) .gear-inspector :is(p,.gear-compare,.detail-item-stats){font-size:13px;line-height:1.3}
 .equipment-modal:has(.gear-main-bust) .gear-inspector .item-skill-heading{font-size:13px}
 .equipment-modal:has(.gear-main-bust) .gear-option{font-size:12px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:12px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:13px}
}
@media(max-height:750px){
 .equipment-modal:has(.gear-main-bust) .gear-inspector :is(p,.gear-compare,.detail-item-stats){font-size:12px;line-height:1.25}
 .equipment-modal:has(.gear-main-bust) .gear-inspector .item-skill-line{line-height:1.25}
}
@media(max-width:700px){
 .equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:9px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:10px}
 .equipment-modal:has(.gear-main-bust) .gear-option{font-size:10px}
 .bag-details :is(.trade-detail-skill,.trade-detail-stats,p){font-size:13px}
 .bag-details h3{font-size:21px}
}

/* Enlarge the painted text only so the rows keep their Standard layout. */
body[data-stat-text-size="medium"]{--character-stat-scale:1.16}
body[data-stat-text-size="xlarge"]{--character-stat-scale:1.32}
body[data-stat-text-size] .gear-stat-table>div>:is(span,b){transform:scale(var(--character-stat-scale,1))}
body[data-stat-text-size] .gear-stat-table>div>span{transform-origin:left center}
body[data-stat-text-size] .gear-stat-table>div>b{transform-origin:right center}
@media(max-width:650px),(max-height:530px){
 body[data-stat-text-size="medium"]{--character-stat-scale:1.12}
 body[data-stat-text-size="xlarge"]{--character-stat-scale:1.24}
}
body:is([data-stat-text-size="medium"],[data-stat-text-size="xlarge"]) .gear-stat-table>div{contain:paint}

.settings-content .settings-stat-preview{max-width:340px;margin-top:12px;padding:8px 12px;border:1px solid #a084435e;border-radius:5px;background:#0c1309}
.settings-stat-preview .gear-stat-table{grid-template-columns:1fr}
.settings-stat-preview .gear-stat-table>div{min-height:25px;font-size:14px;color:#eee2ba}
.settings-stat-preview .gear-stat-table b{color:#e8c779}

/* Readability preference overrides the panel-specific description sizes only. */
body[data-stat-text-size="medium"]{--readable-item-text:16px}
body[data-stat-text-size="xlarge"]{--readable-item-text:19px}
@media(max-width:650px),(max-height:530px){
 body[data-stat-text-size="medium"]{--readable-item-text:14px}
 body[data-stat-text-size="xlarge"]{--readable-item-text:17px}
}
body:is([data-stat-text-size="medium"],[data-stat-text-size="xlarge"]) :is(.gear-detail-scroll>p,.market-detail-content>.trade-detail-skill,#trade-item-detail .trade-detail-skill,.codex-detail-scroll>.explorer-skill,.settings-item-text-preview){
 font-size:var(--readable-item-text);line-height:1.35;overflow-wrap:anywhere
}
body:is([data-stat-text-size="medium"],[data-stat-text-size="xlarge"]) :is(.gear-detail-scroll>p,.market-detail-content>.trade-detail-skill,#trade-item-detail .trade-detail-skill,.codex-detail-scroll>.explorer-skill) .item-skill-heading{font-size:inherit}
.settings-item-text-preview{font-size:12px;margin:8px 0 0}
