/* Shared platform chrome. Card, board, player and resource colors remain game-owned. */
html[data-play-ui]{--play-font:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;--play-ink:#202536;--play-muted:#606572;--play-surface:#fff;--play-line:#e4e7eb;--play-soft:#f4f5f7;--play-accent:#ff642d;--play-focus:#cf4516;font-family:var(--play-font)}
html[data-play-ui] body{font-family:var(--play-font)}
html[data-play-ui][data-theme=dark]{--play-ink:#f1eee7;--play-muted:#b1b4be;--play-surface:#1b1f28;--play-line:#3d424e;--play-soft:#292e38;--play-focus:#ff9b76}
html[data-play-ui] :where(button,input,select,textarea){font-family:inherit}
html[data-play-ui] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--play-focus);outline-offset:3px}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header){background:var(--play-surface)!important;color:var(--play-ink)!important;border-bottom:1px solid var(--play-line)!important;min-height:72px;height:auto;box-shadow:none;z-index:40}
html[data-play-ui] :is(header.site-header,header.play-game-header) :is(.header-inner,.play-game-header-inner){min-height:72px;height:auto;padding-block:12px}
html[data-play-ui] :is(header.game-header,header.app-header,header.topbar,header.table-header){padding-block:12px}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) :is(a,button,nav,.header-game,.game-name,.game-title,.brand-chinese,.play-label,.header-note){color:var(--play-ink)!important}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) :is(.header-divider,.brand-divider,.play-game-divider,.game-divider){border-color:var(--play-line);background:var(--play-line)}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) .wg-brand__wordmark{width:112px;height:auto;max-width:100%}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) .wg-brand--inverse .wg-brand__wordmark{filter:brightness(.15)}
html[data-play-ui][data-theme=dark] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) .wg-brand--inverse .wg-brand__wordmark{filter:none}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) button:not(.table-brand):not(.account-menu button):not(.mode-tab){min-height:40px;border-radius:8px;font-size:12px;font-weight:650;background:transparent;border-color:var(--play-line);box-shadow:none}
html[data-play-ui] :is(.primary-button,.button.primary){border-radius:10px;background:var(--play-accent);color:#202536;border-color:var(--play-accent);font-weight:750;min-height:44px}
html[data-play-ui] :is(.secondary-button,.subtle-button){border-radius:10px;min-height:40px}
html[data-play-ui] :is(dialog,.modal,.dialog-panel,.modal-panel,.modal-card,.modal-content){border-radius:16px}
html[data-play-ui] dialog::backdrop{background:#11182788;backdrop-filter:blur(3px)}
html[data-play-ui] :is(.game-card,.friend-room,.lobby-side-panel){border-radius:16px}
@media(hover:hover){html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) button:not(:disabled):not(.table-brand):hover{background:var(--play-soft)}html[data-play-ui] :is(.primary-button,.button.primary):hover:not(:disabled){background:#ff7a4b}}
@media(max-width:760px){html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header){min-height:60px}html[data-play-ui] :is(header.site-header,header.play-game-header) :is(.header-inner,.play-game-header-inner){min-height:60px;padding-block:8px}html[data-play-ui] :is(header.game-header,header.app-header,header.topbar,header.table-header){padding-block:8px}html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) .wg-brand__wordmark{width:88px}html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) button:not(.table-brand):not(.account-menu button):not(.mode-tab){min-height:40px;font-size:11px}}
@media(prefers-reduced-motion:reduce){html[data-play-ui] :is(button,a){scroll-behavior:auto;transition:none}}

/* Viewport geometry shared by standalone games; each board keeps its own art. */
html[data-play-ui] :is(#root,main,.game-shell,.page-main){min-width:0}
html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) :is(nav,.header-inner,.play-game-header-inner,.topbar-actions,.header-actions){min-width:0}
html[data-play-ui] :is(dialog,.modal-panel,.modal-card,.modal-content){box-sizing:border-box;max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
html[data-play-ui] dialog :is(input,select,textarea){min-width:0;max-width:100%}
@media(max-width:1024px){
 html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) :is(nav,.topbar-actions,.header-actions){flex-wrap:wrap;gap:6px}
 html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header){height:auto}
}
@media(max-width:600px){
 html[data-play-ui] :is(dialog,.modal-panel,.modal-card,.modal-content) :is(input,select,textarea){font-size:16px}
 html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header){padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
 html[data-play-ui] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header) :is(.header-inner,.play-game-header-inner){flex-wrap:wrap;height:auto;gap:8px}
 html[data-play-ui] :is(header.game-header,header.app-header,header.topbar,header.table-header){flex-wrap:wrap;gap:8px}
 html[data-play-ui] .table-header-tools{flex-wrap:wrap;gap:4px;max-width:100%}
}

/* Real game toolbars keep a touch target even when a game uses a compact icon. */
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header) :is(button,summary,a){box-sizing:border-box;min-width:44px!important;min-height:44px!important;touch-action:manipulation}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header) a{display:inline-flex;align-items:center}
@media(max-width:1024px){
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header){height:auto!important;min-width:0;max-width:100%;flex-wrap:wrap}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header) :is(.header-inner,.play-game-header-inner,.wge-header-inner){height:auto!important;min-width:0;max-width:100%;flex-wrap:wrap;gap:4px 8px}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header) :is(nav,.top-actions,.topbar-actions,.header-actions,.header-right,.header-tools,.table-header-tools){min-width:0;max-width:100%;flex-wrap:wrap;gap:4px}
}
@media(max-width:600px){
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header) .wango-locale-control button[aria-pressed=true]{display:none}
}

/* Older game bundles share the same avatar markup until their next source build. */
html[data-play-ui] [data-ai-character]>span[aria-hidden="true"]:is([style*="position:absolute"],[style*="position: absolute"]){display:none!important}

/* Compact navigation also reaches older game bundles through the shared stylesheet. */
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header){
 --play-header-height:56px;box-sizing:border-box;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;height:var(--play-header-height)!important;min-height:var(--play-header-height)!important;max-height:var(--play-header-height)!important;width:100%;max-width:100%;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))!important;margin:0;background:var(--play-surface)!important;color:var(--play-ink)!important;border-bottom:1px solid var(--play-line)!important;box-shadow:none;position:relative;z-index:40
}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(.header-inner,.play-game-header-inner,.wge-header-inner){display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;height:56px!important;min-height:56px!important;width:100%;max-width:1440px;min-width:0;margin:0 auto;padding:0!important}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(nav,.top-actions,.topbar-actions,.header-actions,.header-right,.header-tools,.table-header-tools,.aero-header-tools,.go-header-tools,.race-header-actions){display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:4px!important;width:auto!important;min-width:0;max-width:none;margin-left:auto;flex:0 0 auto}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wg-brand__wordmark{width:88px!important;height:auto!important;max-width:none}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(.wg-brand,.wg-brand--compact){width:auto!important;max-width:none;flex-shrink:0}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(button,summary,a){white-space:nowrap;flex-shrink:0}
html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wango-play-identity-tools{display:inline-flex;align-items:center;flex-wrap:nowrap!important;gap:4px;max-width:none;flex:0 0 auto}
html[data-play-ui][data-play-game] .wge-header .wge-header-rules{display:inline-flex!important;align-items:center;justify-content:center;gap:6px}
html[data-play-ui][data-play-game] .wge-header .wge-back-lobby{display:inline-flex!important;align-items:center;justify-content:center;gap:6px}
@media(max-width:1024px){
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(h1,.wge-session-title,.k-wordmark,.header-game,.header-game-title,.game-name,.game-title,.header-note,.header-preview,.mode-label,.game-wordmark,.az-title,.header-divider,.brand-divider,.play-game-divider,.game-divider,.wge-header-divider,.go-header-divider,.go-header-caption,.go-header>strong){display:none!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(nav,.top-actions,.topbar-actions,.header-actions,.header-right,.header-tools,.table-header-tools,.go-header-tools,.race-header-actions) :is(button,a):not(.wa-menu>div *):has(svg),
 html[data-play-ui][data-play-game] :is(.wge-header .wge-back-lobby,.aero-header .aero-back){font-size:0!important;gap:0!important;width:44px!important;height:44px!important;padding:0!important;justify-content:center!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(nav,.top-actions,.topbar-actions,.header-actions,.header-right,.header-tools,.table-header-tools,.go-header-tools,.race-header-actions) :is(button,a):not(.wa-menu>div *)>span:not(:has(img,svg)):not([role=img]):not(.player-account-avatar),
 html[data-play-ui][data-play-game] :is(.wge-back-lobby,.aero-back)>span{display:inline!important;position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wa-menu>summary>span:last-child{display:none!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wango-locale-control button[aria-pressed=true]{display:none!important}
}
@media(max-width:600px){
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header){gap:4px!important;padding-inline:max(6px,env(safe-area-inset-left))!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wg-brand__wordmark{width:68px!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) :is(nav,.top-actions,.topbar-actions,.header-actions,.header-right,.header-tools,.table-header-tools,.aero-header-tools,.go-header-tools,.race-header-actions){gap:0!important}
 html[data-play-ui][data-play-game] :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.wge-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wango-play-identity-tools{gap:0!important}
}
/* Guest sign-in occupies the same slot as the signed-in account avatar. */
html[data-play-ui][data-play-game] :is(header.wge-header,header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wango-play-identity-tools>a.wa-link{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px!important;width:44px!important;height:44px!important;padding:0!important;font-size:0!important;border:0;background:transparent}
html[data-play-ui][data-play-game] :is(header.wge-header,header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.k-header,header.aero-header,header.j-header,header.header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header) .wango-play-identity-tools>a.wa-link:before{content:'';display:block;width:21px;height:21px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' d='M20 21v-2a7 7 0 0 0-14 0v2M17 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0'/%3E%3C/svg%3E") center/contain no-repeat}
html[data-play-ui][data-play-game] :is(.j-header,.jq-header)>div{display:flex;align-items:center;gap:4px;margin-left:auto;flex-wrap:nowrap}
html[data-play-ui][data-play-game] .ch-header:before{content:'WANGO';font:900 16px/1 var(--play-font);letter-spacing:-1px;flex-shrink:0}
html[data-play-ui][data-play-game] .go-wordmark{font:900 16px/1 var(--play-font);letter-spacing:-1px;color:var(--play-ink)}
@media(max-width:1024px){
 html[data-play-ui][data-play-game] :is(.ch-header,.x-room-header)>button:first-child{font-size:0;padding:0;width:44px;min-height:44px}
 html[data-play-ui][data-play-game] :is(.ch-header,.x-room-header)>button:first-child:before{content:'‹';font:28px/1 sans-serif}
 html[data-play-ui][data-play-game] .j-header>a>span{font-size:14px;font-weight:900}
}
/* Unresolved identities in legacy bundles use the same neutral placeholder. */
html[data-play-ui] [data-ai-character="unknown"]>span[aria-hidden="true"]:not([style*="position:absolute"]):not([style*="position: absolute"]){font-size:0!important}
html[data-play-ui] [data-ai-character="unknown"]>span[aria-hidden="true"]:not([style*="position:absolute"]):not([style*="position: absolute"])::after{content:'◇';font:14px/1 system-ui,sans-serif}
@media(max-width:1024px){
 html[data-play-ui][data-play-game] :is(header.app-header,header.football-header,header.race-header)>:is(button,a):not(.wa-menu>div *):has(svg){font-size:0!important;width:44px!important;height:44px!important;padding:0!important;gap:0!important;justify-content:center}
 html[data-play-ui][data-play-game] :is(header.app-header,header.football-header,header.race-header)>:is(button,a):not(.wa-menu>div *):has(svg)>span:not(:has(img,svg)):not([role=img]):not(.player-account-avatar){display:inline!important;position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
 html[data-play-ui][data-play-game] .football-brand :is(div,p){display:none!important}
 html[data-play-ui][data-play-game] .app-header>a[href*="mode=arena"]{font-size:0!important;width:44px!important;justify-content:center;padding:0}
 html[data-play-ui][data-play-game] .app-header>a[href*="mode=arena"]:before{content:'♜';font:23px/1 serif}
}
html[data-play-ui][data-play-game] :is(header.k-header,header.aero-header,header.j-header,header.ch-header,header.jq-header,header.go-header,header.header,header.wge-header) .wg-brand--inverse .wg-brand__wordmark{filter:brightness(.15)}
html[data-play-ui][data-play-game][data-theme=dark] :is(header.k-header,header.aero-header,header.j-header,header.ch-header,header.jq-header,header.go-header,header.header,header.wge-header) .wg-brand--inverse .wg-brand__wordmark{filter:none}
html[data-play-ui][data-play-game] :is(header.wge-header,header.k-header,header.aero-header,header.j-header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header,header.header) :is(button,summary,a){box-sizing:border-box;min-width:44px!important;min-height:44px!important;color:var(--play-ink)!important}
html[data-play-ui][data-play-game] header.k-header .wango-play-identity-tools,html[data-play-ui][data-play-game] header.k-header .wa-menu{color:var(--play-ink)!important}
html[data-play-ui][data-play-game] header.k-header .wango-locale-control{background:var(--play-soft)!important;border-color:var(--play-line)!important;color:var(--play-ink)!important}
@media(max-width:600px){html[data-play-ui][data-play-game] .football-header .football-brand{display:none!important}}
/* Entry gates keep their own shared header; leave dormant game chrome hidden. */
html[data-play-ui][data-play-game] body:has(.wango-game-entry) :is(header.site-header,header.game-header,header.app-header,header.topbar,header.table-header,header.play-game-header,header.az-header,header.football-header,header.k-header,header.aero-header,header.j-header,header.ch-header,header.jq-header,header.go-header,header.x-room-header,header.race-header,header.online-header,header.tournament-game-header,header.header){display:none!important}
@media(min-width:1025px){
 html[data-play-ui][data-play-game=balatro] .game-header nav{flex:0 0 auto!important;width:max-content!important;max-width:none!important}
 html[data-play-ui][data-play-game=balatro] .game-header .balatro-header-menu{flex:none;min-width:max-content}
 html[data-play-ui][data-play-game=balatro] .game-header .balatro-header-tools{width:max-content;flex-wrap:nowrap}
}
@media(min-width:1025px){
 html[data-play-ui][data-play-game=balatro] .game-header .balatro-header-menu>summary{display:none!important}
 html[data-play-ui][data-play-game=balatro] .game-header .balatro-header-tools{position:static!important;inset:auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;width:max-content!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
}
/* Account cloud controls share one viewport-safe surface across all game bundles. */
.wa-menu>div:has(.wp-sync-inline){width:min(310px,calc(100vw - 24px));max-height:calc(100dvh - 90px);overflow-y:auto;overscroll-behavior:contain}.wa-menu .wp-sync-inline .wp-panel{min-width:0;overflow-wrap:anywhere}.wa-menu .wp-sync-inline .wp-actions{flex-wrap:wrap}.wa-menu .wp-panel header>button{flex-shrink:0;white-space:nowrap;align-self:flex-start}
.wa-menu .wp-sync-inline button.wp-toggle,.wa-menu .wp-sync-inline button.wp-toggle:hover,.wa-menu .wp-sync-inline button.wp-toggle:focus-visible{background:#203d36!important;color:#fff!important;border-color:#203d36!important}
@media(max-width:800px){.wa-menu>div:has(.wp-sync-inline){position:fixed;left:12px;right:12px;top:72px;width:auto;max-height:calc(100dvh - 84px)}}

html:root[data-play-ui][data-play-game] body .wge-compact-header{height:auto!important;padding-block:0!important;max-height:none!important;min-height:39px!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner{position:relative;display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto!important;align-items:center;gap:8px!important;min-height:39px!important;height:auto!important;padding-block:5.2px!important;flex-wrap:wrap!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-divider,html:root[data-play-ui][data-play-game] body .wge-compact-header :is(.wge-back-lobby,.wge-header-rules)>span{display:none!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-session-title{display:block!important;grid-area:auto!important;position:static!important;left:auto!important;transform:none!important;top:auto!important;grid-column:3!important;grid-row:1!important;justify-self:start!important;min-width:0!important;text-align:left;line-height:1.375!important;overflow:hidden;text-overflow:ellipsis;margin:0!important;font-size:16px;color:#26352f!important;font-weight:700;max-width:200px!important;white-space:nowrap}
html:root[data-play-ui][data-play-game] body .wge-compact-header nav{grid-column:4!important;grid-row:1!important;flex-wrap:nowrap!important;display:flex!important;align-items:center;gap:5.2px!important;width:auto!important;flex:0 1 auto!important;min-width:0!important;margin:0!important;position:static!important;justify-self:end}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wango-play-identity-tools{display:contents!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header :is(.wge-header-rules,.wgt-icon,.wge-back-lobby,.wango-locale-compact,.wa-menu>summary){display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box;width:28.6px!important;min-width:28.6px!important;height:28.6px!important;min-height:28.6px!important;padding:0!important;flex-shrink:0!important;border:.65px solid #dce1dc!important;border-radius:7.8px!important;background:#fafbf8!important;color:#26352f!important;box-shadow:none!important;font:600 8.45px/1 system-ui}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wa-menu>summary>span:last-child{display:none!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header svg{width:13px;height:13px;stroke-width:2}
html:root[data-play-ui][data-play-game] body .wge-compact-header :is(button,summary,a):focus-visible{outline:2px solid #286c60!important;outline-offset:2px}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wa-menu{display:block!important;position:relative;flex-shrink:0}
html:root[data-play-ui][data-play-game] body .wge-compact-header :is(.player-account-avatar,.player-account-avatar .wa-portrait){display:inline-flex!important;width:32px!important;height:32px!important;flex-shrink:0}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings{box-sizing:border-box;width:min(420px,calc(100vw - 24px))!important;max-width:420px!important;max-height:calc(100dvh - 32px);overflow:auto;margin:auto!important;padding:20px!important;border:1px solid #dce1dc;border-radius:16px;background:#fffef8;color:#26352f}
.wgt-settings::backdrop{background:#17282180;backdrop-filter:blur(3px)}
.wgt-settings>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.wgt-settings h2{font-size:18px;margin:0}.wgt-settings header button{width:44px;height:44px;background:transparent;border:0}.wgt-settings-items{display:grid;gap:12px;margin-top:16px}.wgt-settings-items>label{display:flex;align-items:center;justify-content:space-between;min-height:44px;gap:12px}.wgt-settings-items>button{min-height:44px;border:1px solid #dce1dc;border-radius:10px;background:#fafbf8;color:inherit}
@media(max-width:600px){html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner:not([data-wgt-layout="single"]){grid-template-columns:auto auto minmax(0,1fr)!important}html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner:not([data-wgt-layout="single"]) .wge-session-title{position:static!important;left:auto!important;top:auto!important;transform:none!important;grid-column:3!important;grid-row:1!important;justify-self:start!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner:not([data-wgt-layout="single"]) nav{grid-column:1/-1!important;grid-row:2!important;flex-wrap:wrap!important;max-width:100%;justify-self:center!important;justify-content:center!important}}
html[data-wango-reduce-motion] *,html[data-wango-reduce-motion] *::before,html[data-wango-reduce-motion] *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wango-game-audio{width:28.6px!important;min-width:28.6px!important;height:28.6px!important;min-height:28.6px!important;padding:0!important;border:.65px solid #dce1dc!important;border-radius:7.8px!important;background:#fafbf8!important;color:#26352f!important}
html:has(.wge-compact-header) .wango-locale-global{display:none!important}
.wgt-service-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px}.wgt-service-settings>a,.wgt-service-settings>button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid #dce1dc;border-radius:10px;color:inherit;background:#fafbf8;text-decoration:none;font:inherit}.wango-ai-launcher[hidden]{display:none!important}
.wgt-context-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;padding:4px 12px}.wgt-context-actions:empty{display:none}.wgt-context-actions>button,.wgt-context-actions>a{min-height:44px}
html:root[data-play-ui][data-play-game] body dialog:has(>.wgt-settings-content){width:min(420px,calc(100vw - 24px))!important;max-width:420px!important;max-height:calc(100dvh - 32px);padding:20px!important;overflow:auto}
.wgt-settings-content>header{display:flex;align-items:center;justify-content:space-between}.wgt-settings-content>header h2{font-size:18px;margin:0}.wgt-settings-content>header button{width:44px;height:44px;border:0;background:transparent}
.wgt-speed{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28.6px;height:28.6px;border:.65px solid #dce1dc;border-radius:7.8px;background:#fafbf8;color:#26352f;font:600 8.45px system-ui;box-sizing:border-box}.wgt-speed select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.wgt-speed:has(select:focus-visible){outline:2px solid #286c60;outline-offset:2px}
.wgt-settings-actions{display:grid;gap:12px}.wgt-settings-actions>button{min-height:44px;border:1px solid #dce1dc;border-radius:10px;background:#fafbf8;color:inherit}
.wgt-context-actions>:is(button,a){display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:8px 12px;border:1px solid #dce1dc;border-radius:10px;background:#fafbf8;color:#26352f;font:600 13px/1.3 system-ui;text-decoration:none}

html:root[data-play-ui][data-play-game][data-wango-input="pointer"] body .wge-compact-header :is(button,summary,a):focus{outline:none!important;box-shadow:none!important}
html:root[data-play-ui][data-play-game][data-wango-input="keyboard"] body .wge-compact-header :is(button,summary,a):focus-visible{outline:2px solid #286c60!important;outline-offset:2px!important;box-shadow:none!important}

/* Settings stay attached to their toolbar trigger and leave the playfield readable. */
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown{position:fixed!important;inset:auto!important;left:var(--wgt-left,12px)!important;top:var(--wgt-top,72px)!important;margin:0!important;width:min(320px,calc(100vw - 24px))!important;max-width:320px!important;max-height:var(--wgt-max-height,calc(100dvh - 84px))!important;padding:16px!important;overflow:auto!important;border:1px solid #dce1dc!important;border-radius:14px!important;background:#fffef8!important;color:#26352f!important;box-shadow:0 8px 28px #17282124!important;animation:none!important;transform:none!important}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown::backdrop{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown h2{font:700 16px/1.4 system-ui!important;margin:0!important}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown .wgt-settings-items{gap:8px;margin-top:8px}
/* Game-specific form rules must not resize the shared settings checkboxes. */
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown label:has(input[type="checkbox"]){display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:44px;min-width:0!important;width:auto!important}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown input[type="checkbox"]{appearance:auto!important;box-sizing:border-box!important;flex:0 0 18px!important;order:2;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important;margin:0!important;padding:0!important;accent-color:#286c60;box-shadow:none!important}
html:root[data-play-ui][data-play-game] body dialog.wgt-settings-dropdown label:has(input[type="checkbox"])>span{flex:1 1 auto!important;width:auto!important;min-width:0!important}

@media(min-width:601px){
 html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner[data-wgt-layout="split"]{grid-template-columns:auto auto minmax(0,1fr)!important}
 html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner[data-wgt-layout="split"] nav{grid-column:1/-1!important;grid-row:2!important;justify-self:end!important;justify-content:flex-end!important;flex-wrap:wrap!important;max-width:100%}
 html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner[data-wgt-layout="split"] .wge-session-title{max-width:100%!important}
}

/* Keep the leading group in row one despite game-specific legacy grids. */
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner>a:first-child{grid-column:1!important;grid-row:1!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-back-lobby{grid-column:2!important;grid-row:1!important}

/* Keep glyphs proportional while preserving the shared 44px touch targets. */
html:root[data-play-ui][data-play-game] body .wge-compact-header .wango-play-identity-tools>a.wa-link:before{width:13.65px!important;height:13.65px!important}
/* Native speed selects cover the complete target, including the label border. */
html:root[data-play-ui][data-play-game] body .wge-compact-header :is(.wgt-speed,.cc-pace-control)>select{box-sizing:border-box!important;inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:28.6px!important;min-width:28.6px!important;max-width:28.6px!important;height:28.6px!important;min-height:28.6px!important;max-height:28.6px!important;padding:0!important}
/* User-confirmed 65% toolbar: frame, spacing and contents scale together. */
html:root[data-play-ui][data-play-game] body .wge-compact-header nav :is(button,summary,a.wa-link,.wgt-speed,.cc-pace-control):not(.wa-menu>div *){box-sizing:border-box!important;width:28.6px!important;min-width:28.6px!important;height:28.6px!important;min-height:28.6px!important;padding:0!important;border-width:.65px!important;border-radius:7.8px!important;font:600 8.45px/1 system-ui!important;flex-shrink:0!important}
html:root[data-play-ui][data-play-game] body .wge-compact-header .player-account-avatar{zoom:.65}
html:root[data-play-ui][data-play-game] body .wge-compact-header .player-account-avatar svg{width:20px;height:20px}
html:root[data-play-ui][data-play-game] body .wge-compact-header .wge-header-inner>a:first-child{min-height:28.6px!important;display:inline-flex;align-items:center}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header nav .wango-play-identity-tools>a.wa-link{font-size:0!important}

/* Fluid toolbar: every visible part uses one scale, rather than separate sizes. */
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header{--wgt-scale:.65;display:block!important;box-sizing:border-box!important;height:calc(61px * var(--wgt-scale))!important;min-height:0!important;max-height:none!important;padding-block:0!important;border-bottom-width:calc(1px * var(--wgt-scale));overflow:visible!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner{box-sizing:border-box!important;display:grid!important;grid-template-columns:auto auto max-content minmax(0,1fr)!important;grid-template-rows:44px!important;gap:8px!important;width:calc(100% / var(--wgt-scale))!important;max-width:none!important;min-width:0!important;height:60px!important;min-height:60px!important;max-height:none!important;padding:8px 0!important;margin:0!important;transform:scale(var(--wgt-scale))!important;transform-origin:top left!important;overflow:visible!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner>a:first-child{grid-column:1!important;grid-row:1!important;min-height:44px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner .wge-back-lobby{grid-column:2!important;grid-row:1!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;border-width:1px!important;border-radius:12px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wg-brand__wordmark{width:88px!important;height:auto!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner .wge-session-title{grid-column:3!important;grid-row:1!important;max-width:none!important;width:max-content!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;font-size:var(--wgt-title-font-size,16px)!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner nav{grid-column:4!important;grid-row:1!important;width:max-content!important;max-width:none!important;gap:8px!important;flex-wrap:nowrap!important;justify-self:end!important;overflow:visible!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner nav :is(button,summary,a.wa-link,.wgt-speed,.cc-pace-control):not(.wa-menu>div *){box-sizing:border-box!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-width:1px!important;border-radius:12px!important;flex-shrink:0!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner nav :is(button,summary,.wgt-speed,.cc-pace-control):not(.wa-menu>div *){font:600 var(--wgt-control-font-size,13px)/1 system-ui!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner svg{width:20px!important;height:20px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner .player-account-avatar{zoom:1!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner :is(.player-account-avatar,.player-account-avatar .wa-portrait){width:32px!important;height:32px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner .wango-play-identity-tools>a.wa-link{font-size:0!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner .wango-play-identity-tools>a.wa-link:before{width:21px!important;height:21px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wge-header-inner :is(.wgt-speed,.cc-pace-control)>select{width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;max-height:44px!important}
html:root[data-play-ui][data-play-game] body header.wge-header.wge-compact-header .wa-menu>div{transform:scale(calc(1 / var(--wgt-scale)))!important;transform-origin:top right!important}
