/* Shared shell: catalog, decks, shop and native starter decks. Game stays isolated. */
.inventory-characters{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:18px;margin:28px 0}.inventory-character{min-height:310px;padding:22px;box-sizing:border-box;border:1px solid #655634;border-radius:14px;background:#10151e;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.inventory-character--selected{border-color:#d5b256;background:radial-gradient(ellipse at center,#41335266,#10151e 75%)}.inventory-character img{width:100%;height:200px;object-fit:contain}.inventory-character h2{font-size:20px;margin:0}.inventory-character p{font-size:12px;color:#a6b4c8;margin:0;line-height:1.6}.inventory-character--empty{border-style:dashed;background:#0e121999;color:#8f9cae}.inventory-character--empty>span{font-size:42px;color:#8d7748}.inventory-character--empty small{color:#c6ae73}.inventory-art{display:block;width:100%;border:0;padding:0;cursor:zoom-in}.inventory-art:focus-visible{outline:2px solid #ffda70;outline-offset:-3px}.inventory-preview{width:min(1100px,92vw);max-height:90dvh;padding:20px;border:1px solid #c2a14a;border-radius:14px;background:#0c111a;color:#fff;box-sizing:border-box;overflow:auto}.inventory-preview::backdrop{background:#000c;backdrop-filter:blur(5px)}.inventory-preview header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.inventory-preview h2{font-size:20px;margin:0}.inventory-preview button{width:40px;height:40px;flex-shrink:0;color:#ffe49a;border:1px solid #907334;border-radius:6px;background:#171d28;font-size:26px;cursor:pointer}.inventory-preview>img{display:block;width:100%;max-height:72dvh;object-fit:contain}@media(max-width:500px){.inventory-characters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.inventory-character{padding:12px;min-height:230px}.inventory-character img{height:130px}.inventory-character h2{font-size:16px}.inventory-character .character-equipped{font-size:11px;padding:6px 9px}.inventory-preview{padding:12px}}
.site-header .site-header__actions>.button--primary{display:flex}
@media(max-width:1100px){.site-header .mobile-menu-toggle{width:34px;height:32px;place-content:center;gap:4px;padding:5px 7px;border:1px solid #66532b;border-radius:5px;background:#111318;cursor:pointer}.site-header .mobile-menu-toggle span{display:block;width:18px;height:2px;background:#ffda70}.mobile-site-menu--open{display:block;position:fixed;z-index:2000;visibility:visible;opacity:1;padding:72px 20px 24px;box-sizing:border-box;background:#0b0e15}.mobile-site-menu>button{position:absolute;top:18px;right:20px;width:38px;height:38px;border:1px solid #796333;border-radius:50%;color:#ffe29b;background:#151a24;font-size:26px}.mobile-site-menu nav{width:100%;gap:10px}.mobile-site-menu nav a{display:grid;gap:5px;padding:14px;border:1px solid #343a45;border-radius:8px;color:#d6ddea;text-decoration:none;font-size:14px;background:#141923}.mobile-site-menu nav small{font-size:11px;color:#8e9bb0}.mobile-site-menu nav a.active{color:#ffe196;background:#332a18;border-color:#9e803d}}
.site-header{position:sticky;top:0;z-index:120;background:#090b0f;border-bottom:1px solid #b69232;backdrop-filter:none;-webkit-backdrop-filter:none}
.site-header::after{left:0;right:0;bottom:-1px;height:1px;background:#b69232;z-index:2;pointer-events:none}
@media(min-width:1101px){.site-header .site-header__inner{height:88px}.site-header .site-sidebar{border-right-color:#b69232}}
.site-header .site-header__inner{width:calc(100% - 40px);max-width:none;min-height:88px;display:flex;justify-content:space-between;gap:20px;padding:8px 0;box-sizing:border-box}
.site-header .brand{width:156px;flex-shrink:0}.site-header .brand img{width:112px;height:68px;object-fit:contain}
.site-header .site-header__actions{display:flex;align-items:center;gap:16px;min-width:0;margin-left:auto}
.site-header .site-header__account{display:flex;align-items:center;gap:12px}.site-header .shop-wallet{margin:0;gap:8px}.site-header .shop-wallet>span{min-width:76px;padding:6px 9px;background:#11151e}
.site-header .user-menu__dropdown{z-index:125;right:0;left:auto;min-width:210px}.site-header .user-chip{cursor:pointer}
.site-header .site-sidebar{position:fixed;left:0;top:88px;bottom:0;width:204px;height:calc(100dvh - 88px);display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;padding:28px 14px;box-sizing:border-box;background:linear-gradient(180deg,#0e1118,#080a0e);border-right:1px solid #554621;overflow-y:auto;grid-column:auto;grid-row:auto}
.site-header .site-sidebar a{display:flex;align-items:center;min-height:48px;margin:0;padding:12px 16px;border:1px solid transparent;border-radius:8px;color:#aeb7c6;font-size:12px;line-height:1.4;letter-spacing:.04em;text-transform:uppercase;text-decoration:none;box-sizing:border-box;transition:background .2s,color .2s}
.site-header .site-sidebar a:before{content:'◆';font-size:10px;margin-right:12px;color:#817047}.site-header .site-sidebar a:after{display:none}.site-header .site-sidebar a:hover{background:#ffffff08;color:#fff}.site-header .site-sidebar a.active{background:linear-gradient(90deg,#68501c55,#29231455);border-color:#8b6f2d;color:#ffe088}.site-header .site-sidebar a.active:before{color:#ffd663}
.app-shell:not(.app-shell--game)>.site-main,.app-shell:not(.app-shell--game)>.site-footer,.starter-content{margin-left:204px}
.app-shell:not(.app-shell--game) .page-container{width:calc(100% - 48px);max-width:1320px}
.characters-page{padding-block:40px}.character-showcase{display:grid;grid-template-columns:minmax(220px,1fr) 1.4fr;gap:32px;border:1px solid #756031;border-radius:18px;padding:32px;background:radial-gradient(ellipse at 20% 70%,#42336355,transparent 65%),#10141d;margin:30px 0}.character-stage{display:grid;place-items:center;min-height:290px;background:radial-gradient(ellipse at 50% 90%,#deac4044,transparent 45%)}.character-stage img{width:100%;max-width:290px;height:290px;object-fit:contain;filter:drop-shadow(0 15px 18px #0009)}.character-description{align-self:center}.character-description h2{font-size:32px;margin:15px 0}.character-description p{color:#b4c1d5;line-height:1.7}.character-equipped{display:inline-block;padding:10px 16px;color:#a7edc0;border:1px solid #4b805a;border-radius:24px;background:#183324}.character-note{font-size:13px}.character-collection h2{font-size:20px}.character-collection h2 small{font-size:12px;color:#9daabe;margin-left:14px}.character-tile{width:185px;display:grid;justify-items:center;gap:10px;border:1px solid #d7b355;border-radius:12px;background:#171a24;color:#ffe3a2;padding:16px}.character-tile img{height:130px;width:140px;object-fit:contain}.character-tile span{color:#a7edc0;font-size:12px}
@media(max-width:1100px){.site-header .site-sidebar{display:none}.app-shell:not(.app-shell--game)>.site-main,.app-shell:not(.app-shell--game)>.site-footer,.starter-content{margin-left:0}.site-header .mobile-menu-toggle{display:grid}.site-header .site-header__inner{gap:12px}.site-header .brand{width:110px}.site-header .site-header__actions{gap:10px}.site-header .user-chip b{display:none}.mobile-site-menu{inset:0 auto 0 0;width:min(340px,88vw);height:100dvh;overflow-y:auto;box-shadow:30px 0 90px #000b}.mobile-site-menu nav{display:flex;flex-direction:column}.mobile-site-menu:not(.mobile-site-menu--open){display:none}}
@media(max-width:700px){.site-header .site-header__inner{width:calc(100% - 24px);flex-wrap:wrap;min-height:72px}.site-header .brand{width:62px}.site-header .brand img{width:62px;height:46px}.site-header .site-header__actions{flex:1;flex-wrap:wrap;justify-content:flex-end;gap:8px}.site-header .site-header__actions>.button--primary{display:flex;font-size:10px;padding:8px;min-height:32px}.site-header .install-button{display:flex;font-size:10px;padding:6px;min-height:32px}.site-header .site-header__account{gap:6px}.site-header .shop-wallet{order:4;flex-basis:100%;justify-content:flex-end}.site-header .shop-wallet>span{min-width:64px;padding:3px 7px}.site-header .shop-wallet .currency-icon{width:26px;height:26px}.site-header .shop-wallet small{font-size:9px}.app-shell:not(.app-shell--game) .page-container{width:calc(100% - 28px)}.characters-page{padding-block:24px}.character-showcase{grid-template-columns:1fr;padding:20px;gap:12px}.character-stage{min-height:210px}.character-stage img{height:210px}.character-description h2{font-size:26px}}
/* Explicit mobile slots avoid flex wrapping the account into a tall column. */
@media(max-width:700px){
 .site-header .site-header__inner{display:grid;grid-template-columns:68px minmax(0,1fr) auto;grid-template-rows:auto auto;gap:8px;align-items:center;padding:10px 0;min-height:0}
 .site-header .brand{grid-column:1;grid-row:1;width:64px;height:44px;margin:0}
 .site-header .brand img{width:64px;height:44px}
 .site-header .site-header__actions{display:contents}
 .site-header .site-header__account{grid-column:3;grid-row:1;flex-direction:row;align-items:center;gap:6px;margin:0}
 .site-header .user-chip{padding:0;gap:3px;min-height:40px}
 .site-header .user-chip>span,.site-header .user-chip>img{width:30px;height:30px;font-size:11px}
 .site-header .mobile-menu-toggle{width:38px;height:40px}
 .site-header .shop-wallet{grid-column:2;grid-row:1;display:flex;justify-content:flex-end;gap:4px;margin:0;min-width:0}
 .site-header .shop-wallet>span{min-width:0;padding:3px 5px;grid-template-columns:20px auto;gap:0 3px;border-radius:6px}
 .site-header .shop-wallet .currency-icon{width:20px;height:24px}
 .site-header .shop-wallet small{font-size:8px}.site-header .shop-wallet b{font-size:10px;max-width:65px;overflow:hidden;text-overflow:ellipsis}
 .site-header .install-button{grid-column:1;grid-row:2;width:100%;justify-content:center;min-height:38px;padding:6px 3px;font-size:9px;gap:3px}
 .site-header .site-header__actions>.button--primary{grid-column:2 / 4;grid-row:2;justify-content:center;min-height:38px;font-size:11px;padding:8px 12px;margin:0}
 .site-header .user-menu__dropdown{max-width:calc(100vw - 24px)}
}
/* Player profile and compact level shortcut. */
.player-level-icon{display:flex;align-items:center;justify-content:center;gap:3px;flex:0 0 auto;min-width:34px;height:34px;padding:0 5px;border:1px solid #b89a39;border-radius:10px;color:#ffda62;background:#151d2b;text-decoration:none;font-size:12px}
.player-level-icon:focus-visible{outline:2px solid #ffe59a;outline-offset:3px}
.player-profile-progress{display:flex;align-items:center;gap:24px;padding:20px;margin-bottom:24px;border:1px solid #9f843b;border-radius:14px;background:#101925;color:#f4deb0}
.player-profile-character{display:flex;flex-direction:column;align-items:center;flex:0 0 160px;gap:5px}
.player-profile-character img{width:140px;height:150px;object-fit:contain}
.player-profile-stats{flex:1;min-width:0}.player-profile-stats h2{margin:5px 0}.player-profile-stats h2 small{font-size:14px;color:#a9b7cb}.player-profile-stats progress{width:100%;accent-color:#f5cd4d}.player-profile-stats p{font-size:14px}.player-profile-stats a{color:#ffda62}
@media(max-width:600px){.player-profile-progress{padding:12px;gap:12px}.player-profile-character{flex-basis:100px;font-size:11px}.player-profile-character img{width:95px;height:110px}.player-profile-stats h2{font-size:20px}.player-profile-stats p{font-size:12px}.player-level-icon{min-width:25px;height:28px;padding:0 3px;font-size:10px}.player-level-icon>span{display:none}}
@media(min-width:1101px){
 .app-shell>.site-header,#shared-site-header .site-header{position:fixed;top:0;left:0;right:0;width:100%;height:89px;box-sizing:border-box}
 .app-shell:not(.app-shell--game){padding-top:89px;box-sizing:border-box;grid-template-rows:1fr auto}
 #shared-site-header{height:89px}
}
@media(max-width:1100px){
 .app-shell>.site-header,#shared-site-header .site-header{position:fixed;top:0;left:0;right:0;width:100%}
 .app-shell:not(.app-shell--game){padding-top:var(--site-header-height,89px);box-sizing:border-box;grid-template-rows:1fr auto}
 #shared-site-header{height:var(--site-header-height,89px)}
}
@media(max-width:700px){.app-shell:not(.app-shell--game){padding-top:var(--site-header-height,111px)}#shared-site-header{height:var(--site-header-height,111px)}}
@media(prefers-reduced-motion:reduce){.site-header .site-sidebar a{transition:none}}
/* Ariel foil preview: decorative layers preserve the original card image. */
.card-gallery__slide.card-foil {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 4%;
}
.card-foil::before, .card-foil::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.card-foil::before {
  z-index: 1;
  background: repeating-linear-gradient(120deg,
    #ffe6ac 0%, #a5f9ed 15%, #bfb0ff 30%, #ffb8df 45%, #fff0b7 60%);
  background-size: 250% 250%;
  background-position: var(--foil-x, 50%) var(--foil-y, 50%);
  mix-blend-mode: color;
  opacity: .32;
}
.card-foil::after {
  z-index: 2;
  background:
    radial-gradient(ellipse at var(--foil-x, 50%) var(--foil-y, 35%), #fff8df88, transparent 48%),
    linear-gradient(115deg, transparent 30%, #d7faff22 40%, #ffffff99 48%, #fbe4ff44 54%, transparent 65%);
  background-size: 100% 100%, 300% 100%;
  mix-blend-mode: screen;
  opacity: .5;
  animation: ariel-foil-sheen 6s ease-in-out infinite alternate;
}
.foil-preview-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
/* Fine foil flakes: two different grain scales prevent a uniform dot pattern. */
.card-foil::before { opacity: .46; }
.card-foil::after { opacity: .7; }
.card-foil__glitter {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(#000 0%, #000 60%, #0005 76%, #0007 100%);
  mask-image: linear-gradient(#000 0%, #000 60%, #0005 76%, #0007 100%);
}
.card-foil__glitter::before, .card-foil__glitter::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #fffef2 0 .7px, transparent 1.3px),
    radial-gradient(circle, #a6faff 0 .6px, transparent 1.2px),
    radial-gradient(circle, #ffdf87 0 .8px, transparent 1.5px),
    radial-gradient(circle, #ffd3ff 0 .5px, transparent 1.1px);
  background-size: 13px 19px, 23px 17px, 31px 29px, 19px 37px;
  background-position: 2px 5px, 11px 3px, 7px 17px, 13px 23px;
  opacity: .52;
  animation: ariel-glitter 3.8s ease-in-out infinite alternate;
}
.card-foil__glitter::after {
  background-size: 43px 59px, 67px 41px, 79px 71px, 53px 83px;
  background-position: 17px 21px, 9px 33px, 29px 11px, 37px 53px;
  filter: drop-shadow(0 0 2px #fff5c5);
  animation-delay: -2.3s;
}
.card-foil:hover .card-foil__glitter,
.card-foil:active .card-foil__glitter { filter: brightness(1.3); }
@keyframes ariel-glitter {
  0% { opacity: .28; }
  50% { opacity: .7; }
  100% { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
  .card-foil__glitter::before, .card-foil__glitter::after { animation: none; }
}
.foil-preview-controls button[aria-pressed="true"] { border-color: #ffcf34; color: #ffdf79; background: #302711; }
@keyframes ariel-foil-sheen {
  from { background-position: center, 100% 0; }
  to { background-position: center, 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card-foil::after { animation: none; }
}
/* Two compact mobile rows: account above, install and rewards below. */
@media(max-width:700px){
 .site-header .site-header__inner{grid-template-columns:56px minmax(0,1fr) auto;gap:5px;padding:6px 0}
 .site-header .brand,.site-header .brand img{width:52px;height:36px}
 .site-header .install-button{min-height:34px;font-size:8px;padding:3px 2px}
 .site-header .reward-shortcuts{grid-column:2/4;grid-row:2;gap:4px;width:100%;margin:0}
 .site-header .reward-shortcut{min-height:34px;padding:2px 4px;gap:3px;border-radius:6px}
 .site-header .reward-shortcut img{width:24px;height:28px}
 .site-header .reward-shortcut strong{font-size:9px;line-height:1.15}
 .site-header .reward-shortcut small{display:none}
 .site-header .reward-shortcut i{width:12px;height:12px;right:-2px;top:-3px;font-size:7px}
}
@media(max-width:360px){
 .site-header .reward-shortcut img{width:19px;height:24px}
 .site-header .reward-shortcut strong{font-size:8px}
}
/* Install stays attached to the brand, independent of account actions. */
.site-header .site-header__brand-group{display:flex;align-items:center;gap:8px;flex-shrink:0}
.site-header .site-header__brand-group .brand{margin:0}
.site-header .site-header__brand-group .install-button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:28px;padding:4px 7px;font-size:9px;gap:4px;border-radius:5px}
@media(max-width:700px){
 .site-header .site-header__inner{grid-template-columns:86px minmax(0,1fr) auto}
 .site-header .site-header__brand-group{grid-column:1;grid-row:1;gap:4px}
 .site-header .site-header__brand-group .install-button{width:28px;height:28px;min-height:28px;padding:0;font-size:16px}
 .site-header .site-header__brand-group .install-button__label{display:none}
 .site-header .reward-shortcuts{grid-column:1/-1;grid-row:2}
}

/* Main mobile header: one row, with compact reward shortcuts. */
@media(max-width:1100px){
 .site-header .site-header__inner{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;padding:5px 8px}
 .site-header .site-header__brand-group{flex:0 0 auto;gap:4px}
 .site-header .site-header__actions{display:flex;flex:1;min-width:0;align-items:center;justify-content:flex-end;gap:6px}
 .site-header .reward-shortcuts{display:flex;flex:0 1 auto;width:auto;margin:0;gap:5px}
 .site-header .reward-shortcut{flex:0 1 auto;min-width:0;min-height:30px;padding:3px 6px;gap:4px}
 .site-header .reward-shortcut strong{font-size:8px;white-space:nowrap}
 .site-header .reward-shortcut img{width:21px;height:24px}
 .site-header .reward-shortcut small{display:none}
 .site-header .shop-wallet{flex:0 0 auto;margin:0;gap:4px}
 .site-header .shop-wallet>span{min-width:0;grid-template-columns:18px auto;gap:0 3px;padding:3px 5px}
 .site-header .shop-wallet .currency-icon{width:18px;height:18px}
 .site-header .shop-wallet b{font-size:10px}
 .site-header .shop-wallet small{font-size:7px}
 .site-header .site-header__account{display:flex;flex:0 0 auto;align-items:center;gap:5px}
 .site-header .user-chip b{display:none}
 .site-header .mobile-menu-toggle{width:30px;height:30px;min-height:30px;padding:6px}
}
@media(max-width:620px){
 .site-header .reward-shortcut{width:29px;height:30px;flex:0 0 29px;padding:2px}
 .site-header .reward-shortcut>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .site-header .reward-shortcut img{width:23px;height:25px}
 .site-header .brand,.site-header .brand img{width:40px;height:30px}
 .site-header .site-header__inner,.site-header .site-header__actions{gap:4px}
 .site-header .user-chip i{display:none}
}
@media(max-width:380px){
 .site-header .site-header__inner{padding:4px}
 .site-header .brand,.site-header .brand img{width:34px;height:28px}
 .site-header .site-header__brand-group .install-button{width:23px;height:26px;min-height:26px}
 .site-header .shop-wallet>span{padding:3px;grid-template-columns:14px auto}
 .site-header .shop-wallet .currency-icon{width:14px;height:14px}
 .site-header .shop-wallet b{font-size:9px}
 .site-header .user-chip>span,.site-header .user-chip>img{width:24px;height:24px;font-size:10px}
}
