
/* Skyphaze mobile layout layer */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 100%;
  }

  body {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }

  .glow,
  .content-background,
  .profile-modal-glow,
  .support-modal-glow {
    animation: none !important;
    filter: blur(56px) !important;
    opacity: .14 !important;
  }

  .header-wrap,
  .section-topbar,
  .auth-buttons,
  .logo {
    z-index: 60 !important;
  }

  .header-wrap {
    position: sticky !important;
    top: 0 !important;
    padding: 10px 0 0 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .header-bubble {
    width: calc(100vw - 16px) !important;
    min-height: 0 !important;
    border-radius: 26px !important;
    padding: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .brand-side,
  .header-tools {
    justify-content: flex-start !important;
  }

  .nav-side {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px !important;
  }

  .nav-side::-webkit-scrollbar {
    display: none;
  }

  .nav-item,
  .lang-option,
  .support-btn,
  .btn,
  .detail-action-btn,
  .stage-tab,
  .channel-item,
  .profile-dropdown-btn {
    min-height: 44px !important;
  }

  .header-tools {
    position: relative !important;
    right: auto !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  .support-btn {
    width: 100% !important;
  }

  .auth-buttons {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    gap: 8px !important;
  }

  .logo {
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    width: 126px !important;
  }

  .showcase-shell,
  .content,
  .community-stage {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .showcase-shell {
    margin-top: 94px !important;
    gap: 16px !important;
  }

  .showcase-row,
  .showcase-row.reverse,
  .showcase-copy,
  .showcase-media {
    border-radius: 24px !important;
  }

  .showcase-row,
  .showcase-row.reverse {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .showcase-copy {
    padding: 20px !important;
  }

  .showcase-title,
  .hero-title,
  .support-title,
  .panel-title {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.08 !important;
  }

  .showcase-text,
  .hero-text,
  .support-sub,
  .detail-copy,
  .community-main-sub {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .site-footer {
    margin: 0 10px 10px !important;
    padding: 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .footer-links {
    justify-content: flex-start !important;
    gap: 12px !important;
  }

  .game-stage,
  .embedded-stage,
  #sectionTournaments.embedded-stage {
    height: auto !important;
    min-height: calc(100vh - 84px) !important;
    padding: 12px 8px 16px !important;
  }

  .page {
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
  }

  .game-layout {
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    height: auto !important;
  }

  .game-shell,
  .leaderboard-shell,
  .embedded-shell,
  .community-shell,
  .leaderboard-page-shell,
  .stage-shell,
  .tournament-detail,
  .tournaments-list {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px !important;
  }

  .game-shell {
    height: min(70vh, 560px) !important;
    min-height: 420px !important;
  }

  .leaderboard-shell {
    height: auto !important;
    min-height: 420px !important;
  }

  .embedded-shell {
    height: calc(100vh - 116px) !important;
    min-height: 540px !important;
  }

  #sectionTournaments .embedded-shell {
    height: calc(100vh - 86px) !important;
    min-height: 580px !important;
  }

  .hud,
  .prism-hud {
    min-height: 136px !important;
    padding: 14px !important;
  }

  .arena,
  .prism-arena {
    top: 136px !important;
  }

  .bottom-help {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    width: auto !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .help-chip {
    padding: 10px 12px !important;
    border-radius: 18px !important;
  }

  .leaderboard-page-shell,
  .leaderboard-panel {
    inset: auto !important;
  }

  .leaderboard-page-shell {
    padding: 14px !important;
    min-height: 0 !important;
  }

  .leaderboard-panel,
  .leaderboard-card {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .leaderboard-card {
    overflow: hidden !important;
  }

  .leaderboard-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .leaderboard-table-head,
  .leaderboard-row {
    min-width: 680px !important;
  }

  .community-stage {
    padding: 92px 0 16px !important;
    min-height: calc(100vh - 76px) !important;
  }

  .community-shell {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
  }

  .community-sidebar,
  .community-main-head,
  .composer-form,
  .detail-grid,
  .panel-stats,
  .shop-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .community-sidebar,
  .community-main-head,
  .messages-wrap,
  .composer-form,
  .detail-main,
  .detail-actions,
  .stage-topbar,
  .stage-tabs,
  .stage-qualification,
  .stage-groups,
  .playoff-shell {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .detail-actions {
    flex-direction: column !important;
  }

  .detail-action-btn,
  .stage-back,
  .support-send-btn {
    width: 100% !important;
  }

  .stage-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    scrollbar-width: none;
  }

  .stage-tabs::-webkit-scrollbar {
    display: none;
  }

  .groups-grid,
  .group-standings-grid,
  .playoff-columns {
    grid-template-columns: 1fr !important;
  }

  .playoff-shell,
  .stage-qualification-wrap,
  .group-table-wrap {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .playoff-board,
  .stage-qualification-table,
  .group-table {
    min-width: 720px !important;
  }

  .support-modal,
  .profile-modal {
    width: calc(100vw - 16px) !important;
  }

  .support-panel,
  .profile-panel {
    border-radius: 24px !important;
  }

  .support-panel {
    min-height: 0 !important;
    max-height: calc(100vh - 16px) !important;
    padding: 22px 16px 16px !important;
  }

  .support-compose-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .panel-card {
    width: calc(100% - 10px) !important;
    padding: 18px !important;
    border-radius: 22px !important;
  }
}

@media (max-width: 560px) {
  .header-bubble {
    width: calc(100vw - 12px) !important;
    padding: 10px !important;
    border-radius: 22px !important;
  }

  .logo {
    width: 112px !important;
  }

  .auth-buttons {
    top: 10px !important;
    right: 10px !important;
  }

  .btn {
    padding: 9px 13px !important;
    font-size: 12px !important;
  }

  .nickname,
  .community-main-title,
  .section-title,
  .stage-tournament-title {
    font-size: 12px !important;
    letter-spacing: .12em !important;
  }

  .nav-item,
  .stage-tab,
  .channel-item {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .game-shell {
    height: min(66vh, 500px) !important;
    min-height: 380px !important;
  }

  .leaderboard-table-head,
  .leaderboard-row {
    min-width: 620px !important;
  }

  .profile-panel-inner,
  .detail-main,
  .community-sidebar {
    padding: 16px !important;
  }

  .profile-avatar-large {
    width: 92px !important;
    height: 92px !important;
  }

  .profile-nickname,
  .profile-rank-value {
    font-size: 22px !important;
  }

  .support-thread {
    min-height: 220px !important;
  }

  body {
    overscroll-behavior-y: none;
  }

  .page > .header-wrap + .game-stage {
    padding-top: 96px !important;
  }

  .game-stage .game-layout {
    align-items: stretch !important;
  }

  .game-stage .game-shell {
    min-height: 520px !important;
    height: min(76vh, 680px) !important;
    overflow: visible !important;
  }

  .game-stage .arena,
  .game-stage .prism-arena {
    top: 122px !important;
    bottom: 96px !important;
  }

  .game-stage .bottom-help {
    bottom: 88px !important;
  }

  .mobile-game-controls {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 15;
  }

  .mobile-game-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(12,16,26,0.92);
    color: #fff;
    border-radius: 18px;
    min-height: 50px;
    padding: 0 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    touch-action: manipulation;
  }

  .mobile-game-btn--start {
    flex: 0 0 42%;
  }

  .mobile-game-btn--boost {
    flex: 1 1 auto;
  }

  .mobile-game-btn:disabled {
    opacity: 0.45;
  }

  .embedded-stage,
  #sectionLeaderboard.embedded-stage,
  #sectionCommunity.embedded-stage,
  #sectionTournaments.embedded-stage {
    padding-top: 96px !important;
  }

  .embedded-shell,
  .leaderboard-page-shell,
  .community-shell,
  .tournaments-shell,
  .stage-shell {
    min-height: calc(100vh - 116px) !important;
    height: auto !important;
  }

}
