/* Dança das Lâminas · desktop primeiro; o celular fica no fim do arquivo (max-width: 760px). */

:root {
  --fundo: #0e0816;
  --noite: #1a0f26;
  --painel: rgba(20, 11, 30, .72);
  --linha: rgba(226, 179, 148, .3);
  --ouro: #e2b394;
  --ouro-claro: #f8e9df;
  --ouro-escuro: #8c5a52;
  --magenta: #d9467f;
  --petala: #ff9cc0;
  --aco: #8db8d6;
  --aco-claro: #cfe6f0;
  --carmim: #c8243a;
  --carmim-claro: #ff4e63;
  --texto: #f8e9df;
  --suave: #b3a1ad;
  --titulo: "Spectral SC", "Georgia", serif;
  --texto-fonte: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--texto-fonte);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--aco-claro); outline-offset: 2px; }
main { outline: none; position: relative; z-index: 1; }

.aco-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.lamina { display: block; flex: none; }

/* ---------- arena: fundo com as duas splashes ---------- */

.arena {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--fundo);
  /* Tamanho das splashes (16:9): altura da tela, ou mais se a arte não cobrir os 60% de largura. */
  --splash-alt: max(100vh, 33.75vw);
  --splash-larg: calc(var(--splash-alt) * 16 / 9);
}

.arte { position: absolute; top: 0; bottom: 0; width: 60%; }

.arte-voce {
  left: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 92%);
  mask-image: linear-gradient(90deg, #000 30%, transparent 92%);
  opacity: 1;
  animation: entrar-esq 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

/* Camadas da arte da Irelia: a skin nova aparece em fade por cima da antiga. */
.arte-voce .camada {
  position: absolute;
  inset: 0;
  /* Splash centralizada (personagem no meio da imagem), alinhada ao meio da faixa livre à
     esquerda do painel de 660 px; o clamp impede que a arte deixe buraco nas bordas. */
  background-size: var(--splash-larg) var(--splash-alt);
  background-position: clamp(calc(60vw - var(--splash-larg)), calc(25vw - 165px - var(--splash-larg) / 2), 0px) 22%;
  opacity: 0;
  transition: opacity .8s ease;
}

.arte-voce .camada.visivel { opacity: 1; }

.arte-inimigo {
  right: 0;
  -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent 92%);
  mask-image: linear-gradient(270deg, #000 30%, transparent 92%);
}

.arte-inimigo .camada {
  position: absolute;
  inset: 0;
  /* Espelho do lado da Irelia: o adversário fica no meio da faixa livre à direita do painel. */
  background-size: var(--splash-larg) var(--splash-alt);
  background-position: clamp(calc(60vw - var(--splash-larg)), calc(35vw + 165px - var(--splash-larg) / 2), 0px) 22%;
  opacity: 0;
  transform: scale(1.08) translateX(30px);
  transition: opacity .7s ease, transform 8s cubic-bezier(.1, .6, .2, 1);
}

.arte-inimigo .camada.visivel { opacity: 1; transform: scale(1) translateX(0); }

.arena-sombra {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(217, 70, 127, .22), transparent 55%),
    linear-gradient(180deg, rgba(14, 8, 22, .5) 0%, rgba(14, 8, 22, 0) 25%, rgba(14, 8, 22, 0) 60%, rgba(14, 8, 22, .85) 100%),
    radial-gradient(ellipse at 50% 50%, rgba(14, 8, 22, .55) 0%, rgba(14, 8, 22, .15) 60%, rgba(14, 8, 22, .35) 100%);
}

/* No guia a arte fica mais escura, para o texto ler bem. */
body[data-tela="guia"] .arena-sombra { background-color: rgba(14, 8, 22, .45); }

@keyframes entrar-esq { from { opacity: 0; transform: translateX(-40px) scale(1.05); } }

/* ---------- elementos comuns ---------- */

.painel {
  position: relative;
  background-color: var(--painel);
  background-image: url(img/canto-ae.svg), url(img/canto-ad.svg), url(img/canto-be.svg), url(img/canto-bd.svg);
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
  background-size: 46px 46px;
  background-repeat: no-repeat;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--linha);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(217, 70, 127, .08), inset 0 0 0 1px rgba(14, 8, 22, .8);
}

/* Moldura hextech: filete dourado em cima com um losango no meio. */
.painel::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ouro) 20%, var(--ouro-claro) 50%, var(--ouro) 80%, transparent);
}

.painel::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -18px;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border-radius: 50%;
  /* Brasão de Ionia (site Universo da Riot), recolorido para o dourado-rosado do site. */
  background: var(--fundo) url(img/ionia.png) center / 22px auto no-repeat;
  box-shadow: 0 0 14px rgba(217, 70, 127, .45);
}

.selo {
  --selo: 220, 60, 60;
  display: inline-block;
  padding: 6px 12px 5px;
  background: rgba(var(--selo), .3);
  border: 1px solid rgba(var(--selo), .85);
  color: #fff;
  font-family: var(--texto-fonte);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 18px rgba(var(--selo), .35), inset 0 0 12px rgba(var(--selo), .25);
}

.laminas { display: inline-flex; align-items: flex-end; gap: 5px; }
.laminas .selo { margin-left: 14px; align-self: center; }

.tag {
  padding: 4px 10px;
  border: 1px solid var(--linha);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ouro-claro);
}

/* ---------- seleção ---------- */

.selecao { position: relative; height: 100vh; min-height: 680px; }

.topo-selecao {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  text-align: center;
  width: 900px;
}

.topo-selecao h1 {
  margin: 4px 0 8px;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ouro-claro);
  text-shadow: 0 2px 20px rgba(0, 0, 0, .8);
  animation: titulo 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes titulo {
  from { opacity: 0; letter-spacing: .6em; filter: blur(6px); }
}

@keyframes surgir { from { opacity: 0; transform: translateY(-8px); } }

.cronometro { display: flex; align-items: center; justify-content: center; gap: 14px; animation: surgir .8s .3s both; }

.cronometro-numero {
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 22px;
  color: var(--ouro-claro);
  min-width: 34px;
}

.cronometro-barra {
  position: relative;
  width: 220px;
  height: 2px;
  background: rgba(226, 179, 148, .2);
  overflow: hidden;
}

.cronometro-barra::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ouro-escuro), var(--ouro-claro));
}

.cronometro-barra:first-child::after { transform-origin: right; }
.cronometro-barra:last-child::after { transform-origin: left; background: linear-gradient(270deg, var(--ouro-escuro), var(--ouro-claro)); }
.cronometro-barra.correndo::after { animation: tempo 30s linear both; }

@keyframes tempo { to { transform: scaleX(0); } }

/* Times nas laterais, como no jogo. */

/* Times nas laterais, como na seleção do cliente: uma faixa que vai da borda da tela até
   perto do painel, com linhas douradas e losangos na ponta de fora. */
/* Centralizada na altura da tela (a faixa tem 78 px). */
.time { position: absolute; top: calc(50% - 39px); width: max(220px, calc(50vw - 352px)); animation: surgir .8s .4s both; }
.time.aliado { left: 0; }
.time.inimigo { right: 0; }

.time ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 78px;
  padding: 0 18px 0 24px;
  background: linear-gradient(90deg, rgba(14, 8, 22, .5), rgba(14, 8, 22, .14));
}

.slot::before, .slot::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 179, 148, .8), rgba(226, 179, 148, .3) 60%, rgba(226, 179, 148, .05));
}

.slot::before { top: 0; }
.slot::after { bottom: 0; }

.faixa-ponta {
  position: absolute;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(226, 179, 148, .9);
  background: var(--fundo);
  transform: rotate(45deg);
}

.faixa-ponta.topo { top: -4px; }
.faixa-ponta.base { bottom: -4px; }

.inimigo .slot { flex-direction: row-reverse; text-align: right; padding: 0 24px 0 18px; background: linear-gradient(270deg, rgba(14, 8, 22, .5), rgba(14, 8, 22, .14)); }
.inimigo .slot::before, .inimigo .slot::after { left: 0; right: 8px; background: linear-gradient(270deg, rgba(226, 179, 148, .8), rgba(226, 179, 148, .3) 60%, rgba(226, 179, 148, .05)); }
.inimigo .faixa-ponta { left: auto; right: 2px; }

.slot-icone {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--ouro);
  background: radial-gradient(circle, rgba(40, 32, 48, .9), rgba(14, 8, 22, .95));
}

.slot-icone img { width: 100%; height: 100%; object-fit: cover; }
.slot-texto { display: grid; gap: 2px; min-width: 0; }
.slot-texto b { font-family: var(--titulo); font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ouro); }
.slot-texto small { font-size: 12px; color: rgba(226, 179, 148, .7); }

.slot.voce .slot-icone { box-shadow: 0 0 14px rgba(226, 179, 148, .35); }

/* Adversário ainda vazio: só o rótulo e o círculo com aro vermelho pulsando. */
.slot.escolhendo .slot-icone { border-color: rgba(200, 36, 58, .8); animation: pulsar-inimigo 1.8s ease-in-out infinite; }
.slot.escolhendo .slot-texto b { font-family: var(--texto-fonte); font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--suave); }

.slot.previa { animation: chegar .35s ease both; }
.slot.previa .slot-icone { border-color: var(--carmim-claro); box-shadow: 0 0 14px rgba(200, 36, 58, .5); }
.slot.previa .slot-texto b { color: var(--ouro-claro); }

@keyframes pulsar-inimigo { 50% { box-shadow: 0 0 0 5px rgba(200, 36, 58, .15), 0 0 16px rgba(200, 36, 58, .35); } }
@keyframes pulsar { 50% { box-shadow: 0 0 0 6px rgba(226, 179, 148, .12); } }
@keyframes chegar { from { opacity: 0; transform: translateX(16px); } }

/* Nomes grandes nos cantos de baixo. */

.nome-grande {
  position: absolute;
  bottom: 34px;
  max-width: calc(50vw - 360px);
  text-shadow: 0 4px 30px rgba(0, 0, 0, .9);
}

.nome-grande.esq { left: 28px; animation: entrar-esq 1s .2s both; }
.nome-grande.dir { right: 28px; text-align: right; display: grid; justify-items: end; }

.nome-grande small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--aco);
  margin-bottom: 4px;
}

.nome-grande strong {
  display: block;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ouro-claro);
}

.nome-grande.dir strong { animation: nome .5s cubic-bezier(.2, .7, .2, 1) both; }
.nome-grande.dir.vazio strong { color: rgba(248, 233, 223, .25); }
.laminas-nome { margin-top: 12px; }
.laminas-nome .lamina { width: 8px; height: 40px; }
.sem-guia-aviso { margin-top: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); }

@keyframes nome { from { opacity: 0; transform: translateX(30px); letter-spacing: .2em; } }

/* ---------- painel de escolha ---------- */

.escolha {
  position: absolute;
  left: 50%;
  top: 170px;
  bottom: 34px;
  width: 660px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  padding: 18px 22px 16px;
  animation: painel .9s .25s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes painel { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }

/* Leque das seis lâminas: a escolha acende da esquerda para a direita, como a passiva. */

.leque-caixa { display: grid; justify-items: center; gap: 6px; margin-bottom: 14px; }

.leque { position: relative; width: 210px; height: 76px; }

/* Leque de um lado, busca e filtros do outro. */
.escolha-topo {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 14px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--linha);
}

.escolha-topo .leque-caixa { flex: none; margin: 0; }
.escolha-busca { flex: 1; display: grid; gap: 12px; }
.escolha-busca .escolha-linha, .escolha-busca .filtros { margin: 0; }

/* Brilho atrás do leque, mais forte quando há um nível escolhido. */
.leque::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 200px;
  height: 82px;
  margin-left: -100px;
  background: radial-gradient(ellipse at 50% 70%, rgba(141, 184, 214, .22), transparent 65%);
  opacity: .35;
  transition: opacity .5s;
  pointer-events: none;
}

.leque.com-nivel::before { opacity: 1; }

.leque button {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 70px;
  margin-left: -12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 165%;
  transform: rotate(var(--ang));
}

.leque.abrindo button { animation: abrir-leque .8s calc(.45s + var(--i) * 60ms) cubic-bezier(.2, .8, .2, 1.2) both; }

@keyframes abrir-leque { from { transform: rotate(0deg) scale(.6); opacity: 0; } }

.leque .lamina {
  width: 11px;
  height: 56px;
  margin: 0 auto;
  filter: grayscale(1) brightness(.32);
  opacity: .55;
  transition: filter .25s, opacity .25s, transform .25s;
}

/* Acesa: aço da skin base com brilho azul. */
.leque button.acesa .lamina {
  filter: drop-shadow(0 0 8px rgba(141, 184, 214, .85));
  opacity: 1;
  transform: translateY(-5px);
}

/* Lampejo na lâmina quando ela acende. */
.leque button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 245, 250, .95), rgba(141, 184, 214, .4) 40%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}

/* Rápido de propósito: o nível 6 termina de acender em menos de meio segundo. */
.leque.acendendo button.acesa .lamina { animation: acender .3s calc(var(--i) * 30ms) cubic-bezier(.2, .8, .2, 1) both; }
.leque.acendendo button.acesa::after { animation: lampejo .3s calc(var(--i) * 30ms) ease-out both; }

@keyframes acender {
  0% { filter: grayscale(1) brightness(.32); opacity: .55; transform: translateY(8px) scale(.86); }
  35% { filter: brightness(2.4) drop-shadow(0 0 16px rgba(230, 245, 250, 1)); opacity: 1; transform: translateY(-8px) scale(1.1); }
  100% { filter: drop-shadow(0 0 8px rgba(141, 184, 214, .85)); opacity: 1; transform: translateY(-5px) scale(1); }
}

@keyframes lampejo {
  0% { opacity: 0; transform: scale(.3); }
  30% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* Prévia ao passar o mouse: acende de leve até a lâmina apontada. */
.leque[data-previa] button:not(.acesa) .lamina { transition-duration: .15s; }
.leque[data-previa="1"] button:nth-child(-n+1):not(.acesa) .lamina,
.leque[data-previa="2"] button:nth-child(-n+2):not(.acesa) .lamina,
.leque[data-previa="3"] button:nth-child(-n+3):not(.acesa) .lamina,
.leque[data-previa="4"] button:nth-child(-n+4):not(.acesa) .lamina,
.leque[data-previa="5"] button:nth-child(-n+5):not(.acesa) .lamina,
.leque[data-previa="6"] button:nth-child(-n+6):not(.acesa) .lamina { filter: grayscale(.4) brightness(.85); opacity: .8; transform: translateY(-2px); }

.leque b {
  position: absolute;
  left: 0;
  right: 0;
  top: -15px;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 11px;
  color: rgba(179, 161, 173, .6);
  transition: color .25s;
}

.leque button.acesa b { color: var(--ouro-claro); text-shadow: 0 0 8px rgba(248, 233, 223, .6); }
.leque button:hover b { color: var(--ouro-claro); }

.leque-rotulo {
  padding: 4px 0 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--suave);
}

.leque-caixa .selo { animation: selo .2s cubic-bezier(.2, .8, .2, 1.4) both; }

.escolha-linha { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.busca { flex: 1; }

.busca input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(14, 8, 22, .7);
  border: 1px solid var(--linha);
  color: var(--texto);
}

.busca input::placeholder { color: var(--suave); }
.busca input:focus { outline: none; border-color: var(--ouro); }
.contagem { font-size: 12px; color: var(--suave); white-space: nowrap; }

.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }



.seletor select {
  padding: 6px 28px 6px 10px;
  background: rgba(14, 8, 22, .7);
  border: 1px solid var(--linha);
  font-size: 12px;
  color: var(--texto);
  cursor: pointer;
}

.alternar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--suave);
  cursor: pointer;
}

.alternar-trilho { position: relative; width: 30px; height: 16px; border: 1px solid var(--linha); background: rgba(14, 8, 22, .7); }
.alternar-trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--suave); transition: transform .2s, background .2s; }
.alternar[aria-checked="true"] { color: var(--ouro-claro); }
.alternar[aria-checked="true"] .alternar-trilho::after { transform: translateX(14px); background: var(--aco); }

/* Grade de retratos redondos. */

.grade {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 14px 8px;
  align-content: start;
  /* Folga para o brilho e a medalha dos retratos das bordas não serem cortados pela rolagem. */
  padding: 12px 12px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--ouro-escuro) transparent;
}

.vazio { grid-column: 1 / -1; text-align: center; color: var(--suave); margin: 30px 0; }
.retrato[hidden], .vazio[hidden] { display: none; }
.retrato.entrou { animation: none; }


.retrato {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-decoration: none;
  animation: retrato .45s calc(.6s + var(--i) * 18ms) cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes retrato { from { opacity: 0; transform: translateY(10px) scale(.9); } }

.retrato-img { position: relative; width: 62px; height: 62px; }

.retrato-foto {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(226, 179, 148, .35);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.retrato-nome {
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.retrato.sem-guia .retrato-foto { filter: grayscale(1) brightness(.5); border-color: rgba(255, 255, 255, .08); }
.retrato.sem-guia .retrato-nome { color: rgba(179, 161, 173, .55); font-weight: 400; }

.retrato.com-guia .retrato-foto { border-color: var(--aco); box-shadow: 0 0 12px rgba(141, 184, 214, .35); }
.retrato.com-guia:hover .retrato-foto, .retrato.com-guia:focus-visible .retrato-foto {
  transform: scale(1.08);
  border-color: var(--ouro-claro);
  box-shadow: 0 0 0 3px rgba(226, 179, 148, .25), 0 0 22px rgba(248, 233, 223, .5);
}

.retrato.com-guia:hover .retrato-nome { color: var(--ouro-claro); }
.retrato.atual .retrato-foto { border-color: var(--carmim-claro); box-shadow: 0 0 0 3px rgba(200, 36, 58, .35), 0 0 20px rgba(200, 36, 58, .6); }
.retrato.atual .retrato-nome { color: var(--carmim-claro); }

/* Medalha redonda com o nível, na cor do selo. */
.retrato-nivel {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(var(--selo), .55), rgba(14, 8, 22, .92) 75%);
  border: 1px solid rgba(var(--selo), .9);
  box-shadow: 0 0 8px rgba(var(--selo), .55), 0 0 0 2px rgba(14, 8, 22, .85);
  font-family: var(--titulo);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--ouro-claro);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}

/* ---------- efeito de travar ---------- */

.travar {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(14, 8, 22, .96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility 0s .4s;
}

/* Durante o efeito a tela fica coberta; ao sair, a camada some devagar. */
.travando .travar { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .18s ease; }

.travar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(207, 230, 240, .5), transparent 60%);
  opacity: 0;
}

.travando .travar::before { animation: clarao .8s ease-out both; }

@keyframes clarao { 15% { opacity: 1; } 100% { opacity: 0; } }

/* A tela de trás espera: as animações de entrada só começam quando o efeito termina. */
.travando #app *, .travando .arena > * { animation-play-state: paused !important; }

.travar-laminas { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }

.travar-laminas .lamina {
  position: absolute;
  left: -14px;
  bottom: 0;
  width: 28px;
  height: 140px;
  transform-origin: 50% 160%;
  filter: drop-shadow(0 0 14px rgba(141, 184, 214, .9));
  animation: varrer calc(var(--dur, 1.3s) * .9) calc(var(--i) * 45ms) cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes varrer {
  0% { opacity: 0; transform: rotate(-120deg) scale(.4); }
  45% { opacity: 1; transform: rotate(calc(-62deg + var(--i) * 25deg)) scale(1.15); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: rotate(calc(-62deg + var(--i) * 25deg + 30deg)) scale(1.6); }
}

.travar-texto {
  position: relative;
  margin: 260px 0 0;
  text-align: center;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 46px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ouro-claro);
  text-shadow: 0 0 30px rgba(14, 8, 22, .9);
  animation: nome .6s .15s both;
}

.travar-texto small { display: block; font-family: var(--texto-fonte); font-size: 12px; font-weight: 600; letter-spacing: .3em; color: var(--aco-claro); }

/* ---------- transição da rota: lâminas passando por trás do conteúdo ---------- */

/* O conteúdo some e volta num fade curto; as lâminas cruzam a tela por trás dele, como detalhe. */
main { transition: opacity .35s ease; }
.saindo main { opacity: 0; transition-duration: .18s; }

.varredura {
  --l: clamp(54px, 6.5vw, 96px);    /* comprimento da lâmina */
  --t: calc(var(--l) * .204);       /* largura (proporção da malha) */
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.varrendo .varredura { visibility: visible; }

/* A trajetória (posição e giro) vem do JS; aqui só o tamanho e o ponto de partida. */
.corte-voo {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--l);
  height: var(--t);
  opacity: 0;
}

/* Fio fino que fica para trás da lâmina, em aço e pétala. */
.corte-rastro {
  position: absolute;
  top: 50%;
  right: 55%;
  width: calc(var(--l) * 1.5);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 156, 192, .3) 55%, var(--aco-claro));
}

/* Lâmina deitada, ponta para a direita. */
.corte-lamina .lamina {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--t);
  height: var(--l);
  transform: translate(-50%, -50%) rotate(90deg);
  filter: drop-shadow(0 0 5px rgba(207, 230, 240, .45));
}

/* ---------- guia: escolha na lateral ---------- */

/* O guia ocupa o centro; a escolha vira uma aba fina na lateral esquerda. */
.guia-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 84px 28px 40px 128px;
}

.trilho {
  position: fixed;
  left: 22px;
  top: 84px;
  bottom: 24px;
  z-index: 6;
  width: 68px;
  --aba-alt: 296px;
  animation: lateral .7s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes lateral { from { opacity: 0; transform: translateX(-40px); } }

.trilho-aba {
  position: absolute;
  top: 0;
  left: 0;
  /* Largura fixa: a área do trilho alarga no hover, e a aba não pode esticar junto. */
  width: 68px;
  height: var(--aba-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 22px 0 26px;
  border: 1px solid var(--linha);
  border-right: 2px solid rgba(217, 70, 127, .75);
  background-image: none;
  cursor: pointer;
  transition: opacity .2s, border-color .25s;
  animation: respirar 2.6s ease-in-out infinite;
}

/* Borda direita "respirando", como uma gaveta que pede para ser puxada. */
@keyframes respirar {
  50% { box-shadow: 6px 0 22px -4px rgba(217, 70, 127, .55); border-right-color: var(--petala); }
}

.trilho-aba::after { display: none; }
.trilho-aba:hover { border-color: var(--ouro); }

/* Puxador redondo saindo da borda, com as setas apontando para onde o painel abre. */
.trilho-aba .trilho-setas {
  position: absolute;
  right: -17px;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--ouro);
  background: var(--fundo);
  box-shadow: 0 0 14px rgba(217, 70, 127, .45);
}

.trilho-foto { display: block; flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; border: 2px solid var(--carmim-claro); box-shadow: 0 0 14px rgba(200, 36, 58, .5); }

.trilho-texto {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--titulo);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ouro-claro);
}

/* A escolha inteira, escondida até o mouse ou o foco chegar na aba. A aba "cresce" até virar
   o painel: ele nasce do mesmo tamanho dela, estica, e só então o conteúdo aparece.
   Fechando, o caminho volta: o conteúdo some, o painel encolhe até a aba e sai. */
.trilho .escolha.compacta {
  position: absolute;
  top: 0;
  left: 0;
  width: 68px;
  height: var(--aba-alt);
  transform: none;
  padding: 16px 14px;
  opacity: 0;
  visibility: hidden;
  animation: none;
  background-color: rgba(18, 10, 27, .97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
  transition:
    width .3s .1s cubic-bezier(.4, 0, .2, 1),
    height .3s .1s cubic-bezier(.4, 0, .2, 1),
    opacity .12s .38s,
    visibility 0s .5s;
}

/* O conteúdo tem a largura final desde o início, para não se rearrumar enquanto o painel estica;
   ele fica invisível até o painel terminar de crescer (sem overflow: hidden, que cortaria o brasão). */
.trilho .escolha.compacta > * { min-width: 272px; opacity: 0; transition: opacity .1s; }

.trilho:hover, .trilho:has(:focus-visible), .trilho.aberto { width: 300px; }
.trilho:hover .trilho-aba, .trilho:has(:focus-visible) .trilho-aba, .trilho.aberto .trilho-aba { opacity: 0; pointer-events: none; transition-duration: .1s, .25s; }
.trilho:hover .escolha.compacta, .trilho:has(:focus-visible) .escolha.compacta, .trilho.aberto .escolha.compacta {
  width: 300px;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transition:
    opacity .06s,
    width .34s .04s cubic-bezier(.2, .7, .2, 1),
    height .34s .04s cubic-bezier(.2, .7, .2, 1);
}

.trilho:hover .escolha.compacta > *, .trilho:has(:focus-visible) .escolha.compacta > *, .trilho.aberto .escolha.compacta > * {
  opacity: 1;
  transition: opacity .22s .3s;
}

.escolha.compacta .leque-caixa { padding-top: 14px; }
.escolha.compacta .grade { grid-template-columns: repeat(3, 1fr); }
.escolha.compacta .retrato { animation-delay: calc(.2s + var(--i) * 30ms); }

.guia { padding: 36px 46px 40px; animation: guia .8s .1s cubic-bezier(.2, .7, .2, 1) both; }

@keyframes guia { from { opacity: 0; transform: translateY(20px); } }

.voltar {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--suave);
}

.voltar:hover { color: var(--ouro-claro); }

.guia-versus {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--aco);
}

.guia-versus-foto { display: block; width: 30px; height: 30px; overflow: hidden; border-radius: 50%; border: 1.5px solid var(--aco); }
.guia-versus span { color: var(--carmim-claro); font-family: var(--titulo); font-weight: 800; font-size: 16px; letter-spacing: .1em; }

.guia-topo h1 {
  margin: 6px 0 14px;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 68px;
  line-height: 1;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ouro-claro);
  animation: nome .7s .2s cubic-bezier(.2, .7, .2, 1) both;
}

.guia-tags { display: flex; gap: 8px; margin-bottom: 20px; animation: surgir .6s .35s both; }

.laminas-guia { gap: 8px; }
.laminas-guia .lamina { width: 15px; height: 76px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); animation: cair .55s .4s cubic-bezier(.2, .8, .2, 1.3) both; }
.laminas-guia .lamina:nth-child(2) { animation-delay: .47s; }
.laminas-guia .lamina:nth-child(3) { animation-delay: .54s; }
.laminas-guia .lamina:nth-child(4) { animation-delay: .61s; }
.laminas-guia .lamina:nth-child(5) { animation-delay: .68s; }
.laminas-guia .lamina:nth-child(6) { animation-delay: .75s; }
.laminas-guia .selo { font-size: 13px; animation: selo .4s .9s cubic-bezier(.2, .8, .2, 1.4) both; }

@keyframes cair { from { opacity: 0; transform: translateY(-30px) rotate(-12deg); } }
@keyframes selo { from { opacity: 0; transform: scale(.6); } }


/* ---------- outras telas ---------- */

.aviso { max-width: 560px; margin: 140px auto 0; padding: 40px; text-align: center; }
.aviso h1 { font-family: var(--titulo); font-weight: 800; font-size: 28px; margin: 0 0 20px; }

.botao {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--ouro);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ---------- tela inicial: escolher a rota ---------- */

.rota-tela {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 34px;
  padding: 40px;
}

.rota-tela h1 {
  margin: 0;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ouro-claro);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .9);
  animation: titulo 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

.rotas { display: flex; gap: 22px; }

.rota {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 190px;
  padding: 30px 20px 22px;
  background: var(--painel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--linha);
  cursor: pointer;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  animation: painel-rota .7s calc(.5s + var(--i) * 120ms) cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes painel-rota { from { opacity: 0; transform: translateY(24px); } }

.rota::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ouro), transparent);
}

.rota .icone-rota { width: 78px; height: 78px; transition: filter .25s; }
.rota span { font-family: var(--titulo); font-weight: 800; font-size: 24px; letter-spacing: .14em; color: var(--ouro-claro); }

.rota:hover, .rota:focus-visible {
  border-color: var(--ouro);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(226, 179, 148, .25);
}

.rota:hover .icone-rota { filter: drop-shadow(0 0 10px rgba(248, 233, 223, .7)); }

/* Rota recomendada: selo sobre a borda de cima e brilho magenta. */
.rota.recomendada { border-color: rgba(217, 70, 127, .55); box-shadow: 0 0 26px rgba(217, 70, 127, .18); }
.rota.recomendada::before { background: linear-gradient(90deg, transparent, var(--magenta), transparent); }

.rota-selo {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  font-family: var(--titulo);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ouro-claro);
  background: rgba(217, 70, 127, .3);
  border: 1px solid rgba(217, 70, 127, .8);
  box-shadow: 0 0 14px rgba(217, 70, 127, .4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.icone-rota-fundo { fill: var(--ouro-escuro); opacity: .6; }
.icone-rota-frente { fill: var(--ouro); }

/* Troca de rota no topo da seleção. */

.troca-rota { display: inline-flex; gap: 4px; margin-bottom: 2px; animation: surgir .8s .1s both; }

.troca-rota a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--suave);
}

.troca-rota .icone-rota { width: 20px; height: 20px; }
.troca-rota a:not([aria-current]) .icone-rota { opacity: .5; }
.troca-rota a[aria-current] { border-color: var(--linha); color: var(--ouro-claro); background: rgba(14, 8, 22, .5); }
.troca-rota a:hover { color: var(--ouro-claro); }

/* Ícone do campeão no centro das lâminas, no efeito de travar. */

.travar-icone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 116px;
  height: 116px;
  margin: -58px 0 0 -58px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--ouro-claro);
  box-shadow: 0 0 40px rgba(207, 230, 240, .7);
  animation: icone-travar var(--dur, 1.3s) cubic-bezier(.2, .8, .2, 1) both;
}

.travar-icone img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Ícone quadrado de campeão: amplia para a moldura escura e a vinheta ficarem fora do recorte. */
.icone-dd { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); }

@keyframes icone-travar {
  0% { opacity: 0; transform: scale(.3); }
  25% { opacity: 1; transform: scale(1.12); }
  40% { transform: scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.05); }
}


/* ---------- skin da Irelia: botão discreto no canto ---------- */

.skin-escolha { position: fixed; top: 18px; left: 22px; z-index: 15; }

.skin-botao {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(226, 179, 148, .45);
  background: var(--fundo);
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s, border-color .2s, transform .2s;
}

.skin-botao img { width: 100%; height: 100%; object-fit: cover; }
.skin-botao:hover, .skin-botao:focus-visible, .skin-botao[aria-expanded="true"] { opacity: 1; border-color: var(--ouro); transform: scale(1.06); }

.skin-lista {
  position: absolute;
  top: 44px;
  left: 0;
  width: 360px;
  max-height: min(440px, calc(100vh - 90px));
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 8px;
  padding: 14px;
  background: rgba(14, 8, 22, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--linha);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  scrollbar-width: thin;
  scrollbar-color: var(--ouro-escuro) transparent;
  animation: surgir .25s ease both;
}

.skin-lista[hidden] { display: none; }

.skin-lista button {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--suave);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.skin-lista img { width: 64px; height: 64px; object-fit: cover; border: 1.5px solid rgba(226, 179, 148, .25); transition: border-color .2s, transform .2s; }
.skin-lista button:hover img { border-color: var(--ouro); transform: scale(1.05); }
.skin-lista button:hover { color: var(--ouro-claro); }
.skin-lista button[aria-pressed="true"] img { border: 2px solid var(--ouro-claro); box-shadow: 0 0 14px rgba(248, 233, 223, .4); }
.skin-lista button[aria-pressed="true"] { color: var(--ouro-claro); }


/* ---------- Ionia: floreios, pétalas, névoa e mandala ---------- */

.topo-selecao h1, .rota-tela h1 { display: flex; align-items: center; justify-content: center; gap: 18px; white-space: nowrap; }

.topo-selecao h1::before, .topo-selecao h1::after, .rota-tela h1::before, .rota-tela h1::after {
  content: "";
  width: 84px;
  height: 17px;
  flex: none;
  background: url(img/voluta-e.svg) center / contain no-repeat;
  opacity: .85;
}

.topo-selecao h1::after, .rota-tela h1::after { background-image: url(img/voluta-d.svg); }

/* Pétalas de flor espiritual caindo devagar. */
.petalas { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.petala {
  position: absolute;
  top: -40px;
  left: var(--x);
  animation: cair var(--dur) var(--atraso) linear infinite;
}

.petala::before {
  content: "";
  display: block;
  width: var(--tam);
  height: calc(var(--tam) * .62);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #ffd3e3, var(--petala) 55%, #c74b86);
  opacity: .75;
  box-shadow: 0 0 10px rgba(255, 156, 192, .5);
  animation: balancar calc(var(--dur) / 4) ease-in-out infinite alternate;
}

@keyframes cair {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--deriva), 112vh, 0); }
}

@keyframes balancar {
  from { transform: rotate(-30deg) translateX(-14px) rotateY(0deg); }
  to { transform: rotate(50deg) translateX(14px) rotateY(160deg); }
}

/* Névoa rosada no pé da tela, andando devagar. */
.nevoa {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 45%;
  background:
    radial-gradient(ellipse 40% 60% at 25% 80%, rgba(217, 70, 127, .16), transparent 70%),
    radial-gradient(ellipse 35% 50% at 70% 90%, rgba(150, 90, 200, .14), transparent 70%),
    radial-gradient(ellipse 30% 40% at 50% 100%, rgba(255, 156, 192, .1), transparent 70%);
  animation: nevoa 26s ease-in-out infinite alternate;
}

@keyframes nevoa { to { transform: translateX(8%); } }

/* Mandala girando devagar atrás da escolha de rota. */
.rota-tela { position: relative; }

.rota-tela::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  background: url(img/mandala.svg) center / contain no-repeat;
  opacity: .14;
  animation: girar-mandala 140s linear infinite;
  pointer-events: none;
}

@keyframes girar-mandala { to { transform: rotate(360deg); } }

.rota-tela > * { position: relative; }

.rota { background-image: url(img/canto-ae.svg), url(img/canto-bd.svg); background-position: 5px 5px, calc(100% - 5px) calc(100% - 5px); background-size: 34px; background-repeat: no-repeat; }

/* Explosão de pétalas ao travar. */
.travar-petalas { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }

.travar-petalas span {
  position: absolute;
  width: 16px;
  height: 10px;
  margin: -5px 0 0 -8px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #ffd3e3, var(--petala) 55%, #c74b86);
  opacity: 0;
  animation: petala-explode calc(var(--dur, 1.3s) * .9) calc(.12s + var(--i) * 12ms) cubic-bezier(.15, .7, .3, 1) both;
}

@keyframes petala-explode {
  0% { opacity: 0; transform: rotate(var(--ang)) translateY(0) scale(.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--ang)) translateY(calc(var(--dist) * -1)) rotate(var(--giro)) scale(1); }
}

/* Seletor de skin no canto superior direito, com aviso e seta. */
.skin-escolha { left: auto; right: 22px; top: 16px; display: flex; align-items: center; gap: 10px; }

.skin-aviso {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--titulo);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ouro-claro);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
  opacity: .8;
  pointer-events: none;
}

/* Três setinhas que acendem em sequência, apontando para o botão. */
.skin-aviso { transition: opacity .35s, transform .35s; }
.skin-aviso.sumindo { opacity: 0; transform: translateX(10px); }

.skin-setas { display: inline-flex; margin-left: 4px; }
.trilho-setas { display: inline-flex; padding-left: 4px; }
/* Uma seta só no puxador. O "›" é um quadrado girado com duas bordas, que puxa o peso para a
   direita; o recuo compensa isso e deixa a seta no meio do círculo. */
.trilho-aba .trilho-setas i { width: 9px; height: 9px; margin: 0 0 0 -4px; }

.skin-setas i, .trilho-setas i {
  width: 7px;
  height: 7px;
  margin-left: -1px;
  border-top: 2px solid var(--ouro);
  border-right: 2px solid var(--ouro);
  transform: rotate(45deg);
  opacity: .2;
  animation: seta-acende 1.4s ease-in-out infinite;
}

.skin-setas i:nth-child(2), .trilho-setas i:nth-child(2) { animation-delay: .2s; }
.skin-setas i:nth-child(3), .trilho-setas i:nth-child(3) { animation-delay: .4s; }

@keyframes seta-acende { 30% { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 156, 192, .9)); } 60% { opacity: .2; } }

.skin-escolha .skin-botao { width: 40px; height: 40px; opacity: .85; box-shadow: 0 0 14px rgba(217, 70, 127, .35); }
.skin-lista { left: auto; right: 0; top: 50px; }

@media (prefers-reduced-motion: reduce) {
  .petalas, .travar-petalas { display: none; }
}

/* ---------- marca do Guiven no canto superior esquerdo ---------- */

.marca {
  position: fixed;
  top: 16px;
  left: 22px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: surgir .8s .1s both;
}

.marca-nome { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }

.marca-nome b {
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ouro-claro);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .8), 0 0 18px rgba(217, 70, 127, .35);
}

.marca-nome small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ouro);
  opacity: .8;
}

.marca-redes { display: flex; align-items: center; gap: 6px; padding-left: 14px; border-left: 1px solid var(--linha); }

.marca-redes svg { width: 15px; height: 15px; fill: currentColor; }
.marca-redes svg.traco { fill: none; stroke: currentColor; stroke-width: 2; }
.marca-redes svg .ponto { fill: currentColor; stroke: none; }

.marca-rede {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(226, 179, 148, .28);
  border-radius: 50%;
  background: rgba(14, 8, 22, .55);
  color: var(--ouro);
  transition: color .2s, border-color .2s, background-color .2s;
}

.marca-rede:hover, .marca-rede:focus-visible { color: var(--ouro-claro); border-color: var(--ouro); background-color: rgba(14, 8, 22, .85); }

.marca-live {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  margin-right: 6px;
  padding: 0 3px 0 12px;
  border: 1px solid rgba(226, 179, 148, .3);
  background: rgba(14, 8, 22, .6);
}

.marca-live-rotulo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ouro-claro);
}

.marca-live-rotulo i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--carmim-claro);
  box-shadow: 0 0 8px var(--carmim-claro);
}

/* Cada plataforma na cor dela, acesa no hover. */
.marca-live a {
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  color: var(--cor);
  opacity: .75;
  transition: opacity .2s, background-color .2s;
}

.marca-live a:hover, .marca-live a:focus-visible { opacity: 1; background-color: rgba(255, 255, 255, .08); }

.live-twitch { --cor: #bf94ff; }
.live-kick { --cor: #53fc18; }
.live-youtube { --cor: #ff4e45; }
.marca-live .live-kick svg { width: 13px; height: 13px; }

/* Em tela mais estreita a marca não pode encostar na troca de rota, no centro. */
@media (max-width: 1365px) {
  .marca-live-extra { display: none; }
}

/* No guia a aba lateral começa logo abaixo da marca. */
body[data-tela="guia"] .marca { top: 20px; }

/* ---------- vídeos do Guiven no guia ---------- */

.guia-videos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 20px 14px 16px;
  border: 1px solid var(--linha);
  background: rgba(14, 8, 22, .45);
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}

.guia-videos:hover, .guia-videos:focus-visible { border-color: var(--ouro); background-color: rgba(14, 8, 22, .7); }

.guia-videos-play {
  position: relative;
  flex: none;
  width: 44px;
  height: 31px;
  border-radius: 8px;
  background: var(--carmim);
  box-shadow: 0 0 16px rgba(200, 36, 58, .4);
}

.guia-videos-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--ouro-claro);
  transform: translate(-40%, -50%);
}

.guia-videos-texto { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.guia-videos-texto small { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ouro); }
.guia-videos-texto b { font-family: var(--titulo); font-weight: 700; font-size: 18px; letter-spacing: .04em; color: var(--ouro-claro); }

.guia-videos-seta { font-size: 26px; line-height: 1; color: var(--ouro); transition: transform .2s; }
.guia-videos:hover .guia-videos-seta { transform: translateX(4px); }

/* ---------- abas do guia ---------- */

.guia-abas { margin-top: 16px; animation: surgir .6s .45s both; }

.abas { display: flex; border-bottom: 1px solid var(--linha); }

.aba {
  flex: 1;
  position: relative;
  padding: 12px 8px 11px;
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--suave);
  cursor: pointer;
  transition: color .2s, background-color .2s;
}

.aba:hover { color: var(--ouro-claro); background-color: rgba(226, 179, 148, .05); }
.aba[aria-selected="true"] { color: var(--ouro-claro); }

/* Traço de aço embaixo da aba aberta, como o fio da lâmina. */
.aba::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aco-claro), transparent);
  box-shadow: 0 0 10px rgba(141, 184, 214, .7);
  opacity: 0;
  transform: scaleX(.3);
  transition: opacity .2s, transform .25s cubic-bezier(.2, .7, .2, 1);
}

.aba[aria-selected="true"]::after { opacity: 1; transform: none; }

.aba-painel { min-height: 236px; padding: 16px 4px 4px; outline: none; }
.aba-painel > * { animation: surgir .25s both; }

.aba-vazia {
  margin: 0;
  padding: 46px 20px;
  border: 1px dashed rgba(226, 179, 148, .3);
  text-align: center;
  color: var(--suave);
}

.aba-titulo { margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ouro); }

.dicas { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.dicas li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.55; }
.dicas li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; background: var(--ouro); transform: rotate(45deg); }

.cooldowns { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.cooldowns li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  background: rgba(14, 8, 22, .45);
  border: 1px solid rgba(226, 179, 148, .14);
}

.cd-icone { position: relative; width: 46px; height: 46px; }
.cd-icone img { width: 100%; height: 100%; border: 1px solid rgba(226, 179, 148, .45); }

.cd-icone b {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 20px;
  padding: 1px 4px;
  background: var(--fundo);
  border: 1px solid var(--ouro);
  font-family: var(--titulo);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  color: var(--ouro-claro);
}

.cd-nome { font-family: var(--titulo); font-weight: 700; font-size: 17px; letter-spacing: .03em; color: var(--ouro-claro); }
.cd-nome small { display: block; margin-top: 2px; font-family: var(--texto-fonte); font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--suave); }

.cd-recarga { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.cd-recarga small { font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--suave); }
.cd-recarga strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--aco-claro); }

.cd-nota { margin: 14px 0 0; padding: 10px 14px; border-left: 2px solid var(--magenta); background: rgba(217, 70, 127, .08); font-size: 14px; }
.cd-rodape { margin: 12px 0 0; font-size: 12px; color: var(--suave); }

.guia-abas .guia-videos { margin-top: 0; }

/* ---------- aba Build ---------- */

.build { display: grid; gap: 20px; }
.build .aba-titulo { margin-bottom: 10px; }
.itens { display: flex; flex-wrap: wrap; gap: 12px; }

.item {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(226, 179, 148, .5);
  background: var(--fundo);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  cursor: help;
  outline: none;
  transition: border-color .15s, transform .15s;
}

.item img { width: 100%; height: 100%; }
.item:hover, .item:focus-visible { border-color: var(--ouro-claro); transform: translateY(-2px); }

.item-ordem {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fundo);
  border: 1px solid var(--ouro);
  font-family: var(--titulo);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  color: var(--ouro-claro);
}

.desconhecido {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px dashed var(--carmim-claro);
  font-family: var(--titulo);
  font-size: 22px;
  color: var(--carmim-claro);
}

/* ---------- aba Runas: árvores como no cliente, escolhidas acesas ---------- */

.runas { display: grid; grid-template-columns: 1.25fr 1fr .75fr; gap: 0 24px; }
.arvore { display: grid; align-content: start; gap: 9px; }

.arvore-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.arvore-topo img { width: 32px; height: 32px; }
.arvore-topo span { display: flex; flex-direction: column; line-height: 1.15; }
.arvore-topo small { font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--suave); }
.arvore-topo b { font-family: var(--titulo); font-weight: 700; font-size: 17px; color: var(--ouro-claro); }

.runas-linha { display: flex; justify-content: center; gap: 14px; }
.runas-linha.pedras { gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(226, 179, 148, .14); }

.runa {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: help;
  outline: none;
  filter: grayscale(1) brightness(.55);
  opacity: .55;
  transition: filter .15s, opacity .15s, transform .15s;
}

.runa img { width: 100%; height: 100%; }
.runa.pedra { width: 52px; height: 52px; }
.runa.fragmento { width: 24px; height: 24px; }
.runa.escolhida { filter: none; opacity: 1; box-shadow: 0 0 0 1.5px var(--ouro), 0 0 14px rgba(226, 179, 148, .35); }
.runa.pedra.escolhida { box-shadow: none; filter: drop-shadow(0 0 10px rgba(226, 179, 148, .5)); transform: scale(1.12); }
.runa:hover, .runa:focus-visible { filter: none; opacity: 1; }
.runa:focus-visible { box-shadow: 0 0 0 2px var(--aco-claro); }

.runas-linha.fragmentos { gap: 16px; padding: 6px 0; }
/* Árvore secundária e fragmentos começam alinhados com a primeira linha da primária. */
.arvore-topo { min-height: 40px; }
.runas-nota { grid-column: 1 / -1; }

/* ---------- tooltip de item e runa ---------- */

.balao {
  position: fixed;
  z-index: 40;
  width: 320px;
  padding: 12px 14px 14px;
  background: rgba(10, 6, 16, .97);
  border: 1px solid var(--ouro-escuro);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 16px 40px rgba(0, 0, 0, .7);
  pointer-events: none;
  font-size: 13px;
  line-height: 1.45;
}

.balao[hidden] { display: none; }

.balao-topo { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid rgba(226, 179, 148, .2); }
.balao-topo img { width: 40px; height: 40px; border: 1px solid rgba(226, 179, 148, .45); }
.balao-topo span { display: flex; flex-direction: column; line-height: 1.2; }
.balao-topo b { font-family: var(--titulo); font-weight: 700; font-size: 16px; color: var(--ouro-claro); }
.balao-topo small { margin-top: 2px; font-weight: 600; color: #f0c45a; }

.balao-texto p { margin: 0; color: #c9bfc6; }
.balao-espaco { display: block; height: 8px; }

/* Cores das marcações do cliente. */
.t-atributo { color: #e7dfe4; }
.t-numero { color: #fff; font-weight: 600; }
.t-titulo { color: var(--ouro-claro); font-weight: 700; }
.t-fisico { color: #ff8c34; }
.t-magico { color: #7f9cff; }
.t-verdadeiro { color: #fff; font-weight: 600; }
.t-cura { color: #6fd37a; }
.t-escudo { color: #b8c9d9; }
.t-velocidade { color: #f2d36b; }
.t-ouro { color: #f0c45a; }
.t-destaque { color: #48c4b7; }
.t-regra { color: #8e8590; font-style: italic; }

/* ---------- setup do confronto, entre o topo e as abas ---------- */

.setup {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  margin-top: 16px;
  padding: 12px 18px 10px;
  border: 1px solid rgba(226, 179, 148, .22);
  background: linear-gradient(90deg, rgba(226, 179, 148, .08), rgba(14, 8, 22, .3));
  animation: surgir .6s .4s both;
}

.setup-titulo {
  align-self: center;
  margin: 0;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ouro);
}

.setup-parte { display: grid; justify-items: center; gap: 6px; }
.setup-parte .itens { gap: 8px; }
.setup-parte .item { width: 44px; height: 44px; }
.setup-parte small { font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--suave); }
.runa.setup-pedra { width: 44px; height: 44px; transform: none; }


/* Nível e setup na mesma linha, embaixo do nome. */
.guia-linha { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.guia-linha .setup { margin-top: 0; }

/* ---------- celular ---------- */

@media (max-width: 760px) {
  /* Animações de entrada passam alguns px da borda; sem isso o Chrome do celular afasta o zoom. */
  #app { overflow-x: clip; }

  body { font-size: 14px; }

  /* Uma arte só, atrás de tudo, bem apagada para o texto ler. */
  .arte { width: 100%; opacity: .45; }
  .arte-inimigo { display: none; }
  .arte-voce .camada { background-size: cover; background-position: 50% 22%; }

  /* Marca compacta no canto, rolando junto com a página para não ficar
     por cima do conteúdo; live e redes descem para uma linha própria embaixo do nome.
     A faixa ocupa a largura toda, então só os links pegam o toque (a skin fica à direita). */
  .marca { position: absolute; top: 12px; left: 12px; right: 12px; flex-wrap: wrap; gap: 10px; pointer-events: none; }
  .marca > * { pointer-events: auto; }
  .marca-nome b { font-size: 18px; }
  .marca-nome small { font-size: 8px; }
  .marca-redes { flex: 1 0 100%; gap: 6px; padding-left: 0; border-left: 0; }
  .marca-live { margin-right: auto; padding-left: 10px; }
  body[data-tela="guia"] .marca { top: 12px; }

  .skin-escolha { position: absolute; top: 10px; right: 12px; }
  .skin-aviso { display: none; }
  .skin-lista { top: 44px; width: calc(100vw - 24px); grid-template-columns: repeat(3, 1fr); }
  .skin-lista img { width: 56px; height: 56px; }

  /* Títulos quebram linha e perdem os floreios laterais. */
  .topo-selecao h1, .rota-tela h1 { white-space: normal; gap: 0; }
  .topo-selecao h1::before, .topo-selecao h1::after, .rota-tela h1::before, .rota-tela h1::after { display: none; }

  /* Rota */
  /* A mandala gira maior que a tela estreita; corta para a página não alargar. */
  .rota-tela { gap: 24px; padding: 116px 16px 32px; overflow: hidden; overflow: clip; }
  .rota-tela h1 { font-size: 24px; }
  .rota-tela::before { width: 360px; height: 360px; margin: -180px 0 0 -180px; }
  .rotas { gap: 12px; width: 100%; justify-content: center; }
  .rota { width: auto; flex: 1; max-width: 190px; padding: 22px 10px 16px; gap: 10px; }

  /* Seleção: tudo em coluna, rolando a página em vez da grade. */
  .selecao { height: auto; min-height: 0; padding: 104px 0 24px; }
  .topo-selecao { position: static; transform: none; width: auto; padding: 0 16px; }
  .topo-selecao h1 { font-size: 22px; letter-spacing: .08em; margin: 6px 0; }
  .time, .nome-grande, .nome-grande.dir { display: none; }

  .escolha {
    position: static;
    width: auto;
    margin: 12px 10px 0;
    padding: 12px 12px 14px;
    transform: none;
    animation-name: surgir;
  }

  .escolha-topo { flex-direction: column; align-items: stretch; gap: 12px; padding: 10px 0 12px; }
  .escolha-topo .leque-caixa { align-self: center; }
  .grade { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 12px 6px; padding: 10px 2px 4px; }
  .retrato-img { width: 54px; height: 54px; }

  /* Travar */
  .travar-texto { margin-top: 200px; font-size: 28px; padding: 0 16px; }

  /* Guia: a escolha vira uma barra presa embaixo que abre uma gaveta. */
  .guia-layout { padding: 104px 10px 88px; }

  .trilho, .trilho:hover, .trilho:has(:focus-visible) {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    height: 56px;
    animation-name: surgir;
  }

  .trilho-aba {
    width: 100%;
    height: 56px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    border-right: 1px solid var(--linha);
    border-top: 2px solid rgba(217, 70, 127, .75);
    background-color: rgba(20, 11, 30, .94);
    animation: none;
  }

  .trilho-foto { width: 36px; height: 36px; }
  .trilho-texto { writing-mode: horizontal-tb; transform: none; }
  .trilho-aba .trilho-setas { position: static; margin: 0 0 0 auto; transform: rotate(-90deg); }

  .trilho .escolha.compacta { top: auto; bottom: 0; width: 100%; height: 56px; margin: 0; }
  .trilho .escolha.compacta > * { min-width: 0; }

  /* No celular só o toque abre; o hover e o foco do desktop não valem aqui. */
  .trilho:hover .trilho-aba, .trilho:has(:focus-visible) .trilho-aba { opacity: 1; pointer-events: auto; }
  .trilho:hover .escolha.compacta, .trilho:has(:focus-visible) .escolha.compacta { width: 100%; height: 56px; opacity: 0; visibility: hidden; }
  .trilho:hover .escolha.compacta > *, .trilho:has(:focus-visible) .escolha.compacta > * { opacity: 0; }

  .trilho.aberto { top: 64px; width: auto; height: auto; }
  .trilho.aberto .trilho-aba { opacity: 0; pointer-events: none; }
  /* Só a grade rola, dentro da moldura: os retratos não passam por cima da borda nem dos cantos. */
  .trilho.aberto .escolha.compacta {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 44px 14px 22px;
    opacity: 1;
    visibility: visible;
    overflow: hidden;
  }
  .trilho.aberto .escolha.compacta .grade { flex: 1; min-height: 0; overflow-y: auto; align-content: start; }
  /* O brasão desce para dentro da borda (sem overflow visível ele seria cortado). */
  .trilho .escolha.compacta::after { top: 6px; }
  .trilho.aberto .escolha.compacta > * { opacity: 1; }
  .escolha.compacta .grade { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }

  /* Cantos menores e o "voltar" afastado do canto de cima. */
  .painel { background-size: 30px 30px; background-position: 4px 4px, calc(100% - 4px) 4px, 4px calc(100% - 4px), calc(100% - 4px) calc(100% - 4px); }
  .guia { padding: 20px 14px 30px; }
  .guia .voltar { margin-left: 22px; }
  .guia-versus { letter-spacing: .2em; }
  .guia-topo h1 { font-size: 40px; margin-bottom: 12px; }
  .guia-linha { flex-direction: column; align-items: flex-start; gap: 14px; }
  .setup { flex-wrap: wrap; gap: 14px 18px; padding: 12px 14px 10px; }
  .setup-titulo { flex-basis: 100%; }

  .guia-videos { gap: 12px; padding: 12px; }

  .abas { overflow-x: auto; scrollbar-width: none; }
  .aba { flex: 1 0 auto; padding: 12px 6px 11px; font-size: 10px; letter-spacing: .08em; }
  .aba-painel { min-height: 0; padding: 14px 0 4px; }

  .cooldowns { grid-template-columns: 1fr; }
  .runas { grid-template-columns: 1fr; gap: 22px; }

  .balao { width: min(320px, calc(100vw - 24px)); }
}

/* Celular estreito (320 px): as cinco abas cabem sem rolar para o lado. */
@media (max-width: 359px) {
  .aba { padding-left: 2px; padding-right: 2px; font-size: 9px; letter-spacing: .04em; }
}

/* Celular: a busca ocupa a linha toda e a contagem desce, senão o texto do campo corta. */
@media (max-width: 760px) {
  .escolha-linha { flex-wrap: wrap; gap: 6px 14px; }
  .busca { flex: 1 0 100%; }
}

/* Celular: o selo do nível (HARDCOUNTER é o mais longo) não passa da borda do painel; se faltar espaço, desce. */
@media (max-width: 760px) {
  .laminas-guia { flex-wrap: wrap; gap: 12px 6px; }
  .laminas-guia .selo { margin-left: 8px; padding: 5px 10px 4px; font-size: 11px; letter-spacing: .1em; }
}

/* Escolha de rota: cabe sempre na tela visível (dvh desconta a barra do navegador no celular),
   sem rolagem, com o conteúdo no centro exato. */
body[data-tela="rota"] { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.rota-tela { min-height: 100vh; min-height: 100dvh; }

@media (max-width: 760px) {
  .rota-tela { height: 100dvh; min-height: 0; padding: 100px 16px; }
}

/* Gaveta de trocar adversário (celular) e deslizar entre as abas do guia. No desktop nada disso aparece. */
.trilho-fundo, .gaveta-topo, .abas-nav, .abas-dica { display: none; }

.aba-painel { transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.aba-painel.deslizando { transition: none; }
.aba-painel[data-dir="prox"] > * { animation: aba-prox .28s cubic-bezier(.2, .7, .2, 1) both; }
.aba-painel[data-dir="ant"] > * { animation: aba-ant .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes aba-prox { from { opacity: 0; transform: translateX(28px); } }
@keyframes aba-ant { from { opacity: 0; transform: translateX(-28px); } }

@media (max-width: 760px) {
  body.gaveta-aberta { overflow: hidden; }
  /* O main passa por cima da marca e do resto, para a gaveta cobrir o título. */
  body.gaveta-aberta main { z-index: 30; }

  .trilho.aberto { top: 0; left: 0; right: 0; bottom: 0; height: auto; }

  .trilho-fundo {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(6, 3, 10, .72);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s;
  }
  .trilho.aberto .trilho-fundo { opacity: 1; pointer-events: auto; }
  .trilho.aberto.fechando .trilho-fundo { opacity: 0; }

  .trilho:not(.aberto) .escolha.compacta { transition: none; }
  .trilho.aberto .escolha.compacta {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    padding: 0 14px 18px;
    border-bottom: 0;
    animation: gaveta-sobe .32s cubic-bezier(.2, .7, .2, 1) backwards;
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  }
  .trilho.aberto.fechando .escolha.compacta { transform: translateY(100%); }
  .trilho.arrastando .escolha.compacta { transition: none; }
  .trilho.aberto .escolha.compacta > * { transition: none; }
  .trilho.aberto .escolha.compacta::after { display: none; }
  @keyframes gaveta-sobe { from { transform: translateY(100%); } }

  .gaveta-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    flex: none;
    padding: 24px 0 12px;
    touch-action: none;
    cursor: grab;
  }
  .gaveta-alca {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 46px;
    height: 5px;
    margin-left: -23px;
    border-radius: 3px;
    background: var(--ouro); opacity: .75;
  }
  .gaveta-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .gaveta-titulo b { font-family: var(--titulo); font-size: 18px; font-weight: 700; letter-spacing: .06em; color: var(--ouro-claro); }
  .gaveta-fechar {
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ouro);
    border-radius: 50%;
    background: rgba(14, 8, 22, .85);
    color: var(--ouro-claro);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }
  .gaveta-fechar:focus-visible { outline: 2px solid var(--ouro-claro); outline-offset: 2px; }

  /* Abas: o conteúdo acompanha o dedo; embaixo, anterior/próxima com os pontinhos. */
  .guia-abas { overflow-x: clip; }
  .aba-painel { touch-action: pan-y; }

  .abas-dica {
    display: flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    margin: 10px auto 0;
    padding: 5px 14px;
    border: 1px solid var(--linha);
    border-radius: 999px;
    background: rgba(14, 8, 22, .6);
    font-size: 11px;
    letter-spacing: .05em;
    color: var(--suave);
    animation: dica-balanco 1.4s ease-in-out .6s 4;
  }
  .abas-dica span { font-size: 15px; font-weight: 700; color: var(--ouro); }
  @keyframes dica-balanco { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

  .abas-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--linha);
  }
  .abas-nav-ir {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--linha);
    background: rgba(14, 8, 22, .6);
    color: var(--ouro-claro);
    font-family: var(--titulo);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
  }
  .abas-nav-ir.ant { text-align: left; }
  .abas-nav-ir.prox { text-align: right; }
  .abas-nav-ir[hidden] { display: block; visibility: hidden; }
  .abas-pontos { display: flex; gap: 5px; flex: none; }
  .abas-pontos i { width: 6px; height: 6px; border-radius: 3px; background: var(--ouro-escuro); transition: width .2s; }
  .abas-pontos i.atual { width: 16px; background: var(--ouro-claro); }
}

/* Celular estreito: "‹ Matchup" e "Cooldowns ›" cabem sem reticências. */
@media (max-width: 360px) {
  .abas-nav { gap: 6px; }
  .abas-nav-ir { padding: 0 6px; font-size: 11px; letter-spacing: .02em; }
  .abas-pontos { gap: 4px; }
}

/* ---------- celular: mesmo visual, menos trabalho para a placa de vídeo ---------- */
/* Em celular intermediário (ex.: Galaxy M34) o que engasga é o desfoque de vidro recalculado
   sobre a arte a cada quadro de rolagem e as animações que nunca param. Aqui o vidro vira um
   fundo mais fechado e o movimento contínuo fica só no que aparece. */
@media (max-width: 760px) {
  .painel, .rota, .selo, .rota-selo, .skin-lista { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .painel, .rota { background-color: rgba(20, 11, 30, .9); }

  /* O fundo fixo usa a altura grande da tela: a barra do navegador sumindo ao rolar não
     redimensiona a arte (cada redimensionamento redesenhava a splash inteira). */
  .arena, .petalas { bottom: auto; height: 100vh; height: 100lvh; }
  .arena { contain: strict; transform: translateZ(0); }

  /* A arte já ocupa a tela toda apagada; a máscara de degradê só custava uma camada a mais. */
  .arte-voce { -webkit-mask-image: none; mask-image: none; }

  /* Pétalas sem brilho e sem giro 3D. */
  .petala { will-change: transform; }
  .petala::before { box-shadow: none; animation-name: balancar-plano; }

  .nevoa, .rota-tela::before { animation: none; }

  /* Lâmina da transição sem o brilho de filtro; o fio já marca o corte. */
  .corte-lamina .lamina { filter: none; }

  /* Setas de "deslize" piscam só na opacidade (o brilho com filtro redesenhava a cada quadro). */
  .skin-setas i, .trilho-setas i { animation-name: seta-acende-leve; }

  /* A grade de campeões entra em cascata só nos primeiros; o resto já chega junto. */
  .retrato { animation-delay: calc(.3s + min(var(--i), 16) * 18ms); }
}

@keyframes balancar-plano {
  from { transform: rotate(-30deg) translateX(-14px); }
  to { transform: rotate(50deg) translateX(14px); }
}

@keyframes seta-acende-leve { 30% { opacity: 1; } 60% { opacity: .2; } }
