/* ============================================
   FarmBrawl — Sidebar Navigation (v8)
   Desktop: fixed left sidebar 220px
   Mobile:  hamburger → drawer from left
   ============================================ */

/* ─── SIDEBAR (desktop: fixed left) ─── */
.game-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    height: 100dvh;
    z-index: var(--farm-z-sticky);
    background: linear-gradient(180deg, var(--farm-bg-surface) 0%, var(--farm-bg-deep) 100%);
    border-right: 1px solid var(--farm-border-subtle);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 176, 74, 0.4) rgba(26, 20, 16, 0.9);
}
.game-sidebar::-webkit-scrollbar {
    width: 10px;
}
.game-sidebar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(74, 222, 128, 0.15);
}
.game-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.75), rgba(16, 185, 129, 0.55));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.95);
    min-height: 40px;
}
.game-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(110, 231, 183, 0.95), rgba(52, 211, 153, 0.75));
}

/* ─── Logo header ─── */
.game-sidebar-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.game-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}

.game-sidebar-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.game-sidebar-logo-text {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* ─── Nav groups (vertical) ─── */
.game-sidebar-nav {
    flex: 1;
    min-height: 0; /* allow flex child to scroll */
    overflow-y: auto;
    padding: 0.5rem 0.35rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    /* Visible themed scrollbar on nav list */
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.55) rgba(15, 23, 42, 0.85);
}
.game-sidebar-nav::-webkit-scrollbar {
    width: 10px;
}
.game-sidebar-nav::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 999px;
    margin: 4px 0;
}
.game-sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.8), rgba(16, 185, 129, 0.55));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.85);
    min-height: 48px;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.25);
}
.game-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #86efac, #34d399);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.45);
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-group-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem 0.2rem;
    margin-top: 0.15rem;
}

.nav-group-label span {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.nav-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.4rem 0.5rem;
}

/* ─── Nav tabs (sidebar style) — AAA hierarchy ─── */
.game-sidebar .nav-tab {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 0 var(--farm-radius-sm) var(--farm-radius-sm) 0;
    border: none;
    border-left: 2px solid transparent;
    background: transparent;
    /* text-slate-300 — clearer inactive than #94a3b8 */
    color: #cbd5e1;
    /* text-base + font-semibold */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    text-decoration: none;
    min-height: 42px;
    transition: transform 120ms var(--farm-ease-out), background-color var(--farm-transition-fast), border-color var(--farm-transition-fast), color var(--farm-transition-fast);
}
.game-sidebar .nav-tab:active {
    transform: scale(0.97);
}
.game-sidebar .nav-tab .nav-tab-ico {
    opacity: 0.9;
    font-size: 1.05rem;
    width: 1.25rem;
    transition: transform var(--farm-transition-fast), color var(--farm-transition-fast), opacity var(--farm-transition-fast), filter var(--farm-transition-fast);
}
.game-sidebar .nav-tab:hover .nav-tab-ico {
    opacity: 1;
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px currentColor);
}
/* hover:text-white + hover:bg-slate-800/50 */
.game-sidebar .nav-tab:not(.active):hover {
    background-color: rgba(30, 41, 59, 0.5);
    color: #ffffff;
}

/* Restore sidebar icon theme colors for inactive nav items */
.game-sidebar .nav-tab--farm .nav-tab-ico { color: #4ade80; }
.game-sidebar .nav-tab--attack .nav-tab-ico { color: #E5533B; }
.game-sidebar .nav-tab--roulette .nav-tab-ico { color: #fcd34d; }
.game-sidebar .nav-tab--shop .nav-tab-ico { color: #fcd34d; }
.game-sidebar .nav-tab--market .nav-tab-ico { color: #f87171; }
.game-sidebar .nav-tab--exchange .nav-tab-ico { color: #fb923c; }
.game-sidebar .nav-tab--withdrawals .nav-tab-ico { color: #94a3b8; }
.game-sidebar .nav-tab--staking .nav-tab-ico { color: #a78bfa; }
.game-sidebar .nav-tab--lab .nav-tab-ico { color: #a78bfa; }
.game-sidebar .nav-tab--forge .nav-tab-ico { color: #f87171; }
.game-sidebar .nav-tab--missions .nav-tab-ico { color: #60a5fa; }
.game-sidebar .nav-tab--inventory .nav-tab-ico { color: #a78bfa; }
.game-sidebar .nav-tab--vip .nav-tab-ico { color: #fcd34d; }
.game-sidebar .nav-tab--referrals .nav-tab-ico { color: #22d3ee; }

.game-sidebar .nav-tab.active {
    border-left-color: var(--farm-green-400, #a8d880);
    border-left-width: 3px;
    background: rgba(106, 176, 74, 0.08);
    color: #f0ebe3;
    box-shadow: inset 0 0 0 1px rgba(106, 176, 74, 0.1);
}
.game-sidebar .nav-tab.active .nav-tab-label {
    color: #f0ebe3;
    font-weight: 700;
}
/* Harvest glow on active icon */
.game-sidebar .nav-tab.active .nav-tab-ico {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(106, 176, 74, 0.7)) drop-shadow(0 0 12px rgba(106, 176, 74, 0.35));
}
.game-sidebar .nav-tab.active.nav-tab--farm .nav-tab-ico {
    color: #a8d880;
    filter: drop-shadow(0 0 6px rgba(106, 176, 74, 0.8)) drop-shadow(0 0 14px rgba(106, 176, 74, 0.45));
}
.game-sidebar select {
    color-scheme: dark;
}

.nav-tab-ico {
    width: 1.25rem;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.nav-tab-label {
    font-size: 1rem; /* text-base */
    font-weight: 600; /* font-semibold */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

/* ─── SISTEMA section premium ─── */
.sistema-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.08);
    margin-bottom: 0.25rem;
}
.sistema-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), transparent);
}
.sistema-header-icon {
    font-size: 0.55rem;
    color: rgba(168, 85, 247, 0.5);
    letter-spacing: 0.15em;
    font-weight: 800;
}
.sistema-header-text {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sistema-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    min-height: 34px;
    position: relative;
    overflow: hidden;
}
.sistema-btn:hover {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(30, 15, 50, 0.15));
    border-color: rgba(168, 85, 247, 0.15);
    color: #e2e8f0;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.05), inset 0 1px 0 rgba(255,255,255,0.04);
}
.sistema-btn:active {
    transform: scale(0.98);
}
.sistema-btn-ico {
    width: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.sistema-btn:hover .sistema-btn-ico {
    transform: scale(1.1);
    color: #a78bfa;
}
/* Icon colors per item */
.sistema-ico-calc { color: #14b8a6; }
.sistema-btn:hover .sistema-ico-calc { color: #5eead4; }
.sistema-ico-bolt { color: #eab308; }
.sistema-btn:hover .sistema-ico-bolt,
.sistema-toggle-wrap:hover .sistema-ico-bolt,
.sistema-lang-wrap:hover .sistema-ico-bolt { color: #fde047; }
.sistema-ico-globe { color: #3b82f6; }
.sistema-btn:hover .sistema-ico-globe,
.sistema-lang-wrap:hover .sistema-ico-globe { color: #60a5fa; }
.sistema-btn-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Discrete beta demo link (anchor styled as sistema-btn) */
a.sistema-btn--beta-link {
    text-decoration: none;
    color: #64748b;
    font-size: 0.72rem;
    opacity: 0.85;
}
a.sistema-btn--beta-link:hover {
    opacity: 1;
    color: #cbd5e1;
}
a.sistema-btn--beta-link .sistema-btn-ico {
    color: #64748b;
    font-size: 0.72rem;
}

/* Premium toggle */
.sistema-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    min-height: 34px;
}
.sistema-toggle-wrap:hover {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(30, 15, 50, 0.15));
    border-color: rgba(168, 85, 247, 0.15);
    color: #e2e8f0;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.05);
}
.sistema-toggle-wrap:hover .sistema-btn-ico {
    transform: scale(1.1);
    color: #a78bfa;
}
.sistema-toggle-track {
    position: relative;
    width: 1.75rem;
    height: 1rem;
    background: #1e293b;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.sistema-toggle-track:has(input:checked) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(88, 28, 135, 0.3));
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}
.sistema-toggle-track input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.sistema-toggle-dot {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    background: #64748b;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.sistema-toggle-track:has(input:checked) .sistema-toggle-dot {
    transform: translateX(12px);
    background: #a78bfa;
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

/* Premium language selector */
.sistema-lang-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    min-height: 34px;
}
.sistema-lang-wrap:hover {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(30, 15, 50, 0.15));
    border-color: rgba(168, 85, 247, 0.15);
    color: #e2e8f0;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.05);
}
.sistema-lang-wrap:hover .sistema-btn-ico {
    transform: scale(1.1);
    color: #a78bfa;
}
.sistema-lang-select {
    background: rgba(15, 20, 35, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.4rem;
    padding: 0.15rem 1.25rem 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: #c4b5fd;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' fill='%23a78bfa'%3E%3Cpath d='M1 2l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    background-size: 0.55rem;
    transition: all 0.2s ease;
}
.sistema-lang-select:hover {
    border-color: rgba(168, 85, 247, 0.25);
    background-color: rgba(88, 28, 135, 0.2);
}
.sistema-lang-select:focus {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.1);
}

/* Don José user card premium */
.sistema-user-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    padding: 0.7rem 0.75rem;
    border-radius: var(--farm-radius-md);
    border: 1px solid var(--farm-border-subtle);
    background: linear-gradient(135deg, rgba(30, 27, 46, 0.55), rgba(15, 10, 30, 0.5));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    cursor: pointer;
    transition: transform 120ms var(--farm-ease-out), background-color var(--farm-transition-fast), border-color var(--farm-transition-fast), box-shadow var(--farm-transition-fast);
    overflow: visible;
}
.sistema-user-card:hover {
    border-color: rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, rgba(49, 40, 78, 0.7), rgba(30, 20, 52, 0.6));
    box-shadow: var(--farm-shadow-md), 0 0 18px rgba(168, 85, 247, 0.18);
}
.sistema-user-card:active {
    transform: scale(0.97);
}
.sistema-user-avatar {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 0 2px rgba(15, 10, 30, 0.8), 0 0 8px rgba(52, 211, 153, 0.12);
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.6);
}
.sistema-user-card:hover .sistema-user-avatar {
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 0 0 2px rgba(15, 10, 30, 0.8), 0 0 12px rgba(52, 211, 153, 0.2);
}
.sistema-user-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    display: block;
}
.sistema-user-info {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    position: relative;
    z-index: 1;
    overflow: visible;
}
.sistema-user-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}
.sistema-user-role {
    /* Full role label — no ellipsis cut ("Asesor Agrícola") */
    font-size: 0.625rem; /* text-[10px] */
    font-weight: 700;
    color: #a78bfa;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    letter-spacing: 0.01em;
    word-break: normal;
}
.sistema-user-gear {
    position: relative;
    z-index: 1;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--farm-radius-full);
    border: none;
    background: var(--farm-divider);
    color: var(--farm-text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--farm-transition-fast), background-color var(--farm-transition-fast), color var(--farm-transition-fast);
    flex-shrink: 0;
}
.sistema-user-gear:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--farm-white);
    transform: rotate(45deg);
}
.sistema-user-gear:active {
    transform: rotate(90deg) scale(0.9);
}

/* ─── System status (Online + Ping) — bottom of sidebar ─── */
.sidebar-system-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--farm-radius-md, 0.75rem);
    border: 1px solid rgba(52, 211, 153, 0.15);
    background: rgba(6, 78, 59, 0.18);
    min-width: 0;
}

.sidebar-system-status .oracle-widget--sidebar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    text-decoration: none;
    flex: 1 1 auto;
    padding: 0.15rem 0.25rem;
    border: none;
    background: transparent;
    box-shadow: none;
}

.sidebar-system-status .oracle-widget--sidebar .oracle-widget-title {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #6ee7b7;
    text-transform: uppercase;
}

.sidebar-system-status .oracle-widget--sidebar .oracle-widget-live {
    font-size: 0.55rem;
    font-weight: 800;
    color: #34d399;
    letter-spacing: 0.04em;
}

.sidebar-system-status .oracle-widget-led {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
    flex-shrink: 0;
}

.sidebar-ping-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 0.2rem 0.35rem;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-ping-chip i {
    font-size: 0.65rem;
    color: #4ade80;
}

.sidebar-ping-val {
    font-variant-numeric: tabular-nums;
    color: #e2e8f0;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Compact size + status colors (hex literals — outrank base so measureHudPing warn/bad show) */
.sidebar-ping-chip .hud-ping-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}
.sidebar-ping-chip .hud-ping-dot.warn {
    background-color: #facc15 !important;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}
.sidebar-ping-chip .hud-ping-dot.bad {
    background-color: #f87171 !important;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
}

/* ─── Footer tools ─── */
.game-sidebar-footer {
    flex-shrink: 0;
    padding-bottom: 0.5rem;
}

.game-sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0 0.5rem;
}

.sidebar-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--farm-text-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    min-height: 36px;
}
.sidebar-tool-btn:hover {
    background: rgba(30, 41, 59, 0.4);
    color: #fff;
}

.game-sidebar-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    color: var(--farm-text-muted, #64748b);
    font-size: 0.75rem;
}
.game-sidebar-lang .game-lang-select {
    background: transparent;
    border: none;
    color: var(--farm-text-muted, #64748b);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
}

/* ─── Backdrop (mobile) ─── */
.game-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: calc(var(--farm-z-sticky) - 10);
    background: rgba(0, 0, 0, 0.6);
}
.game-sidebar-backdrop.open { display: block; }

/* ─── Hamburger toggle (mobile topbar) ─── */
.game-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    color: var(--farm-text-primary, #f1f5f9);
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.game-sidebar-toggle:active { transform: scale(0.92); }

/* ─── Bottom bar (mobile) ─── */
.game-bottom-bar { display: none; }

.game-bottom-bar-inner {
    display: flex;
    justify-content: space-evenly;
    max-width: 420px;
    margin: 0 auto;
}

.game-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
    padding: 0.35rem 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--farm-text-muted, #64748b);
    font-size: 0.58rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.game-bottom-btn i { font-size: 1.2rem; line-height: 1; }
.game-bottom-btn.active { color: var(--farm-green-400, #4ade80); }
.game-bottom-btn.active i { filter: drop-shadow(0 0 4px currentColor); }
.game-bottom-btn[data-group="economia"].active { color: var(--farm-gold-300, #fcd34d); }
.game-bottom-btn[data-group="crear"].active { color: var(--farm-purple-400, #a78bfa); }
.game-bottom-btn[data-group="progreso"].active { color: var(--farm-blue-400, #60a5fa); }
.game-bottom-btn[data-group="mas"].active { color: var(--farm-text-primary, #e2e8f0); }

/* ─── Más overlay (mobile) ─── */
.game-mas-overlay {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: calc(var(--farm-z-sticky, 200) + 1);
    background: rgba(8, 14, 10, 0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 1rem 1rem 2rem;
    max-height: 50vh;
    overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
}
.game-mas-overlay.open { display: block; }
.game-mas-backdrop { display: none; position: fixed; inset: 0; z-index: calc(var(--farm-z-sticky, 200)); background: rgba(0, 0, 0, 0.5); }
.game-mas-backdrop.open { display: block; }
.game-mas-header { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--farm-text-muted, #64748b); margin-bottom: 0.6rem; }
.game-mas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.game-mas-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.6rem 0.25rem; border-radius: 0.75rem; background: rgba(30, 41, 59, 0.35); border: 1px solid rgba(255, 255, 255, 0.06); color: var(--farm-text-secondary, #94a3b8); font-size: 0.6rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.game-mas-item:active { transform: scale(0.95); }
.game-mas-item i { font-size: 1.05rem; }
.game-mas-item--roulette { color: var(--farm-gold-300, #fcd34d); border-color: rgba(245,158,11,0.2); }
.game-mas-item--vip { color: var(--farm-gold-300, #fcd34d); border-color: rgba(234,179,8,0.2); }

/* ═══ RESPONSIVE ═══ */

/* ─── Mobile <970px: sidebar hidden, drawer, bottom bar ─── */
@media (max-width: 969px) {
    .game-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        transition: transform var(--farm-transition-fast), opacity var(--farm-transition-fast);
        z-index: calc(var(--farm-z-sticky) + 10);
    }
    .game-sidebar.open {
        transform: translateX(0);
        opacity: 1;
    }

    .game-sidebar-toggle {
        display: flex;
    }

    .game-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: var(--farm-z-sticky, 200);
        background: rgba(8, 14, 10, 0.96);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding: 0.2rem 0;
        padding-bottom: max(0.2rem, env(safe-area-inset-bottom));
    }

    [id^="content-"] { padding-bottom: 3.5rem !important; }

    /* Topbar: no sidebar offset */
    .game-topbar,
    .game-topbar-inner {
        margin-left: 0 !important;
    }
}

/* ─── Desktop ≥970px: sidebar fixed, content pushed right ─── */
@media (min-width: 970px) {
    .game-sidebar {
        transform: none;
    }

    .game-sidebar-toggle,
    .game-sidebar-backdrop,
    .game-bottom-bar,
    .game-mas-overlay,
    .game-mas-backdrop {
        display: none !important;
    }

    /* Push content right */
    .game-topbar {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
    .game-topbar-inner {
        margin-left: 0;
    }
    
    /* Don José lives in #farmer-modal (viewport-centered). Do not offset .farmer-widget. */

    .game-main-shell {
        margin-left: max(220px, calc(50% - 530px));
        margin-right: auto;
    }
    .game-main-shell--wide {
        margin-left: max(220px, calc(50% - 610px));
        margin-right: auto;
    }
}
