/* Mobile quality pass: predictable widths, touch-sized controls and low-cost effects. */
html{overflow-x:hidden}
body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
.page,.panel,.family,.listitem,.dashboard-card,.party-layout>*{min-width:0}
.profile-title-help{display:block;margin-top:9px;color:var(--st-muted,var(--ct-muted));font-size:.66rem;line-height:1.45}

/* The profile Sprite gallery is a real independently scrollable control. */
.profile-sprite-picker{
  min-height:190px;
  max-height:min(52dvh,520px)!important;
  overflow-y:scroll!important;
  overscroll-behavior-y:auto!important;
  scrollbar-gutter:stable both-edges;
  touch-action:pan-y pinch-zoom!important;
  contain:layout paint;
}
.profile-sprite-picker:focus-visible{outline:3px solid color-mix(in srgb,var(--st-cyan) 72%,white);outline-offset:3px}
.profile-sprite-picker-head>small{white-space:nowrap}

/* Console search/categories and full reward descriptions. */
.console-toolbar{position:relative;display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:end;margin:0 0 16px}
.console-toolbar label{display:grid;gap:6px}.console-toolbar label>span{color:#72ff9f;font:800 .62rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.1em}
.console-toolbar .input{border-color:rgba(114,255,159,.4)!important;background:#07160e!important;color:#dfffe8!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.console-toolbar .input::placeholder{color:#8abf99!important;opacity:1}
.console-filters{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.console-filters button{min-height:40px;padding:7px 10px;border:1px solid rgba(114,255,159,.32);border-radius:8px;background:#0a1b11;color:#bdecca;font:800 .64rem/1 Inter,system-ui,sans-serif;cursor:pointer}.console-filters button.active{background:#72ff9f;color:#07130b;border-color:#a9ffc5}
.console-code label>span{gap:5px!important}.console-code-heading{display:flex;align-items:center;gap:7px;min-width:0}.console-code-heading strong{min-width:0}.console-code-heading em{flex:0 0 auto;padding:2px 5px;border:1px solid rgba(114,255,159,.34);border-radius:999px;color:#9fe9b5;font:800 .48rem/1 Inter,system-ui,sans-serif;letter-spacing:.06em}
.console-code label small{overflow:visible!important;display:block;white-space:normal!important;line-height:1.35!important;text-overflow:clip!important}
.console-code-joke{border-style:dashed!important;border-color:rgba(255,214,94,.58)!important;background:rgba(72,52,4,.2)!important}.console-code-joke .console-code-heading em{border-color:rgba(255,214,94,.55);color:#ffe17a}.console-code-joke label strong{color:#ffe17a!important;text-shadow:0 0 9px rgba(255,214,94,.28)!important}.console-code-joke input{opacity:.45}
.console-empty{position:relative;padding:24px;border:1px dashed rgba(114,255,159,.3);color:#b9e9c7;text-align:center}

@media(max-width:900px){
  .top{height:auto;min-height:68px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:9px 12px}
  .persistent-brand{min-width:0}.persistent-brand>span{min-width:0}.persistent-brand>span img{max-width:100%}
  .top .actions.console-launcher-actions{width:min(100%,360px)!important}
  .content{width:calc(100% - 18px)!important;padding:18px 0 calc(98px + env(safe-area-inset-bottom))!important}
  .page>.hero,.page .hero{min-width:0}.page>.hero h2,.page .hero>h2,.console-page-intro h2{width:auto!important;font-size:clamp(1.85rem,8vw,3.1rem)!important;line-height:1.02!important;overflow-wrap:anywhere}
  .panel,.dashboard-card{padding:15px}
  .grid2,.party-layout,.feedback-layout,.profile-sharing-grid{grid-template-columns:minmax(0,1fr)!important}
  .input,.select,input,select,textarea{max-width:100%;font-size:16px!important}
  .row{flex-wrap:wrap}.row>.btn{flex:1 1 150px}
  .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.toolbar .input{grid-column:1/-1}
  .mobile{align-items:stretch;gap:5px;min-height:68px;padding:6px 7px max(6px,env(safe-area-inset-bottom))!important;background:color-mix(in srgb,var(--st-bg) 92%,transparent)!important;backdrop-filter:blur(16px);scroll-snap-type:x mandatory}
  .mobile a,.mobile button{display:grid;place-items:center;min-width:88px!important;min-height:48px;padding:7px 6px!important;line-height:1.15;white-space:normal;scroll-snap-align:start}
  .profile-v2-ribbon{overflow:visible!important}.profile-ribbon-controls{min-width:0}.profile-sprite-picker{height:min(48dvh,430px);min-height:240px}
  .console-toolbar{grid-template-columns:1fr}.console-filters{justify-content:flex-start}.console-codes{grid-template-columns:repeat(2,minmax(0,1fr))!important}.console-code{grid-template-columns:minmax(0,1fr)}.console-copy{justify-content:center;min-height:42px;border-top:1px solid rgba(114,255,159,.32);border-left:0!important}
  .admin-app-top{padding-inline:10px}.admin-app-top-actions{width:100%}.admin-app-top-actions>.btn{flex:1 1 120px;text-align:center}.admin-session{min-width:0}.admin-session span{max-width:min(180px,50vw)}
}

@media(max-width:620px){
  .top{grid-template-columns:1fr}.persistent-brand{justify-self:center}.top .actions.console-launcher-actions{justify-self:stretch;width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}.console-launch-button{grid-column:1/-1!important}.console-launcher-actions #account{grid-column:auto!important;width:auto!important}
  .console-launcher-actions>.btn,.console-launcher-actions>.pill{display:grid;place-items:center;min-height:43px;padding:6px 4px!important;text-align:center;white-space:normal}
  .hero p,.muted{overflow-wrap:anywhere}.stats{gap:7px}.stat{padding:10px}.stat b{font-size:1.16rem}
  /* Three compact variant cards fit on common 390px phones. */
  .spritegrid{grid-template-columns:1fr!important;gap:10px!important}.family{padding:9px!important}.variantgrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.variant-wrap>.variant{min-height:124px!important;padding:5px!important}.variant img{height:68px!important}.lv{top:61px!important;left:4px!important;padding:1px 4px!important;font-size:.48rem!important}.vn{font-size:.58rem!important;line-height:1.15!important;overflow-wrap:anywhere}.vs{font-size:.46rem!important}.overview-check{min-height:32px!important;padding:4px!important;font-size:.48rem!important}
  .profile-sprite-picker{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;height:min(52dvh,420px);padding-inline:0}.profile-sprite-choice{grid-template-rows:62px auto!important;min-height:100px;padding:6px!important}.profile-sprite-choice img{width:62px!important;height:62px!important}.profile-sprite-none{grid-template-rows:62px auto!important}.profile-sprite-none>span{width:48px!important;height:48px!important}.profile-sprite-choice>span{white-space:normal!important;font-size:.59rem!important;line-height:1.15!important}.profile-sprite-picker-head>small{white-space:normal}
  #accountPage .grid2{gap:10px}#accountPage .fields{gap:10px}#accountPage .row{display:grid;grid-template-columns:1fr 1fr}#accountPage .btn{min-height:46px}
  .party-form,.party-goal-form,.party-compare-toolbar,.party-trade-context,.party-trade-sides{grid-template-columns:1fr!important}.party-detail-head,.party-compare-head,.achievement-v2-head{align-items:flex-start;flex-direction:column}.party-momentum-grid{grid-template-columns:1fr 1fr!important}
  .fortnite-command-console{padding:13px 10px!important}.fortnite-command-console header strong,.fortnite-command-console header small{font-size:.91rem!important;overflow-wrap:anywhere}.console-prompt{margin:15px 0;padding:11px;font-size:1rem}.console-toolbar{gap:9px}.console-filters{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.console-filters button{padding-inline:5px}.console-codes{grid-template-columns:1fr!important}.fortnite-command-console footer{font-size:.62rem}
  .auth-gateway__layout{width:calc(100% - 14px)!important;padding-top:66px!important}.auth-gateway__brand>img{height:78px!important}.auth-gateway__intro{padding:14px 4px 12px!important}.auth-gateway__intro h1{font-size:clamp(2rem,11vw,3rem)!important}.auth-gateway__intro p{font-size:.79rem!important}.auth-gateway__card{padding:16px!important;border-radius:19px!important}.auth-gateway__copy{margin:18px 0 15px}.auth-gateway__copy h2{font-size:1.55rem}.auth-gateway__google,.auth-gateway__submit{min-height:48px}.auth-gateway__theme{min-height:44px}
  .admin-app-main{width:calc(100vw - 12px)!important}.admin-app-hero h1{font-size:clamp(1.75rem,9vw,2.4rem)!important}.admin-session{width:100%}.admin-module-grid{grid-template-columns:1fr!important}
}

@media(max-width:350px){
  .variantgrid,.profile-sprite-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .top .actions.console-launcher-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.console-launcher-actions #account{grid-column:auto!important}.console-launch-button{grid-column:1/-1!important}
  #accountPage .row,.party-momentum-grid{grid-template-columns:1fr!important}
}

/* Coarse pointers get the same visual identity without continuous expensive motion. */
@media(pointer:coarse){
  .variant,.variant::before,.variant::after,.variant img,.family.complete,.family.complete::before,.familybanner,.familybanner::after,.auth-gateway__stars,.console-prompt span{animation:none!important;transition-duration:.08s!important}
  .variant{will-change:auto!important;transform:none!important}.family{content-visibility:auto;contain-intrinsic-size:420px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
