/* Character collection gallery. Presentation only; selection and roster APIs remain unchanged. */
#characterSelect{padding:26px 18px 32px;background:radial-gradient(ellipse at 12% 12%,#23423e55,transparent 45%),radial-gradient(ellipse at 90% 70%,#302c5555,transparent 40%),#080e1a;color:#e6e9ed;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
#characterSelect .csShell{max-width:1160px;margin:0 auto;padding:22px;border:1px solid #b19c5c;border-radius:17px;background:linear-gradient(145deg,#17213aee,#0d1528f5 65%);box-shadow:0 0 0 4px #152133,0 20px 80px #0008,inset 0 0 0 5px #1c293d}
#characterSelect .selectTop{max-width:none;align-items:center;margin:0 0 17px;padding:0 2px;gap:16px}
#characterSelect .selectLogo{font-size:10px;font-weight:600;letter-spacing:2.5px;color:#8f9eac}
#characterSelect .selectTop h1{font-size:25px;line-height:1.4;margin:4px 0 0;color:#f4e2ad;letter-spacing:.5px}
#characterSelect .selectAccount{background:none;border:0;border-radius:0;padding:0;min-width:0;gap:3px;flex-shrink:0}
#characterSelect .selectAccount b{font-size:14px;font-weight:600;color:#e8dba9}
#characterSelect .selectAccount span{font-size:11px;letter-spacing:.25px;color:#9aacc0}
#characterSelect .csNamebar{display:flex;gap:18px;align-items:center;padding:11px 14px;border:1px solid #3b4b62;border-radius:8px;background:#0d1525;box-shadow:inset 0 1px 6px #0003;margin-bottom:18px}
#characterSelect .csNamebar>span:first-child{font-size:12px;font-weight:600;color:#c4b67e}
#characterSelect #csFocusedName{font-size:15px;color:#f0f1ec;font-weight:600}
#characterSelect .csConnection{margin-left:auto;font-size:10px;color:#a3aec1;white-space:nowrap}
#characterSelect .csConnection.online{color:#9ecfb2}
#characterSelect .csMain{display:grid;grid-template-columns:minmax(260px,.91fr) minmax(0,1.9fr);gap:18px;align-items:start}
#characterSelect .csDetail{position:sticky;top:0;overflow:hidden;border:1px solid #3d5665;border-radius:12px;background:linear-gradient(#0c1a25,#080f20 64%);box-shadow:inset 0 0 0 2px #122237;--hero-accent:#9fc5b6}
#characterSelect .csHeroStage{position:relative;height:288px;isolation:isolate;background:radial-gradient(ellipse at 50% 75%,color-mix(in srgb,var(--hero-accent) 20%,transparent),transparent 55%),repeating-linear-gradient(110deg,transparent 0 55px,#c7f5df04 56px 78px,transparent 79px 110px),#10292d22;overflow:hidden}
#characterSelect .csHeroStage:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 18% 32%,#a7ddba88 0 1px,transparent 2px),radial-gradient(circle at 75% 59%,#d8fce977 0 1px,transparent 2px),radial-gradient(circle at 35% 12%,#abdfc555 0 1px,transparent 2px),radial-gradient(circle at 88% 23%,#abdfc544 0 1px,transparent 2px);pointer-events:none}
#characterSelect .csHeroHalo{position:absolute;width:74%;height:48px;left:13%;bottom:17px;border:1px solid var(--hero-accent);border-radius:50%;opacity:.6;box-shadow:0 0 28px color-mix(in srgb,var(--hero-accent) 18%,transparent),inset 0 0 17px #a6dfbd1a;transform:rotate(-2deg)}
#characterSelect .csHeroHalo:after{content:"";position:absolute;inset:6px 12px;border:1px dashed var(--hero-accent);border-radius:50%;opacity:.55}
#characterSelect .csHeroArt{position:absolute;inset:14px 8px 23px;display:flex;align-items:flex-end;justify-content:center;filter:drop-shadow(0 9px 8px #0007);animation:csHeroReveal89 .28s ease-out}
#characterSelect .csHeroArt .csPortrait,#characterSelect .csHeroArt .fighterPreview59{display:block;width:91%;height:100%;max-width:270px;max-height:254px;overflow:hidden}
#characterSelect .csHeroLevel{position:absolute;top:13px;right:13px;z-index:2;font-size:10px;color:#adbbbd;letter-spacing:1px}
#characterSelect .csHeroLevel b{font-size:18px;color:#ebdfb3;margin-left:3px}
#characterSelect .csHeroBody{padding:0 16px 16px}
#characterSelect .csHeroTitle{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px}
#characterSelect .csHeroTitle h2{font-size:25px;line-height:1.15;color:#f2f3e6;margin:0 0 5px}
#characterSelect .csHeroTitle>div>span{font-size:10px;letter-spacing:2.7px;color:var(--hero-accent);font-weight:700}
#characterSelect .csHeroMark{color:var(--hero-accent);font-size:24px;opacity:.75}
#characterSelect .csRolePill{display:inline-block;border:1px solid color-mix(in srgb,var(--hero-accent) 38%,transparent);background:color-mix(in srgb,var(--hero-accent) 12%,transparent);color:#d4e9d9;font-size:10px;padding:4px 9px;border-radius:20px}
#characterSelect .csHeroDescription{font-size:11px;line-height:1.8;margin:10px 0 13px;color:#b8c4d2;min-height:40px}
#characterSelect .csStats{display:grid;gap:7px;padding-bottom:13px;margin-bottom:12px;border-bottom:1px solid #28374b}
#characterSelect .csStats>div{display:grid;grid-template-columns:81px minmax(0,1fr) 25px;align-items:center;gap:8px;font-size:10px}
#characterSelect .csStats span{color:#afbecc}
#characterSelect .csStats b{font-size:10px;text-align:right;color:#d4e2da;font-variant-numeric:tabular-nums}
#characterSelect .csStats i{height:7px;background:#20283a;border-radius:2px;position:relative;overflow:hidden}
#characterSelect .csStats i:before{content:"";position:absolute;inset:0;width:var(--fill);background:linear-gradient(90deg,#669985,var(--hero-accent));box-shadow:0 0 6px var(--hero-accent)}
#characterSelect .csStats i:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 calc(20% - 3px),#0b1426 calc(20% - 3px) 20%)}
#characterSelect .csWeapon{display:flex;gap:10px;align-items:center;padding:7px 9px;border:1px solid #29374b;border-radius:5px;background:#0a1324}
#characterSelect .csWeapon>span{font-size:22px;color:var(--hero-accent)}
#characterSelect .csWeapon small{display:block;color:#7f94a9;font-size:9px;margin-bottom:2px}
#characterSelect .csWeapon b{color:#c6d2db;font-size:11px;font-weight:500}
#characterSelect .csSkillIcons{display:flex;gap:9px;padding:12px 0}
#characterSelect .csSkillIcons>span{position:relative;width:38px;height:36px;border:1px solid color-mix(in srgb,var(--hero-accent) 65%,#354356);border-radius:8px;background:radial-gradient(ellipse,color-mix(in srgb,var(--hero-accent) 25%,transparent),#0b1525 75%);box-shadow:inset 0 0 9px #b8e3cd11,0 0 8px #111e2d}
#characterSelect .csSkillIcons i{display:grid;place-items:center;height:100%;font-style:normal;font-size:22px;color:var(--hero-accent);text-shadow:0 0 8px var(--hero-accent)}
#characterSelect .csSkillIcons small{position:absolute;right:4px;bottom:0;color:#d2dbde;font-size:8px}
#characterSelect .csHeroStatus{font-size:10px;line-height:1.6;color:#b9c9bc;margin:0 0 9px}
#characterSelect .csAssignHero{width:100%;border:1px solid #897850;background:linear-gradient(#2c3a3e,#1e2b30);border-radius:6px;color:#e9dfb5;padding:9px 12px;display:flex;justify-content:space-between;cursor:pointer;font-size:12px}
#characterSelect .csAssignHero:hover{background:#354841;border-color:#d1bc78}
#characterSelect .csCollection{min-width:0}
#characterSelect .csCollectionHead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 11px}
#characterSelect .csCollectionHead h2{font-size:13px;font-weight:500;margin:0;color:#d6d8d9}
#characterSelect .csCollectionHead span{font-size:9px;color:#8798ae}
#characterSelect .characterGrid{max-width:none;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#characterSelect .charSelectSlot{--card-accent:#9fb7d6;position:relative;height:205px;min-height:0;padding:0;gap:0;overflow:hidden;isolation:isolate;border:1px solid #334762;border-radius:10px;background:radial-gradient(ellipse at 50% 30%,color-mix(in srgb,var(--card-accent) 17%,transparent),transparent 70%),linear-gradient(155deg,#17213a,#0c1426 65%);box-shadow:inset 0 0 0 2px #162239;color:#f3f2ea;transition:border-color .16s,box-shadow .16s,transform .16s}
#characterSelect .charSelectSlot.filled:hover{transform:translateY(-2px);border-color:var(--card-accent);box-shadow:0 5px 18px #0003,inset 0 0 24px #b9d2e811}
#characterSelect .charSelectSlot.inParty{border-color:#596a6c;box-shadow:inset 0 0 0 1px #7f8c7540}
#characterSelect .charSelectSlot.isFocused{border-color:#dfd18b;box-shadow:0 0 0 1px #d7cd86,0 0 18px #d7d58e25,inset 0 0 16px #d2dda014;background:radial-gradient(ellipse at 50% 30%,color-mix(in srgb,var(--card-accent) 28%,transparent),transparent 85%),#142431}
#characterSelect .slotNo{z-index:3;top:9px;left:9px;color:#6d8297;font-size:9px}
#characterSelect .csClassIcon{position:absolute;z-index:3;top:10px;left:11px;width:20px;height:20px;display:grid;place-items:center;border:1px solid var(--card-accent);color:var(--card-accent);border-radius:50%;background:#10182ae6;font-size:12px}
#characterSelect .filled .slotNo{display:none}
#characterSelect .selectAvatar{position:absolute;width:100%;height:151px;left:0;bottom:51px;border-radius:0;background:transparent;border:0;display:flex;align-items:flex-end;justify-content:center;padding:9px 9px 0;box-sizing:border-box;filter:drop-shadow(0 7px 8px #0006)}
#characterSelect .selectAvatar .csPortrait,#characterSelect .selectAvatar .fighterPreview59{width:90%;height:100%;max-height:148px;overflow:hidden}
#characterSelect .csCardCaption{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:11px 3px 10px;background:linear-gradient(transparent,#0a1325e8 15%,#0a1325);display:grid;gap:2px}
#characterSelect .csCardCaption b{font-size:13px;line-height:1.3;color:#f1f2e9}
#characterSelect .csCardCaption strong{font-size:9px;letter-spacing:1.5px;font-weight:650;color:var(--card-accent)}
#characterSelect .csCardCaption span{font-size:9px;color:#9daabc;line-height:1.5}
#characterSelect .charSelectSlot em{z-index:4;top:9px;right:8px;border-radius:10px;background:#263b55;color:#c8d8eb;font-size:8px;padding:3px 6px;border:1px solid #4b627a;font-weight:600}
#characterSelect .charSelectSlot em.csFallen{color:#e8b2ad;background:#4d3036;border-color:#81515d}
#characterSelect .charSelectSlot.empty{opacity:1;cursor:default;background:linear-gradient(145deg,#101b30,#0c1426);border-style:dashed;border-color:#2b3b53;justify-content:flex-end;padding-bottom:19px;gap:5px}
#characterSelect .empty b{font-size:12px;color:#75869f}
#characterSelect .empty>span{font-size:9px;color:#52657e}
#characterSelect .csEmptyFigure{position:absolute;left:50%;top:29px;translate:-50% 0;border-radius:50% 50% 35% 35%;width:73px;height:100px;background:radial-gradient(ellipse at 50% 30%,#2d3057,#171d36 65%);display:grid;place-items:center;color:#66688d;font-size:38px;box-shadow:0 0 21px #64549e0f}
#characterSelect .partySelectArea{max-width:none;margin:20px 0 0;padding:12px 14px;grid-template-columns:155px minmax(0,1fr) 144px;gap:15px;background:#0b1528;border:1px solid #46546b;border-radius:9px;position:static}
#characterSelect .csTeamHeading h2{font-size:13px;font-weight:600;color:#e1d6b5;margin-bottom:5px}
#characterSelect .csTeamHeading p{font-size:9px;line-height:1.7;color:#8597ad}
#characterSelect .selectParty{gap:8px;min-width:0}
#characterSelect .partyPick{min-width:0;min-height:77px;padding:5px 6px;background:#111e32;border:1px solid #344a65;position:relative;align-content:start;gap:2px}
#characterSelect .partyPick.filled{border-color:#5c6d6a}
#characterSelect .partyPick small{font-size:8px;color:#c2b57d;letter-spacing:1.2px;justify-self:start}
#characterSelect .partyPick .teamAssign{display:flex;align-items:center;gap:6px;padding:0;text-align:left;min-width:0;max-width:100%;height:47px}
#characterSelect .csTeamPortrait{display:block;width:35px;height:45px;flex:0 0 35px}
#characterSelect .csTeamPortrait svg{width:100%;height:100%;display:block;overflow:hidden}
#characterSelect .csTeamName{display:block;min-width:0}
#characterSelect .csTeamName b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#dee5df;max-width:92px}
#characterSelect .csTeamName>span{display:block;font-size:8px;color:#8497ae;margin-top:2px}
#characterSelect .csTeamEmpty{font-size:24px;color:#78909f;margin:0 5px}
#characterSelect .teamRemove{position:absolute;right:4px;top:3px;border:0;background:transparent;color:#8196a5;font-size:8px;padding:1px 3px;cursor:pointer}
#characterSelect .teamRemove:hover{color:#eedb9f}
#characterSelect #enterGameBtn{height:53px;padding:0 15px;display:flex;align-items:center;justify-content:space-between;border-radius:6px;border-color:#b49a60;background:linear-gradient(#927a43,#5a4e31);color:#fff2cb;font-size:13px;box-shadow:inset 0 1px #ebd59044}
#characterSelect #enterGameBtn:hover{filter:brightness(1.15)}
#characterSelect #enterGameBtn:disabled{opacity:.4;cursor:not-allowed}
#characterSelect #selectMessage{max-width:none;color:#9daebf;font-size:10px;line-height:1.7;margin:10px 4px 0;min-height:17px}
#characterSelect .csNoHero{text-align:center;padding:100px 25px;color:#8b9eac;min-height:460px}
#characterSelect .csNoHero>span{font-size:60px;color:#ad9b68}
#characterSelect .csNoHero h2{font-size:18px;color:#d4ceae}
#characterSelect .csNoHero p{font-size:12px;line-height:1.8}
#characterSelect button:focus-visible{outline:2px solid #e8da92;outline-offset:3px}
@keyframes csHeroReveal89{from{opacity:.4;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:980px){#characterSelect .csShell{padding:16px}#characterSelect .csMain{grid-template-columns:minmax(220px,.95fr) minmax(0,1.65fr);gap:13px}#characterSelect .charSelectSlot{height:181px}#characterSelect .selectAvatar{height:128px}#characterSelect .csHeroStage{height:260px}#characterSelect .csCollectionHead span{display:none}#characterSelect .partySelectArea{grid-template-columns:minmax(0,1fr) 130px}#characterSelect .csTeamHeading{display:none}#characterSelect .csHeroBody{padding:0 12px 13px}#characterSelect .csStats>div{grid-template-columns:77px minmax(0,1fr) 23px;gap:5px}}
@media(max-width:650px){#characterSelect{padding:12px 8px 20px}#characterSelect .csShell{padding:12px;border-radius:11px}#characterSelect .selectTop h1{font-size:20px}#characterSelect .selectLogo{font-size:8px;letter-spacing:1.5px}#characterSelect .selectAccount b{font-size:11px}#characterSelect .selectAccount span{font-size:9px}#characterSelect .csNamebar{padding:9px 10px;gap:10px;margin-bottom:12px}#characterSelect .csNamebar>span:first-child{font-size:10px}#characterSelect #csFocusedName{font-size:12px}#characterSelect .csConnection{font-size:8px}#characterSelect .csMain{grid-template-columns:1fr}#characterSelect .csDetail{position:relative;top:auto;display:grid;grid-template-columns:.8fr 1.2fr;align-items:start}#characterSelect .csHeroStage{height:100%;min-height:290px}#characterSelect .csHeroArt{inset:45px 2px 31px}#characterSelect .csHeroArt .csPortrait,#characterSelect .csHeroArt .fighterPreview59{height:100%;width:98%;max-height:260px}#characterSelect .csHeroLevel{left:12px;right:auto;top:12px}#characterSelect .csHeroBody{padding:14px 12px 12px 0}#characterSelect .csHeroTitle h2{font-size:22px}#characterSelect .csHeroDescription{min-height:0;font-size:10px;margin:8px 0 10px}#characterSelect .csHeroTitle>div>span{letter-spacing:1.6px;font-size:9px}#characterSelect .csHeroMark{display:none}#characterSelect .csStats{gap:5px;margin-bottom:9px;padding-bottom:9px}#characterSelect .csStats>div{grid-template-columns:70px minmax(0,1fr) 22px;font-size:9px}#characterSelect .csStats b{font-size:9px}#characterSelect .csSkillIcons{gap:7px;padding:9px 0}#characterSelect .csSkillIcons>span{width:29px;height:29px;border-radius:6px}#characterSelect .csSkillIcons i{font-size:18px}#characterSelect .csWeapon{padding:5px 7px}#characterSelect .csHeroStatus{font-size:9px}#characterSelect .csAssignHero{font-size:10px;padding:7px 9px}#characterSelect .csCollectionHead{margin-top:4px;margin-bottom:9px}#characterSelect .characterGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}#characterSelect .charSelectSlot{height:167px;border-radius:8px}#characterSelect .selectAvatar{height:117px;padding:12px 4px 0;bottom:49px}#characterSelect .csCardCaption{padding:8px 2px}#characterSelect .csCardCaption b{font-size:11px}#characterSelect .csCardCaption strong{font-size:7px;letter-spacing:.7px}#characterSelect .csCardCaption span{font-size:8px}#characterSelect .csClassIcon{left:7px;top:8px;width:17px;height:17px;font-size:10px}#characterSelect .charSelectSlot em{font-size:7px;right:5px;top:8px;padding:2px 4px}#characterSelect .csEmptyFigure{width:55px;height:80px;top:25px;font-size:29px}#characterSelect .partySelectArea{padding:10px;grid-template-columns:1fr;gap:10px;margin-top:14px}#characterSelect .partyPick{min-height:68px;padding:5px}#characterSelect .selectParty{gap:5px}#characterSelect .csTeamPortrait{width:26px;flex-basis:26px;height:39px}#characterSelect .csTeamName b{font-size:9px;max-width:64px}#characterSelect .csTeamName>span{font-size:7px}#characterSelect .partyPick .teamAssign{gap:4px;height:42px}#characterSelect #enterGameBtn{height:43px;justify-content:center;gap:20px;font-size:13px}}
@media(prefers-reduced-motion:reduce){#characterSelect .csHeroArt{animation:none}#characterSelect .charSelectSlot{transition:none}}

/* Each SVG viewport clips the atlas to exactly one frame, including small team portraits. */
#characterSelect .csPortrait{overflow:hidden!important;contain:paint}
#characterSelect .csTeamPortrait{overflow:hidden;position:relative}
#characterSelect .csSlotPicker90{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:18px;background:#030813bc;backdrop-filter:blur(5px)}
#characterSelect .csSlotDialog90{width:min(520px,100%);padding:24px;border:1px solid #c5ad68;border-radius:16px;background:linear-gradient(140deg,#202d46,#10192a);box-shadow:0 20px 90px #000a;text-align:center}
#characterSelect .csSlotDialog90 h2{font-size:20px;color:#f3dfab;margin:0 0 8px;overflow-wrap:anywhere}
#characterSelect .csSlotDialog90 p{font-size:12px;color:#adbaca;margin:0 0 20px}
#characterSelect .csSlotChoices90{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#characterSelect .csSlotChoices90 button{display:flex;flex-direction:column;align-items:center;gap:9px;min-height:118px;padding:15px 5px;border-radius:10px;border:1px solid #687c94;background:#152239;color:#f0e4c1;cursor:pointer}
#characterSelect .csSlotChoices90 button:hover,#characterSelect .csSlotChoices90 button:focus-visible{border-color:#f5d977;background:#30423d;box-shadow:0 0 16px #d5c56a44;outline:2px solid #ead67a;outline-offset:2px}
#characterSelect .csSlotChoices90 small{font-size:9px;letter-spacing:2px;color:#d9bf76}
#characterSelect .csSlotChoices90 b{font-size:18px}
#characterSelect .csSlotChoices90 span{font-size:11px;color:#abb9ca;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#characterSelect .csCancel90{margin-top:18px;border:1px solid #526177;border-radius:7px;background:#172238;color:#c4ccda;padding:8px 24px;cursor:pointer}

/* Mobile selection uses one native vertical scroll surface. */
@media (pointer:coarse), (max-width:760px){
 #characterSelect{height:100vh!important;height:100dvh!important;max-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scroll-padding-bottom:160px;padding:10px 8px calc(12px + env(safe-area-inset-bottom))!important}
 #characterSelect *{touch-action:pan-y!important}
 #characterSelect .csShell{height:auto!important;max-height:none!important;min-height:100%;overflow:visible!important;box-sizing:border-box;min-width:0}
 #characterSelect .csMain,#characterSelect .csCollection,#characterSelect .characterGrid{height:auto!important;max-height:none!important;overflow:visible!important;min-width:0}
 #characterSelect .partySelectArea{position:sticky!important;bottom:0!important;z-index:20;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;padding:8px!important;background:#0c1729f5;box-shadow:0 -6px 16px #0006}
 #characterSelect .partyPick{min-height:54px!important}
 #characterSelect .partyPick .teamAssign{height:34px!important}
 #characterSelect .csTeamPortrait{height:32px!important}
 #characterSelect #enterGameBtn{min-height:44px!important;width:100%;flex-shrink:0}
 #characterSelect .csSlotPicker90{box-sizing:border-box;overflow-y:auto;align-items:safe center;padding:12px}
 #characterSelect .csSlotDialog90{box-sizing:border-box;max-height:calc(100dvh - 24px);overflow-y:auto;padding:16px}
 #characterSelect .csSlotChoices90 button{min-height:85px;padding:10px 4px;gap:6px}
 #characterSelect [draggable]{-webkit-user-drag:none}
}
@media(pointer:coarse) and (max-height:500px){
 #characterSelect .partySelectArea{grid-template-columns:minmax(0,1fr) 125px!important}
 #characterSelect .csTeamHeading{display:none!important}
 #characterSelect .csSlotDialog90 h2{font-size:16px}
 #characterSelect .csSlotDialog90 p{margin-bottom:8px}
 #characterSelect .csCancel90{margin-top:8px}
}
