/**
 * Shared mobile hub + bottom nav shell (Idle MMO style).
 * Set theme on the game root, e.g.:
 *   --shell-accent: #10b981;
 *   --shell-accent-muted: rgba(167, 243, 208, 0.72);
 *   --shell-surface: rgba(28, 35, 33, 0.95);
 *   --shell-border: rgba(16, 185, 129, 0.28);
 *   --shell-text: #ecfdf5;
 *   --shell-nav-active: #fbbf24;
 */

@media (max-width: 767px) {
  .game-shell-body {
    flex-direction: column;
  }

  .game-shell-body > aside.game-shell-sidebar {
    display: none;
  }

  .game-shell-body > main.game-main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important;
  }

  .game-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    background: rgba(12, 18, 16, 0.96);
    border-top: 1px solid var(--shell-border, rgba(16, 185, 129, 0.28));
    backdrop-filter: blur(8px);
  }

  .game-bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3rem;
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.72));
    font-size: 0.68rem;
    line-height: 1.1;
    cursor: pointer;
  }

  .game-bottom-nav-btn.is-active {
    color: var(--shell-nav-active, #fbbf24);
  }

  .game-bottom-nav-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .game-mobile-mode .game-main-scroll {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .game-mobile-hub-scroll {
    padding-bottom: 0.5rem;
  }

  .game-mobile-hub-intro {
    font-size: 0.8125rem;
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.72));
    line-height: 1.45;
    margin: 0 0 0.25rem;
  }

  .game-mobile-hub-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .game-mobile-hub-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--shell-border, rgba(16, 185, 129, 0.28));
    background: var(--shell-surface, rgba(28, 35, 33, 0.95));
    color: var(--shell-text, #ecfdf5);
    text-align: left;
    min-height: 4.25rem;
    cursor: pointer;
  }

  .game-mobile-hub-card-icon {
    font-size: 2rem;
    line-height: 1;
    width: 2.75rem;
    text-align: center;
    flex-shrink: 0;
  }

  .game-mobile-hub-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .game-mobile-hub-card-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
  }

  .game-mobile-hub-card-level {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(41, 51, 48, 0.95);
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.85));
  }

  .game-mobile-hub-card-chevron {
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.55));
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .game-mobile-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shell-accent-muted, rgba(110, 231, 183, 0.65));
    margin: 0 0 0.4rem 0.35rem;
  }

  .game-mobile-section-card {
    border-radius: 0.75rem;
    border: 1px solid var(--shell-border, rgba(16, 185, 129, 0.22));
    background: rgba(20, 28, 26, 0.92);
    overflow: hidden;
  }

  .game-mobile-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid var(--shell-border, rgba(16, 185, 129, 0.12));
    background: transparent;
    color: var(--shell-text, #ecfdf5);
    text-align: left;
    min-height: 3.25rem;
    cursor: pointer;
  }

  .game-mobile-row:last-child {
    border-bottom: none;
  }

  .game-mobile-row-icon {
    font-size: 1.35rem;
    width: 1.75rem;
    text-align: center;
    flex-shrink: 0;
  }

  .game-mobile-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .game-mobile-row-title {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
  }

  .game-mobile-row-title.is-highlight {
    color: var(--shell-nav-active, #fbbf24);
  }

  .game-mobile-row-sub {
    font-size: 0.75rem;
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.62));
    line-height: 1.3;
  }

  .game-mobile-row-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #1c1917;
    flex-shrink: 0;
  }

  .game-mobile-row-chevron {
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.5));
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  .game-mobile-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--shell-border, rgba(16, 185, 129, 0.28));
    background: var(--shell-surface, rgba(28, 35, 33, 0.95));
  }

  .game-mobile-profile-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: rgba(6, 24, 20, 0.85);
    border: 1px solid var(--shell-border, rgba(16, 185, 129, 0.35));
    flex-shrink: 0;
  }

  .game-mobile-profile-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--shell-text, #ecfdf5);
  }

  .game-mobile-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--shell-accent-muted, rgba(167, 243, 208, 0.78));
  }

  .game-mobile-backbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: -0.25rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--shell-border, rgba(16, 185, 129, 0.18));
  }

  .game-mobile-back-btn {
    flex-shrink: 0;
    min-height: 2.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: transparent;
    color: var(--shell-nav-active, #fbbf24);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .game-mobile-back-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--shell-text, #ecfdf5);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  .game-bottom-nav {
    display: none;
  }
}
