/* R4: explicit two-row page layout. A heading never needs sticky offsets and
   remains fixed from the first pixel, including phone rotation and long English. */
.r4 .app-scroll{display:flex;flex-direction:column;overflow:hidden;padding:0;scrollbar-gutter:auto}
.r4 .fixed-page{height:100%;min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;padding-bottom:0!important}
.r4 .page-heading{flex:none;min-width:0;position:relative;z-index:2;padding-bottom:12px;background:transparent}
.r4 .page-heading>.page-title{margin:0}
.r4 .page-content-scroll{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-behavior:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}
.r4 .page-content-scroll>.footer{margin-top:22px;padding:16px 8px;font-size:11px}
.r4 .page-content-scroll:focus-visible{outline:1px solid #36b8dc;outline-offset:-2px}
.r4 .page-heading>.tabs{margin-top:12px;margin-bottom:0}
.r4 .page-heading>.filters{margin-top:10px;margin-bottom:0}
.r4 .page-heading>.info{margin-bottom:0;margin-top:8px}
.r4 .lobby-identity{margin-bottom:0}
.r4 .home>.page-heading{padding-bottom:0}
.r4 .home .section-label{margin:0;padding:12px 28px;line-height:1.3;font-size:19px}
.r4 .home .home-content{padding-top:10px}
.r4 .home .home-bottom{min-height:0;height:0}
.r4 .home-hero{height:min(340px,calc(var(--app-height,100dvh) * .33));min-height:0}
.r4 .auth-page.fixed-page{display:grid;height:100%;min-height:0;padding:24px;overflow:hidden}
.r4 .auth-panel{display:flex;flex-direction:column;max-height:100%;min-height:0;overflow:hidden}
.r4 .auth-panel>.page-heading{padding-bottom:12px}
.r4 .auth-panel>.page-heading .subtitle{margin-bottom:0}
.r4 .auth-panel>.page-content-scroll{padding-bottom:2px}
.r4 .auth-panel .r2-auth-brand{margin-bottom:10px}
.r4 .auth-panel .r2-auth-language{margin-bottom:10px}
.r4 .auth-panel .tabs{margin-bottom:12px}
.r4 .fixed-play-page>.page-heading{padding-bottom:8px}
.r4 .fixed-play-page .table-toolbar{margin-bottom:0}
.r4 .fixed-chat-page>.page-content-scroll{overflow:hidden;display:flex;flex-direction:column}
.r4 .fixed-chat-page .r2-chat-grid{flex:1;min-height:0;height:100%;align-items:stretch}
.r4 .fixed-chat-page .r2-chat-panel{height:100%;min-height:0}
.r4 .fixed-chat-page .r2-public-messages{min-height:0;flex:1;overflow-y:auto}
.r4 .fixed-chat-page .r2-chat-grid>aside{overflow:auto;min-height:0}
.r4 .fixed-chat-page .r2-chat-composer{flex:none}
.r4 .fixed-chat-page .footer{display:none}
.r4 .setting-row{min-width:0}.r4 .setting-row .lead{min-width:0}.r4 .setting-row .lead>div{min-width:0}
.r4 .setting-row .lead p{overflow-wrap:anywhere}
.r4 .management-language{width:145px;min-width:0;font-size:13px}
.r4 .admin-header{min-width:0}.r4 .admin-header>div:first-child{min-width:0}
.r4 .admin-header h1{overflow-wrap:anywhere}
.r4 .admin-header .row{flex-shrink:0}
/* Portrait: keep the accepted hero; use height-aware sizing on compact phones. */
html[data-layout=mobile-portrait] .r4 .home-hero{height:clamp(110px,calc(var(--app-height,100dvh) * .25),218px);min-height:0}
html[data-layout=mobile-portrait] .r4 .home .section-label{padding:10px 12px;font-size:18px}
html[data-layout=mobile-portrait] .r4 .page-heading{padding-bottom:10px}
html[data-layout=mobile-portrait] .r4 .home>.page-heading{padding-bottom:0}
html[data-layout=mobile-portrait] .r4 .lobby-identity{padding:10px 12px;gap:8px}
html[data-layout=mobile-portrait] .r4 .lobby-identity .lobby-mark{font-size:28px}
html[data-layout=mobile-portrait] .r4 .lobby-identity h1{font-size:22px;line-height:1.25}
html[data-layout=mobile-portrait] .r4 .lobby-identity .eyebrow{display:none}
html[data-layout=mobile-portrait] .r4 .lobby-identity>.row{width:auto;margin-left:auto;gap:6px;flex-wrap:nowrap}
html[data-layout=mobile-portrait] .r4 .lobby-identity>.row .btn{font-size:11px;padding:7px 9px}
html[data-layout=mobile-portrait] .r4 .lobby-identity .r2-lobby-title{flex:1 1 100%;min-width:0}
html[data-layout=mobile-portrait] .r4 .lobby-identity>.lobby-mark{display:none}
html[data-layout=mobile-portrait] .r4 .lobby-identity>.row{width:100%}
html[data-layout=mobile-portrait] .r4 .lobby-identity>.row .btn{flex:1}
html[data-layout=mobile-portrait] .r4 .page-heading>.tabs{margin-top:8px}
html[data-layout=mobile-portrait] .r4 .page-heading>.tabs button{min-height:40px;padding:8px 12px}
html[data-layout=mobile-portrait] .r4 .page-heading>.filters{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;margin-top:8px}
html[data-layout=mobile-portrait] .r4 .page-heading>.filters .search{width:100%;min-width:0;flex-basis:auto}
html[data-layout=mobile-portrait] .r4 .page-heading>.filters label{gap:4px;font-size:10px;white-space:nowrap}
html[data-layout=mobile-portrait] .r4 .page-heading>.filters>.btn{padding:7px 9px}
html[data-layout=mobile-portrait] .r4 .page-heading>.info{font-size:11px;line-height:1.45;padding:9px 11px}
html[data-layout=mobile-portrait] .r4 .auth-page.fixed-page{padding:12px}
html[data-layout=mobile-portrait] .r4 .auth-panel{padding:18px 18px 10px}
html[data-layout=mobile-portrait] .r4 .auth-panel .r2-auth-brand{width:min(240px,100%)}
html[data-layout=mobile-portrait] .r4 .auth-panel .tabs{margin-bottom:8px}
html[data-layout=mobile-portrait] .r4 .admin-header{align-items:flex-start}
html[data-layout=mobile-portrait] .r4 .admin-header>.row{max-width:160px;justify-content:flex-end;gap:4px}
html[data-layout=mobile-portrait] .r4 .management-language{width:145px;min-height:38px}
/* Landscape: compact identity bar and a single-row filter; content retains height. */
html[data-layout=mobile-landscape] .r4 .home-hero{height:clamp(66px,calc(var(--app-height,100dvh) * .24),112px);min-height:0}
html[data-layout=mobile-landscape] .r4 .home .section-label{padding:7px 14px;font-size:15px}
html[data-layout=mobile-landscape] .r4 .home .hero-corner{bottom:10px;font-size:10px}
html[data-layout=mobile-landscape] .r4 .page-heading{padding-bottom:7px}
html[data-layout=mobile-landscape] .r4 .home>.page-heading{padding-bottom:0}
html[data-layout=mobile-landscape] .r4 .lobby-identity{min-height:0;padding:7px 10px;gap:8px}
html[data-layout=mobile-landscape] .r4 .lobby-identity .lobby-mark{font-size:24px;flex:none}
html[data-layout=mobile-landscape] .r4 .lobby-identity h1{font-size:20px;line-height:1.2}
html[data-layout=mobile-landscape] .r4 .lobby-identity .eyebrow{display:none}
html[data-layout=mobile-landscape] .r4 .lobby-identity p{font-size:10px;margin:2px 0 0}
html[data-layout=mobile-landscape] .r4 .lobby-identity>.row{flex-wrap:nowrap;gap:6px;flex:none}
html[data-layout=mobile-landscape] .r4 .lobby-identity .btn{font-size:11px;padding:6px 9px;min-height:38px}
html[data-layout=mobile-landscape] .r4 .page-heading>.tabs{margin-top:5px}
html[data-layout=mobile-landscape] .r4 .page-heading>.tabs button{min-height:36px;padding:6px 16px}
html[data-layout=mobile-landscape] .r4 .page-heading>.filters{display:flex;flex-wrap:nowrap;gap:8px;margin-top:5px}
html[data-layout=mobile-landscape] .r4 .page-heading>.filters .search{min-width:0;flex:1;min-height:38px}
html[data-layout=mobile-landscape] .r4 .page-heading>.filters>.btn{min-height:38px}
html[data-layout=mobile-landscape] .r4 .page-heading>.info{font-size:10px;line-height:1.25;padding:6px 10px;margin-top:4px}
html[data-layout=mobile-landscape] .r4 .auth-page.fixed-page{padding:10px;place-items:center end}
html[data-layout=mobile-landscape] .r4 .auth-panel{width:430px;padding:12px 20px 8px}
html[data-layout=mobile-landscape] .r4 .auth-panel>.page-heading{display:grid;grid-template-columns:minmax(0,1fr) 138px;gap:5px 8px;padding-bottom:8px}
html[data-layout=mobile-landscape] .r4 .auth-panel .r2-auth-brand{width:190px;margin:0;align-self:center}
html[data-layout=mobile-landscape] .r4 .auth-panel .r2-auth-language{margin:0}
html[data-layout=mobile-landscape] .r4 .auth-panel .tabs{grid-column:1/-1;margin:0}
html[data-layout=mobile-landscape] .r4 .auth-panel .tabs button{padding:5px 14px;min-height:32px}
html[data-layout=mobile-landscape] .r4 .auth-panel h1{grid-column:1/-1;font-size:19px;margin:0}
html[data-layout=mobile-landscape] .r4 .auth-panel .subtitle{display:none}
html[data-layout=mobile-landscape] .r4 .auth-panel .r2-auth-language .input{min-height:36px;font-size:13px}
html[data-layout=mobile-landscape] .r4 .fixed-chat-page .r2-chat-panel .panel-header{padding:5px 12px}
html[data-layout=mobile-landscape] .r4 .management-language{min-height:36px;width:145px}
@media(max-height:640px){html[data-layout=mobile-portrait] .r4 .page-title .eyebrow{display:none}html[data-layout=mobile-portrait] .r4 .page-title p{font-size:11px;line-height:1.4}html[data-layout=mobile-portrait] .r4 .lobby-identity p{font-size:10px}html[data-layout=mobile-portrait] .r4 .auth-panel .r2-auth-brand{width:190px}}
@media(prefers-reduced-motion:reduce){.r4 .page-content-scroll{scroll-behavior:auto}}
html[data-layout=mobile-landscape] .r4 .page-heading>.filters{padding:7px 10px}
.r4 .tournament-hero{margin-bottom:0}
html[data-layout=mobile-landscape] .r4 .tournament-hero{padding:12px 16px}
html[data-layout=mobile-landscape] .r4 .tournament-hero h1{font-size:22px;line-height:1.2;margin:3px 0 8px}
html[data-layout=mobile-landscape] .r4 .tournament-hero .eyebrow{font-size:9px}
html[data-layout=mobile-landscape] .r4 .tournament-hero .chips{gap:5px}
.r4 .admin-login .management-language{align-self:flex-end;margin-bottom:10px}

@media(max-height:360px){html[data-layout=mobile-landscape] .r4 .lobby-identity p{display:none}html[data-layout=mobile-landscape] .r4 .lobby-identity{padding-top:4px;padding-bottom:4px}html[data-layout=mobile-landscape] .r4 .page-heading>.tabs button{min-height:32px}html[data-layout=mobile-landscape] .r4 .page-heading>.filters{padding-top:4px;padding-bottom:4px}}

/* Text-only localized center seal covers the old embedded English title.
   The original game substrate and all table geometry are unchanged. */
.r4-game-brand{position:absolute;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:#0a1d2d;border-radius:48%;box-shadow:0 0 15px 12px #0a1d2d;pointer-events:none;color:#81a7c3;font-size:22px;line-height:1.1;text-align:center}
.r4-game-brand img{width:52px;height:52px;object-fit:contain;opacity:.7;filter:saturate(.5)}
