/* ===== Mobile shell — theme-mobile4 ===== */
.m-topbar,
.m-drawer,
.m-drawer-backdrop,
.m-bottom-nav,
.m-announce,
.m-member-nav,
.m-member-nav-wrap,
.m-only {
  display: none;
}

.d-only {
  display: inline;
}

@media (max-width: 768px) {
  .d-only {
    display: none !important;
  }

  .m-only {
    display: inline !important;
  }

  /* Prevent overflow from clipping position:fixed bottom nav */
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
    padding-bottom: 96px !important;
  }

  body.m-nav-open {
    overflow: hidden !important;
  }

  .page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 20px !important;
    overflow-x: clip;
  }

  .page-bg {
    background-attachment: scroll !important;
  }

  .desktop-only {
    display: none !important;
  }

  img,
  svg,
  video,
  canvas {
    max-width: 100%;
  }

  /* ---- Top bar ---- */
  .m-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    background: linear-gradient(180deg, #1a7ec4 0%, #0b5eab 100%);
    border-bottom: 1.5px solid rgba(255, 255, 255, .18);
    box-shadow: 0 4px 14px rgba(6, 58, 115, .25);
  }

  .m-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .m-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    overflow: hidden;
  }

  .m-logo img {
    height: 32px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2));
  }

  .m-auth {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
  }

  /* Member page: saldo + profil */
  .m-topbar-member {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .m-member-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .m-balance {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #063a73;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    cursor: pointer;
  }

  .m-balance i {
    color: #e89a12;
    font-size: 12px;
  }

  .m-balance.is-spinning i {
    animation: m-spin .6s linear;
  }

  @keyframes m-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .m-profile-wrap {
    position: relative;
  }

  .m-profile-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 210, 74, .9);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
  }

  .m-profile-drop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid rgba(240, 180, 41, .55);
    box-shadow: 0 10px 24px rgba(6, 58, 115, .2);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 50;
  }

  .m-profile-drop[hidden] {
    display: none !important;
  }

  .m-profile-drop button {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 9px 10px;
    border-radius: 8px;
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #0b5eab;
    cursor: pointer;
  }

  .m-profile-drop button:hover {
    background: #eef7ff;
  }

  .m-profile-drop hr {
    border: 0;
    border-top: 1px solid rgba(11, 94, 171, .12);
    margin: 4px 0;
  }

  .m-profile-drop .is-logout {
    color: #c62828;
  }

  .m-profile-drop .is-finance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #fff8e8, #ffe9b8);
    color: #9a6a00;
    font-weight: 800;
  }

  .m-profile-drop .is-finance i {
    width: 16px;
    text-align: center;
    color: #e89a12;
  }

  .m-profile-drop .is-finance.is-wd {
    background: linear-gradient(180deg, #eef7ff, #d7ecff);
    color: #0b5eab;
  }

  .m-profile-drop .is-finance.is-wd i {
    color: #0b5eab;
  }

  .m-profile-drop .is-finance:hover {
    filter: brightness(1.03);
  }

  .m-member-nav-wrap {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin: 6px 10px 0;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    border: 1.5px solid rgba(255, 255, 255, .8);
    box-shadow: 0 4px 14px rgba(6, 58, 115, .16);
  }

  .m-member-scroll {
    flex: 0 0 auto;
    width: 28px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: #0b5eab;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(6, 58, 115, .2);
  }

  .m-member-scroll:active {
    transform: scale(.96);
  }

  .m-member-scroll.is-hidden {
    visibility: hidden;
    pointer-events: none;
  }

  .m-member-nav {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .m-member-nav::-webkit-scrollbar {
    display: none;
  }

  .m-member-nav button {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #0b5eab;
    font-family: "Fredoka", "Nunito", sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 12px 10px;
    cursor: pointer;
    position: relative;
    text-shadow: none;
  }

  .m-member-nav button.is-active {
    color: #c4860a;
  }

  .m-member-nav button.is-active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 3px;
    height: 3px;
    border-radius: 999px;
    background: #f0b429;
  }

  body.page-member .m-announce {
    display: none !important;
  }

  .m-member-nav-wrap.is-finance-hide {
    display: none !important;
  }

  .m-btn-login {
    background: rgba(255, 255, 255, .95) !important;
    border: 0 !important;
    color: #0b5eab !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12) !important;
  }

  .m-btn-register {
    background: linear-gradient(180deg, #ffb020, #f07a00) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 2px 6px rgba(180, 80, 0, .28) !important;
  }

  .m-btn-login,
  .m-btn-register {
    padding: 7px 10px !important;
    font-size: 10px !important;
    border-radius: 999px !important;
    min-height: 30px !important;
    line-height: 1 !important;
    white-space: nowrap;
    letter-spacing: 0 !important;
  }

  /* ---- Drawer ---- */
  body.m-nav-open .m-bottom-nav,
  body.auth-open .m-bottom-nav {
    visibility: hidden;
    pointer-events: none;
  }

  .m-drawer-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(4, 30, 60, .45);
  }

  .m-drawer-backdrop[hidden] {
    display: none !important;
  }

  .m-drawer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    width: min(82vw, 320px);
    height: 100%;
    background: linear-gradient(180deg, #eef8ff 0%, #ffffff 40%);
    box-shadow: 8px 0 28px rgba(6, 58, 115, .28);
    transform: translateX(0);
    transition: transform .22s ease, visibility .22s ease;
  }

  .m-drawer[hidden] {
    display: flex !important;
    transform: translateX(-105%);
    pointer-events: none;
    visibility: hidden;
  }

  .m-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, #1a7ec4, #0b5eab);
    color: #fff;
  }

  .m-drawer-head .m-icon-btn {
    background: rgba(255, 255, 255, .16);
  }

  .m-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 4px;
    overflow-y: auto;
  }

  .m-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border-bottom: 1px solid #ccc;
    color: #063a73;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
  }

  .m-drawer-nav a i {
    width: 20px;
    color: #e89a12;
    text-align: center;
  }

  .m-drawer-nav a:hover,
  .m-drawer-nav a:active {
    background: rgba(11, 94, 171, .08);
  }

  /* ---- Bottom nav — circular scoop hugs deposit FAB ---- */
  .m-bottom-nav {
    --fab: clamp(58px, 19vw, 78px);
    --fab-r: calc(var(--fab) / 2);
    --nav-h: 64px;
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    z-index: 80 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: end;
    gap: 0;
    margin: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  .m-bottom-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #2a93d8 0%, #0e6bb8 45%, #064a8f 100%);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 14px rgba(6, 58, 115, .28);
    /* perfect circular scoop from the top center */
    -webkit-mask-image: radial-gradient(circle calc(var(--fab-r) - 1px) at 50% 0,
        transparent calc(var(--fab-r) - 1.5px),
        #000 calc(var(--fab-r) - 0.5px));
    mask-image: radial-gradient(circle calc(var(--fab-r) - 1px) at 50% 0,
        transparent calc(var(--fab-r) - 1.5px),
        #000 calc(var(--fab-r) - 0.5px));
  }

  .m-tab {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
    min-height: 54px;
    padding: 0 2px 11px;
    color: #fff;
    text-decoration: none;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
  }

  .m-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-tab i {
    font-size: 18px;
    color: #fff;
    line-height: 1;
  }

  .m-tab.is-active {
    color: #ffe566;
  }

  .m-tab.is-active i {
    color: #ffe566;
  }

  .m-tab-deposit {
    justify-content: flex-end;
    padding-bottom: 0;
    overflow: visible;
  }

  .m-deposit-fab {
    width: var(--fab) !important;
    height: var(--fab) !important;
    min-width: var(--fab);
    min-height: var(--fab);
    margin: 0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 0 0 11px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #2a93d8 0%, #0e6bb8 55%, #064a8f 100%);
    border: 2px solid rgba(255, 255, 255, .55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
    /* FAB center sits exactly on bar top edge → mask scoop hugs the circle */
    transform: translateY(calc(var(--fab-r) - var(--nav-h)));
    overflow: hidden;
  }

  .m-deposit-fab img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28));
  }

  .m-deposit-label {
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .3px;
    line-height: 1;
    max-width: none !important;
  }

  /* ---- Main order ---- */
  main {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    gap: 10px;
    overflow-x: clip;
    max-width: 100%;
  }

  .hero {
    order: 1;
    margin: 0 -10px;
    width: calc(100% + 20px);
    max-width: none;
  }

  .m-announce {
    order: 2;
  }

  .categories {
    order: 3;
  }

  .jackpot {
    order: 4;
  }

  .popular {
    order: 5;
  }

  .casino-fav {
    order: 6;
  }

  .benefits {
    order: 7;
  }

  .providers-classic {
    display: none !important;
  }

  .providers-mobile {
    order: 8;
  }

  .payments {
    order: 9;
  }

  .live-activity {
    display: none !important;
  }

  .m-trust {
    display: flex !important;
  }

  /* ---- Announce: keep single row (override style.css 760px column) ---- */
  .announce,
  .m-announce {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    padding: 8px 10px !important;
    min-height: 0 !important;
  }

  .m-announce .announce-left {
    flex: 1;
    min-width: 0;
    gap: 6px !important;
  }

  .m-announce .announce-left strong {
    font-size: 11px !important;
  }

  .m-announce .announce-link {
    flex-shrink: 0;
    font-size: 11px !important;
    align-self: center !important;
  }

  /* ---- Hero ---- */
  .hero,
  .hero-slides {
    min-height: 260px !important;
  }

  .hero-slide {
    padding: 16px 5% 44px !important;
    justify-content: center !important;
  }

  .hero-copy {
    align-items: center !important;
    text-align: center !important;
    max-width: 100% !important;
  }

  .hero-cta {
    align-items: center !important;
    padding-left: 0 !important;
  }

  .hero-sub {
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .hero-arch {
    width: min(100%, 340px) !important;
    height: auto !important;
  }

  .hero-arch .arch-white {
    font-size: 46px !important;
  }

  .hero-arch .arch-gold {
    font-size: 62px !important;
    stroke-width: 10px !important;
  }

  .hero-copy .btn-hero {
    width: auto !important;
    font-size: 13px !important;
    padding: 10px 20px !important;
  }

  /* ---- Categories: compact 4-col white cards ---- */
  .categories {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin: 0 !important;
  }

  .cat-card,
  .cat-slot,
  .cat-casino,
  .cat-fish,
  .cat-sport {
    border-radius: 14px !important;
    box-shadow: 0 3px 10px rgba(6, 58, 115, .12) !important;
    background: #fff !important;
    overflow: hidden !important;
    min-height: 0 !important;
    transform: none !important;
  }

  .cat-card::after {
    display: none !important;
  }

  .cat-media {
    aspect-ratio: 1 / 1 !important;
    padding: 4px 4px 0 !important;
    background: transparent !important;
  }

  .cat-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .cat-body {
    padding: 2px 3px 8px !important;
    gap: 0 !important;
    flex: 0 !important;
  }

  .cat-body::before,
  .cat-body::after {
    display: none !important;
    content: none !important;
  }

  .cat-body h2 {
    font-size: 9px !important;
    margin: 0 !important;
    color: #0b5eab !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    font-weight: 800 !important;
  }

  .cat-body p,
  .cat-body .btn-cat {
    display: none !important;
  }

  /* ---- Jackpot ---- */
  .jackpot {
    margin: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .hero {
    max-width: 100%;
    overflow: hidden;
  }

  .provider-strip-wrap {
    overflow: hidden !important;
    max-width: 100% !important;
  }

  .provider-strip {
    min-width: max-content !important;
    width: max-content !important;
  }

  .provider-panel {
    margin-top: 8px !important;
    padding: 16px 10px 12px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .trust-block {
    margin: 0 !important;
    max-width: 100%;
  }

  .trust-head {
    font-size: 13px !important;
    padding: 9px 12px !important;
    border-radius: 10px 10px 0 0 !important;
  }

  .trust-body {
    padding: 12px 10px 14px !important;
    border-radius: 0 0 12px 12px;
  }

  .provider-logos {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 10px !important;
    overflow: visible !important;
  }

  .trust-block .provider-logos .provider {
    flex: 0 0 auto !important;
    width: 72px !important;
    max-width: 72px !important;
    height: 36px !important;
  }

  .trust-block .provider-logos .provider img {
    max-height: 28px !important;
  }

  .pay-methods {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .pay-methods .pay-col {
    padding: 0 !important;
  }

  .pay-methods .pay-col+.pay-col {
    border-left: 0 !important;
    border-top: 1.5px solid rgba(120, 150, 180, .3);
    padding-top: 12px !important;
  }

  .pay-methods .pay-label {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  .pay-methods .pay-tray {
    gap: 8px 10px !important;
  }

  .pay-methods .pay-tray img {
    height: 20px !important;
    max-width: 64px !important;
  }

  /* .jackpot .jp-content {
    left: 18% !important;
    width: 48% !important;
    top: 14% !important;
    height: 72% !important;
  } */

  .jackpot .btn-jackpot {
    font-size: 8px !important;
    padding: 6px 8px !important;
    right: 1.5% !important;
    gap: 4px !important;
    max-width: 30%;
  }

  .jackpot .btn-jackpot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .jackpot .jp-label {
    font-size: 9px !important;
  }

  .jackpot .jp-amount {
    font-size: clamp(12px, 3.8vw, 18px) !important;
  }

  /* ---- Games / sections ---- */
  .section-head-row {
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .game-grid,
  .casino-grid {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  .game-card {
    flex: 0 0 38% !important;
  }

  .casino-card {
    flex: 0 0 58% !important;
  }

  .benefits {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .provider-badge {
    font-size: 11px !important;
    padding: 6px 12px 5px !important;
  }

  /* Category / inner pages compact */
  .page-category .page {
    padding-top: 0 !important;
  }

  .page-category .m-announce,
  .m-announce {
    display: flex !important;
    margin: 6px 10px 0 !important;
    min-height: 32px !important;
    padding: 4px 8px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
  }

  .page-category .m-announce .announce-left strong,
  .m-announce .announce-left strong {
    font-size: 10px !important;
  }

  .page-category .m-announce .announce-link,
  .m-announce .announce-link {
    font-size: 10px !important;
    white-space: nowrap;
  }

  .category-panel {
    margin: 6px 0 0 !important;
  }

  .page-category main {
    padding: 0 10px !important;
  }

  .page-category .logo-img,
  .desktop-only .logo-img {
    max-height: 42px;
  }

  .footer-shell {
    border-radius: 28px;
    padding: 24px 14px 14px;
  }

  .footer-bottom {
    width: calc(100% + 28px) !important;
    margin: 10px -14px -14px !important;
    border-radius: 0 0 26px 26px !important;
  }
}

@media (min-width: 769px) {

  .m-topbar,
  .m-drawer,
  .m-drawer-backdrop,
  .m-bottom-nav,
  .m-announce {
    display: none !important;
  }
}

/* Extra guarantee when JS marks mobile viewport */
html.is-mobile .m-bottom-nav {
  display: grid !important;
  position: fixed !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  z-index: 80 !important;
  visibility: visible !important;
}

html.is-mobile .m-topbar {
  display: grid !important;
}
/* INTEGRASI V2G: icon provider grid lebih besar (mobile) */
@media (max-width: 768px) {
  .trust-block .provider-logos .provider { width: 96px !important; max-width: 96px !important; height: 48px !important; }
  .trust-block .provider-logos .provider img { max-height: 40px !important; }
}
