.backgrounds-container{width:min(calc(100% - 32px),1510px);margin-inline:auto}
.backgrounds-title-row{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 24px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.backgrounds-title-row h1,.background-detail-head h1{margin:0;font:700 clamp(2.25rem,4vw,4rem)/1 Oswald,sans-serif}
.background-rules-link{display:inline-flex;align-items:center;gap:10px;color:var(--gold);font-size:.83rem;font-weight:800}
.background-rules-link span{display:grid;width:28px;height:28px;place-items:center;border:1px solid var(--line);border-radius:8px}
.backgrounds-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}
.backgrounds-main{min-width:0}
.background-toolbar{display:grid;grid-template-columns:minmax(300px,1fr) 145px 155px 125px;gap:8px;margin-bottom:14px}
.background-toolbar>label{position:relative;display:block}
.background-toolbar>label>span:not(.background-search>span){position:absolute;z-index:1;left:11px;top:7px;color:var(--muted);font-size:.58rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;pointer-events:none}
.background-toolbar input,.background-toolbar select{width:100%;height:48px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);outline:0}
.background-toolbar input{padding:0 14px 0 42px;font-size:.91rem}
.background-toolbar select{padding:16px 30px 2px 11px;font-size:.79rem;font-weight:700}
.background-toolbar input:focus,.background-toolbar select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(239,161,58,.1)}
.background-search>span{position:absolute;left:14px;top:10px;color:var(--muted);font-size:1.35rem}
.background-result-line{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px;color:var(--muted);font-size:.73rem}
.background-result-line strong{color:var(--text);font-size:.8rem}
.background-group{margin-top:20px}
.background-group+.background-group{margin-top:30px}
.background-group>h2{margin:0 0 10px;color:var(--muted);font:700 .78rem Oswald,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.background-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.background-card{display:grid;min-height:108px;padding:13px;border:1px solid var(--line);border-radius:9px;background:color-mix(in srgb,var(--panel) 78%,transparent);transition:border-color .16s ease,background .16s ease,transform .16s ease}
.background-card:hover{border-color:color-mix(in srgb,var(--gold) 60%,var(--line));background:var(--panel);transform:translateY(-1px)}
.background-card-head,.background-card-foot{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.background-card-head strong,.background-card-head small{display:block}
.background-card-head strong{font-size:.97rem}
.background-card-head small{margin-top:4px;color:var(--muted);font-size:.7rem}
.background-abilities{display:flex;gap:5px;flex:none}
.ability-mark{display:grid;width:28px;height:28px;place-items:center;border:1px solid var(--line);border-radius:7px;background:var(--soft);color:var(--text);font:800 .56rem Manrope,sans-serif;font-style:normal}
.ability-str{--ability:#e07a5f}.ability-dex{--ability:#81b29a}.ability-con{--ability:#f2cc8f}.ability-int{--ability:#6daedb}.ability-wis{--ability:#9c89b8}.ability-cha{--ability:#e5989b}
.ability-mark{box-shadow:inset 0 -2px 0 var(--ability,transparent)}
.background-card-foot{align-items:flex-end;margin-top:auto}
.background-skills{display:flex;flex-wrap:wrap;gap:6px}
.background-skills>span{padding:5px 8px;border:1px solid var(--line);border-radius:6px;color:#d7d1ca;font-size:.68rem;font-weight:750}
.background-skills .background-bonus{color:var(--gold)}
.background-source{align-self:flex-end;color:var(--muted);font-size:.68rem;font-weight:800}
.background-sidebar{position:sticky;top:88px;border:1px solid var(--line);border-radius:9px;background:var(--panel);padding:16px;box-shadow:var(--shadow)}
.background-sidebar-head{display:none;align-items:center;justify-content:space-between;margin-bottom:16px}
.background-sidebar-head button{width:38px;height:38px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--text);font-size:1.3rem}
.background-legend{padding-bottom:16px;border-bottom:1px solid var(--line)}
.background-legend h3{margin:0 0 12px;font-size:.82rem}
.background-legend>div{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.background-legend>div>span{display:flex;align-items:center;gap:7px;min-width:0}
.background-legend b{overflow:hidden;color:var(--muted);font-size:.61rem;text-overflow:ellipsis;white-space:nowrap}
.background-filter-title{display:flex;align-items:center;justify-content:space-between;margin-top:16px}
.background-filter-title h2{margin:0;font-size:.92rem}
.background-filter-title button{border:0;background:transparent;color:var(--gold);cursor:pointer;font-size:.72rem;font-weight:800}
.background-filter{border-bottom:1px dotted var(--strong)}
.background-filter summary{display:flex;align-items:center;gap:8px;padding:14px 0;list-style:none;color:var(--muted);cursor:pointer;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.background-filter summary::-webkit-details-marker{display:none}
.background-filter summary:before{content:'⌄';color:var(--text);font-size:.8rem}
.background-filter:not([open]) summary:before{transform:rotate(-90deg)}
.background-filter summary small{display:none;margin-left:auto;min-width:20px;padding:2px 5px;border-radius:999px;background:var(--gold);color:#17110a;text-align:center}
.background-filter.has-selection summary{color:var(--text)}
.background-filter.has-selection summary small{display:inline-block}
.background-filter>div{display:grid;gap:3px;max-height:200px;overflow:auto;padding:0 0 12px}
.background-filter label{display:flex;align-items:center;gap:8px;padding:5px 7px;border-radius:6px;color:var(--muted);font-size:.73rem;cursor:pointer}
.background-filter label:hover{background:var(--soft);color:var(--text)}
.background-filter input{width:15px;height:15px;accent-color:var(--gold)}
.background-filter-open,.background-filter-apply{display:none}
.background-empty{display:grid;place-items:center;gap:7px;min-height:260px;border:1px dashed var(--strong);border-radius:10px;color:var(--muted)}
.background-empty strong{color:var(--text)}
.background-compact .background-card{min-height:86px}
.background-compact .background-card-head small{display:none}
.background-compact .background-card-foot{margin-top:9px}
.background-detail-head{display:flex;align-items:end;justify-content:space-between;gap:24px;padding:6px 0 22px;border-bottom:1px solid var(--line)}
.background-detail-head>div{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.78rem}
.background-detail-head b{padding:5px 8px;border:1px solid var(--line);border-radius:7px;color:var(--text);font-size:.7rem}
.background-detail-main{width:min(100%,940px);margin-top:24px}
.background-description{padding:24px;border:1px solid var(--line);border-radius:9px;background:color-mix(in srgb,var(--panel) 82%,transparent);font-size:.94rem}
.background-description p{margin:0 0 13px;line-height:1.72}
.background-description p:last-child{margin-bottom:0}
.background-description strong{color:var(--text)}
.background-description a{color:var(--gold)}
.background-art{position:relative;margin:22px 0 0;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.background-art img{display:block;width:100%;height:auto;aspect-ratio:2.65/1;object-fit:cover}
.background-art figcaption{position:absolute;left:16px;bottom:14px;padding:5px 9px;border-radius:6px;background:rgba(8,8,12,.72);color:#fff;font-size:.7rem;backdrop-filter:blur(8px)}
@media(max-width:1050px){.backgrounds-layout{grid-template-columns:minmax(0,1fr) 270px}.background-toolbar{grid-template-columns:minmax(260px,1fr) repeat(3,120px)}.background-grid{grid-template-columns:1fr}.background-legend b{display:none}}
@media(max-width:760px){body.background-filters-open{overflow:hidden}.backgrounds-container{width:min(calc(100% - 24px),1510px)}.backgrounds-title-row{align-items:flex-start;flex-direction:column;gap:12px}.background-rules-link{font-size:.76rem}.backgrounds-layout{display:block}.background-toolbar{grid-template-columns:minmax(0,1fr) 48px}.background-toolbar>label:not(.background-search){display:none}.background-filter-open{display:grid;place-items:center;height:48px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:transparent;font-size:0}.background-filter-open:before{content:'☷';color:var(--text);font-size:1.2rem}.background-result-line span{display:none}.background-sidebar{position:fixed;inset:0;z-index:600;display:block;overflow:auto;border:0;border-radius:0;padding:18px 18px 28px;background:var(--bg);transform:translateY(100%);transition:transform .22s ease}.background-sidebar.is-open{transform:none}.background-sidebar-head{display:flex;position:sticky;top:-18px;z-index:2;margin:-18px -18px 12px;padding:18px;background:var(--bg);border-bottom:1px solid var(--line)}.background-filter>div{max-height:none}.background-filter-apply{position:sticky;bottom:0;display:block;width:100%;min-height:46px;margin-top:18px;border:0;border-radius:9px;background:var(--gold);color:#17110a;font-weight:850}.background-grid{grid-template-columns:1fr}.background-card{min-height:104px;padding:12px}.background-card-head{gap:8px}.ability-mark{width:25px;height:25px;font-size:.51rem}.background-skills>span{padding:4px 7px}.background-detail-head{align-items:flex-start;flex-direction:column;gap:12px}.background-detail-head>div{width:100%;justify-content:space-between}.background-detail-main{margin-top:18px}.background-description{padding:18px;font-size:.95rem}.background-art{margin-top:14px}.background-art img{min-height:190px;aspect-ratio:auto}.background-art figcaption{display:none}}
