/* Last in the cascade: all window types share a bounded, transform-free frame. */
#game .attackRow.pkControls{gap:3px;padding:0}
#game .pkControls .auto{width:56px;height:56px;flex:none}
#game .pkControls .auto small{font-size:12px;line-height:16px;white-space:nowrap}
#game .pkControls .attack{width:60px;height:60px;flex:none}
#game .pkControls #autoSkills{width:48px;font-size:12px;flex:none}
#game .controls #pkAuto{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:none;min-width:44px;width:44px;height:44px;margin:0;padding:3px;box-sizing:border-box;border:1px solid #8e7964;border-radius:9px;background:#243128ed;color:#c5baa0;font:700 14px/18px var(--font-ui);white-space:nowrap;box-shadow:none;touch-action:manipulation}
#game .controls #pkAuto[aria-pressed=true]{border-color:#e59675;background:#672c29ec;color:#fff0d3;box-shadow:0 0 0 1px #dc9a7940}
#game .pkModeLight{display:block;width:16px;height:3px;border-radius:2px;background:#758273}
#game #pkAuto[aria-pressed=true] .pkModeLight{background:#ffb392;box-shadow:0 0 6px #f57655}
#game .controls #auto.pkSelected{border-color:#dc9d82;background:linear-gradient(#6c352c,#351d1c);color:#ffe7ce}
#game .controls #auto.pkSelected.on{box-shadow:0 0 0 2px #ce8d69aa,0 0 13px #c8583566}
#game .controls #pkAuto[hidden]{display:none}
#game #panel.floatingPanel{inset:auto;left:8px;top:24%;right:auto;bottom:auto;transform:none;translate:none;width:calc(100% - 16px);height:56%;min-height:0;max-height:none;max-width:none;margin:0;padding:0;border-radius:9px;box-sizing:border-box;overflow:hidden;background:linear-gradient(145deg,#193d2edb,#0a211ad4)!important;box-shadow:0 8px 30px #0006,inset 0 0 0 1px #d1b87822;isolation:isolate}
#game #panel.floatingPanel .panelHead{position:relative;display:flex;align-items:center;gap:5px;height:42px;min-height:42px;padding:4px 7px;margin:0;background:#163b2ee6;cursor:grab;touch-action:none;user-select:none}
#game #panel.floatingPanel.dragging .panelHead{cursor:grabbing;background:#29503fec}
#game #panel.floatingPanel #panelTitle{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:15px;outline-offset:-1px}
#game #panel.floatingPanel #panelTitle:after{content:'⠿';margin-left:auto;font:18px var(--font-ui);color:#cfb77a99}
#game #panel.floatingPanel .panelHead button{position:static;flex:none;margin:0;padding:0;width:32px;height:32px;min-height:32px;cursor:pointer}
#game #panel.floatingPanel #panelBack{width:54px;font-size:12px}
#game #panel.floatingPanel #panelReset{font-size:19px;color:#cabb95}
#game #panel.floatingPanel #panelBody{flex:1;min-height:0;height:auto;max-height:none;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:8px;scrollbar-width:thin}
#game #panel.floatingPanel .characterSheet{min-height:0}
#game #sleepView{padding:25px 18px max(18px,env(safe-area-inset-bottom));gap:6px;overflow-y:auto;justify-content:safe center;background:radial-gradient(ellipse at 50% 20%,#14261e,#030806 70%)}
#game #sleepView #clock{font:44px/1.1 var(--font-display);letter-spacing:2px;color:#e2d5b4}
#game #sleepView>p{margin:4px 0;color:#b3b89f}
#game #sleepView>strong{margin-top:12px;color:#e7d294;font-size:17px}
#game #sleepTime{margin:0 0 8px;font-size:12px;color:#869789}
#game .sleepStats{display:flex;justify-content:space-between;gap:10px;width:100%;max-width:430px;margin:0;padding:12px 14px;border:1px solid #a78b504d;border-radius:7px;background:#172a1f7a;color:#afbdab;font-size:12px;line-height:1.5}
#game .sleepStats b{color:#e6d5a9;font-size:17px;display:block}
#game .sleepLootSection{width:100%;max-width:430px;min-height:100px;flex-shrink:0;border:1px solid #a78b504d;border-radius:8px;background:#101e1680;margin:7px 0 15px;padding:12px}
#game .sleepLootSection h2{display:flex;align-items:center;justify-content:space-between;font:14px var(--font-ui);color:#d6c396;text-align:left;margin:0 0 10px}
#game .sleepLootSection h2 small{font-size:10px;color:#839481}
#game #sleepLoot{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 7px;max-height:230px;overflow-y:auto;overscroll-behavior:contain}
#game .sleepItem{position:relative;min-width:0;display:flex;align-items:center;flex-direction:column;font-size:9px;color:#b4beaa;gap:4px}
#game .sleepItemArt{display:block;width:100%;aspect-ratio:1;background:#2133299e;border:1px solid #99825777;border-radius:5px;overflow:hidden}
#game .sleepItemArt .artIcon{display:block;width:100%;height:100%;border:0;background-color:transparent}
#game .sleepItem>b{font:700 11px var(--font-ui);color:#f1dfae;overflow-wrap:anywhere;max-width:100%}
#game .sleepItem>span:last-child{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game .sleepEmpty{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:10px;min-height:68px;color:#889d8b;font-size:12px}
#game .sleepEmpty .artIcon{width:38px;height:38px;opacity:.6}
#game #sleepView>small{color:#788878;font-size:10px}
#game #sleepView #wake{flex-shrink:0;margin:8px 0 0;padding:11px 22px;background:#1c3022;border:1px solid #967d4b;color:#d9c68f;border-radius:6px;font-size:13px}
@media(max-height:600px){#game #sleepView{padding-top:12px;gap:3px}#game #sleepView #clock{font-size:30px}#game #sleepView>strong{margin-top:4px}#game .sleepLootSection{margin-bottom:4px}#game #sleepLoot{max-height:126px}}
/* Keep the dock inside short viewports; window movement never changes the camera. */
#game{min-height:0}
#game #panel.chatPanel.floatingPanel #panelBody{overflow:auto}
#game .chatShell{min-height:280px}
#game .chatContext{font-size:12px}
#game .chatCompose textarea{font-size:16px}
#game #panel .supplyDetail :is(button,#useReturnTalisman){min-height:44px;min-width:120px}
@media(max-width:350px){#game .bottom{grid-template-columns:72px minmax(0,1fr);column-gap:8px}#game #pad,#game #dodge{width:72px}#game #pad{height:72px}}
@media(pointer:coarse){
 #game #panel.floatingPanel .panelHead{height:48px;min-height:48px;padding:2px 5px}
 #game #panel.floatingPanel .panelHead button{width:44px;height:44px;min-height:44px}
 #game #panel .itemActions button{min-height:44px}
 #game #panel .inventoryGrid{grid-template-columns:repeat(7,minmax(0,1fr))}
}
@media(pointer:coarse) and (max-width:380px){#game #panel .inventoryGrid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(pointer:coarse) and (max-width:350px){#game #panel .inventoryGrid{grid-template-columns:repeat(5,minmax(0,1fr))}}
#game #panelResize{position:absolute;right:0;bottom:0;width:36px;height:28px;padding:0;border:0;border-radius:5px 0 0 0;background:#234536eb;color:#d1bd87;touch-action:none;cursor:nwse-resize;z-index:3}
#game #panelResize[hidden]{display:none}
#game #panel.chatPanel.floatingPanel #panelBody{padding-bottom:30px}
#game .chatPreferences{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;font-size:12px;flex:none}
#game .chatPreferences small{color:#afbea8;font-size:11px}
#game .chatPreferences select,#game #whisperTo{background:#163929;border:1px solid #9e8d5c;border-radius:4px;color:#f0ddb3;min-height:36px;font:14px var(--font-ui);max-width:100%;padding:4px}
#game .chatForm .whisperRecipient{display:flex;gap:8px;align-items:center}#game .chatForm .whisperRecipient[hidden]{display:none}#game #whisperTo{flex:1;min-width:0}
#game .chatMessageActions{flex-wrap:wrap}#game .chatTabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.communityPanel{color:#eaddba;font-size:13px;line-height:1.6}.communityPanel fieldset{border:0;padding:0;margin:0;min-width:0}.communityHero{display:flex;gap:14px;align-items:center;margin:12px 0 18px;padding:14px;background:linear-gradient(110deg,#385a4d90,#0e292530);border-bottom:1px solid #c7ad6755}.communityHero>svg,.communityEmpty>svg{width:44px;height:44px;flex:none;color:#e6c786}.communityHero h3{margin:0;font-size:21px;color:#ffe5aa}.communityHero p{margin:4px 0}.communityPanel small{color:#bbcab9;display:block}.communityRows{display:grid;gap:7px;margin:12px 0}.communityRows article{display:flex;gap:10px;align-items:center;background:#102d2780;border:1px solid #7a8a6555;border-radius:8px;padding:10px;flex-wrap:wrap}.communityRows article>div{flex:1;min-width:120px}.communityRows .uiIcon{width:36px;height:36px;flex:none}.communityRows article.isSelf{border-color:#d5b775}.communityCard{background:#152e28a0;border:1px solid #8c986755;border-radius:8px;padding:12px;margin:10px 0}.communityPanel button{font-size:12px;padding:7px 11px;min-height:36px}.communityPanel form{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:12px 0}.communityPanel label{display:grid;gap:4px;flex:1;min-width:100px}.communityPanel input,.communityPanel select{box-sizing:border-box;width:100%;min-width:0;background:#102b27;color:#f5e2b2;border:1px solid #8b9970;border-radius:5px;padding:9px}.communityPanel progress{width:100%;accent-color:#d8ba6a}.communityToolbar,.communityWallet{display:flex;align-items:center;justify-content:space-between;gap:8px}.communityToolbar span{font-size:12px;color:#d9cba4}.communityConfirm{padding:14px;border:1px solid #e7bd66;background:#3d4430;border-radius:8px;margin:12px 0}.communityConfirm>div{display:flex;gap:10px;margin-top:10px}.communityEmpty{text-align:center;padding:24px 12px;color:#decba3}

/* v63 guild chat and market filters */
#game .chatTabs{grid-template-columns:repeat(4,minmax(0,1fr))}.marketFilters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.marketFilters label{min-width:0;display:grid;gap:4px}.marketFilters input,.marketFilters select{width:100%;min-width:0;font-size:14px}.marketPages{display:flex;align-items:center;justify-content:space-between;gap:8px}.communityRows .icon{flex-shrink:0}.marketEmpty{padding:20px 12px;text-align:center}.marketGear{border-left:3px solid #b9965c}

#game .atlasPanel .frontierCard{min-height:112px;padding:0;border:1px solid #806c45;border-radius:8px;background:#172224}#game .communityPanel{font-size:14px}#game .communityPanel button{font-size:14px;min-height:40px}.communityRows .artIcon{width:44px;height:44px;flex:none}.communityPanel small{overflow-wrap:anywhere}

/* v64 clan warehouse: contained item art, compact material balances, readable touch controls. */
.clanTabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}.clanTabs button{display:flex;align-items:center;justify-content:center;gap:6px}.clanTabs svg,.vaultPermissions summary svg{width:20px;height:20px;flex:none}.clanTabs [aria-pressed=true]{border-color:#e7c47a;background:#365041;color:#ffe5a6}
#game .clanTabs button,#game .clanVault button{min-height:44px}.clanVault :is(input,select){min-height:44px;font-size:16px;max-width:100%}.clanVault :is(p,b){overflow-wrap:anywhere}.clanVault h4{color:#ecd396;margin:20px 0 8px}.vaultBalances,.vaultGearGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.vaultBalances article{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid #a6955c66;border-radius:8px;background:#18372e}.vaultBalances article>div{min-width:0}.vaultBalances strong{display:block;color:#ffdfa0;font-size:20px;font-variant-numeric:tabular-nums}.vaultBalances .artIcon,.vaultGear .artIcon,.vaultHistory .artIcon{width:44px;height:44px;flex:none}.vaultBalances small{font-size:11px}.vaultDonation{border-left:2px solid #caaa68;padding-left:10px;color:#e3cc99}.clanVault form label{min-width:0;flex:1 1 105px}.clanVault form button{flex:0 0 auto}.vaultGear{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:8px;padding:10px;background:#14302bd0;border:1px solid #8d825b66;border-radius:8px;min-width:0}.vaultGear>button{grid-column:1/-1;width:100%}.vaultEmpty{grid-column:1/-1;text-align:center;padding:20px;color:#bfcab7}.vaultPermissions summary{display:flex;gap:8px;align-items:center;min-height:44px;cursor:pointer}.vaultHistory{padding:0;margin:12px 0;list-style:none;display:grid;gap:8px}.vaultHistory li{display:flex;gap:12px;align-items:center;border-bottom:1px solid #8c986744;padding:12px 4px}.vaultHistory li>div{min-width:0}.vaultHistory .menuSymbol{width:32px;height:32px;flex:none;color:#d3b97c}.vaultHistory time{font-size:12px;color:#aebcaa}.clanVault .communityRows article>div{min-width:90px}
@media(max-width:380px){.vaultGearGrid{grid-template-columns:minmax(0,1fr)}.vaultBalances article{padding:8px;gap:5px}.vaultBalances .artIcon{width:30px;height:30px}.vaultBalances strong{font-size:18px}.clanVault form button{flex:1 1 100%}}

/* v65 cooperative dungeons and recruitment */
.dungeonCatalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dungeonChoice{min-width:0;overflow:hidden;border:1px solid #a68b535c;background:#17352ccd;border-radius:10px}.dungeonChoice>img{display:block;width:100%;height:112px;object-fit:cover;object-position:50% 74%;opacity:.88}.dungeonChoice>div{padding:12px}.dungeonPanel h3{color:#f1d497;margin:4px 0}.dungeonPanel h4{color:#efdaaa;margin:22px 0 8px}.dungeonPanel p{overflow-wrap:anywhere}.dungeonPanel .dungeonDaily{color:#c3d9b8;font-size:13px}.dungeonRewards{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.dungeonRewards>span{display:flex;align-items:center;gap:5px;font-size:12px}.dungeonRewards b{display:block;color:#ffdda0;font-size:14px}.dungeonRewards .artIcon{width:32px;height:32px;flex:none}.dungeonRoster{display:grid;gap:8px;margin:12px 0}.dungeonRoster article{display:flex;align-items:center;gap:9px;padding:8px;border-bottom:1px solid #9f9a7250;flex-wrap:wrap}.dungeonRoster article>div{flex:1;min-width:90px}.dungeonRoster svg{width:28px;height:28px;flex:none;color:#cfb678}.dungeonLobbies .communityCard{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.dungeonPending{border-top:1px solid #8f9d6650;padding:12px 0}.dungeonPanel form label{min-width:0;flex:1 1 110px}.dungeonPanel select{font-size:16px;min-height:44px}.dungeonRoom>button{margin:3px}#game .dungeonPanel button{min-height:44px}.dungeonPanel :is(b,small){overflow-wrap:anywhere}
@media(max-width:540px){.dungeonCatalog{grid-template-columns:minmax(0,1fr)}.dungeonChoice>img{height:96px}.dungeonRoom>button{width:100%;margin:4px 0}}
