/* Phone shell uses the same palette tokens as the desktop member desk. */
@media (max-width:720px) {
  html[data-member-theme] body.legacy-skin.is-authenticated { background:var(--theme-bg)!important; color:var(--theme-ink)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-appbar,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-portal-hero { background:var(--theme-header)!important; color:#fff!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-portal { background:var(--theme-bg)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-home-shortcuts,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-portal-group,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-home-game-card,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-home-game { background:#fff!important; border-color:var(--theme-line)!important; color:var(--theme-ink)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-section-heading,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-portal-group h2 { color:var(--theme-ink)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-feature-icon,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-home-game>span { background:var(--theme-light)!important; color:var(--theme-primary)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-member-nav { background:#fff!important; border-top-color:var(--theme-line)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-member-nav .is-active { color:var(--theme-primary)!important; background:var(--theme-light)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-theme-setting,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-theme-setting select { border-color:var(--theme-line)!important; color:var(--theme-ink)!important; }
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-balance-strip,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-period-bar,
  html[data-member-theme] body.legacy-skin.is-authenticated .mobile-stake-footer { border-color:var(--theme-line)!important; }
}

/* Classic betting header only: keep the controls grouped at the left and use
   light text on the shared dark theme header. Room and account pages retain
   their existing layout. The sound button is the first child at runtime. */
@media (max-width:720px) {
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar {
    justify-content:flex-start;
    gap:8px;
    padding-inline:10px;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar button {
    color:#fff;
    text-shadow:none;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .draw-sound-toggle {
    order:0;
    flex:0 0 34px;
    width:34px;
    min-height:34px;
    margin:0;
    border:1px solid #ffffff55;
    background:#ffffff14;
    color:#fff;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .draw-sound-toggle[aria-pressed=true] {
    border-color:#b5eddb;
    background:#ffffff20;
    color:#fff;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .mobile-game-trigger {
    order:1;
    flex:0 1 auto;
    min-width:0;
    gap:6px;
    min-height:44px;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .mobile-game-trigger strong {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#fff;
    font-size:16px;
    letter-spacing:0;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .mobile-game-trigger > span {
    flex:none;
    font-size:16px;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .rr-return-room {
    order:2;
    flex:none;
    min-height:34px;
    margin:0;
    padding:6px 8px;
    border:1px solid #ffffff55;
    border-radius:6px;
    background:#ffffff14;
    color:#fff;
    font-size:13px;
    font-weight:600;
    line-height:1.4;
    white-space:nowrap;
  }
  html[data-member-theme] body.legacy-skin.is-authenticated:not(.race-room-active):not(.mobile-portal-open):not(.mobile-inner-open) .mobile-appbar .mobile-account-trigger {
    order:3;
    flex:0 0 32px;
    width:32px;
    margin-left:auto;
    color:#fff;
  }
}
