/* ==========================================================================
   ANIME BATTLE / AN NAM LUC CUU — DEDICATED MOBILE UI/UX (OPTION A)
   Strictly scoped under html[data-ui-mode="mobile"] so Desktop PC is 100%
   untouched when html[data-ui-mode="desktop"].
   ========================================================================== */

/* 1. Hide mobile-only chrome on Desktop PC */
.m-header-brand,
.m-search-trigger,
.m-search-close,
#mobile-bottom-nav,
#mobile-more-sheet,
#mobile-more-backdrop {
    display: none;
}

/* Floating return-to-mobile pill when user explicitly picks Desktop view on a phone */
#mobile-return-pill {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #ffd16b;
    background: rgba(20, 20, 24, 0.94);
    color: #ffd16b;
    font: 700 13px/1 Inter, system-ui, sans-serif;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}
#mobile-return-pill[hidden] {
    display: none !important;
}

/* ==========================================================================
   2. MOBILE TOKENS & APP SHELL (html[data-ui-mode="mobile"])
   ========================================================================== */
html[data-ui-mode="mobile"] {
    --m-header-h: 56px;
    --m-nav-h: 62px;
    --m-bg: #0c0c0f;
    --m-surface: #141419;
    --m-raised: #1c1c24;
    --m-border: #2a2a35;
    --m-border-strong: #3a3a48;
    --m-gold: #ffd16b;
    --m-gold-strong: #ffb84d;
    --m-cyan: #53dff1;
    --m-text: #f3f3f7;
    --m-muted: #a4a4b3;
    --app-header: var(--m-header-h);
    scroll-padding-top: calc(var(--m-header-h) + 12px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html[data-ui-mode="mobile"] body.site-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: var(--m-header-h) minmax(0, 1fr) !important;
    grid-template-areas: "header" "workspace" !important;
    background: var(--m-bg);
    color: var(--m-text);
    overflow-x: clip;
}

html[data-ui-mode="mobile"] body.m-sheet-open {
    overflow: hidden;
}

/* Hide Desktop Sidebar, Backdrop & Hamburger Menu */
html[data-ui-mode="mobile"] .app-sidebar,
html[data-ui-mode="mobile"] #app-drawer-backdrop,
html[data-ui-mode="mobile"] #app-menu-toggle {
    display: none !important;
}

/* Compact 56px Single-Row Top Header */
html[data-ui-mode="mobile"] [hidden] {
    display: none !important;
}

html[data-ui-mode="mobile"] .app-header:not([hidden]) {
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: var(--m-header-h) !important;
    min-height: var(--m-header-h) !important;
    padding: 0 12px !important;
    background: rgba(15, 15, 20, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .m-header-brand {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    flex: 0 1 auto;
    min-width: 0;
    text-decoration: none;
}

html[data-ui-mode="mobile"] .m-header-brand img {
    display: block;
    height: 32px;
    width: auto;
    max-width: 112px;
    object-fit: contain;
}

html[data-ui-mode="mobile"] .app-header-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 6px !important;
    margin-left: auto;
    min-width: 0;
    flex-shrink: 0;
}

html[data-ui-mode="mobile"] .app-header .app-auth-controls {
    inline-size: auto !important;
    display: flex;
    align-items: center;
    gap: 6px !important;
}

html[data-ui-mode="mobile"] .m-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--m-border);
    background: var(--m-raised);
    color: var(--m-text);
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

html[data-ui-mode="mobile"] .m-search-trigger svg,
html[data-ui-mode="mobile"] .m-search-close svg {
    width: 18px;
    height: 18px;
}

html[data-ui-mode="mobile"] .app-language select {
    min-width: 48px !important;
    width: auto;
    min-height: 38px !important;
    height: 38px;
    padding: 0 8px !important;
    border-radius: 10px;
    border: 1px solid var(--m-border);
    background: var(--m-raised);
    color: var(--m-text);
    font-size: 12.5px;
    font-weight: 600;
}

html[data-ui-mode="mobile"] .app-header-coins {
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 209, 107, 0.35);
    background: rgba(255, 209, 107, 0.1);
    color: var(--m-gold);
    font-size: 12px;
    font-weight: 700;
    gap: 5px;
}

html[data-ui-mode="mobile"] .app-account-loading {
    width: 38px;
    height: 38px;
    border-radius: 999px;
}

html[data-ui-mode="mobile"] .app-account-button {
    min-height: 38px !important;
    height: 38px;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12.5px !important;
    font-weight: 700;
    border: 1px solid var(--m-border-strong);
    background: var(--m-raised);
    color: var(--m-text);
}

html[data-ui-mode="mobile"] .app-account-button.is-authenticated {
    padding: 2px 8px 2px 3px !important;
    gap: 5px;
}

html[data-ui-mode="mobile"] .app-account-button.is-authenticated #account-label {
    display: none;
}

html[data-ui-mode="mobile"] .app-account-avatar {
    width: 30px;
    height: 30px;
}

html[data-ui-mode="mobile"] .app-account-button.app-signup {
    background: var(--m-gold);
    border-color: var(--m-gold);
    color: #161108;
}

@media (max-width: 440px) {
    html[data-ui-mode="mobile"] #account-signup {
        display: none !important;
    }
}

/* Search Overlay triggered by .m-search-trigger */
html[data-ui-mode="mobile"] #global-search {
    display: none;
}

html[data-ui-mode="mobile"] body.m-search-open #global-search {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 85;
    height: var(--m-header-h);
    max-width: none;
    width: 100%;
    padding: 0 10px;
    gap: 6px;
    border: 0;
    border-bottom: 1px solid var(--m-gold);
    border-radius: 0;
    background: #14141a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.72);
}

html[data-ui-mode="mobile"] body.m-search-open #global-search > svg {
    margin-left: 4px;
    color: var(--m-gold);
}

html[data-ui-mode="mobile"] body.m-search-open #global-search-input {
    font-size: 16px;
    padding: 8px 6px;
}

html[data-ui-mode="mobile"] body.m-search-open .m-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--m-border);
    border-radius: 10px;
    background: var(--m-raised);
    color: var(--m-text);
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

html[data-ui-mode="mobile"] body.m-search-open #global-search-results {
    position: fixed;
    top: calc(var(--m-header-h) + 6px);
    left: 10px;
    right: 10px;
    max-height: min(62dvh, 420px);
    z-index: 86;
    border-radius: 14px;
    border: 1px solid var(--m-border-strong);
    background: #181820;
}

/* Main Workspace & Safe Bottom Clearance above 5-Tab Bar */
html[data-ui-mode="mobile"] .site-shell .workspace {
    min-height: calc(100dvh - var(--m-header-h));
}

html[data-ui-mode="mobile"] .site-shell main {
    padding: 12px 14px calc(var(--m-nav-h) + 24px + env(safe-area-inset-bottom)) !important;
}

html[data-ui-mode="mobile"] .site-shell .site-footer {
    padding: 12px 14px calc(var(--m-nav-h) + 18px + env(safe-area-inset-bottom));
    font-size: 11px;
    gap: 10px;
    background: #101015;
    border-top: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .site-shell .toast {
    bottom: calc(var(--m-nav-h) + 14px + env(safe-area-inset-bottom));
    border-radius: 12px;
}

/* ==========================================================================
   3. FIXED 5-TAB BOTTOM NAVIGATION BAR
   ========================================================================== */
html[data-ui-mode="mobile"] #mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    min-height: calc(var(--m-nav-h) + env(safe-area-inset-bottom));
    padding: 5px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(15, 15, 20, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--m-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--m-muted);
    text-decoration: none;
    font: 600 10.5px/1.15 Inter, system-ui, sans-serif;
    cursor: pointer;
    position: relative;
    transition: color 0.14s ease, background-color 0.14s ease, transform 0.12s ease;
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab:active {
    transform: scale(0.95);
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab.is-active {
    color: var(--m-gold);
    background: rgba(255, 209, 107, 0.11);
    font-weight: 700;
}

html[data-ui-mode="mobile"] #mobile-bottom-nav .m-tab.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28%;
    right: 28%;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: var(--m-gold);
}

/* ==========================================================================
   4. MORE BOTTOM SHEET
   ========================================================================== */
html[data-ui-mode="mobile"] #mobile-more-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

html[data-ui-mode="mobile"] #mobile-more-sheet {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    max-height: 82dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
    background: #15151c;
    border-top: 1px solid var(--m-border-strong);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.78);
    transform: translateY(100%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-ui-mode="mobile"] #mobile-more-sheet.is-open {
    transform: translateY(0);
}

html[data-ui-mode="mobile"] .m-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 2px 0 4px;
}

html[data-ui-mode="mobile"] .m-sheet-handle span {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #3e3e4e;
}

html[data-ui-mode="mobile"] .m-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

html[data-ui-mode="mobile"] .m-sheet-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--m-text);
}

html[data-ui-mode="mobile"] .m-sheet-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--m-border);
    background: var(--m-raised);
    color: var(--m-text);
    padding: 0;
    cursor: pointer;
}

html[data-ui-mode="mobile"] .m-sheet-close svg {
    width: 18px;
    height: 18px;
}

html[data-ui-mode="mobile"] .m-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

html[data-ui-mode="mobile"] .m-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--m-border);
    background: var(--m-raised);
    color: var(--m-text);
    text-decoration: none;
    text-align: left;
    font: 600 13.5px/1.25 Inter, system-ui, sans-serif;
    cursor: pointer;
}

html[data-ui-mode="mobile"] .m-more-item svg {
    width: 19px;
    height: 19px;
    color: var(--m-gold);
    flex-shrink: 0;
}

html[data-ui-mode="mobile"] .m-more-item.is-active {
    border-color: var(--m-gold);
    background: rgba(255, 209, 107, 0.12);
    color: #fff;
}

html[data-ui-mode="mobile"] .m-more-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

html[data-ui-mode="mobile"] .m-more-text small {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--m-muted);
}

html[data-ui-mode="mobile"] .m-sheet-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .m-lang-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #101015;
    border: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .m-lang-switch button {
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--m-muted);
    font: 600 13px/1 Inter, system-ui, sans-serif;
    cursor: pointer;
}

html[data-ui-mode="mobile"] .m-lang-switch button.is-active {
    background: var(--m-gold);
    color: #161108;
    font-weight: 800;
}

html[data-ui-mode="mobile"] .m-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--m-muted);
}

html[data-ui-mode="mobile"] .m-legal-links a {
    color: var(--m-muted);
    text-decoration: none;
    padding: 6px 4px;
}

/* ==========================================================================
   5. MOBILE HOME (/home)
   ========================================================================== */
html[data-ui-mode="mobile"] .homev2-heading {
    margin: 2px 0 12px;
}

html[data-ui-mode="mobile"] .homev2-heading h1 {
    font-size: 23px !important;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

html[data-ui-mode="mobile"] .homev2-heading p {
    font-size: 13px;
    margin-top: 4px;
}

html[data-ui-mode="mobile"] .homev2-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
}

html[data-ui-mode="mobile"] .homev2-content {
    gap: 20px;
}

html[data-ui-mode="mobile"] .homev2-aside {
    max-width: none;
}

/* Hero Banner with Clear Primary Gold CTA */
html[data-ui-mode="mobile"] .homev2-feature {
    min-height: 220px;
    border-radius: 16px;
    border: 1px solid rgba(255, 209, 107, 0.28);
    background: #17171f;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

html[data-ui-mode="mobile"] .homev2-feature-copy {
    max-width: 100% !important;
    min-height: 220px;
    padding: 18px 16px 16px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

html[data-ui-mode="mobile"] .homev2-feature-copy::before {
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(14, 14, 20, 0.25) 0%, rgba(14, 14, 20, 0.84) 55%, rgba(12, 12, 16, 0.97) 100%) !important;
}

html[data-ui-mode="mobile"] .homev2-eyebrow {
    align-self: flex-start;
    background: rgba(255, 209, 107, 0.18);
    color: var(--m-gold);
    border: 1px solid rgba(255, 209, 107, 0.35);
    padding: 3px 8px;
}

html[data-ui-mode="mobile"] .homev2-feature h2 {
    font-size: 21px !important;
    margin: 8px 0 4px;
    line-height: 1.2;
}

html[data-ui-mode="mobile"] .homev2-feature p {
    font-size: 13px;
    margin: 0 0 14px;
    color: #d6d6e0;
    line-height: 1.45;
}

html[data-ui-mode="mobile"] .homev2-feature .homev2-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

html[data-ui-mode="mobile"] .homev2-feature .homev2-button {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
}

html[data-ui-mode="mobile"] .homev2-feature .homev2-button:not(.homev2-button-secondary) {
    background: linear-gradient(180deg, #ffe08a 0%, #ffba42 100%);
    border-color: #ffe08a;
    color: #171108;
    box-shadow: 0 6px 20px rgba(255, 186, 66, 0.28);
}

html[data-ui-mode="mobile"] .homev2-feature .homev2-button-secondary {
    min-height: 42px;
    background: rgba(34, 34, 44, 0.88);
    border-color: var(--m-border-strong);
    color: var(--m-text);
    font-weight: 600;
}

html[data-ui-mode="mobile"] .homev2-feature-controls {
    top: 12px;
    right: 12px;
    bottom: auto;
    background: rgba(12, 12, 16, 0.65);
    padding: 4px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

html[data-ui-mode="mobile"] .homev2-feature-arrow {
    width: 26px;
    height: 26px;
}

/* Section Headings */
html[data-ui-mode="mobile"] .homev2-section-head {
    gap: 8px;
    margin-bottom: 10px;
}

html[data-ui-mode="mobile"] .homev2-section-head h2 {
    font-size: 17px !important;
    width: auto;
}

html[data-ui-mode="mobile"] .homev2-filters {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
}

html[data-ui-mode="mobile"] .homev2-filters::-webkit-scrollbar,
html[data-ui-mode="mobile"] .homev2-modes::-webkit-scrollbar {
    display: none;
}

html[data-ui-mode="mobile"] .homev2-filter {
    flex-shrink: 0;
    min-height: 34px;
    padding: 5px 12px;
}

/* Quick Play Modes: Horizontal Snap Carousel */
html[data-ui-mode="mobile"] .homev2-modes {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

html[data-ui-mode="mobile"] .homev2-mode {
    flex: 0 0 80%;
    max-width: 280px;
    min-height: 82px;
    scroll-snap-align: start;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    gap: 10px;
}

html[data-ui-mode="mobile"] .homev2-mode-image {
    width: 58px;
    height: 54px;
    border-radius: 10px;
}

html[data-ui-mode="mobile"] .homev2-play-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--m-gold);
    color: #161108;
}

/* Featured Fighters: Compact 3-Column Grid (2-col on < 360px) */
html[data-ui-mode="mobile"] .homev2-fighters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

@media (max-width: 359px) {
    html[data-ui-mode="mobile"] .homev2-fighters {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-card {
    border-radius: 12px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-card:hover {
    transform: none;
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-portrait {
    aspect-ratio: 3 / 3.5;
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-portrait-thumb {
    width: 28px;
    height: 28px;
    right: 5px;
    bottom: 5px;
    border-radius: 6px;
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-portrait-badge {
    top: 5px;
    left: 5px;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 5px !important;
    font-size: 9px !important;
}

html[data-ui-mode="mobile"] .homev2-fighters .v2-card-copy {
    padding: 8px;
    background: var(--m-surface);
}

html[data-ui-mode="mobile"] .homev2-fighter-name {
    font-size: 12px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html[data-ui-mode="mobile"] .homev2-fighter-picks {
    font-size: 10.5px;
    min-height: 24px;
    padding: 3px 6px;
    gap: 4px;
}

html[data-ui-mode="mobile"] .homev2-fighter-picks svg {
    width: 11px;
    height: 11px;
}

html[data-ui-mode="mobile"] .homev2-account {
    border-radius: 16px;
    padding: 16px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .homev2-update {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 14px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] .homev2-update-copy {
    padding: 14px;
}

/* ==========================================================================
   6. MODES, ROSTER, DETAIL, STORE & PROFILE
   ========================================================================== */
html[data-ui-mode="mobile"] .v2-heading {
    margin-bottom: 16px;
}

html[data-ui-mode="mobile"] .v2-heading h1 {
    font-size: 23px;
}

/* /modes */
html[data-ui-mode="mobile"] .v2-mode-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

html[data-ui-mode="mobile"] .v2-mode-card {
    border-radius: 14px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] .v2-mode-card h2 {
    margin: 14px 14px 6px;
    font-size: 18px;
}

html[data-ui-mode="mobile"] .v2-mode-card p {
    margin: 0 14px 14px;
    font-size: 13px;
}

html[data-ui-mode="mobile"] .v2-mode-card .v2-button {
    margin: auto 14px 14px;
    min-height: 44px;
    border-radius: 10px;
}

/* /roster & /store */
html[data-ui-mode="mobile"] .v2-roster-header,
html[data-ui-mode="mobile"] .v2-store-hero-banner {
    padding: 16px;
    min-height: 0;
    border-radius: 14px;
    margin-bottom: 14px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] .v2-roster-header h1,
html[data-ui-mode="mobile"] .v2-store-banner-title {
    font-size: 22px;
}

html[data-ui-mode="mobile"] .v2-roster-hero-banner,
html[data-ui-mode="mobile"] .v2-store-hero-art {
    width: 65%;
    opacity: 0.35;
}

html[data-ui-mode="mobile"] .v2-roster-subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

html[data-ui-mode="mobile"] .v2-toolbar {
    top: var(--m-header-h);
    gap: 8px;
    padding: 8px 0;
    background: rgba(12, 12, 15, 0.96);
}

html[data-ui-mode="mobile"] .v2-toolbar-left,
html[data-ui-mode="mobile"] .v2-toolbar-right,
html[data-ui-mode="mobile"] .v2-toolbar-center {
    width: 100%;
    margin-left: 0;
    gap: 8px;
}

html[data-ui-mode="mobile"] .v2-search-box {
    width: 100%;
    height: 42px;
    border-radius: 12px;
}

html[data-ui-mode="mobile"] .v2-search-input {
    font-size: 16px !important;
}

html[data-ui-mode="mobile"] .v2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 560px) {
    html[data-ui-mode="mobile"] .v2-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

html[data-ui-mode="mobile"] .v2-card {
    border-radius: 12px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] .v2-card:hover {
    transform: none;
}

html[data-ui-mode="mobile"] .v2-card-copy {
    padding: 10px;
    background: var(--m-surface);
}

html[data-ui-mode="mobile"] .v2-detail {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
    border-radius: 14px;
}

html[data-ui-mode="mobile"] .v2-detail .v2-portrait {
    width: 140px;
    height: 186px;
    min-width: 140px;
    margin: 0 auto;
}

html[data-ui-mode="mobile"] .v2-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html[data-ui-mode="mobile"] .v2-detail-actions .v2-detail-btn,
html[data-ui-mode="mobile"] .v2-detail-actions .v2-badge {
    width: 100%;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
}

/* /profile */
html[data-ui-mode="mobile"] .v2-profile-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
    border-radius: 14px;
}

html[data-ui-mode="mobile"] .v2-profile-avatar-wrap {
    width: 68px;
    height: 68px;
}

html[data-ui-mode="mobile"] .v2-profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--m-border);
}

html[data-ui-mode="mobile"] .v2-profile-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html[data-ui-mode="mobile"] .v2-profile-main-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

html[data-ui-mode="mobile"] .v2-profile-panel {
    padding: 16px !important;
    border-radius: 14px !important;
    overflow-x: auto;
}

html[data-ui-mode="mobile"] .v2-profile-combat-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html[data-ui-mode="mobile"] .v2-profile-fav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

html[data-ui-mode="mobile"] .v2-profile-table {
    font-size: 12px;
}

html[data-ui-mode="mobile"] .v2-profile-table th,
html[data-ui-mode="mobile"] .v2-profile-table td {
    padding: 8px 8px;
}

/* ==========================================================================
   7. SUPPORT PAGES, CONTROLS, SETTINGS, REDEEM & DIALOGS
   ========================================================================== */
html[data-ui-mode="mobile"] .rbx-redeem-page {
    padding: 12px 0 24px;
}

html[data-ui-mode="mobile"] .rbx-redeem-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

html[data-ui-mode="mobile"] .rbx-redeem-right {
    padding-top: 0;
}

html[data-ui-mode="mobile"] .rbx-redeem-input,
html[data-ui-mode="mobile"] .site-shell input[type="text"],
html[data-ui-mode="mobile"] .site-shell input[type="email"],
html[data-ui-mode="mobile"] .site-shell input[type="password"],
html[data-ui-mode="mobile"] .site-shell textarea {
    font-size: 16px;
}

html[data-ui-mode="mobile"] .site-shell .panel,
html[data-ui-mode="mobile"] .v2-panel {
    padding: 16px;
    border-radius: 14px;
    background: var(--m-surface);
    border-color: var(--m-border);
}

html[data-ui-mode="mobile"] #account-dialog,
html[data-ui-mode="mobile"] .v2-dialog {
    width: calc(100vw - 24px);
    max-width: 420px;
    border-radius: 18px;
    border-color: var(--m-border-strong);
    background: #16161d;
    padding: 20px;
}

/* Automatic Mobile Development Notice Popup */
#mobile-dev-notice {
    display: none;
    box-sizing: border-box;
    width: calc(100vw - 28px);
    max-width: 400px;
    margin: auto;
    padding: 0;
    border: 1px solid #3a3a48;
    border-radius: 18px;
    background: #16161d;
    color: #f3f3f7;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72);
    overflow: hidden;
}

#mobile-dev-notice[open] {
    display: block;
}

#mobile-dev-notice::backdrop {
    background: rgba(8, 8, 12, 0.76);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.m-dev-notice-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.m-dev-notice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.m-dev-notice-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 209, 107, 0.38);
    background: rgba(255, 209, 107, 0.14);
    color: #ffd16b;
    font: 700 11.5px/1 Inter, system-ui, sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.m-dev-notice-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.m-dev-notice-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #2e2e3a;
    border-radius: 10px;
    background: #20202a;
    color: #c6c6d4;
    padding: 0;
    cursor: pointer;
}

.m-dev-notice-close svg {
    width: 18px;
    height: 18px;
}

.m-dev-notice-title {
    margin: 2px 0 0;
    font: 700 19px/1.3 Inter, system-ui, sans-serif;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.m-dev-notice-desc {
    margin: 0;
    font: 400 14px/1.55 Inter, system-ui, sans-serif;
    color: #d0d0dd;
}

.m-dev-notice-btn {
    margin-top: 4px;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #ffe08a;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffe08a 0%, #ffba42 100%);
    color: #171108;
    font: 800 14px/1.2 Inter, system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 186, 66, 0.24);
}
