/* Shared phone shell; content modules own their respective responsive surfaces. */
.mobile-logout{display:none}
@media(max-width:760px), (max-width:1024px) and (max-height:500px) and (orientation:landscape){
  :root{--phone-header:64px;--phone-nav:68px}
  html{scroll-padding-top:calc(var(--phone-header) + env(safe-area-inset-top,0px) + 16px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{font-size:14px;line-height:1.6;min-width:0}
  button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
  button,a{touch-action:manipulation}
  a:focus-visible,button:focus-visible,summary:focus-visible{outline:2px solid #64eadd;outline-offset:3px}
  .main,body[data-auth-state="guest"] .main,body:not([data-page="home"]) .main{
    min-width:0;margin-left:0;
    padding:calc(var(--phone-header) + env(safe-area-inset-top,0px) + 18px) max(16px,env(safe-area-inset-right,0px)) calc(var(--phone-nav) + env(safe-area-inset-bottom,0px) + 28px) max(16px,env(safe-area-inset-left,0px));
  }
  .topbar,body[data-auth-state="member-preview"] .topbar{
    inset:0 0 auto;height:calc(var(--phone-header) + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px));
    gap:8px;background:#171d1cf5;backdrop-filter:blur(16px)
  }
  .top-left{gap:6px;min-width:0;flex-shrink:0}
  .menu-button{display:grid;place-items:center;margin:0;width:44px;height:44px;padding:8px;border-radius:10px;background:#242f2c}
  .menu-button .icon{width:21px;height:21px}
  .mobile-logo{display:block;width:94px;max-width:100%;height:auto}
  .top-tabs,.topbar .preview-tag,.topbar .top-divider,.topbar .icon-button{display:none}
  .top-right,body[data-auth-state="member-preview"] .top-right{min-width:0;gap:6px}
  .auth-guest-actions{gap:6px}
  .top-right .auth-guest-actions .btn{min-height:42px;padding:0 13px;font-size:13px;border-radius:9px;white-space:nowrap}
  .topbar .auth-member-actions{gap:0;min-width:0}
  .topbar .header-wallet,.topbar .header-member,.topbar .header-logout{display:none}
  .header-balance{display:flex;align-items:center;gap:7px;min-height:46px;padding:5px 8px;max-width:100%;border:1px solid #365e54;border-radius:10px;background:#203a31;color:#e5fff5;white-space:nowrap}
  .header-balance-coin{display:grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:50%;background:#228f77;color:#fff;font-size:14px}
  .header-balance-text{display:flex;flex-direction:column;min-width:0;padding:0;gap:1px}
  .header-balance-text>small{font-size:9px;line-height:1.3;color:#b0c7bd}
  .header-balance-text>strong{font-size:12px;line-height:1.5;font-weight:750;letter-spacing:0;font-variant-numeric:tabular-nums;white-space:nowrap}
  .header-balance-text>strong>span{font-size:9px;margin-left:2px;color:#8ed5bb}
  .sidebar,.sidebar-collapsed .sidebar{
    inset:0 auto auto 0;width:min(300px,calc(100vw - 40px));height:100vh;height:100dvh;
    padding:env(safe-area-inset-top,0px) 14px max(16px,env(safe-area-inset-bottom,0px));
    overflow:hidden;overscroll-behavior:contain;transform:translateX(-100%);z-index:40;
    box-shadow:16px 0 50px #0006
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar>.brand{height:72px;flex-shrink:0;padding-inline:14px}
  .sidebar>.brand img{width:140px}
  .sidebar>nav{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 2px}
  .sidebar .nav-item{min-height:46px;padding:11px 13px;font-size:14px;margin:3px 0}
  .sidebar .nav-item .icon{width:21px;height:21px;flex-shrink:0}
  .sidebar .menu-label{font-size:10px;padding:18px 13px 7px}
  .sidebar>.side-bottom{flex-shrink:0;padding-top:12px}
  .sidebar .side-language{min-height:44px;margin-top:6px}
  .sidebar .mobile-logout{display:flex;width:100%;color:#e2baba}
  .nav-backdrop.open{display:block;position:fixed;inset:0;z-index:39;background:#050d0dba;backdrop-filter:blur(4px)}
  body.mobile-menu-open{overflow:hidden;overscroll-behavior:none}
  .mobile-bottom{
    position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;z-index:28;
    min-height:calc(var(--phone-nav) + env(safe-area-inset-bottom,0px));
    padding:5px max(6px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
    background:#17201ef5;border-top:1px solid #35514a;box-shadow:0 -8px 24px #0002
  }
  .mobile-bottom a{position:relative;justify-content:center;min-width:0;min-height:56px;padding:5px 2px;gap:4px;font-size:11px;line-height:1.3;font-weight:650;border-radius:10px}
  .mobile-bottom .icon{width:22px;height:22px}
  .mobile-bottom .selected{background:#2ab99f12;color:#77f8df}
  .mobile-bottom .selected::before{content:'';position:absolute;top:0;left:32%;right:32%;height:2px;border-radius:3px;background:#61eedb}
  .support-fab{width:44px;height:44px;right:max(14px,env(safe-area-inset-right,0px));bottom:calc(var(--phone-nav) + env(safe-area-inset-bottom,0px) + 13px);border-radius:14px}
  .support-fab .icon{width:23px;height:23px}
  .page-bar{gap:12px;align-items:center;margin-bottom:17px;font-size:11px}
  .page-bar>span{min-width:0;overflow-wrap:anywhere;text-align:right}
  .page-back{min-height:44px;flex-shrink:0;font-size:12px;gap:5px}
  .page-heading{margin-bottom:22px;min-width:0}
  .page-heading h1{font-size:26px;line-height:1.35;letter-spacing:-.3px;margin-block:8px 10px;overflow-wrap:anywhere}
  .page-heading p{font-size:13px;line-height:1.75;margin:0;overflow-wrap:anywhere}
  .page-heading .eyebrow{font-size:9px;line-height:1.5;letter-spacing:1.5px}
  .section-head{gap:10px;align-items:center}
  .section-title{min-width:0;gap:7px}
  .section-head h2{font-size:18px;line-height:1.4}
  .rail-controls .view-all{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;font-size:11px}
  .rail-controls .rail-control{display:none}
  footer{padding-top:10px}
  .footer-main{display:block;margin-bottom:22px}
  .footer-brand{max-width:none}
  .footer-brand img{width:122px}
  .footer-brand p{font-size:12px;line-height:1.75;max-width:none}
  .footer-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px;padding-top:24px}
  .footer-links>div:first-child{display:block}
  .footer-links strong{font-size:12px;line-height:1.5;margin-bottom:8px}
  .footer-links a{font-size:11px;line-height:1.5;min-height:36px;margin:0;display:flex;align-items:center}
  .footer-end{gap:14px;font-size:10px;line-height:1.7;align-items:flex-start}
  .footer-end>span{min-width:0}
  .footer-end .age-note{flex-shrink:0}
  .footer-preview{font-size:10px;line-height:1.8;overflow-wrap:anywhere}
  .toast{left:16px;right:16px;bottom:calc(var(--phone-nav) + env(safe-area-inset-bottom,0px) + 12px);width:auto;max-width:none;transform:none;font-size:13px}
  /* Keep the full feed inside its own horizontal surface on a narrow display. */
  .user-bets{display:block;margin:30px 0}
  .bet-status button{min-height:44px;padding:8px 13px;font-size:12px}
  .bet-table{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#41685d transparent;-webkit-overflow-scrolling:touch;border:1px solid #35403b;border-radius:12px}
  .bet-columns,.bet-viewport{min-width:680px}
  .bet-columns,.bet-row{grid-template-columns:1.3fr .9fr 1fr 1fr 1fr;gap:12px;padding-inline:12px;font-size:11px}
  .bet-columns{height:44px;background:#1d2924;position:sticky;top:0}
  .bet-viewport{height:348px}
  .bet-game,.bet-user{gap:6px}
  .bet-game img{width:27px;height:27px}
  .bet-user i{width:22px;height:22px;flex-shrink:0;font-size:10px}
  .bet-time{font-size:10px}
  .bet-row em{width:14px;height:14px;font-size:10px;margin-right:3px}
  .bet-scroll-hint{margin:6px 0 0;color:#a3b8ae;font-size:10px;line-height:1.6;text-align:right}
}
@media(min-width:761px) and (min-height:501px){.bet-scroll-hint{display:none}}
@media(max-width:359px){
  .main,body[data-auth-state="guest"] .main,body:not([data-page="home"]) .main{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
  .mobile-logo{width:78px}.top-left{gap:3px}
  .top-right .auth-guest-actions .btn{padding-inline:10px;font-size:12px}
  .header-balance{gap:5px;padding-inline:6px}.header-balance-coin{display:none}
  .header-balance-text>strong{font-size:11.5px}
  .footer-links{gap:12px 8px}.footer-links a{font-size:10px}
}
@media(max-width:319px){
  .topbar,body[data-auth-state="member-preview"] .topbar{padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px));gap:6px}
  .mobile-logo{width:55px}
  .top-right .auth-guest-actions .btn{font-size:11px;padding-inline:8px}
  .header-balance-text>strong{font-size:11px}
  .mobile-bottom a{font-size:10px}
  .page-heading h1{font-size:23px}
}
@media(max-width:1024px) and (max-height:500px) and (orientation:landscape){
  :root{--phone-header:54px;--phone-nav:56px}
  .mobile-bottom{padding-top:2px;padding-bottom:calc(2px + env(safe-area-inset-bottom,0px))}
  .mobile-bottom a{min-height:50px;flex-direction:row;gap:6px}
  .mobile-bottom .icon{width:19px;height:19px}
  .sidebar>.brand{height:54px}.sidebar>.side-bottom{display:none}
}
/* Tablet portrait keeps the familiar side menu and increases touch target sizes. */
@media(min-width:761px) and (max-width:1024px) and (min-height:501px){
  .sidebar{width:185px;overflow:hidden;overscroll-behavior:contain}
  .sidebar>nav{min-height:0;flex:1;overscroll-behavior:contain}
  .main{margin-left:185px;padding-inline:22px}
  .topbar,body[data-auth-state="member-preview"] .topbar{left:185px;padding-inline:16px;gap:12px}
  .topbar .top-tabs{gap:14px}.topbar .top-tab{font-size:12px;gap:5px}
  .topbar .top-tab .icon{width:17px;height:17px}
  .topbar .header-member,.topbar .header-logout{display:none}
  .header-balance{padding:5px 8px}.header-balance-text{padding-right:0}
  .header-balance-text>strong{font-size:12px}.header-balance-coin{width:21px;height:21px;font-size:14px}
  .topbar .header-wallet{padding-inline:10px;font-size:12px;min-height:44px}
  .mobile-logout{display:flex}
  .footer-main{display:block}.footer-brand{max-width:none}.footer-links{justify-content:space-between;gap:18px;padding-top:20px}
  .footer-links a{min-height:32px}.footer-links>div:first-child{display:block}
  .user-bets .bet-table{overflow-x:auto;overscroll-behavior-x:contain}
  .user-bets .bet-columns,.user-bets .bet-viewport{min-width:680px}
}
@media(pointer:coarse){
  .fx-interactive{transition:background-color .18s,border-color .18s,opacity .18s}
  .game:active,.live-card:active,.category:active,.partner-card:active{filter:brightness(1.12)}
  .fx-ripple-layer{pointer-events:none}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .sidebar,.mobile-bottom a{transition:none}
}
