/* ARENA mobile dedicated layout — max-width 767px only. Desktop unchanged.
   Spec v1 2026-10-30: overflow containment, 2-col grids, 5-tab bar, compact header.
   Card aspect 44:59 lives in style.css — DO NOT override here. */

@media (max-width: 767px) {
  /* ── P0: page-level horizontal overflow kill ── */
  html, body, main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  html, body {
    width: 100%;
    position: relative;
  }
  /* flex children must shrink */
  body > .flex,
  body > div.flex,
  main,
  main > *,
  .right-scroll,
  .flex-1 {
    min-width: 0 !important;
  }
  #carousel-container,
  #carousel-track,
  .max-w-\[1400px\],
  main .p-4,
  main .px-4 {
    max-width: 100%;
    min-width: 0;
  }

  /* Filter chips ONLY may scroll horizontally — never the page */
  .overflow-x-auto.hide-scroll,
  .flex.items-center.gap-2.overflow-x-auto,
  .flex.items-center.gap-2.sm\:gap-3.overflow-x-auto {
    overflow-x: auto !important;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  /* everything else that accidentally got overflow-x-auto on page root */
  main > .overflow-x-auto:not(.hide-scroll) {
    overflow-x: hidden !important;
  }

  /* Hero carousel: one slide = viewport; track must not widen body */
  #carousel-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    aspect-ratio: 16 / 10 !important;
    border-radius: 1rem !important;
    min-height: 0;
  }
  #carousel-track {
    width: 100% !important;
    max-width: 100% !important;
  }
  #carousel-track > .min-w-full,
  #carousel-track > div.min-w-full {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
    padding: 1rem !important;
  }
  #carousel-track h2,
  #carousel-track .text-3xl,
  #carousel-track .sm\:text-5xl {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }
  #carousel-track h3 {
    font-size: 1.1rem !important;
  }
  #carousel-track .flex.flex-wrap,
  #carousel-track .flex.gap-3 {
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
  }
  #carousel-track a,
  #carousel-track button.px-6,
  #carousel-track button.px-8 {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  #carousel-track .shortcut-btn {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.75rem;
    min-height: 40px;
  }

  /* ── P0: grids → 2 columns ── */
  .provider-grid,
  .provider-grid.grid,
  main .provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
  }
  /* main / casino / slot / sports / minigame card grids */
  main .grid.grid-cols-2,
  main .grid.grid-cols-3,
  main .grid.sm\:grid-cols-3,
  main .grid.md\:grid-cols-4,
  main .grid.lg\:grid-cols-6,
  main .grid.xl\:grid-cols-6,
  main .grid.grid-cols-2.sm\:grid-cols-3,
  main .grid.grid-cols-2.sm\:grid-cols-3.md\:grid-cols-4,
  main .grid.grid-cols-2.sm\:grid-cols-3.md\:grid-cols-4.lg\:grid-cols-6,
  main .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-6,
  main .grid.grid-cols-3.sm\:grid-cols-4,
  main .grid.grid-cols-3.sm\:grid-cols-4.md\:grid-cols-5,
  main .grid.grid-cols-3.sm\:grid-cols-4.md\:grid-cols-5.lg\:grid-cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
  }
  /* catch-all: any multi-col game/provider grid inside main on mobile */
  main .grid[class*="grid-cols-"]:not(.grid-cols-1):not(.lg\:grid-cols-12):not(.lg\:grid-cols-3) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* keep hero 1-col / 12-col layouts */
  main .grid.grid-cols-1,
  main .grid.grid-cols-1.lg\:grid-cols-12,
  main .grid.grid-cols-1.lg\:grid-cols-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Compact sticky header — P1 shrink / 40px touch */
  main > header.sticky,
  header.sticky.top-0 {
    height: 52px !important;
    min-height: 52px;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    gap: 0.35rem;
    overflow: hidden;
  }
  main > header .xl\:flex,
  header nav.hidden.xl\:flex {
    display: none !important;
  }
  header .flex.items-center.gap-4,
  header .flex.items-center.gap-4.sm\:gap-6 {
    gap: 0.5rem !important;
    min-width: 0;
    flex-shrink: 1;
  }
  #openSidebar {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  header a[href="main.html"] .w-8,
  header a[href="main.html"] .sm\:w-10 {
    width: 1.75rem !important;
    height: 1.75rem !important;
  }
  header button[onclick*="deposit"],
  header button[onclick*="withdrawal"] {
    min-height: 40px;
    min-width: 40px;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    font-size: 0.75rem !important;
    flex-shrink: 0;
  }
  #user-menu-trigger {
    min-width: 40px;
    min-height: 40px;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
  }
  /* hide balance text cluster on very narrow to prevent header push */
  header .hidden.xs\:flex.flex-col {
    display: none !important;
  }

  /* Section spacing — P2 */
  main .space-y-8 > section,
  main section {
    margin-bottom: 0.25rem;
  }
  main .mb-12 {
    margin-bottom: 1.5rem !important;
  }
  main .p-4.sm\:p-6,
  main .px-4.sm\:px-6 {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  /* Game cards — readable 2-col (aspect untouched) */
  .game-card .p-2\.5,
  .game-card .p-2,
  .game-card > div:last-child {
    padding: 0.5rem 0.55rem !important;
  }
  .game-card h3,
  .game-card .text-xs.font-bold {
    font-size: 0.8125rem !important;
    line-height: 1.25;
  }
  .game-card p.text-\[10px\] {
    font-size: 0.625rem;
  }
  .game-card:active .game-img,
  .game-card:active img {
    transform: scale(0.96);
  }
  .game-card img,
  .game-img {
    transition: transform 0.15s ease;
  }

  /* P2 sticky titles DISABLED (20261030vid) — caused 인기 게임 bar to cover 아레나 스포츠 on scroll */
  .mobile-sticky-title {
    position: static !important;
    z-index: auto !important;
    backdrop-filter: none !important;
    background: transparent !important;
  }

  /* ── Mobile hamburger drawer: full usable width, never mini, readable labels ── */
  #sidebar {
    width: min(86vw, 300px) !important;
    max-width: 86vw !important;
    min-width: min(260px, 86vw) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    white-space: normal !important; /* override HTML whitespace-nowrap */
    -webkit-overflow-scrolling: touch;
    outline: none !important;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.28);
  }
  #sidebar.mini-sidebar {
    /* mobile drawer must never collapse to icon rail */
    width: min(86vw, 300px) !important;
    max-width: 86vw !important;
  }
  #sidebar .nav-text,
  #sidebar .nav-badge,
  #sidebar .nav-section-title {
    display: inline !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: none !important;
    visibility: visible !important;
    white-space: nowrap;
    overflow: visible;
  }
  #sidebar.mini-sidebar .nav-text,
  #sidebar.mini-sidebar .nav-badge,
  #sidebar.mini-sidebar .nav-section-title {
    display: inline !important;
    opacity: 1 !important;
    width: auto !important;
  }
  #sidebar .menu-link {
    justify-content: flex-start !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    gap: 0.75rem !important;
    min-height: 44px;
    outline: none !important;
    box-shadow: none !important;
  }
  #sidebar .menu-link:focus,
  #sidebar .menu-link:focus-visible,
  #sidebar button:focus,
  #sidebar button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
  #sidebar .provider-dot-container {
    justify-content: flex-start !important;
    width: auto !important;
  }
  #closeSidebar {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    outline: none !important;
  }
  #sidebar > div:first-child {
    padding-left: 1rem !important;
    padding-right: 0.75rem !important;
  }
  body.mobile-drawer-open {
    overflow: hidden !important;
  }
  #sidebarOverlay {
    z-index: 45 !important;
  }
  #sidebar {
    z-index: 50 !important;
  }

  /* Modals → bottom-sheet */
  #notice-modal,
  #login-modal,
  #register-modal,
  #providers-modal {
    align-items: flex-end !important;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  #notice-modal .modal-content,
  #login-modal .modal-content,
  #register-modal .modal-content,
  #providers-modal .modal-content {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh;
    overflow-y: auto;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
    margin: 0 !important;
  }
  #notice-modal .modal-close,
  #login-modal .modal-close,
  #register-modal .modal-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    top: 0.5rem !important;
    right: 0.5rem !important;
  }

  /* ── P1: Bottom tab bar (5 tabs) ── */
  #arena-mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    justify-content: space-around;
    align-items: stretch;
    max-width: 100vw;
    overflow: hidden;
  }
  .dark #arena-mobile-tabbar {
    background: rgba(17, 24, 39, 0.96);
    border-top-color: rgba(55, 65, 81, 0.85);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }
  #arena-mobile-tabbar a,
  #arena-mobile-tabbar button.tab-more {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: -0.01em;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
    padding: 0 2px;
  }
  .dark #arena-mobile-tabbar a,
  .dark #arena-mobile-tabbar button.tab-more {
    color: #9ca3af;
  }
  #arena-mobile-tabbar a img,
  #arena-mobile-tabbar button.tab-more img,
  #arena-mobile-tabbar a .tab-fa,
  #arena-mobile-tabbar button.tab-more .tab-fa {
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 20px;
    opacity: 0.75;
    filter: grayscale(0.2);
  }
  #arena-mobile-tabbar a span,
  #arena-mobile-tabbar button.tab-more span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  #arena-mobile-tabbar a.is-active,
  #arena-mobile-tabbar button.tab-more.is-active {
    color: #0082f0;
  }
  .dark #arena-mobile-tabbar a.is-active,
  .dark #arena-mobile-tabbar button.tab-more.is-active {
    color: #38bdf8;
  }
  #arena-mobile-tabbar a.is-active img,
  #arena-mobile-tabbar a.is-active .tab-fa,
  #arena-mobile-tabbar button.tab-more.is-active img,
  #arena-mobile-tabbar button.tab-more.is-active .tab-fa {
    opacity: 1;
    filter: none;
  }
  #arena-mobile-tabbar a:active,
  #arena-mobile-tabbar button.tab-more:active {
    transform: scale(0.96);
  }

  /* Content clearance for tab bar */
  body.has-mobile-tabbar main {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 8px) !important;
  }
  body.has-mobile-tabbar main .flex-1.overflow-y-auto,
  body.has-mobile-tabbar main > .overflow-y-auto,
  body.has-mobile-tabbar .right-scroll {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px);
  }

  /* Hero intro */
  main h1.text-4xl {
    font-size: 1.65rem !important;
    line-height: 1.2 !important;
  }
  main .lg\:col-span-5 .flex.flex-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 0.65rem !important;
  }
  main .lg\:col-span-5 .flex.flex-wrap > button {
    width: 100% !important;
    min-height: 44px;
  }
  main .grid.grid-cols-1.lg\:grid-cols-12 {
    gap: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  /* Provider / lobby mobile */
  .provider-card > div:last-child {
    padding: 0.4rem 0.45rem !important;
  }
  .provider-card h3 {
    font-size: 0.75rem !important;
    line-height: 1.2;
  }
  .provider-card p {
    font-size: 0.6rem !important;
  }
  .provider-tile-name {
    font-size: 0.72rem;
  }
  .provider-tile-mark {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
  }
  [data-lobby-view] .lobby-head {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.4rem 1rem;
    background: rgba(9, 15, 30, 0.92);
    backdrop-filter: blur(8px);
  }
  html:not(.dark) [data-lobby-view] .lobby-head {
    background: rgba(241, 245, 249, 0.94);
  }
  [data-lobby-view] .lobby-head h2 {
    font-size: 0.95rem;
  }
  [data-lobby-view] .lobby-head h2 img {
    display: none;
  }
  .lobby-back,
  .lobby-chip {
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
  }
  .lobby-enter {
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
  }
}

@media (min-width: 768px) {
  #arena-mobile-tabbar {
    display: none !important;
  }
}

/* === SPEC v1 P0 (2026-10-30 스포츠/디자인) — max-width 767 only === */
@media (max-width: 767px) {
  html, body, main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  main .flex-1,
  main .right-scroll,
  .max-w-\[1400px\] {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Force 2-col game/provider grids (fix 3–6 col squeeze) */
  .provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
  }
  main .grid.grid-cols-2,
  main .grid.grid-cols-3,
  main .grid.sm\:grid-cols-3,
  main .grid.md\:grid-cols-4,
  main .grid.lg\:grid-cols-5,
  main .grid.lg\:grid-cols-6,
  main .grid.xl\:grid-cols-6,
  main [class*="grid-cols-"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* keep single-col intentional layouts */
  main .grid.grid-cols-1:not([class*="sm:grid-cols"]):not([class*="md:grid-cols"]):not([class*="lg:grid-cols"]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  main .grid.grid-cols-1.lg\:grid-cols-12 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .game-card,
  .provider-card {
    min-width: 0 !important;
    max-width: 100%;
  }
  .game-card h3,
  .game-card p,
  .provider-card h3,
  .provider-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Chip / filter row: internal scroll only */
  .overflow-x-auto.hide-scroll,
  .flex.items-center.gap-2.sm\:gap-3.overflow-x-auto {
    max-width: 100%;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Clip the window only. A broad carousel id rule used to set overflow:hidden
     on the track too, which clips slides 2 and 3 after translateX. */
  #carousel-container {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  #carousel-track {
    overflow: visible !important;
  }
  #carousel-track .min-w-full {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  /* Header: prevent push overflow */
  main > header.sticky,
  header.sticky.top-0 {
    max-width: 100vw;
    overflow: hidden;
  }
  main > header .flex.items-center.gap-2,
  main > header .flex.items-center.gap-3 {
    min-width: 0;
    flex-shrink: 1;
  }
}

/* ===== 2026-10-30 tables: 목록 테이블 → 모바일 카드 (≤767px 전용) ===== */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  /* 닫힌 드로어의 그림자/가장자리 핸들이 본문 좌측에 비치지 않도록 */
  #sidebar.-translate-x-full { box-shadow: none !important; visibility: hidden; }
  #toggleDesktopSidebar { display: none !important; }
  .overflow-x-auto:has(> table.m-card-table) { overflow-x: visible !important; }
  table.m-card-table, table.m-card-table tbody { display: block; width: 100%; }
  table.m-card-table thead tr { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; }
  table.m-card-table thead th { display: none; padding: 0 !important; }
  table.m-card-table thead th:has(input[type=checkbox]) { display: flex; align-items: center; gap: .5rem; width: auto !important; }
  table.m-card-table thead th:has(input[type=checkbox])::after { content: "전체 선택"; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; white-space: nowrap; }
  table.m-card-table thead tr:not(:has(input[type=checkbox])) { display: none; }
  table.m-card-table tbody tr {
    display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: .6rem; row-gap: .3rem;
    padding: .85rem .95rem; align-items: center;
  }
  table.m-card-table tbody tr.m-has-chk { grid-template-columns: 22px minmax(0,1fr) auto; }
  table.m-card-table tbody td { display: block; padding: 0 !important; width: auto !important; max-width: none !important;
    text-align: left !important; word-break: keep-all; overflow-wrap: anywhere; min-width: 0; }
  table.m-card-table tbody td.m-skip { display: none !important; }
  table.m-card-table tbody td.m-full { grid-column: 1 / -1; text-align: center !important; }
  table.m-card-table td.m-chk { grid-column: 1; grid-row: 1 / span 3; align-self: start; padding-top: 2px !important; }
  table.m-card-table td.m-title { grid-column: 1; grid-row: 1; font-size: 15px; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.m-card-table tr.m-has-chk td.m-title { grid-column: 2; }
  table.m-card-table td.m-num { grid-column: -2; grid-row: 1; justify-self: end; font-size: 11px !important; white-space: nowrap; opacity: .8; }
  table.m-card-table td.m-num::before { content: "No."; }
  table.m-card-table td.m-body, table.m-card-table td.m-extra { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.45;
    white-space: normal !important; overflow: hidden; text-overflow: clip;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  table.m-card-table tr.m-has-chk td.m-body, table.m-card-table tr.m-has-chk td.m-extra { grid-column: 2 / -1; }
  table.m-card-table td.m-badge { grid-column: 1; white-space: nowrap; justify-self: start; }
  table.m-card-table tr.m-has-chk td.m-badge { grid-column: 2; }
  table.m-card-table td.m-date { grid-column: 1 / -1; font-size: 11.5px !important; white-space: nowrap; opacity: .85; }
  table.m-card-table tr.m-has-chk td.m-date { grid-column: 2 / -1; }
  table.m-card-table td.m-badge + td.m-date { grid-column: -2; justify-self: end; }
}


/* ===== 2026-10-30 remain: deposit/withdraw visibility + scroll-top ===== */
@media (max-width: 767px) {
  /* Sidebar must not consume flex space while fixed-offscreen */
  body.flex > #sidebar,
  body > #sidebar {
    position: fixed !important;
    flex: 0 0 0 !important;
    max-width: min(86vw, 300px) !important;
  }
  body.flex > main,
  body > main {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
  }

  /* History / board table wrappers: always full-width in viewport */
  .right-scroll,
  .right-scroll > .max-w-\[1400px\],
  .right-scroll .mx-auto.w-full {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .right-scroll .rounded-3xl:has(> table.m-card-table),
  .right-scroll .rounded-3xl:has(table.m-card-table),
  #board-list:has(table.m-card-table) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    position: relative !important;
    overflow: visible !important;
  }
  table.m-card-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }

  /* Unhide Tailwind "hidden md:table-cell" fields inside card rows (JS no longer m-skips them) */
  table.m-card-table tbody td.hidden.md\:table-cell:not(.m-skip),
  table.m-card-table tbody td[class*="md:table-cell"]:not(.m-skip) {
    display: block !important;
  }
  /* Hide nested mobile-only duplicate chips when card fields are shown */
  table.m-card-table tbody td .block.md\:hidden,
  table.m-card-table tbody td .md\:hidden {
    display: none !important;
  }

  /* Scroll-to-top: sit above bottom tab bar so it does not cover 「더보기」 */
  body.has-mobile-tabbar #scroll-to-top,
  body:has(#arena-mobile-tabbar) #scroll-to-top,
  #scroll-to-top {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 16px) !important;
    right: 1rem !important;
    z-index: 44 !important; /* tabbar is 45 — button above content, below/beside tab chrome */
  }
}



/* ===== 2026-10-30 hotfix: wl-deposit-notice must not steal body.flex row ===== */
#wl-deposit-notice {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 48rem;
  flex: 0 0 auto;
  align-self: stretch;
  height: auto !important;
  min-height: 0;
}
/* Belt: if notice is ever a direct body.flex child, pull it out of the row */
body.flex > #wl-deposit-notice,
body > #wl-deposit-notice {
  position: absolute !important;
  left: 0;
  right: 0;
  top: 0;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 0 !important;
  height: auto !important;
  z-index: 25;
  margin: 0 !important;
  border-radius: 0 !important;
}
@media (max-width: 767px) {
  body.flex > #wl-deposit-notice,
  body > #wl-deposit-notice {
    position: fixed !important;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(60px + env(safe-area-inset-top, 0px) + 4px);
    width: auto !important;
    max-width: none !important;
    z-index: 40;
  }
  main #wl-deposit-notice,
  .right-scroll > #wl-deposit-notice {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
