/* Shared page chrome; card artwork, rarity colours and reveal animations remain independent. */
.cards-theme{--accent:#b7a2ff;--muted:#afb2ca;--border:#353950;color:#f4f1ff;padding:28px 0 48px}
.cards-theme .collection-heading{margin:0 0 30px;padding:0 0 24px;border-bottom:1px solid #353950}
.cards-theme h1{font-family:'Segoe UI',sans-serif;font-size:clamp(30px,3.5vw,46px);letter-spacing:-1.2px;line-height:1.15}
.cards-theme .collection-heading p{color:#afb2ca;line-height:1.65}
.cards-theme :is(.collection-tabs,.craft-tabs){display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;width:fit-content;max-width:100%;padding:0;margin:0 0 24px;border:0;border-radius:0;background:transparent;box-shadow:none}
.cards-theme :is(.collection-tabs,.craft-tabs) a{background:#1b1e32;border:1px solid #353950;border-radius:5px;color:#afb2ca;min-height:44px;padding:11px 17px;text-decoration:none}
.cards-theme :is(.collection-tabs,.craft-tabs) a[aria-current=page]{background:#b7a2ff20;border-color:#8b79bb;color:#e6dcff;box-shadow:inset 0 -2px #b7a2ff}
.cards-theme .collection-stats{gap:14px;margin-bottom:24px}
.cards-theme .collection-stats>div{background:#1b1e32;border:1px solid #353950;border-radius:6px;padding:20px 24px}
.cards-theme .collection-stats dt{color:#afb2ca}.cards-theme .collection-stats dd{color:#f4ce86}
.cards-theme :is(.collection-filters,.craft-filters){background:#1b1e32;border:1px solid #353950;border-radius:6px;padding:20px;gap:14px}
.cards-theme :is(input:not([type=checkbox]):not([type=range]),select,textarea){background:#111321;border-color:#46405c;color:#f4f1ff;border-radius:5px}
.cards-theme input:is([type=checkbox],[type=range]){accent-color:#b7a2ff}
.cards-theme label{color:#c5c5d9}
.cards-theme .button{border-radius:5px;background:#b7a2ff;border:1px solid #b7a2ff;color:#181328;font-weight:700;box-shadow:none}
.cards-theme .button:hover:not(:disabled){background:#cabaff;border-color:#cabaff}
.cards-theme .button-quiet{background:#202438;border-color:#46405c;color:#d8caff}
.cards-theme .button:disabled{opacity:.5;cursor:not-allowed}
.cards-theme :is(.pack-shelf,.material-tile,.craft-action,.merge-panel,.album-box,.album-reward,.empty-state){background:#1b1e32;border:1px solid #353950;border-radius:8px;box-shadow:none}
.cards-theme .pack-shelf{padding:28px;gap:32px;border-left:3px solid #8b79bb}
.cards-theme .pack-copy h2{color:#f4f1ff}.cards-theme .pack-copy>p{color:#afb2ca}.cards-theme .pack-balance{color:#f4ce86}
.cards-theme .pack-open-options{gap:8px}
.cards-theme :is(.pack-result,.craft-result){background:#141624;border-color:#353950;border-radius:8px}
.cards-theme :is(.material-tile,.craft-action){padding:22px}
.cards-theme .album-cover{border-color:#46405c;border-radius:6px;background:#1b1e32;color:#f4f1ff}
.cards-theme .album-cover:hover{border-color:#b7a2ff;background:#25253d}
.cards-theme .album-cover.active{border-color:#b7a2ff;box-shadow:inset 0 -3px #b7a2ff}
.cards-theme .album-box{padding:24px}.cards-theme .album-heading{border-color:#353950}
.cards-theme .album-reward{padding:20px;background:#141624}.cards-theme .album-status{color:#afb2ca}
.cards-theme .album-card:not(.owned){background:#141624;border-color:#353950}
.cards-theme :is(.pagination,.album-pagination) :is(a,button){border-radius:5px;border-color:#46405c;background:#202438;color:#d8caff}
.cards-theme :is(.pagination,.album-pagination) [aria-current=page]{background:#b7a2ff;color:#181328}
.cards-theme :is(dialog,.card-inspect-dialog,.modal-content){background:#1b1e32;color:#f4f1ff;border-color:#46405c;border-radius:8px}
.cards-theme :is(a,button,input,select,textarea):focus-visible{outline:2px solid #f4ce86;outline-offset:3px}
@media(max-width:640px){.cards-theme{padding-top:18px}.cards-theme :is(.collection-tabs,.craft-tabs){gap:6px;width:100%}.cards-theme .craft-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cards-theme .craft-tabs a{min-width:0}.cards-theme :is(.collection-tabs,.craft-tabs) a{padding:10px 12px;font-size:13px}.cards-theme :is(.collection-filters,.craft-filters,.album-box,.album-reward){padding:14px}.cards-theme .pack-shelf{padding:20px 16px;gap:20px}.cards-theme .collection-stats>div{padding:16px}.cards-theme .collection-heading{margin-bottom:22px}}
.cards-theme :is(.craft-recipe-card,.craft-card,.craft-destroy,.craft-help){background:#1b1e32;border-color:#353950;border-radius:6px}.cards-theme .page-navigation{background:#141624;border-color:#353950;border-radius:6px}.cards-theme .page-position{color:#afb2ca}

/* Card Masters: retain health/reward/status colours, unify page surfaces. */
.masters-theme .boss-hero{background:#1b1e32;border:1px solid #353950;border-radius:8px;grid-template-columns:minmax(220px,.8fr) minmax(0,1.3fr)}
.masters-theme .boss-copy{padding:48px 28px 28px;min-width:0}
.masters-theme .boss-copy h2{font-family:'Segoe UI',sans-serif;font-weight:800;letter-spacing:-1px}
.masters-theme .boss-copy p,.masters-theme .boss-copy small{color:#afb2ca}
.masters-theme .boss-eyebrow{color:#b7a2ff}
.masters-theme :is(.boss-facts>div,.aftermath-score){background:#141624;border-color:#353950;border-radius:6px}
.masters-theme .boss-facts strong{color:#f4ce86}
.masters-theme :is(.boss-participants,.boss-live-editor,.boss-aftermath){padding:24px;background:#1b1e32;border:1px solid #353950;border-radius:8px;box-shadow:none}
.masters-theme .boss-aftermath{margin:24px 0;background:#141624}
.masters-theme .aftermath-reward{background:#202438;border-color:#756343;border-radius:6px;padding:18px}
.masters-theme .boss-settings{background:#202438;border-color:#46405c;border-radius:5px;color:#d8caff}
.masters-theme .boss-settings:hover{background:#2b2d45;border-color:#b7a2ff}
.masters-theme .boss-table :is(th,td){border-color:#353950;padding:14px 12px}
.masters-theme .boss-table th{color:#afb2ca;background:#141624}
.masters-theme .boss-table a{color:#d8caff}
.masters-theme .boss-start{gap:16px;margin:24px 0 16px}
.masters-theme .boss-start .button:disabled{background:#353950;border-color:#46405c;color:#afb2ca;opacity:.65}
.masters-theme .deck-required{padding:18px;background:#202438;border-color:#746b91;border-left-color:#b7a2ff;border-radius:6px}
.masters-theme .deck-required a{color:#c7bbec}
.masters-theme .boss-live-actions{margin-top:20px;gap:10px}
.masters-theme .boss-participants header{margin-bottom:18px;flex-wrap:wrap}
@media(max-width:760px){.masters-theme .boss-hero{grid-template-columns:minmax(0,1fr)}.masters-theme .boss-copy{padding:24px 18px}.masters-theme :is(.boss-participants,.boss-live-editor,.boss-aftermath){padding:18px}.masters-theme .boss-facts{gap:8px}.masters-theme .boss-table{max-width:100%;overflow-x:auto}}

/* Marketplace chrome, shared with the collection; preserve card rarity and transaction states. */
.market-theme .auction-page{padding-top:0}
.market-theme :is(.coin-shop-header,.auction-header){gap:24px;margin-bottom:28px}
.market-theme :is(.coin-wallet,.auction-wallet){background:#1b1e32;border:1px solid #46405c;border-radius:6px;padding:16px 20px}
.market-theme :is(.coin-shop-product,.style-product,.auction-card,.auction-empty){background:#1b1e32;border:1px solid #353950;border-radius:8px;box-shadow:none}
.market-theme :is(.coin-shop-product,.style-product){padding:24px}
.market-theme .auction-influence{background:#141624;border-color:#353950;border-radius:6px}
.market-theme .coin-shop-art{background:transparent}
.market-theme :is(.coin-price,.auction-confirm-price){color:#f4ce86}
.market-theme :is(.auction-tabs,.auction-sales-tabs){display:flex;flex-wrap:wrap;gap:8px;background:transparent;border:0;border-radius:0;padding:0;margin:0 0 24px;box-shadow:none}
.market-theme :is(.auction-tabs,.auction-sales-tabs) :is(a,button){background:#1b1e32;border:1px solid #353950;border-radius:5px;color:#afb2ca;min-height:44px;padding:11px 17px}
.market-theme :is(.auction-tabs,.auction-sales-tabs) :is(.active,[aria-current=page],[aria-selected=true]){background:#b7a2ff20;border-color:#8b79bb;color:#e6dcff;box-shadow:inset 0 -2px #b7a2ff}
.market-theme .auction-filters{background:#1b1e32;border:1px solid #353950;border-radius:6px;padding:20px;margin-bottom:24px;gap:14px}
.market-theme .auction-multiselect{background:#141624;border-color:#46405c;border-radius:5px}
.market-theme .auction-multiselect :is(ul,div){border-color:#46405c}
.market-theme :is(.auction-prices,.auction-actions,.auction-card-top){border-color:#353950}
.market-theme .auction-prices{background:#141624;border-radius:5px;padding:14px}
.market-theme :is(.auction-note,.auction-seller,.auction-count){color:#afb2ca}
.market-theme .auction-dialog{background:#1b1e32;color:#f4f1ff;border:1px solid #46405c;border-top:2px solid #b7a2ff;border-radius:8px;padding:24px;max-width:calc(100vw - 32px)}
.market-theme .auction-dialog::backdrop{background:#080b16c9}
.market-theme .auction-dialog label{display:block;margin-bottom:8px}
.market-theme :is(.auction-dialog,.auction-pagination) .button{border-radius:5px}
.market-theme .auction-view-switch{background:#141624;border-color:#46405c;border-radius:5px}
.market-theme .auction-view-switch button{color:#afb2ca}
.market-theme .auction-view-switch button[aria-pressed=true]{background:#b7a2ff20;color:#e6dcff}
@media(max-width:640px){.market-theme :is(.coin-shop-product,.style-product,.auction-dialog){padding:18px}.market-theme .auction-filters{padding:14px}.market-theme :is(.auction-tabs,.auction-sales-tabs){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.market-theme :is(.auction-tabs,.auction-sales-tabs) :is(a,button){min-width:0;padding:10px 12px;font-size:13px}}
.market-theme :is(.auction-tabs,.auction-sales-tabs) [aria-pressed=true]{background:#b7a2ff20;border-color:#8b79bb;color:#e6dcff;box-shadow:inset 0 -2px #b7a2ff}.market-theme .style-default{background:#1b1e32;border-color:#353950;border-radius:6px;padding:24px}.market-theme option{background:#141624;color:#f4f1ff}
/* Outrank Blazor's isolated state selectors, not only the base button rules. */
.cards-theme.market-theme .auction-page :is(.auction-tabs,.auction-sales-tabs,.auction-view-switch) button:is(.active,.selected,[aria-pressed=true]){background:#2b2d45;border-color:#8b79bb;color:#e6dcff;box-shadow:none}
.cards-theme.market-theme .auction-page :is(.auction-tabs,.auction-sales-tabs,.auction-view-switch) button:hover:not(:disabled){background:#25283e;border-color:#8b79bb;color:#f4f1ff}
.cards-theme.market-theme .auction-page input[type=checkbox]{accent-color:#b7a2ff}
.cards-theme.market-theme .auction-page input[type=checkbox]:checked{background-color:#b7a2ff;border-color:#b7a2ff;color:#181328}
.cards-theme.market-theme .auction-page .auction-actions .auction-bid-button{background:#b7a2ff;border-color:#b7a2ff;color:#181328;box-shadow:none}
.cards-theme.market-theme .auction-page .auction-actions .auction-bid-button:hover:not(:disabled){background:#cabaff;border-color:#cabaff;box-shadow:none}

/* Profile and showcase */
.profile-theme{--accent:#b7a2ff;--muted:#afb2ca;--surface:#1b1e32;--border:#353950;padding-top:24px}.profile-theme .showcase-empty{background:#1b1e32;border-color:#46405c;border-radius:8px}.profile-theme .showcase-slot-link:hover .showcase-empty{background:#25283e;border-color:#b7a2ff}.profile-theme .showcase-empty>span{color:#c7bbec}.profile-theme .profile-stats>div,.profile-theme .profile-card-request{background:#1b1e32;border-color:#353950;border-radius:8px}.profile-theme .showcase-remove button{background:#202438;border-color:#46405c}.profile-theme .showcase-remove button:hover{background:#702b49;border-color:#f49bbb}

/* Progression: achievements, quests, challenges, login rewards and rankings. */
.progression-theme{--surface:#1b1e32;--border:#353950;--accent:#b7a2ff;--purple:#b7a2ff;--muted:#afb2ca;--text:#f4f1ff;padding-top:24px}.progression-theme h1{font-family:'Segoe UI',sans-serif;font-weight:850;letter-spacing:-.035em}.progression-theme .achievement-list{border-radius:8px}.progression-theme .achievement-row.is-ready{background:#25283e}.progression-theme :is(.ranking-tabs,.challenge-tabs){display:flex;flex-wrap:wrap;gap:8px;padding:0;border:0;background:transparent;border-radius:0}.progression-theme :is(.ranking-tabs,.challenge-tabs) a{background:#202438;border:1px solid #353950;color:#afb2ca;border-radius:6px;min-height:44px;box-sizing:border-box}.progression-theme :is(.ranking-tabs,.challenge-tabs) a:is([aria-current=page],.active){background:#2b2d45;border-color:#b7a2ff;color:#f4f1ff;box-shadow:inset 0 -2px #b7a2ff}.progression-theme :is(.ranking-tabs,.challenge-tabs) a:hover{background:#2b2d45;color:#f4f1ff}.progression-theme :is(.collectors-table,.ranking-board){background:#1b1e32;border-color:#353950;border-radius:8px}.progression-theme .collectors-table :is(th,td){border-color:#353950}.progression-theme .collectors-table tbody tr:hover{background:#25283e}.progression-theme :is(.ranking-prizes>div,.ranking-prize){background:#202438;border-color:#46405c;border-radius:6px}.progression-theme :is(button,a,input,select):focus-visible{outline:2px solid #f4ce86;outline-offset:3px}@media(max-width:600px){.progression-theme :is(.ranking-tabs,.challenge-tabs){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.progression-theme :is(.ranking-tabs,.challenge-tabs) a{text-align:center}}

/* Keep profile navigation clear of the hero above it. */
.cards-theme.profile-theme .profile-tabs{margin-top:24px}


/* Common site chrome for pages without a dedicated theme wrapper. */
body:has(>.site-header){background:#111321;--bg:#111321;--surface:#1b1e32;--border:#353950;--muted:#afb2ca;--text:#f4f1ff;--accent:#b7a2ff;--purple:#b7a2ff}
.site-main .button{border-radius:6px}
.site-main .button:not(.button-quiet):not(.profile-delete-button){background:#b7a2ff;color:#141624;border-color:#b7a2ff}
.site-main .button:not(.button-quiet):not(.profile-delete-button):hover:not(:disabled){background:#c7bbec;border-color:#c7bbec}
.site-main .button.button-quiet{background:#202438;border-color:#46405c;color:#f4f1ff}
.site-main .button.button-quiet:hover{background:#2b2d45}
.site-main .empty-state{background:#1b1e32;border-color:#46405c;border-radius:8px}
.site-main .notice{background:#202438;border-color:#46405c;color:#f4f1ff;border-radius:6px}
.site-main>.collection-heading h1,.remaining-theme h1{font-family:'Segoe UI',sans-serif;font-weight:850}
.remaining-theme :is(.craft-tabs,.game-tabs){gap:8px;flex-wrap:wrap}
.remaining-theme :is(.deck-editor,.showcase-picker){border-color:#353950;background:#1b1e32;border-radius:8px}
.remaining-theme input:not([type=checkbox]):not([type=radio]):not([type=range]),.remaining-theme select{background-color:#141624;border-color:#46405c;color:#f4f1ff}
.remaining-theme :is(.deck-empty,.deck-empty:hover){background:#202438;border-color:#46405c}
@media(max-width:600px){.remaining-theme .collection-heading{margin-bottom:24px}.remaining-theme .empty-state{padding:24px 18px}}

/* Shared by tower, player levels and daily XP rankings. */
.cards-theme :is(.xp-prizes,.xp-help,.xp-table-wrap){background:#1b1e32;border-color:#353950;border-radius:8px}
.cards-theme .xp-prizes article{background:#202438;border-color:#46405c;border-radius:6px}
.cards-theme .xp-table{background:#1b1e32}
.cards-theme .xp-table :is(td,th){border-color:#353950}
.cards-theme .xp-table thead{background:#202438;color:#afb2ca}
.cards-theme .xp-table caption{color:#afb2ca}
