.social-dialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:18px;border:1px solid #869775;border-radius:14px;background:#182c23;color:#ede5ca}
.social-dialog::backdrop{background:#07130cb0}
.social-dialog form{display:grid;gap:10px}
.social-dialog form label{display:grid;gap:4px;min-width:0}
.social-dialog form label[hidden]{display:none}
.social-dialog form label :is(input,select){width:100%;min-width:0}
.social-dialog :is(input,select,button){min-height:40px;max-width:100%;box-sizing:border-box}
.social-dialog button{padding:8px 12px;border:1px solid #627c66;border-radius:8px;color:inherit;background:#294535;margin:4px}
.social-dialog h3,.social-dialog p{overflow-wrap:anywhere}
#game-shell .chat-tabs{overflow-x:auto;flex-wrap:nowrap}
#game-shell .chat-tabs button{flex-shrink:0}
#game-shell .chat-person,#game-shell .chat-sale{display:inline;min-height:0;padding:0;border:0;background:none;color:#dac997;font:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere}
#game-shell .chat-sale{text-decoration:underline;color:#a9d1b2}
#game-shell .bag-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;min-width:0}
#game-shell .bag-layout>section{min-width:0;padding:10px}
#game-shell .bag-slots{grid-template-columns:repeat(auto-fill,minmax(52px,1fr));max-height:min(42dvh,420px);overflow:auto}
#game-shell .bag-summary span{padding:8px;overflow-wrap:anywhere}
#game-shell .bag-slot{min-width:0;aspect-ratio:1}
#game-shell .bag-slot .item-image{max-width:100%;max-height:100%;object-fit:contain}
#game-shell .inventory-item{min-width:0;overflow-wrap:anywhere}
#game-shell #return-town-button{font-size:11px;padding:5px;min-width:0;line-height:1.4}
#game-shell #quick-serum-button{order:6}
#game-shell #quick-medicine-button{order:5}
#game-shell #auto-attack-button{order:7}
#game-shell #return-town-button{order:8}
#game-shell .action-dock #bag-shortcut{position:static;bottom:auto;width:auto;min-height:46px;box-shadow:none;padding:4px}
@media(min-width:761px) and (pointer:fine){
 #game-shell:not(.touch-playing) .action-dock:has(#emote-button){width:min(100%,790px);grid-template-columns:minmax(84px,1fr) 62px 62px 58px minmax(110px,1fr) 54px 54px 54px 58px;gap:4px;grid-auto-rows:60px}
 #game-shell .quick-medicine-button{min-height:60px}
}
@media(max-width:760px){
 #game-shell .bag-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 #game-shell .bag-layout{grid-template-columns:minmax(0,1fr)}
 #game-shell .bag-select-hint{min-height:70px}
 #game-shell:not(.touch-playing) .action-dock:has(#emote-button){grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:46px;gap:3px}
 #game-shell:not(.touch-playing) .action-dock>button{min-height:46px;height:auto;font-size:10px}
 #game-shell:not(.touch-playing) .action-dock :is(small,.slot-icon){display:none}
}
@media(pointer:coarse), (any-pointer:coarse){
 #game-shell.touch-playing .bottom-hud:has(#vehicle-shortcut){width:184px;max-width:184px}
 #game-shell.touch-playing .action-dock:has(#vehicle-shortcut){width:184px;grid-template-columns:50px 72px 50px;gap:5px;padding:0}
 #game-shell.touch-playing .action-dock #nearby-button{width:50px;min-height:50px;height:50px}
 #game-shell.touch-playing .action-dock #attack-button{grid-column:2;grid-row:1;width:72px;height:72px}
 #game-shell.touch-playing #quick-serum-button{grid-column:3;grid-row:2;justify-self:center;width:46px;height:46px;min-height:46px;border-radius:50%;padding:3px}
 #game-shell.touch-playing #quick-medicine-button{width:46px;height:46px;min-height:46px}
 #game-shell.touch-playing #quick-serum-button :is(strong,small){display:none}
 #game-shell.touch-playing #quick-serum-button .shortcut-hint{display:block;font-size:8px;line-height:10px}
 #game-shell.touch-playing #return-town-button{grid-column:3;grid-row:3;height:40px;min-height:40px;width:48px;justify-self:center}
 #game-shell.touch-playing .action-dock #bag-shortcut{grid-column:3;grid-row:1;width:50px;min-height:46px;height:46px;padding:3px;font-size:9px;align-self:end}
 #game-shell.touch-playing .action-dock #vehicle-shortcut{grid-column:1;grid-row:2;width:46px;height:46px;min-height:46px}
 #game-shell.touch-playing .action-dock #quick-medicine-button{grid-column:2;grid-row:2}
 #game-shell.touch-playing .action-dock #quick-serum-button{grid-column:3;grid-row:2}
 #game-shell.touch-playing .action-dock #auto-attack-button{grid-column:2;grid-row:3;width:64px;justify-self:center}
 #game-shell.touch-playing .action-dock #emote-button{grid-column:1;grid-row:3;width:48px}
}

.chat-buy-items{height:220px;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable;border:1px solid #526c58;border-radius:8px;padding:4px}
.social-dialog .chat-buy-items button{display:block;width:calc(100% - 8px);margin:2px 4px;text-align:left;overflow-wrap:anywhere;background:transparent;border-color:transparent}
.social-dialog .chat-buy-items button[hidden]{display:none}
.social-dialog .chat-buy-items button[aria-pressed="true"]{background:#405c3e;border-color:#ac9c68;color:#f2dfaa}
.social-dialog .chat-buy-items button:focus-visible{outline:2px solid #dbc58d;outline-offset:-2px}
.social-dialog .chat-buy-selected{margin:0;font-size:13px;color:#daca99}
