/* ============================================================
   MOBILE.CSS — o jogo no navegador do celular (02/10/2026)

   Carregado em último lugar em todas as páginas do jogo, para estas
   regras ganharem às de cada página. Só actua em ecrãs estreitos
   (até 760px): no computador nada muda.

   Fase 2 (02/10): as restantes páginas já ficam bem com a viewport, o
   cabeçalho e o menu; aqui só o aviso do tutorial mais compacto.

   Fase 1: cabeçalho com botão ☰ (o menu é montado por js/shared.js,
   a partir dos mesmos links do cabeçalho e da barra de saldo), barra
   de saldo compacta e as páginas Início, Invasor, Missões, Jutsus,
   Habilidades e PvP.
   ============================================================ */

/* O botão ☰ e o menu só existem no celular. */
.np-menu-btn, .np-menu-mobile, .np-menu-fundo { display: none; }

@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  img, video, canvas { max-width: 100%; }

  /* ── CABEÇALHO ───────────────────────────────────────────── */
  html body .np-topbar {
    height: 56px; min-height: 56px; flex-wrap: nowrap;
    gap: 8px; padding: 0 10px;
  }
  html body .np-topbar .np-nav { display: none !important; }
  html body .np-logo-img { height: 44px; transform: none; }
  .np-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: 40px; height: 40px; padding: 0; margin: 0;
    border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
    background: rgba(0,0,0,.28); color: #fff; font-size: 22px; line-height: 1;
    cursor: pointer;
  }
  .np-menu-btn:focus-visible { outline: 2px solid var(--chakra); outline-offset: 2px; }
  html body .np-topbar-right { margin-left: auto; gap: 8px; min-width: 0; flex-wrap: nowrap; }
  html body .np-topbar-info { gap: 6px; }
  html body .np-clock { display: none; }
  html body .np-online { padding: 3px 8px; gap: 5px; font-size: .78rem; }
  html body .np-online::after { display: none; }
  html body .np-tbname { max-width: 74px; font-size: .78rem; }
  html body .np-btn-sair { padding: 6px 10px; font-size: .74rem; }

  /* ── BARRA DE SALDO ──────────────────────────────────────── */
  /* Os atalhos (Invocações, Bijuus, Novidades…) passam para o menu ☰;
     aqui ficam só Ryous, Cash e Chakra. */
  html body .np-saldo-bar { top: 56px; }
  html body .np-saldo-bar-inner {
    padding: 6px 10px; gap: 4px; justify-content: space-between;
    overflow: hidden; flex-wrap: nowrap;
  }
  html body .np-saldo-bar a.np-saldo-item,
  html body .np-saldo-bar .np-saldo-sep,
  html body .np-saldo-cash-tip,
  html body .np-saldo-chakra-regen { display: none !important; }
  html body .np-saldo-item { padding: 4px 2px; gap: 4px; min-width: 0; }
  html body .np-saldo-item img { width: 18px; height: 18px; }
  html body .np-saldo-label { font-size: .6rem; letter-spacing: 0; }
  html body .np-saldo-val { font-size: .74rem; }
  /* Ryous e Cash têm ícone: o nome sai para caber o Chakra inteiro. */
  html body .np-saldo-ryo .np-saldo-label,
  html body .np-saldo-cash .np-saldo-label { display: none; }

  /* ── MENU ☰ ──────────────────────────────────────────────── */
  .np-menu-fundo {
    display: block; position: fixed; inset: 0; z-index: 998;
    background: rgba(0,0,0,.55); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .np-menu-mobile {
    display: flex; flex-direction: column; position: fixed; z-index: 999;
    top: 0; left: 0; bottom: 0; width: min(86vw, 330px);
    background: #102b49 url("../img/cabecalho-2026/azul.png") center / 768px auto repeat;
    box-shadow: 6px 0 24px rgba(0,0,0,.5);
    transform: translateX(-105%); transition: transform .22s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  body.np-menu-aberto .np-menu-fundo { opacity: 1; pointer-events: auto; }
  body.np-menu-aberto .np-menu-mobile { transform: none; }
  body.np-menu-aberto { overflow: hidden; }
  .np-menu-topo {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 14px 10px; border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .np-menu-quem { color: var(--parchment); font-weight: 700; font-size: .95rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .np-menu-fechar {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.25);
    color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  }
  .np-menu-sec { padding: 10px 10px 4px; }
  .np-menu-sec h3 {
    margin: 0 4px 6px; font-family: var(--font-body); font-size: .66rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: rgba(237,227,200,.6);
  }
  .np-menu-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .np-menu-grade a {
    display: flex; align-items: center; min-height: 44px; padding: 8px 12px;
    border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1);
    color: #fff; font-family: var(--font-body); font-weight: 600; font-size: .86rem;
    text-decoration: none; line-height: 1.2;
  }
  .np-menu-grade a.active { border-color: var(--chakra); color: var(--chakra); background: rgba(79,209,255,.1); }
  .np-menu-grade a .sidebar-trade-badge, .np-menu-grade a .sidebar-msg-badge { margin-left: auto; }
  .np-menu-sair {
    margin: 12px 10px 18px; min-height: 44px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255,90,54,.5); background: rgba(255,90,54,.15);
    color: #ffb4a3; font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  }

  /* ── PÁGINAS (fase 1) ────────────────────────────────────── */
  /* As abas laterais (Contatos / Chat) ficam mais pequenas para não
     taparem o conteúdo. */
  /* Abas laterais Contatos / Chat: mais finas, para taparem menos o
     conteúdo; e os painéis que abrem cabem no ecrã. */
  html body .ct-lateral-btn, html body .gc-lateral-btn {
    padding: 10px 3px; opacity: .92;
  }
  html body .ct-lateral-label, html body .gc-lateral-label { font-size: .56rem; letter-spacing: .5px; }
  html body .ct-lateral-btn { top: 42%; }
  html body .gc-lateral-btn { top: calc(42% + 82px); }
  html body .ct-panel, html body .ct-conv-panel, html body .gc-panel { width: min(340px, 92vw); max-width: 92vw; }

  /* Fase 2 — o aviso "Tutorial a meio" fica mais pequeno (só o título e
     o botão), para não tapar os botões do fundo do ecrã (combate, comprar). */
  html body .nr-tut-pastilha { right: 8px; bottom: 8px; padding: 6px 8px; gap: 8px; max-width: calc(100vw - 16px); }
  html body .nr-tut-pastilha-txt { font-size: 0; }
  html body .nr-tut-pastilha-txt b { font-size: .72rem; }
}
