
/* N9 v0.20.0 — Responsive presentation layer only */

body.n9-game-page .n9-mobile-section-toggle,
body.n9-arena-v170 .n9-mobile-section-toggle{
  display:none;
}

/* TABLET */
@media(min-width:768px) and (max-width:1050px){
  body.n9-game-page .n9-shared-casino-layout,
  body.n9-arena-v170 .n9-shared-casino-layout{
    grid-template-columns:minmax(220px,.82fr) minmax(0,2.15fr)!important;
    gap:10px!important;
  }

  body.n9-game-page .control-card,
  body.n9-arena-v170 .control-card,
  body.n9-arena-v170 .arena170-side{
    grid-column:1 / -1!important;
  }

  body.n9-game-page .reactor-stage,
  body.n9-arena-v170 .reactor-stage{
    min-height:520px!important;
  }
}

/* MOBILE */
@media(max-width:767px){
  html,body{overflow-x:hidden!important}

  body.n9-game-page .casino-topnav,
  body.n9-arena-v170 .casino-topnav{
    position:sticky!important;
    top:0!important;
    z-index:1000!important;
    min-height:56px!important;
    padding:6px 8px!important;
    background:rgba(2,8,24,.96)!important;
    border-bottom:1px solid rgba(78,214,255,.36)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  body.n9-game-page .n9-shared-casino-layout,
  body.n9-arena-v170 .n9-shared-casino-layout{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
    padding:8px!important;
  }

  body.n9-game-page .main-reactor-card,
  body.n9-arena-v170 .main-reactor-card{
    order:1!important;
    width:100%!important;
    margin:0!important;
  }

  body.n9-game-page .reactor-stage,
  body.n9-arena-v170 .reactor-stage{
    width:100%!important;
    min-height:430px!important;
    aspect-ratio:.95/1!important;
    border-radius:16px!important;
  }

  body.n9-game-page #grid.pulse-grid,
  body.n9-arena-v170 #grid.pulse-grid{
    width:100%!important;
    height:100%!important;
    min-height:410px!important;
  }

  body.n9-game-page .route-display,
  body.n9-arena-v170 .route-display{
    order:2!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    padding:8px!important;
    border-radius:12px!important;
  }

  body.n9-game-page .control-card,
  body.n9-arena-v170 .control-card{
    order:3!important;
    width:100%!important;
    margin:0!important;
    padding:10px!important;
    border-radius:14px!important;
  }

  body.n9-game-page .control-card button,
  body.n9-arena-v170 .control-card button{
    min-height:48px!important;
    font-size:13px!important;
    border-radius:12px!important;
  }

  body.n9-game-page .control-card .actions,
  body.n9-arena-v170 .control-card .actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }

  body.n9-game-page #pulseBtn,
  body.n9-arena-v170 #pulseBtn{
    grid-column:1 / -1!important;
    min-height:54px!important;
    font-size:15px!important;
  }

  body.n9-game-page .quick-actions,
  body.n9-arena-v170 .quick-actions{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:6px!important;
  }

  body.n9-game-page .quick-actions button,
  body.n9-arena-v170 .quick-actions button{
    min-height:44px!important;
    font-size:11px!important;
  }

  body.n9-game-page .paytable-side,
  body.n9-arena-v170 .paytable-side,
  body.n9-arena-v170 .arena170-side{
    order:4!important;
    width:100%!important;
    margin:0!important;
    border-radius:14px!important;
  }

  body.n9-game-page .n9-mobile-section-toggle,
  body.n9-arena-v170 .n9-mobile-section-toggle{
    display:flex!important;
    width:100%!important;
    min-height:48px!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:0 12px!important;
    border:0!important;
    border-radius:12px!important;
    background:rgba(3,15,36,.94)!important;
    color:#dffaff!important;
    font-weight:800!important;
    letter-spacing:.03em!important;
  }

  .n9-mobile-section-toggle::after{
    content:'−';
    font-size:20px;
    color:#73efff;
  }

  .n9-mobile-collapsed > .n9-mobile-section-toggle::after{
    content:'+';
  }

  .n9-mobile-collapsed > *:not(.n9-mobile-section-toggle){
    display:none!important;
  }

  body.n9-game-page .arena-chat-panel,
  body.n9-arena-v170 .arena-chat-panel{
    order:5!important;
    width:100%!important;
  }

  body.n9-game-page .auto-panel,
  body.n9-arena-v170 .auto-panel{
    order:6!important;
  }

  body.n9-game-page .stage-rings,
  body.n9-arena-v170 .stage-rings{
    opacity:.68!important;
  }

  body.n9-game-page .planet-name,
  body.n9-arena-v170 .planet-name{
    font-size:9px!important;
    padding:2px 5px!important;
  }

  .n9-mobile-logout{
    top:8px!important;
    right:8px!important;
    z-index:1200!important;
  }
}

@media(max-width:390px){
  body.n9-game-page .reactor-stage,
  body.n9-arena-v170 .reactor-stage{
    min-height:395px!important;
  }

  body.n9-game-page #grid.pulse-grid,
  body.n9-arena-v170 #grid.pulse-grid{
    min-height:380px!important;
  }

  body.n9-game-page .control-card .actions,
  body.n9-arena-v170 .control-card .actions{
    grid-template-columns:1fr!important;
  }

  body.n9-game-page #pulseBtn,
  body.n9-arena-v170 #pulseBtn{
    grid-column:auto!important;
  }

  body.n9-game-page .quick-actions,
  body.n9-arena-v170 .quick-actions{
    grid-template-columns:1fr 1fr!important;
  }
}
