/* Dartava owner-approved MOBILE BROWSER finish.
   This only touches /r3/mobile: same real UI/routes as the Android surface.
   Match and camera UI preserve their existing high-contrast gameplay controls. */
html:has(body[data-r3-surface="mobile"]){scroll-padding-bottom:calc(88px + env(safe-area-inset-bottom));overflow-x:clip}
body[data-r3-surface="mobile"]{
 --phone-paper:#f8f7f3;--phone-navy:#212b3d;--phone-blue:#365bce;
 --phone-coral:#ec785d;--phone-border:#dfe4ee;
 margin:0;background:var(--phone-paper)!important;color:var(--phone-navy)!important;
 -webkit-text-size-adjust:100%;overflow-x:clip;
}
body[data-r3-surface="mobile"] *,body[data-r3-surface="mobile"] *::before,body[data-r3-surface="mobile"] *::after{box-sizing:border-box}
body[data-r3-surface="mobile"] .r3-phone-shell{
 width:100%;max-width:760px;margin:0 auto;min-height:100dvh;
 padding:0 12px calc(94px + env(safe-area-inset-bottom))!important;
 background:var(--phone-paper)!important;
}
body[data-r3-surface="mobile"] .r3-phone-top{
 position:sticky;top:0;z-index:31;min-height:62px;
 margin:0 -12px!important;padding:env(safe-area-inset-top) 14px 0!important;
 display:flex;align-items:center;justify-content:space-between;
 background:rgba(248,247,243,.97)!important;
 border-bottom:1px solid var(--phone-border)!important;
 backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
body[data-r3-surface="mobile"] .r3-phone-top .r3-avatar{
 min-width:43px;min-height:43px;border-radius:50%;
 background:#edf2ff!important;color:var(--phone-navy)!important;
 border:1px solid #cad7fa!important;
}
body[data-r3-surface="mobile"] .r3-phone-main{padding-top:8px!important;min-width:0}
body[data-r3-surface="mobile"] .r3-phone-main>div,
body[data-r3-surface="mobile"] .r3-phone-page{min-width:0;max-width:100%}
body[data-r3-surface="mobile"] .r3-phone-page.owner-home{
 max-width:680px;padding:12px 2px 30px!important;
}
body[data-r3-surface="mobile"] .owner-home-hero{width:100%;overflow:hidden}
body[data-r3-surface="mobile"] .owner-home-actions button{flex:1 1 132px;white-space:normal}
body[data-r3-surface="mobile"] .owner-home-grid button{min-width:0}
body[data-r3-surface="mobile"] .r3-phone-nav{
 position:fixed!important;bottom:0;left:50%;transform:translateX(-50%);
 width:100%;max-width:760px;z-index:60;
 height:calc(70px + env(safe-area-inset-bottom))!important;
 padding:5px 5px calc(6px + env(safe-area-inset-bottom))!important;
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;
 background:#fff!important;border-top:1px solid var(--phone-border)!important;
 box-shadow:0 -8px 22px rgba(33,43,61,.08);
}
body[data-r3-surface="mobile"] .r3-phone-nav button{
 min-width:0!important;max-width:100%;min-height:52px!important;
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:2px;color:#647187!important;font-size:11px!important;
 padding:5px 2px!important;touch-action:manipulation;
}
body[data-r3-surface="mobile"] .r3-phone-nav button[data-active="1"]{color:var(--phone-blue)!important}
body[data-r3-surface="mobile"] .r3-phone-nav button.play{
 width:auto!important;height:auto!important;min-height:53px!important;
 border-radius:13px;background:var(--phone-navy)!important;color:#fff!important;
 box-shadow:none!important;transform:none!important;
}
body[data-r3-surface="mobile"] .r3-phone-nav button.play[data-active="1"]{background:var(--phone-blue)!important;color:#fff!important}
body[data-r3-surface="mobile"] .r3-phone-nav button span,
body[data-r3-surface="mobile"] .r3-phone-nav button svg{pointer-events:none}
body[data-r3-surface="mobile"] .r3-auth-wrap{
 min-height:100dvh;padding:max(24px,env(safe-area-inset-top)) 15px max(24px,env(safe-area-inset-bottom));
 display:grid;place-items:center;background:var(--phone-paper);
}
body[data-r3-surface="mobile"] .r3-auth-card{
 width:min(100%,460px);max-width:100%;
 padding:23px 20px!important;border:1px solid var(--phone-border)!important;
 border-radius:19px!important;background:#fff!important;
 box-shadow:0 14px 38px rgba(33,43,61,.08);
}
body[data-r3-surface="mobile"] .r3-auth-card h1{font-size:clamp(25px,6.6vw,34px);line-height:1.12;color:var(--phone-navy)!important}
body[data-r3-surface="mobile"] :is(input,textarea,select){font-size:16px!important;max-width:100%}
body[data-r3-surface="mobile"] .r3-auth-card :is(input,button,a){min-height:48px}
body[data-r3-surface="mobile"] .r3-fullscreen-mode[data-open="1"]{
 z-index:110;overscroll-behavior:contain;background:#192438!important;
}
body[data-r3-surface="mobile"] .r3-fullscreen-body{
 min-height:100dvh;padding-bottom:max(env(safe-area-inset-bottom),12px);
}
body[data-r3-surface="mobile"] :is(.r3bv-layer,.r3-games-layer,.r3-online-layer)[data-open="1"]{z-index:120}
body[data-r3-surface="mobile"] .r3-phone-page :is(button,a){touch-action:manipulation}
body[data-r3-surface="mobile"] .r3-phone-page :is(.r3-card,.r3-panel,.r3-phone-card){
 max-width:100%;overflow-wrap:anywhere;
}
@media(max-width:360px){
 body[data-r3-surface="mobile"] .r3-phone-shell{padding-left:8px!important;padding-right:8px!important}
 body[data-r3-surface="mobile"] .r3-phone-top{margin-inline:-8px!important}
 body[data-r3-surface="mobile"] .owner-home-grid{gap:7px}
 body[data-r3-surface="mobile"] .owner-home-grid button{padding:12px 10px!important}
 body[data-r3-surface="mobile"] .r3-phone-nav button{font-size:10px!important}
}
@media(min-width:761px){
 body[data-r3-surface="mobile"] .r3-phone-shell{border-inline:1px solid #e3e8f0}
}
