/* One square playfield, centered independently of the optional chat rail. */
body.adventure-layout{background:#000!important}
body.adventure-layout main.game-shell{inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;width:var(--square-size,90vmin)!important;height:var(--square-size,90vmin)!important;max-width:100vw!important;max-height:100dvh!important}
body.adventure-layout.mobile-immersive main.game-shell{width:var(--square-size,100vmin)!important;height:var(--square-size,100vmin)!important}
body.adventure-layout.mobile-immersive #screen{height:var(--square-size,100vmin)!important;width:var(--square-size,100vmin)!important}
.community-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;filter:drop-shadow(0 2px 2px #0008)}.community-icon svg{display:block;width:100%;height:100%;max-width:36px;max-height:36px}
.hud-shortcut .community-icon{width:28px;height:28px}.adventure-hud .hud-actions .hud-shortcut{display:flex;align-items:center;justify-content:center}
.vip-name-badge{display:inline-flex;align-items:center;vertical-align:middle;margin-left:4px;color:#ffe89e;filter:drop-shadow(0 1px 1px #1a140e)}.vip-name-badge .community-icon{width:15px;height:13px}.trainer-nick{position:relative}.hud-vip{display:flex;font:bold 9px system-ui;align-items:center;color:#ffdf78;gap:3px}.hud-vip[hidden]{display:none}.hud-vip .community-icon{width:17px;height:13px}
body.adventure-layout :is(#screen,main.game-shell) .adventure-hud #server-presence{position:static!important;display:flex!important;visibility:visible!important;transform:none!important;translate:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;margin:0!important;padding:0 4px!important;gap:3px!important;flex-wrap:wrap!important;width:85px!important;max-width:85px!important;font:9px system-ui!important;align-content:center;z-index:auto}
.adventure-hud #server-presence time{display:none!important}.adventure-hud #server-presence>span{width:100%;text-align:center;color:#8fddcc}.adventure-hud #server-presence button{font:9px system-ui!important;padding:2px!important;min-height:20px!important;height:20px!important;background:#183344!important;border:1px solid #3b7489!important;border-radius:3px!important}.adventure-hud #server-presence #server-online-list{position:absolute;right:0;top:64px;max-height:260px;overflow:auto;width:220px;background:#0c1d2b;border:1px solid #59c8ee;padding:12px;color:#e3f6ff}
.adventure-hud{container-type:inline-size}.adventure-hud .hud-place{min-width:60px}.adventure-hud .hud-climate{min-width:92px}.adventure-hud .hud-trainer{min-width:126px;gap:5px;padding-left:5px}.adventure-hud .hud-money{min-width:60px;padding:4px;font-size:11px}.adventure-hud .hud-actions{gap:1px;padding:3px}.adventure-hud .hud-shortcut{width:31px!important}.adventure-hud .hud-shortcut[data-action=Menu]{width:36px!important}
.community-window{--gold:#ffda65;width:min(1160px,98vw)!important;height:min(850px,96dvh)!important;border:1px solid #60c8e0!important;background:repeating-linear-gradient(125deg,#ffffff02 0 1px,transparent 1px 6px),#101d27!important}.community-window .festival-heading>.community-icon{width:52px;height:52px;border:1px solid #738b99;background:#0d1720;margin-right:15px;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}
.community-window .festival-heading{height:88px!important}.community-window .festival-heading h2{font-size:26px!important;letter-spacing:.055em}.community-window .community-status{min-height:18px;color:#ffde8f;margin:4px 18px;font-size:12px}.community-window button{font:600 12px system-ui!important;cursor:pointer;min-height:36px;border:1px solid #4e859b;background:linear-gradient(#173b50,#102333);color:#d8f7ff;border-radius:5px;padding:8px 12px;box-shadow:none}.community-window button:disabled{opacity:.5;cursor:default}.community-window button[aria-pressed=true]{border-color:#65e3ff;box-shadow:inset 0 0 0 1px #65e3ff70;background:linear-gradient(#254658,#172c3b)}
.daily-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(210px,1fr);gap:12px;padding:12px;height:calc(100% - 118px);overflow:auto;box-sizing:border-box}.daily-main{display:flex;flex-direction:column;min-width:0}.daily-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;font-size:11px;color:#add7e6}.daily-summary strong{padding:12px;border:1px solid #517185;border-radius:6px;color:#7be7fc}.daily-summary p{flex:1;min-width:120px;text-align:right;font-size:10px;color:#b7c4cf}.daily-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;flex:1}.community-window .daily-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:9px 3px;min-height:105px;background:repeating-linear-gradient(45deg,#ffffff03 0 1px,transparent 1px 5px),linear-gradient(#25343d,#111d27);border-color:#436374;color:#e9f3f5}.daily-card small{font-size:9px;letter-spacing:.08em;color:#6fe7ff;text-transform:uppercase}.daily-card strong{font-size:11px}.daily-card span{font-size:9px;line-height:1.2;text-align:center}.daily-card[data-special=true]{border-color:#a38a46}.daily-card[data-special=true] small{color:#ffe275}.daily-card[data-state=claimed]{opacity:.55}.community-item{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}.daily-aside{display:flex;flex-direction:column;gap:12px;min-width:0}.daily-hero,.daily-next,.daily-history{border:1px solid #4b6e82;border-radius:7px;padding:14px;text-align:center;background:linear-gradient(#2a3a43aa,#0a1926);box-sizing:border-box}.daily-hero{display:flex;flex-direction:column;align-items:center;gap:12px;flex:1}.daily-hero>small{font-size:10px;letter-spacing:.15em;text-transform:uppercase}.daily-day{background:linear-gradient(#fff397,#e4ad2e);color:#242313;font-size:11px;font-weight:900;padding:5px 20px;clip-path:polygon(0 0,100% 0,90% 100%,10% 100%)}.daily-hero h3{color:#63def9!important;font-size:20px;margin:0}.daily-hero .community-item{width:120px;height:120px;filter:drop-shadow(0 14px 10px #36bfdd35)}.daily-hero p{font-size:11px;line-height:1.6;color:#c5d3dd}.daily-quantity{color:#ffe36a;font-size:22px}.community-window .daily-claim{background:linear-gradient(#ffe379,#e2b124);color:#29230d;border-color:#ffe28a;text-transform:uppercase;letter-spacing:.05em;width:100%;font-weight:900!important}.daily-next{display:flex;flex-direction:column;gap:10px}.daily-next h4{margin:0;color:#78dcee;font-size:12px}.daily-next small{color:#a2baca}.daily-clock{color:#fff;font-variant-numeric:tabular-nums}.daily-history{overflow:auto;text-align:left;font-size:12px;line-height:1.6}
.mail-layout{height:calc(100% - 118px);display:grid;grid-template-columns:minmax(230px,.9fr) minmax(300px,1.3fr);gap:16px;padding:12px;box-sizing:border-box}.mail-sidebar,.mail-detail{background:#08182b!important;border:1px solid #315680!important;border-radius:10px!important;padding:14px!important;box-sizing:border-box;min-width:0}.mail-sidebar{display:flex!important;flex-direction:column!important;overflow:hidden}.mail-tabs{display:flex!important;gap:6px;background:none!important;padding:0!important;flex-shrink:0}.mail-tabs button{flex:1;padding:8px 4px;font-size:11px!important}.mail-list{flex:1;overflow:auto;margin:14px 0}.community-window .mail-row{width:100%;display:flex;gap:9px;align-items:center;text-align:left;margin-bottom:8px;border:1px solid #294d76;background:#122947;padding:12px}.mail-row>.community-icon{width:38px;height:38px}.mail-row>span:nth-child(2){min-width:0;flex:1}.mail-row strong,.mail-row small,.mail-row p{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-row strong{font-size:12px}.mail-row small{font-size:10px;color:#6bcde9;margin-top:5px}.mail-row p{font-size:11px;margin:8px 0 0;color:#91a7c1}.mail-row[data-unread=true] strong{color:#fff}.mail-star{color:#ffdc5e}.mail-pagination{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:10px;color:#a1b7ce}.mail-pagination button{font-size:10px!important;padding:6px}.mail-detail{overflow:auto;display:flex;flex-direction:column;gap:14px}.mail-detail-head{display:flex;align-items:center;gap:12px;border-bottom:1px solid #234566;padding-bottom:15px}.mail-detail-head>.community-icon{width:44px;height:44px}.mail-detail-head h3{flex:1;font-size:18px;color:#e8f5ff!important;margin:0}.mail-detail-head time{font-size:10px;color:#9fb7d2}.mail-sender{color:#68ccf1;font-size:12px;margin:0}.mail-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font-size:14px;color:#ccd9ed;flex:1}.mail-gifts{border:1px solid #355984;border-radius:7px;padding:16px;display:flex;gap:14px;flex-wrap:wrap}.mail-gifts h4{width:100%;color:#f1cf5d;margin:0}.mail-gifts article{display:flex;align-items:center;flex-direction:column;gap:8px;border:1px solid #34557a;border-radius:7px;min-width:90px;padding:12px;font-size:11px}.mail-gifts strong{color:#ffe076}.mail-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.mail-actions button{flex:1;white-space:nowrap}.mail-compose{display:flex;flex-direction:column;gap:15px}.mail-compose input,.mail-compose textarea,.mail-compose select{box-sizing:border-box;width:100%;background:#102b42;color:#e7f6ff;border:1px solid #487492;border-radius:5px;padding:12px;font:14px system-ui}.community-empty{color:#acc2d3;text-align:center;padding:30px 10px;font-size:13px}
.npc-quest-window{height:auto!important;max-height:90dvh!important;max-width:820px!important}.npc-quest-body{padding:20px;overflow:auto;max-height:65dvh;color:#c6d7e2}.npc-quest-card{display:flex;gap:18px;background:repeating-linear-gradient(45deg,#ffffff03 0 1px,transparent 1px 7px),#27353f;border:1px solid #7898a4;border-radius:8px;padding:20px}.npc-quest-card>.community-icon{width:50px;height:50px}.npc-quest-card>div{flex:1}.npc-quest-card h3{font-size:18px;margin:0 0 10px;color:#fff}.npc-quest-card p{font-size:13px;line-height:1.6;white-space:pre-wrap}.npc-quest-card progress{display:block;width:100%;height:9px;accent-color:#55e1fb;margin:15px 0 8px}.npc-quest-card strong{color:#5ee0fb}.npc-quest-reward{display:flex;align-items:center;gap:15px;padding:15px;border-bottom:1px solid #477488;font-size:13px}.npc-quest-body>button{display:block;margin-left:auto;min-width:170px}
body.adventure-layout #screen #desktop-chat{background:#070e19fa!important;color:#d1f6ff!important;border-color:#315779!important;border-radius:7px!important}.desktop-chat-channel-tabs{display:flex;gap:2px;padding:4px;flex-shrink:0}.desktop-chat-channel-tabs button{flex:1;padding:5px 2px!important;font-size:9px!important;min-width:0!important}.desktop-chat-channel-tabs button[aria-pressed=true]{border-color:#66dbf5!important;color:#80eaff!important}body.adventure-layout #screen #desktop-chat .desktop-chat-header{background:#10243a;border-color:#2b5069;color:#c6f6ff}.desktop-chat-header strong{font-size:11px!important}body.adventure-layout #screen #desktop-chat button{background:#163047;border-color:#345779;color:#bbf4ff}body.adventure-layout #screen #desktop-chat #chat-log{color:#80e4ec;background:#070e19!important}body.adventure-layout #screen #desktop-chat #chat-log p>span{color:#fff;font-weight:800}body.adventure-layout #screen #desktop-chat form{background:#0c1828}body.adventure-layout #screen #desktop-chat input,body.adventure-layout #screen #desktop-chat select{background:#06101d;color:#dbf5ff;border-color:#3b5973}body.adventure-layout #screen #desktop-chat .desktop-chat-settings{background:#13263b}
@media(min-width:1100px){body.chat-docked #screen #desktop-chat{font-size:13px!important;--desktop-chat-font:13px!important}body.chat-docked #desktop-chat .desktop-chat-resize,body.chat-docked #desktop-chat [data-chat-expand]{display:none!important}body.chat-docked #desktop-chat .desktop-chat-header{cursor:move}body.chat-docked #chat-toggle{display:none!important}body.chat-docked main.game-shell{left:50%!important}}
@container (max-width:760px){.adventure-hud .hud-place{min-width:75px;max-width:105px;padding:5px;flex:.6}.adventure-hud .hud-place strong{font-size:11px}.adventure-hud .hud-money{display:none}.adventure-hud .hud-xp{display:none}.adventure-hud .hud-trainer{flex:1}.adventure-hud .hud-shortcut[data-action=Pokédex],.adventure-hud .hud-shortcut[data-action=Bolsa],.adventure-hud .hud-shortcut[data-action=Pokémon]{display:none}}
@media(max-width:760px){.community-window{height:96dvh!important}.daily-layout{grid-template-columns:1fr;overflow:auto}.daily-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.community-window .daily-card{min-height:95px;padding:5px 1px}.daily-card span{font-size:8px}.daily-card .community-item{width:28px;height:28px}.daily-aside{display:grid;grid-template-columns:1fr 1fr}.daily-hero .community-item{width:75px;height:75px}.daily-hero{gap:7px}.daily-summary{gap:5px}.daily-summary strong{padding:8px}.daily-summary p{min-width:100%}.mail-layout{display:flex;flex-direction:column;overflow:auto}.mail-sidebar{flex-shrink:0;max-height:300px}.mail-list{min-height:90px}.mail-detail{flex-shrink:0;min-height:300px}.mail-detail-head{flex-wrap:wrap}.mail-detail-head time{width:100%}.community-window .festival-heading h2{font-size:21px!important}.community-window .festival-heading>.community-icon{width:38px;height:40px;margin-right:9px}.npc-quest-window{height:auto!important}.npc-quest-card{padding:12px;gap:8px}.npc-quest-card>.community-icon{width:30px}.adventure-hud .hud-shortcut[data-action='Recompensa diária'],.adventure-hud .hud-shortcut[data-action=Correio]{display:none!important}.adventure-hud #server-presence{max-width:65px!important}}
@media(max-width:430px){.daily-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.daily-aside{display:flex}.daily-hero{min-height:280px}.adventure-hud .hud-place{display:none!important}.adventure-hud .hud-climate{min-width:75px;font-size:10px}.adventure-hud .hud-trainer{min-width:108px}.adventure-hud .hud-shortcut{width:27px!important}}
.community-window .festival-heading{justify-content:flex-start!important;gap:12px}.community-window .festival-heading>div{margin-right:auto;text-align:left}.community-window button.festival-close{font-size:28px!important;min-width:42px;min-height:42px}.daily-main{min-height:0}.daily-grid{grid-auto-rows:minmax(102px,1fr)}

/* All game surfaces remain inside the centered 1:1 frame, including top-layer dialogs. */
body.adventure-layout dialog.festival-window,body.adventure-layout dialog.community-window{width:var(--play-square,90vmin)!important;max-width:var(--play-square,90vmin)!important;height:var(--play-square,90vmin)!important;max-height:var(--play-square,90vmin)!important;box-sizing:border-box;margin:auto!important}
body.adventure-layout dialog{max-width:var(--play-square,90vmin)!important;max-height:var(--play-square,90vmin)!important;box-sizing:border-box}
body.adventure-layout main.game-shell{left:50%!important;overflow:visible}
body.adventure-layout.mobile-immersive #touch-controls{position:fixed!important;top:calc((100dvh - var(--play-square))/2)!important;left:calc((100vw - var(--play-square))/2)!important;width:var(--play-square)!important;height:var(--play-square)!important;padding:12px!important}
@media(min-width:1100px){.chat-docked #desktop-chat .desktop-chat-header>div{gap:1px}.chat-docked #desktop-chat .desktop-chat-header button{min-width:23px!important;padding:3px!important}.chat-docked #desktop-chat .desktop-chat-header strong{font-size:10px!important}}
body.adventure-layout .festival-window .festival-close{flex-shrink:0}.community-window .daily-layout{grid-template-columns:minmax(0,2.6fr) minmax(170px,1fr)}.community-window .daily-hero .community-item{width:84px;height:84px}.community-window .daily-hero{gap:8px;padding:10px}.community-window .daily-hero h3{font-size:17px}.community-window .daily-hero p{font-size:10px}.community-window .daily-next{padding:10px;gap:7px}.community-window .daily-summary p{margin:3px}.community-window .daily-card{min-height:100px}.community-window .mail-layout{grid-template-columns:minmax(205px,.85fr) minmax(240px,1.15fr)}
@media(max-height:790px) and (min-width:761px){.community-window .daily-grid{gap:4px}.community-window .daily-card{min-height:88px;gap:4px}.community-window .daily-card .community-item{width:32px;height:32px}.community-window .daily-summary strong{padding:8px}.community-window .daily-summary p{display:none}.community-window .daily-hero .community-item{width:64px;height:64px}.community-window .daily-next button{min-height:28px;padding:5px}.community-window .daily-hero p{margin:3px}.community-window .daily-grid{grid-auto-rows:minmax(88px,1fr)}}
@media(max-width:760px){.community-window .daily-layout{grid-template-columns:1fr}.community-window .mail-layout{display:flex}.community-window .festival-heading{height:68px!important;padding:8px}.community-window .festival-heading p{font-size:10px}.community-window .festival-heading h2{font-size:17px!important}.community-window .daily-layout,.community-window .mail-layout{height:calc(100% - 98px)}.community-window .mail-sidebar{max-height:240px}.community-window .daily-summary p{display:none}.npc-quest-body{max-height:calc(var(--play-square) - 120px)}}
body.adventure-layout dialog.community-window.npc-quest-window{height:auto!important;width:min(780px,var(--play-square))!important;max-height:var(--play-square)!important;min-height:0!important}

body.adventure-layout :is(#screen,main.game-shell) #adventure-hud{padding:0!important;overflow:hidden}
body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{display:flex!important;visibility:visible!important;flex-shrink:0}
body.adventure-layout #screen #desktop-chat #chat-form{background:#0c1828!important;border-color:#315779!important}
body.adventure-layout #screen #desktop-chat #chat-form input,body.adventure-layout #screen #desktop-chat #chat-form select{background:#06101d!important;color:#dbf5ff!important;border-color:#3b5973!important}
@container(max-width:1000px){.adventure-hud .hud-xp{display:none}.adventure-hud .hud-place{padding:4px;min-width:60px}.adventure-hud .hud-climate{padding:4px}.adventure-hud .hud-trainer{min-width:110px}}
/* Fixed overlays use viewport coordinates; do not create a transformed containing block. */
body.adventure-layout main.game-shell,body.adventure-layout.chat-docked main.game-shell{left:calc((100vw - var(--play-square,90vmin))/2)!important;top:calc((100dvh - var(--play-square,90vmin))/2)!important;transform:none!important}
body.adventure-layout #screen{clip-path:inset(0);overflow:hidden!important}
body.adventure-layout #screen #overlay,body.adventure-layout #screen #overlay[data-view=menu]{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
body.adventure-layout dialog.community-window.npc-quest-window{height:fit-content!important}
body.adventure-layout #screen #desktop-chat .chat-feedback{background:#0c1828!important}
body.adventure-layout::before,body.adventure-layout::after{display:none!important}
body.adventure-layout main #touch-controls{position:fixed!important;top:calc((100dvh - var(--play-square))/2)!important;left:calc((100vw - var(--play-square))/2)!important;right:auto!important;bottom:auto!important;width:var(--play-square)!important;height:var(--play-square)!important;box-sizing:border-box!important;padding:12px!important;align-items:flex-end!important;background:none!important}
html[data-mobile-client=true] body.adventure-layout #screen #mobile-chat{left:calc((100vw - var(--play-square))/2 + 8px)!important;right:auto!important;top:calc((100dvh - var(--play-square))/2 + 8px)!important;width:calc(var(--play-square) - 16px)!important;height:calc(var(--play-square) - 16px)!important;max-height:calc(var(--play-square) - 16px)!important;background:#091b2c!important;border-color:#44819b!important}
html[data-mobile-client=true] body.adventure-layout #screen #mobile-chat #chat-form{background:#091b2c!important}
html[data-mobile-client=true] body.adventure-layout #screen #mobile-chat #chat-form :is(input,select){background:#0d263d!important;color:#d8f5ff!important;border-color:#44819b!important}
body.adventure-layout :is(#screen,main.game-shell) #adventure-hud{overflow:visible}
body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence button{font-size:8px!important;min-height:17px!important;height:17px!important;padding:1px!important}
body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence>span{font-size:8px}
body.adventure-layout :is(#screen,main.game-shell) #adventure-hud{overflow:visible!important}
@media(max-width:760px){.community-window .daily-aside{order:-1}.community-window .daily-hero{min-height:0}.community-window .daily-hero .community-item{width:64px;height:64px}}

/* The three map scales remain available inside the square HUD. */
#adventure-hud .hud-zoom{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;flex:0 0 105px;padding:0 4px;box-sizing:border-box;align-self:center}
#adventure-hud .hud-zoom button{min-width:0;height:30px;padding:0 3px;border:1px solid #386878;border-radius:3px;background:#102630;color:#b8dde7;font:700 10px system-ui;cursor:pointer}
#adventure-hud .hud-zoom button[aria-pressed=true]{color:#fff;background:#18516a;border-color:#6ce8ff;box-shadow:inset 0 -2px #6ce8ff}
#adventure-hud .hud-zoom button:focus-visible{outline:2px solid #ffe57b;outline-offset:1px}
@container (max-width:760px){#adventure-hud .hud-zoom{grid-template-columns:1fr;flex-basis:37px;gap:1px;padding:0 2px}#adventure-hud .hud-zoom button{height:17px;font-size:9px}}
@media(max-width:430px){#adventure-hud .hud-trainer{min-width:85px}#adventure-hud .hud-shortcut[data-action="Pokéloja"]{display:none}#adventure-hud #server-presence{width:72px;min-width:72px}}

@media(max-width:430px){
 body.adventure-layout :is(#screen,main.game-shell) #adventure-hud{flex-wrap:nowrap!important}
 body.adventure-layout :is(#screen,main.game-shell) #adventure-hud .hud-trainer{flex:1 1 0!important;min-width:80px!important;padding:2px}
 body.adventure-layout :is(#screen,main.game-shell) #adventure-hud .hud-climate{flex:0 0 64px;min-width:64px;padding:2px}
 body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{flex:0 0 64px!important;min-width:64px!important;width:64px!important;padding:1px!important}
}

/* Phones and the installed app follow the device viewport, not the desktop square. */
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout main.game-shell{
 left:var(--play-left,0px)!important;top:var(--play-top,0px)!important;right:auto!important;bottom:auto!important;
 width:var(--play-width,100vw)!important;height:var(--play-height,100dvh)!important;max-width:none!important;max-height:none!important;transform:none!important;border:0!important;padding:0!important;margin:0!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout main.game-shell #screen{
 width:var(--play-width,100vw)!important;height:var(--play-height,100dvh)!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout main #touch-controls{
 top:var(--play-top,0px)!important;left:var(--play-left,0px)!important;width:var(--play-width,100vw)!important;height:var(--play-height,100dvh)!important;
 padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout dialog{
 max-width:var(--play-width,100vw)!important;max-height:var(--play-height,100dvh)!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout dialog:is(.festival-window,.community-window){
 width:var(--play-width,100vw)!important;height:var(--play-height,100dvh)!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout dialog.community-window.npc-quest-window{
 width:min(780px,var(--play-width,100vw))!important;height:fit-content!important;
}
html:is([data-mobile-client=true],[data-native-client=true]) body.adventure-layout .npc-quest-body{max-height:calc(var(--play-height,100dvh) - 120px)}
html[data-mobile-client=true] body.adventure-layout #screen #mobile-chat{
 left:calc(var(--play-left,0px) + 8px)!important;top:calc(var(--play-top,0px) + 8px)!important;
 width:calc(var(--play-width,100vw) - 16px)!important;height:calc(var(--play-height,100dvh) - 16px)!important;max-height:calc(var(--play-height,100dvh) - 16px)!important;
}
/* /post: 20% larger on desktop browsers; mobile/native overrides below stay unchanged. */
#global-broadcast[data-kind="post"]{transform:translateX(-50%) scale(.6)!important;transform-origin:50% 100%;font-size:clamp(18.72px,3.12vw,31.2px)!important}
/* Native and small-screen clients use unscaled, legible text and safe margins. */
html[data-native-client=true] #global-broadcast[data-kind="post"],html[data-mobile-client=true] #global-broadcast[data-kind="post"]{transform:translateX(-50%)!important;font-size:clamp(16.9px,2.73vw,20.8px)!important;line-height:1.4;width:min(88vw,560px);padding:10px 14px;border-width:1px;border-radius:10px;bottom:calc(var(--touch-reserve,0px) + env(safe-area-inset-bottom,0px) + 14px)}
@media(max-width:600px){#global-broadcast[data-kind="post"]{transform:translateX(-50%)!important;font-size:18.2px!important;line-height:1.4;width:calc(100vw - 32px);padding:10px 14px;border-width:1px;border-radius:10px;bottom:calc(var(--touch-reserve,0px) + env(safe-area-inset-bottom,0px) + 14px)}}

#contest-painting{width:min(90%,520px);text-align:center;padding-bottom:20px}.contest-painting-frame{margin:24px auto 12px;width:min(70%,280px);padding:20px;background:radial-gradient(ellipse,#e6e5a8,#88a486);border:10px ridge #d2ad53;box-shadow:0 8px 28px #0008}.contest-painting-frame .pokemon-sprite{display:block;width:100%;height:auto;image-rendering:pixelated}.contest-painting-frame figcaption{color:#302816;background:#f6e7b4;padding:6px;font-weight:700}.contest-painting-caption{color:#b5dbe5}
/* Readable online/audio controls in the desktop HUD. */
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence {
 display:grid!important;grid-template-columns:1fr 1fr;grid-template-rows:16px 34px;
 width:196px!important;max-width:196px!important;min-width:196px!important;
 gap:4px 6px!important;padding:3px 8px!important;align-content:center;align-items:stretch;
 height:60px!important;max-height:none!important;overflow:visible!important;letter-spacing:normal;
}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence>span {
 grid-column:1/-1;font-size:13px!important;line-height:16px;font-weight:600;
}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence>button {
 width:100%!important;height:34px!important;min-height:34px!important;min-width:0!important;
 padding:5px 7px!important;font-size:12px!important;line-height:20px!important;
 border-radius:5px!important;white-space:nowrap;clip-path:none!important;color:#e8f8ff!important;font-weight:600!important;
}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-online-list {
 top:calc(100% + 6px)!important;right:0!important;width:320px!important;
 max-width:calc(100vw - 32px)!important;max-height:min(380px,60vh)!important;
 box-sizing:border-box;padding:16px!important;font:14px/1.5 system-ui!important;
 border-radius:8px;box-shadow:0 10px 28px #0008;z-index:100;letter-spacing:normal;
}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud #server-online-list>strong {font-size:16px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud #server-online-list ul {padding:0;margin:10px 0 0;list-style:none}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud #server-online-list li {padding:7px 4px;border-top:1px solid #416773;overflow-wrap:anywhere}
@container(max-width:1000px){
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud :is(.hud-place,.hud-climate,.hud-money){display:none!important}
}
/* Compact identity and direct storefronts share the existing HUD height. */
body.adventure-layout #adventure-hud .hud-trainer{flex:0 1 194px;min-width:142px;grid-template-columns:38px minmax(0,1fr);grid-template-rows:34px 6px;gap:2px 8px;padding:5px 10px}
body.adventure-layout #adventure-hud .hud-avatar{grid-row:1/3;width:38px;height:38px}
body.adventure-layout #adventure-hud .hud-identity{min-width:0}
body.adventure-layout #adventure-hud .hud-identity strong{font:700 12px/1.2 system-ui;max-width:100%;letter-spacing:.03em}
body.adventure-layout #adventure-hud .hud-identity small{font:800 10px/1.2 system-ui;margin-top:3px;padding:1px 5px}
body.adventure-layout #adventure-hud .hud-xp{display:block;grid-column:2;width:100%;height:5px;margin:0}
body.adventure-layout #adventure-hud .hud-place{flex:0 1 148px;min-width:82px;padding:6px 10px}
body.adventure-layout #adventure-hud .hud-place strong{font-size:12px;letter-spacing:.03em}
body.adventure-layout #adventure-hud .hud-commerce{background:none!important;box-shadow:none!important;border-radius:0!important;display:flex;flex:1 0 222px;align-items:center;justify-content:center;gap:8px;padding:7px 10px;border:0}
body.adventure-layout #adventure-hud .hud-commerce-button{display:flex;flex:1 1 0;align-items:center;justify-content:center;gap:8px;min-width:98px;max-width:180px;height:44px;align-self:center;padding:5px 12px;border:1px solid #d2aa57;border-radius:8px!important;background:linear-gradient(135deg,#594523,#29302c);color:#fff0bb;box-shadow:inset 0 1px #fff5c533,0 2px 5px #0004;font:800 12px/1.2 system-ui;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;transition:background .15s,border-color .15s}
body.adventure-layout #adventure-hud .hud-commerce-market{background:linear-gradient(135deg,#19465c,#132936);border-color:#57c4e6;color:#d6f6ff}
body.adventure-layout #adventure-hud .hud-commerce-button:hover{background:#66502b;border-color:#ffe194}
body.adventure-layout #adventure-hud .hud-commerce-market:hover{background:#235771;border-color:#a2ecff}
#adventure-hud .hud-commerce-icon{display:block;flex:0 0 30px;width:30px;height:30px;background:url('/assets/ui/trainer-menu-atlas-v1.png') 33.333% 33.333% / 400% 400% no-repeat;filter:drop-shadow(0 2px 2px #0008)}
#adventure-hud .hud-commerce-market .hud-commerce-icon{background:url('/menu-icons/v22/market.png') center / contain no-repeat}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-zoom{grid-template-columns:1fr;flex-basis:36px;padding:0 3px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-zoom button{cursor:default}
@container(max-width:1100px){
 body.adventure-layout #adventure-hud .hud-trainer{flex-basis:158px;min-width:138px;padding:5px 6px}
 body.adventure-layout #adventure-hud .hud-commerce{flex-basis:202px;padding:6px;gap:5px}
 body.adventure-layout #adventure-hud .hud-commerce-button{font-size:11px;padding:4px 7px;gap:5px;min-width:92px}
 body.adventure-layout #adventure-hud .hud-commerce-icon{width:26px;height:26px;flex-basis:26px}
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{width:160px!important;min-width:160px!important;max-width:160px!important;padding:3px 5px!important}
}
@container(max-width:760px){
 body.adventure-layout #adventure-hud .hud-commerce{flex:0 0 86px;padding:3px;gap:4px}
 body.adventure-layout #adventure-hud .hud-commerce-button{min-width:0;width:38px;height:36px;padding:3px;gap:0;border-radius:6px}
 body.adventure-layout #adventure-hud .hud-commerce-label{display:none}
 body.adventure-layout #adventure-hud .hud-trainer{flex:0 1 118px;min-width:100px;grid-template-columns:30px minmax(0,1fr);gap:2px 4px;padding:4px}
 body.adventure-layout #adventure-hud .hud-avatar{width:30px;height:30px}
 body.adventure-layout #adventure-hud .hud-identity strong{font-size:10px}
 body.adventure-layout #adventure-hud :is(.hud-place,.hud-climate,.hud-money){display:none!important}
 body.adventure-layout #adventure-hud .hud-shortcut:is([data-action='Recompensa diária'],[data-action='Correio'],[data-action='Pokédex'],[data-action='Eventos'],[data-action='Pokémon'],[data-action='Bolsa']){display:none!important}
}

@container(max-width:760px){
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-commerce{flex:1 0 202px}
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-commerce-label{display:inline}
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-commerce-button{gap:5px;padding:4px 7px}
}

.classic-popup .item-recipient{display:grid;grid-template-columns:1fr;gap:5px;min-width:min(320px,70vw);padding:10px 12px;text-align:left}.item-recipient progress{width:100%;height:10px;accent-color:#36bf82}.item-recipient progress[data-health=low]{accent-color:#ed6060}.item-recipient progress[data-health=medium]{accent-color:#e6bb46}.item-recipient small{font-size:.8em;white-space:normal}

#global-broadcast[data-kind="notice"]{font-size:clamp(9px,1.5vw,15px)!important;padding:8px 12px;}

/* Quest conversations fade in without a full-screen brightness jump. */
.npc-quest-window[open],.npc-quest-window[open]::backdrop{animation:quest-dialog-enter 140ms ease-out both}
@keyframes quest-dialog-enter{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.npc-quest-window[open],.npc-quest-window[open]::backdrop{animation:none}}

/* Use the actual game-frame width, including the desktop map-size controls. */
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout main.game-shell.desktop-map-frame{container-type:inline-size;container-name:desktop-game-frame}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout main.game-shell.desktop-map-frame > #adventure-hud{
 display:grid!important;height:98px!important;grid-template-columns:minmax(142px,1fr) minmax(84px,.9fr) 86px 82px minmax(214px,1.3fr) 36px;grid-template-rows:repeat(2,minmax(0,1fr));align-items:center;
}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-trainer{grid-area:1/1;height:100%!important;min-height:0;min-width:0;grid-template-columns:36px minmax(0,1fr);grid-template-rows:30px 5px;align-content:center;padding:4px 8px;gap:2px 6px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-avatar{width:36px;height:36px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-identity strong{max-width:none;font-size:12px;line-height:14px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-identity small{font-size:10px;line-height:12px;padding:1px 5px;margin-top:2px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-xp{display:block!important;height:5px;margin:0}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud :is(.hud-place,.hud-climate,.hud-money){display:flex!important;min-width:0;flex-direction:column;justify-content:center;white-space:nowrap;padding:4px 8px;font-size:12px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-place{grid-area:1/2}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-place strong{max-width:100%;overflow:hidden;text-overflow:ellipsis}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-climate{grid-area:1/3}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-money{grid-area:1/4;padding:4px;text-align:center}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-commerce{grid-area:1/5;min-width:0;padding:3px 6px;gap:5px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-commerce-button{height:36px;min-width:0;max-width:144px;padding:3px 6px;gap:5px;font-size:11px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-commerce-label{display:inline}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-commerce-icon{width:24px;height:24px;flex-basis:24px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-zoom{grid-area:1/6;padding:3px}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-actions{grid-area:2/1/3/5;border-right:0;padding:3px;gap:2px;min-width:0}
html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-shortcut{display:flex!important;flex-shrink:0;width:32px!important;height:36px!important}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{grid-area:2/5/3/7;justify-self:end;align-self:center;height:42px!important;min-height:42px!important;max-height:42px!important;grid-template-rows:14px 26px!important;width:170px!important;min-width:0!important;max-width:170px!important;padding:0 4px!important;gap:2px!important}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence>span{font-size:11px!important;line-height:14px}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence>button{height:26px!important;min-height:26px!important;padding:2px 5px!important;font-size:11px!important;line-height:18px!important}
@container desktop-game-frame (min-width:1170px){
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout main.game-shell.desktop-map-frame > #adventure-hud{height:68px!important;grid-template-columns:minmax(142px,1fr) minmax(84px,.9fr) 86px 82px minmax(214px,1.3fr) 36px 274px 170px;grid-template-rows:minmax(0,1fr)}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-actions{grid-area:1/7}
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{grid-area:1/8}
}
@container desktop-game-frame (max-width:700px){
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout main.game-shell.desktop-map-frame > #adventure-hud{height:132px!important;grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-trainer{grid-area:1/1/2/4}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-place{grid-area:1/4/2/6}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-climate{grid-area:1/6/2/8}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-money{grid-area:1/8/2/10}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-zoom{grid-area:1/10}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-commerce{grid-area:2/1/3/7}
 html:not([data-mobile-client=true]):not([data-native-client=true]) #adventure-hud .hud-actions{grid-area:3/1/4/11}
 html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout :is(#screen,main.game-shell) #adventure-hud #server-presence{grid-area:2/7/3/11;width:100%!important;max-width:170px!important}
}

/* Keep the original HUD height; constrain labels to their existing grid cells. */
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud :is(.hud-identity,.hud-place,.hud-climate,.hud-money,.hud-commerce,.hud-actions){min-width:0!important;box-sizing:border-box;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-identity strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-place strong{display:block;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-place small,html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-climate small{display:block;max-width:100%;font-size:9px!important;line-height:1.3;letter-spacing:.15px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-climate strong{font-size:11px!important;letter-spacing:.3px!important;font-variant-numeric:tabular-nums;white-space:nowrap;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-money{font-size:10px!important;font-variant-numeric:tabular-nums;letter-spacing:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-commerce-button{box-sizing:border-box!important;min-width:0!important;overflow:hidden;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-commerce-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.15px!important;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-actions{align-items:center!important;justify-content:flex-start!important;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-shortcut{align-items:center!important;justify-content:center!important;}
html:not([data-mobile-client=true]):not([data-native-client=true]) body.adventure-layout #adventure-hud .hud-zoom{align-self:center!important;box-sizing:border-box!important;}
