/* RUNECASTLE — LAYOUT DE CELULAR. Carregado por último (build.py), vale só até 720px; o desktop não é tocado.
   Onde editar: cada bloco abaixo tem o nome da seção. Espaçamento lateral padrão = --gut. */
@media (max-width: 720px) {
  :root { --gut: 20px; }
  html, body { overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }
  h2 { text-wrap: balance; }

  /* ---------- topo: logo à esquerda, um botão e o idioma à direita ---------- */
  .nav { padding: 6px var(--gut); gap: 10px; background: linear-gradient(#020b12f2, #020b12b8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid #c39a5526; }
  .brand .logo { height: 44px; }
  .nav nav { gap: 10px; flex: 0 0 auto; }
  .nav nav > a:not(.btn), .nav-social { display: none !important; }
  .nav nav .btn-ghost { display: none; }
  /* botão do topo: dourado liso (a moldura em imagem do desktop embaralhava o texto em tamanho pequeno) */
  .nav .btn-sm, .nav .btn { background: linear-gradient(#f1dfbb, #c9994a 55%, #8f6a2c) !important; border: 1px solid #f1dfbb !important; border-image: none !important; color: #1a1208 !important; text-shadow: none !important; padding: 0 14px !important; min-height: 40px; width: auto !important; min-width: max-content; flex: none; overflow: visible; white-space: nowrap; display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .12em; box-shadow: 0 4px 14px #0008; }
  .nav .lang { display: inline-flex !important; flex: none; }
  .nav .lang a { display: inline-block !important; width: auto; padding: 10px 5px !important; font-size: 11px; }

  /* ---------- hero: arte em cima, texto e botões embaixo, tudo na mesma coluna ---------- */
  .hero-inner { padding-left: var(--gut); padding-right: var(--gut); padding-bottom: 40px; display: flex; flex-direction: column; gap: 0; }
  /* o login deixa de flutuar sobre o hero (no desktop ele é absoluto no centro) e entra no fluxo, logo abaixo da arte */
  .hero-inner > .game-login, .js .hero-inner > .game-login.reveal, .js .hero-inner > .game-login.reveal.in { position: static !important; transform: none !important; top: auto; left: auto; order: 2; margin: 0 0 28px; width: 100%; max-width: none; }
  .hero-inner > .eyebrow { order: 1; text-align: center; margin: 4px 0 10px; }
  .hero-inner > h1 { order: 1; text-align: center; }
  .hero-inner > .genres { order: 3; }
  .hero-inner > .lead { order: 3; }
  .hero-inner > .cta { order: 3; }
  .hero-inner > .slots { order: 3; }
  h1 { font-size: clamp(26px, 7.6vw, 32px); line-height: 1.12; text-wrap: balance; }
  h1 span { max-width: none; margin-inline: auto; }
  .genres { justify-content: center; margin-top: 14px; gap: 6px; }
  .lead { font-size: 16px; line-height: 1.55; margin: 16px 0 22px; text-align: left; }
  .cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .cta .btn, .hero .cta .btn { width: 100%; min-width: 0; text-align: center; justify-content: center; padding: 16px 18px; font-size: 13px; letter-spacing: .14em; }
  .slots { margin-top: 18px; }
  .game-login { padding: 22px 18px; }
  .game-login .btn, .game-login__google { width: 100%; min-height: 48px; }

  /* ---------- títulos de seção ---------- */
  .home > .sec h2, .world-stage__heading h2, .community-faq-scene h2 { font-size: 28px; line-height: 1.15; }
  .eyebrow { letter-spacing: .24em; font-size: 11px; }
  .sec { padding-top: 48px; padding-bottom: 48px; }
  .wrap { padding-left: var(--gut); padding-right: var(--gut); }

  /* ---------- novidades (antes espremida em 2 colunas) ---------- */
  .news-stage { padding: 44px 0 20px; min-height: 0; }
  .news-stage__grid { grid-template-columns: 1fr !important; gap: 26px; }
  .news-feature { min-height: 340px; }
  .news-feature > div { left: 20px; right: 20px; bottom: 20px; }
  .news-feature h2 { font-size: 26px; max-width: none; }
  .news-feature p { font-size: 15px; }
  .news-feature > .tag { top: 16px; left: 16px; }
  .news-list > a { grid-template-columns: 84px 1fr 18px; gap: 12px; padding: 12px 0; }
  .news-list i { display: none; }
  .news-list header { flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 12px; }
  .news-list header h2 { font-size: 26px; }
  .news-list > a { grid-template-columns: 108px 1fr; }
  .news-list span { font-size: 10.5px; letter-spacing: .1em; }
  .news-feature::after { background: linear-gradient(0deg, #03070bf7 0, #03070be0 52%, #03070b66 82%, transparent); }
  .chapter-links { grid-template-columns: repeat(2, 1fr); margin-top: 8px; padding: 0 var(--gut) 40px; gap: 8px; }
  .chapter-links > a { min-height: 150px; }
  .chapter-links strong { font-size: 14px; }

  /* ---------- heróis: 2 por linha, texto legível ---------- */
  #classes { min-height: 0; padding: 40px 0; display: block; }
  #classes .heroes { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .heroes figcaption, .heroes figure p { font-size: 12.5px; line-height: 1.35; }
  .heroes figure h3 { font-size: 15px; }

  /* ---------- o jogo / modos: uma coluna, cartas sem altura fixa enorme ---------- */
  #mundo, #modos { min-height: 0; padding: 44px 0; }
  /* o texto das cartas é absoluto sobre a arte: a altura vem do min-height (nunca 0) */
  #mundo .cards3 .card:nth-child(n) { min-height: 300px; }
  #modos .cards3 .card:nth-child(n) { min-height: 330px; }
  .card h3, #mundo .card h3 { font-size: 22px; }
  #mundo .card p, .card p { font-size: 15.5px; line-height: 1.5; }
  .cards3, .cards4 { gap: 16px; }

  /* ---------- apresentação das classes ---------- */
  .class-showcase > header { padding-inline: var(--gut); }
  .class-showcase__scene { aspect-ratio: 4 / 3; }

  /* ---------- fases ---------- */
  .world-stage { min-height: 0; padding-top: 36px; }
  .world-stage__heading { padding: 0 var(--gut) 18px; }
  .world-stage__viewer { min-height: 0; }
  .world-stage__art { position: relative; height: 56vw; min-height: 220px; width: 100%; object-fit: cover; }
  .world-stage__copy { position: static; width: auto; padding: 18px var(--gut) 6px; transform: none; }
  .world-stage__copy h3 { font-size: 26px; }
  .world-stage__copy p { font-size: 15.5px; line-height: 1.5; }
  .world-stage__previews { padding-top: 0 !important; padding-bottom: 26px !important; margin: 0 var(--gut); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .world-stage__previews button { height: 58px; }
  .world-stage__previews button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .world-stage__previews button b { font-size: 20px; }
  .world-stage__previews button span { font-size: 13px; }
  .world-stage__shade { display: none; }

  /* ---------- vídeos e imagens ---------- */
  .media { min-height: 0; padding: 44px 0 40px; }
  .media .media-grid { margin: 22px 0 0; gap: 10px; }
  .media-grid { display: grid !important; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .media-grid figure { height: auto !important; margin: 0 !important; }
  .media-grid__wide { grid-column: 1 / -1; grid-row: span 2; }

  /* ---------- inscrição (formulário) ---------- */
  .sec-form { padding: 48px 0; }
  .form-grid { gap: 26px; }
  form { padding: 22px 18px; }
  input[type=text], input[type=email], select { font-size: 16px; min-height: 48px; }
  .pick { grid-template-columns: repeat(2, 1fr); }
  .pick span { padding: 13px 8px; }
  .form-emblem { width: 96px; height: auto; }

  /* ---------- comunidade e perguntas ---------- */
  .community-faq-scene { padding-block: 24px; }
  .community-faq-scene > .community > .wrap, .community-faq-scene > #faq > .wrap { padding-inline: var(--gut); }
  .community .btn { width: 100%; }
  details { padding: 16px 0; }
  summary { font-size: 16px; align-items: flex-start; }
  details p { font-size: 15.5px; line-height: 1.55; }

  /* ---------- rodapé ---------- */
  footer { padding: 36px var(--gut) 96px; }
  footer .brand .logo { height: 84px; }
  .legal { gap: 10px 22px; font-size: 14px; }
  .copy { font-size: 12.5px; }

  /* ---------- botão fixo de baixo ---------- */
  .sticky-cta { left: var(--gut); right: var(--gut); justify-content: center; bottom: max(14px, env(safe-area-inset-bottom)); }

  /* ---------- páginas legais ---------- */
  .doc { padding: 96px var(--gut) 60px; }
  .doc h1 { font-size: 28px; }
  .doc p, .doc li { font-size: 16.5px; line-height: 1.6; }
  .doc-tabs a { flex: 1 1 auto; text-align: center; padding: 11px 10px; font-size: 12px; }
  .doc-toc { padding: 18px 18px 18px 36px; font-size: 15px; }
}

/* celulares muito estreitos */
@media (max-width: 380px) {
  .nav .btn-sm { padding: 10px 10px; font-size: 10px; }
  .lang a { padding: 10px 4px !important; }
  .brand .logo { height: 40px; }
  .chapter-links { grid-template-columns: 1fr; }
  #classes .heroes { gap: 8px; }
}
