/* ---------- menú de estandartes (pedido de Alejandro, 8/10/2026) ----------
   El menú principal es una pila centrada de estandartes rúnicos bajo el logo (js/menu/estandartes.js arma el SVG).
   El estandarte grande es solo del menú principal; los submenús, la elección de vikingo y las ventanas usan piezas
   más chicas de la misma familia: cinta del título con nudos y runas, marco tallado, botones con cola de golondrina.
   Caro: las brasas de los estandartes solo con Calidad gráfica alta (html[data-calidad]). Nada redondo, nada degradado. */

@font-face {
  font-family: "Noto Sans Runic";
  font-weight: 400;
  font-display: swap;
  src: url("../propuesta/fuentes/NotoSansRunic.woff2") format("woff2");
  unicode-range: U+16A0-16F8;
}

/* ---------- pantalla de inicio: logo arriba, pila al centro, lo chico abajo a la izquierda ---------- */
#title {
  --logoW: min(40vw, 620px, 62vh);
  justify-content: flex-start;
  gap: 0;
  /* arriba queda lugar para la cabeza que sale del logo al tocarlo (con las flechas clavadas llega a ~22 % del ancho del logo) */
  padding: calc(var(--logoW) * 0.24 + clamp(8px, 2vh, 24px)) 16px 56px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(10, 7, 7, 0.36);
}
#title > .wordmark {
  margin-bottom: clamp(16px, 4vh, 44px);
}
#title .logoE {
  width: var(--logoW);
}
#title .titleWrap {
  max-width: none;
  padding: 0;
  justify-content: center;
}
#title .titleCol {
  align-items: center;
  gap: 0;
}
#title #mainNav,
#title #newNav {
  --banW: min(330px, 20vw, 36vh);
  align-items: center;
  gap: 0;
}
#title #mainNav > * + * {
  margin-top: calc(var(--banW) * -0.025);
}
/* el ranking es una ventana: se abre con el estandarte Ranking, en el lugar de la pila */
#title .rankCard {
  display: none;
}
#title.verRank .rankCard {
  display: flex;
  flex: none;
  width: min(460px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  overflow: visible;
}
#title.verRank .titleCol,
#title.verRank .menuPie {
  display: none;
}
#title .rankCard > h2 {
  font-size: clamp(17px, 1.3vw, 21px);
  white-space: nowrap;
}
#title .rankCard #rankBack {
  align-self: stretch;
}

/* ---------- estandarte: base común ---------- */
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban {
  position: relative;
  z-index: 1;
  display: block;
  container-type: inline-size;
  padding: 0;
  min-height: 0;
  height: auto;
  border: 0;
  background: transparent;
  clip-path: none;
  box-shadow: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --bo: #9c2315;
  --bi: #5e130d;
  --bl: #9c2315;
  --bd: #c8402d;
  --bimg: 0.12;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban::before,
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban::after {
  content: none;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banSvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banSvg * {
  transition:
    fill 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    stroke 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banO {
  fill: var(--bo);
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banI {
  fill: var(--bi);
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banL {
  fill: none;
  stroke: var(--bl);
  stroke-width: 1.6;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banNudo {
  fill: none;
  stroke: var(--bd);
  stroke-width: 2.6;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banDibujo {
  opacity: var(--bimg);
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banFlota {
  animation: banFlotar 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banFlota.lento {
  animation-duration: 12s;
  animation-delay: -4s;
}
@keyframes banFlotar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banBrasas {
  opacity: 0;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banTx {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banTexto {
  font-family: "Eromash Display", sans-serif;
  font-weight: 600;
  line-height: 1;
  color: #f2ecec;
  white-space: nowrap;
  transition: color 0.28s;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banRunas {
  font-family: "Noto Sans Runic", "Segoe UI Historic", serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.35em;
  margin-right: -0.35em;
  color: #e0b2b2;
  opacity: 0.6;
  white-space: nowrap;
  transition:
    opacity 0.28s,
    color 0.28s;
}

/* principal: la tela ocupa 440×72 dentro de 480×116 (lo que sobra es para el aire de las brasas) */
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal {
  width: var(--banW, 360px);
  aspect-ratio: 480 / 116;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal .banTx {
  left: 4.17%;
  width: 91.67%;
  top: 20.69%;
  height: 62.07%;
  gap: 0.6cqw;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal .banTexto {
  font-size: 6.4cqw;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal .banRunas {
  font-size: 3.3cqw;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal:not([aria-disabled="true"]) .banTexto {
  color: #e0b2b2;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banPrincipal:not([aria-disabled="true"]) .banRunas {
  opacity: 0.4;
}

/* marcado: con el mouse, el teclado o el mando. Si el mouse está sobre la pila, manda el mouse */
#title #mainNav button.ban:is(:hover, :focus-visible):not([aria-disabled="true"]),
body.padNav #title #mainNav button.ban:focus:not([aria-disabled="true"]) {
  z-index: 3;
  transform: scale(1.07);
  background: transparent;
  box-shadow: none;
  --bo: #c8402d;
  --bi: #9c2315;
  --bl: #ff8d71;
  --bd: #ffd98a;
  --bimg: 0.09;
}
#title #mainNav:hover button.ban:focus-visible:not(:hover, [aria-disabled="true"]) {
  z-index: 1;
  transform: none;
  --bo: #9c2315;
  --bi: #5e130d;
  --bl: #9c2315;
  --bd: #c8402d;
  --bimg: 0.12;
}
#title #mainNav button.ban:is(:hover, :focus-visible) .banTexto,
body.padNav #title #mainNav button.ban:focus .banTexto {
  color: #f2ecec;
}
#title #mainNav button.ban:is(:hover, :focus-visible) .banRunas,
body.padNav #title #mainNav button.ban:focus .banRunas {
  opacity: 1;
  color: #ffd98a;
}
#title #mainNav:hover button.ban:focus-visible:not(:hover) .banTexto {
  color: #e0b2b2;
}
#title #mainNav:hover button.ban:focus-visible:not(:hover) .banRunas {
  opacity: 0.4;
  color: #e0b2b2;
}
/* sin partida guardada: Continuar y Cargar partida quedan apagados */
#title #mainNav button.ban[aria-disabled="true"] {
  --bo: #2a2220;
  --bi: #1a1515;
  --bl: #2a2220;
  --bd: #2a2220;
  --bimg: 0.05;
  transform: none;
}
#title #mainNav button.ban[aria-disabled="true"] .banTexto {
  color: rgba(242, 236, 236, 0.35);
}
#title #mainNav button.ban[aria-disabled="true"] .banRunas {
  opacity: 0.25;
}
/* brasas que suben del estandarte marcado (solo Calidad gráfica alta) */
html[data-calidad="alta"] #title #mainNav button.ban:is(:hover, :focus-visible):not([aria-disabled="true"]) .banBrasas,
html[data-calidad="alta"] body.padNav #title #mainNav button.ban:focus:not([aria-disabled="true"]) .banBrasas {
  opacity: 1;
}
html[data-calidad="alta"] #title #mainNav button.ban:is(:hover, :focus-visible) .banBrasas polygon,
html[data-calidad="alta"] body.padNav #title #mainNav button.ban:focus .banBrasas polygon {
  animation: banSube 2.2s cubic-bezier(0.3, 0.6, 0.4, 1) infinite;
}
@keyframes banSube {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(-34px);
    opacity: 0;
  }
}
html[data-calidad="baja"] :is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.ban .banFlota {
  animation: none;
}
/* Continuar: lo que se sigue aparece al costado del estandarte */
#title #mainNav .navRow {
  position: relative;
  display: flex;
}
#title #contNote {
  margin-left: 6px;
}

/* ---------- estandarte secundario: 1 jugador / Cooperativo y elegir vikingo ---------- */
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banSecundario {
  --bo: #5e130d;
  --bi: #171212;
  --bl: #3a1a16;
  --bd: #9c2315;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banSecundario .banTexto {
  color: #e0b2b2;
}
:is(#title, #pick) :is(#mainNav, #newNav, .pickBar) button.banSecundario .banRunas {
  opacity: 0.35;
}
:is(#title #newNav, #pick .pickBar) button.banSecundario:is(:hover, :focus-visible),
body.padNav :is(#title #newNav, #pick .pickBar) button.banSecundario:focus {
  z-index: 3;
  transform: scale(1.05);
  background: transparent;
  box-shadow: none;
  --bo: #c8402d;
  --bi: #5e130d;
  --bl: #9c2315;
  --bd: #ffd98a;
}
:is(#title #newNav, #pick .pickBar) button.banSecundario:is(:hover, :focus-visible) .banTexto,
body.padNav :is(#title #newNav, #pick .pickBar) button.banSecundario:focus .banTexto {
  color: #f2ecec;
}
:is(#title #newNav, #pick .pickBar) button.banSecundario:is(:hover, :focus-visible) .banRunas,
body.padNav :is(#title #newNav, #pick .pickBar) button.banSecundario:focus .banRunas {
  opacity: 1;
  color: #ffd98a;
}
#title #newNav {
  gap: calc(var(--banW) * 0.045);
}
#title #newNav button.banSecundario {
  width: calc(var(--banW) * 0.92);
  aspect-ratio: 440 / 68;
}
#title #newNav button.banSecundario .banTexto {
  font-size: 6.6cqw;
}
#title #newNav button.banSecundario .banRunas {
  font-size: 3.6cqw;
  margin-top: 0.4cqw;
}
#title #newNav .navKicker {
  font-size: clamp(13px, 1vw, 17px);
  letter-spacing: 0.24em;
  margin: 0 0 4px;
}
#title #newNav .navKicker::after {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  clip-path: var(--m-rombo);
}
#title #newNav .navNote {
  margin-top: -4px;
  max-width: calc(var(--banW) * 1.1);
  text-align: center;
  color: #b8a6a4;
}
/* Volver de los submenús: texto en oro entre dos rombos */
#title #newNav #btnNewBack,
#pick .pickBar #pickBack {
  clip-path: none;
  background: transparent;
  box-shadow: none;
  min-height: 40px;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffd98a;
  font-size: 17px;
  font-weight: 600;
  transform: none;
}
#title #newNav #btnNewBack::before,
#title #newNav #btnNewBack::after,
#pick .pickBar #pickBack::before,
#pick .pickBar #pickBack::after {
  content: "";
  position: static;
  width: 8px;
  height: 8px;
  margin: 0;
  background: #ffd98a;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: none;
}
#title #newNav #btnNewBack:is(:hover, :focus-visible),
body.padNav #title #newNav #btnNewBack:focus,
#pick .pickBar #pickBack:is(:hover, :focus-visible),
body.padNav #pick .pickBar #pickBack:focus {
  color: #f2ecec;
  background: transparent;
  box-shadow: inset 0 -2px 0 #ffd98a;
  transform: none;
}

/* ---------- elegir vikingo ---------- */
#pick .pickBar {
  align-items: center;
  gap: clamp(14px, 2.2vw, 36px);
}
#pick .pickBar button.banSecundario {
  width: clamp(200px, 17vw, 300px);
  aspect-ratio: 440 / 108;
}
#pick .pickBar button.banSecundario .banTexto {
  font-size: 8.2cqw;
}
#pick .pickBar button.banSecundario .banRunas {
  font-size: 4.6cqw;
  margin-top: 1cqw;
}
#pick .pickTitle {
  display: flex;
  align-items: center;
  gap: 0.6em;
}
#pick .pickTitle::before,
#pick .pickTitle::after {
  content: "";
  width: 0.36em;
  height: 0.36em;
  background: #ffd98a;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
/* después de la transición desde el menú, el título y los estandartes entran cuando la cámara ya llegó */
#pick.entraB .pickTitle {
  animation: pickArriba 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s both;
}
#pick.entraB .pickBar {
  animation: pickAbajo 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 1.7s both;
}
@keyframes pickArriba {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pickAbajo {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- transición B · Foco: la pila sale, la cámara baja apenas y el fondo se aclara ---------- */
#title.saliendo {
  pointer-events: none;
  animation: tituloFondo 0.9s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}
#title.saliendo > .wordmark {
  animation: tituloSube 1s cubic-bezier(0.55, 0, 0.2, 1) 0.15s forwards;
}
#title.saliendo .titleWrap {
  animation: tituloCae 0.7s cubic-bezier(0.55, 0, 0.2, 1) forwards;
}
#title.saliendo .menuPie {
  animation: tituloFuera 0.4s ease forwards;
}
@keyframes tituloFondo {
  to {
    background: rgba(10, 7, 7, 0);
  }
}
@keyframes tituloSube {
  to {
    transform: translateY(-4vh) scale(1.04);
    opacity: 0;
  }
}
@keyframes tituloCae {
  to {
    transform: translateY(3vh);
    opacity: 0;
  }
}
@keyframes tituloFuera {
  to {
    opacity: 0;
  }
}
#sceneInner.transB {
  transition:
    transform 2.6s cubic-bezier(0.65, 0, 0.35, 1),
    filter 2.4s cubic-bezier(0.65, 0, 0.35, 1);
}
#brasasInicio {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
#brasasInicio i {
  position: absolute;
  display: block;
}

/* ---------- abajo a la izquierda: versión y créditos, notas, panel de administrador y la cuenta ---------- */
#title .menuPie {
  position: absolute;
  left: 16px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: calc(100% - 32px);
}
#title #menuPie button,
#title #menuPie button:hover,
#title #menuPie button:focus-visible,
#title #menuPie button:active,
body.padNav #title #menuPie button:focus {
  position: static;
  clip-path: none;
  background: none;
  border: 0;
  box-shadow: none;
  transform: none;
  min-height: 34px;
  padding: 6px 0;
  font-family: "Eromash Text", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #e0b2b2;
  opacity: 0.6;
}
#title #menuPie button:hover,
#title #menuPie button:focus-visible,
body.padNav #title #menuPie button:focus {
  color: #f2ecec;
  opacity: 1;
}
#title #menuPie button:focus-visible,
body.padNav #title #menuPie button:focus {
  outline: 1px solid #e0b2b2;
  outline-offset: 2px;
}
#title #menuPie button:not([hidden]) ~ button:not([hidden])::before {
  content: "·";
  margin: 0 10px;
  color: #e0b2b2;
}

/* ---------- ventanas del menú: marco tallado, cinta del título, botones con cola de golondrina ---------- */
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard,
#naming .nameCard,
#title .rankCard {
  background: #171212;
  box-shadow: inset 0 0 0 2px #5e130d;
  clip-path: polygon(
    16px 0,
    calc(100% - 16px) 0,
    100% 16px,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    16px 100%,
    0 calc(100% - 16px),
    0 16px
  );
  padding-top: 0;
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard::before,
#naming .nameCard::before,
#title .rankCard::before {
  left: 8px;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: auto;
  height: auto;
  z-index: -1;
  background: none;
  border: 1px solid rgba(156, 35, 21, 0.5);
  clip-path: polygon(
    11px 0,
    calc(100% - 11px) 0,
    100% 11px,
    100% calc(100% - 11px),
    calc(100% - 11px) 100%,
    11px 100%,
    0 calc(100% - 11px),
    0 11px
  );
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard::after,
#naming .nameCard::after,
#title .rankCard::after {
  content: none;
}
/* la cinta: un estandarte chico colgado del borde de arriba, con sus nudos y el nombre en runas abajo */
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard > h2,
#naming .nameCard > h2,
#title .rankCard > h2 {
  align-self: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin: 0 0 6px;
  padding: 11px clamp(56px, 4.6vw, 74px) 9px;
  min-width: min(72%, 320px);
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-family: "Eromash Display", sans-serif;
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 700;
  line-height: 1.1;
  color: #f2ecec;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 26'%3E%3Cg fill='none' stroke='%23FFD98A' stroke-width='2.6'%3E%3Cpolygon points='13,1.5 24.5,13 13,24.5 1.5,13'/%3E%3Cpolygon points='27,1.5 38.5,13 27,24.5 15.5,13'/%3E%3C/g%3E%3C/svg%3E")
      no-repeat left 24px center / 28px 18px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 26'%3E%3Cg fill='none' stroke='%23FFD98A' stroke-width='2.6'%3E%3Cpolygon points='13,1.5 24.5,13 13,24.5 1.5,13'/%3E%3Cpolygon points='27,1.5 38.5,13 27,24.5 15.5,13'/%3E%3C/g%3E%3C/svg%3E")
      no-repeat right 24px center / 28px 18px,
    #5e130d;
  box-shadow: inset 0 0 0 3px #9c2315;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%, 16px 50%);
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard > h2::before,
#naming .nameCard > h2::before,
#title .rankCard > h2::before {
  content: attr(data-ru);
  order: 2;
  width: auto;
  height: auto;
  background: none;
  clip-path: none;
  font-family: "Noto Sans Runic", "Segoe UI Historic", serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  color: #e0b2b2;
  opacity: 0.55;
  white-space: nowrap;
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide) .optCard > h2::after,
#naming .nameCard > h2::after,
#title .rankCard > h2::after {
  content: none;
}

/* botones: rojo el principal, oscuro con borde vino el resto; marcado = borde salmón y dos rombos de oro */
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban) {
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
  background: #9c2315;
  box-shadow: inset 0 0 0 2px #c8402d;
  color: #f2ecec;
  font-weight: 700;
  padding-left: 26px;
  padding-right: 26px;
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:is(.secondary, .optBtn):not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban) {
  background: #1f1818;
  box-shadow: inset 0 0 0 2px #5e130d;
  color: #e0b2b2;
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban, :disabled):is(:hover, :focus-visible),
body.padNav
  :is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban, :disabled):focus {
  outline: 0;
  color: #f2ecec;
  box-shadow: inset 0 0 0 2px #ff8d71;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='5,0 10,5 5,10 0,5' fill='%23FFD98A'/%3E%3C/svg%3E")
      no-repeat left 17px center / 8px 8px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='5,0 10,5 5,10 0,5' fill='%23FFD98A'/%3E%3C/svg%3E")
      no-repeat right 17px center / 8px 8px,
    #c8402d;
}
:is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:is(.secondary, .optBtn):not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban, :disabled):is(:hover, :focus-visible),
body.padNav
  :is(#options, #online, #cuenta, #slots, #slotAsk, #pasar, #exitAsk, #credits, #controls, #guide, #naming, #title .rankCard)
  button:is(.secondary, .optBtn):not([role="tab"], .switch, .keyBtn, .slotBtn, .linkBtn, .difFl, .rankQuitar, .seg button, .tabs button, #nameDif, .ban, :disabled):focus {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='5,0 10,5 5,10 0,5' fill='%23FFD98A'/%3E%3C/svg%3E")
      no-repeat left 17px center / 8px 8px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='5,0 10,5 5,10 0,5' fill='%23FFD98A'/%3E%3C/svg%3E")
      no-repeat right 17px center / 8px 8px,
    #2a1714;
}
/* enlaces (Cómo hostear, Iniciá sesión, Creá una): texto en oro con rombos */
:is(#online, #cuenta, #slots) .linkBtn.linkBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  color: #ffd98a;
  text-decoration: none;
  font-weight: 600;
  clip-path: none;
  background: none;
  box-shadow: none;
}
:is(#online, #cuenta, #slots) .linkBtn.linkBtn::before,
#online #onlineHelp.linkBtn::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: #ffd98a;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
:is(#online, #cuenta, #slots) .linkBtn.linkBtn:is(:hover, :focus-visible),
body.padNav :is(#online, #cuenta, #slots) .linkBtn.linkBtn:focus {
  color: #f2ecec;
  background: none;
  box-shadow: inset 0 -2px 0 #ffd98a;
}

/* campos de texto: oscuros, con muesca; al escribir, la línea de abajo se pone salmón */
:is(#cuenta, #online, #naming) input:not([type="range"]) {
  background: #0d0a0a;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 #3a2826;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  color: #f2ecec;
}
:is(#cuenta, #online, #naming) input:not([type="range"]):focus,
:is(#cuenta, #online, #naming) input:not([type="range"]):focus-visible {
  outline: 0;
  box-shadow: inset 0 -2px 0 #ff8d71;
}
:is(#cuenta, #online, #naming) label {
  font-family: "Eromash Display", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e0b2b2;
}

/* partidas: filas talladas con el número en un octágono */
#slots .slotList .slotBtn {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-auto-rows: auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 18px 10px 22px;
  background: #1f1818;
  box-shadow: inset 0 0 0 2px #5e130d;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%);
}
#slots .slotList .slotBtn::before {
  content: attr(data-i);
  /* estilos.css lo pone absoluto a la izquierda: acá va en su columna de la grilla */
  position: static;
  transform: none;
  grid-row: 1 / span 3;
  grid-column: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: "Eromash Display", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #e0b2b2;
  background: #2a2020;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
#slots .slotList .slotBtn > * {
  grid-column: 2;
}
#slots .slotList .slotBtn small:first-of-type {
  color: #ff8d71;
}
#slots .slotList .slotBtn:not(:disabled):is(:hover, :focus-visible),
body.padNav #slots .slotList .slotBtn:not(:disabled):focus {
  outline: 0;
  background: #2a1714;
  box-shadow: inset 0 0 0 2px #ff8d71;
}
#slots .slotList .slotBtn:not(:disabled):is(:hover, :focus-visible)::before,
body.padNav #slots .slotList .slotBtn:not(:disabled):focus::before {
  background: #9c2315;
  color: #f2ecec;
}

/* nombre del vikingo: la dificultad con flechas y los rombos de nivel (el elegido muestra su dibujo) */
#naming .nameDif {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#naming .difSel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
#naming .difFila {
  display: flex;
  align-items: center;
  gap: 6px;
}
#naming button.difFl {
  position: relative;
  min-width: 0;
  flex: none;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  background: #2a2020;
  box-shadow: none;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
#naming button.difFl::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 9px;
  height: 11px;
  background: #e0b2b2;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
#naming button.difMas::before {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
#naming button.difFl:is(:hover, :focus-visible),
body.padNav #naming button.difFl:focus {
  outline: 0;
  background: #9c2315;
  box-shadow: none;
}
#naming button.difFl:is(:hover, :focus-visible)::before,
body.padNav #naming button.difFl:focus::before {
  background: #f2ecec;
}
#naming #nameDif,
#naming #nameDif:hover {
  min-width: 104px;
  min-height: 32px;
  padding: 4px 8px;
  clip-path: none;
  background: none;
  box-shadow: none;
  color: #f2ecec;
  font-weight: 600;
}
#naming #nameDif:focus-visible,
body.padNav #naming #nameDif:focus {
  outline: 0;
  background: none;
  box-shadow: inset 0 -2px 0 #ffd98a;
}
#naming .difPts {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
}
#naming .difPts i {
  width: 8px;
  height: 8px;
  background: #3a2826;
  transform: rotate(45deg);
  transition: background 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#naming .difPts i.pasado {
  background: var(--c);
}
#naming .difPts .difIcono {
  width: 28px;
  height: 28px;
  display: block;
}
#naming .difPts .difIcono.entra {
  animation: difEntra 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes difEntra {
  from {
    transform: scale(0.4) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #title button.ban .banFlota,
  #title button.ban .banBrasas polygon {
    animation: none !important;
  }
}

/* ---------- celular acostado: dos columnas de estandartes, sin logo ---------- */
@media (max-height: 520px) {
  html.celular #title {
    justify-content: center;
    padding: 8px 12px 30px;
  }
  html.celular #title #mainNav,
  html.celular #title #newNav {
    --banW: min(40vw, 250px);
  }
  html.celular #title #mainNav {
    display: grid;
    grid-template-columns: repeat(2, var(--banW));
    column-gap: 12px;
    row-gap: 0;
    justify-items: center;
  }
  html.celular #title #mainNav > * + * {
    margin-top: 0;
  }
  html.celular #title #mainNav button.ban,
  html.celular #title #newNav button.ban {
    font-size: inherit;
    min-height: 0;
    padding: 0;
  }
  html.celular #title .menuPie {
    left: max(12px, env(safe-area-inset-left));
    bottom: 2px;
  }
  html.celular #title.verRank .rankCard {
    width: min(460px, calc(100vw - 24px));
  }
  html.celular #pick .pickBar button.banSecundario {
    width: clamp(150px, 26vw, 220px);
  }
}

/* con una ventana abierta encima del menú, la pila y lo de abajo se esconden para que no asomen detrás */
body:has(
    :is(#options, #slots, #slotAsk, #exitAsk, #credits, #controls, #notasVer, #noticias, #privacidad, #admin, #pasar):not([hidden])
  )
  #title
  :is(.titleWrap, .menuPie) {
  visibility: hidden;
}
