/* =====================================================================================
   BloodDate · MUNDO: bastión del Nether.
   La web se maneja como la interfaz de Minecraft (ranuras, tooltips, hotbar, pantallas
   del juego) construida con piedra negra, oro y redstone.
   Capa única de diseño: va después de blooddate.css (utilidades) y antes del CSS de cada página.
   ===================================================================================== */

@font-face {
  font-family: "BloodCraft";
  src: url(../fonts/bloodcraft.woff2) format("woff2");
  font-weight: 100 900; /* un solo peso: evita la negrita sintética */
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root, :root.dark {
  /* Piedra negra, de más honda a más clara */
  --pz-0: #0a0809;
  --pz-1: #110d0f;
  --pz-2: #191416;
  --pz-3: #221b1f;
  --pz-4: #2c2328;
  --pz-5: #3d3338;
  --pz-6: #5a4d54;

  --oro: #f4c430;
  --oro-claro: #ffe27a;
  --oro-oscuro: #b07e14;
  --oro-hondo: #3a2a06;
  --rojo: #e32626;
  --rojo-claro: #ff6a5c;
  --rojo-oscuro: #8a1010;
  --rojo-hondo: #2a0a0c;
  --verde: #6fdc7e;
  --verde-hondo: #0f2a16;

  --tinta: #f5f2eb;
  --tinta-2: #c9c1b7;
  --tinta-3: #9c928b;

  --pixel: "BloodCraft", "Nunito", system-ui, sans-serif;
  --lectura: var(--font-nunito, "Nunito"), system-ui, sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ancho: 1200px;
  --barra-alto: 64px;

  /* Tokens de las utilidades heredadas de blooddate.css */
  --color-crema: var(--pz-1);
  --color-carta: var(--pz-2);
  --color-borde: var(--pz-5);
  --color-tinta: var(--tinta);
  --color-tinta-suave: var(--tinta-2);
  --color-delta: var(--rojo);
  --color-delta-claro: var(--oro);
  --color-delta-fondo: var(--rojo-hondo);
  --color-delta-oscuro: var(--oro-claro);
  --color-miel: var(--oro);
  --color-shiny: var(--oro-claro);
}

body.bd-page {
  --font-titulo: var(--pixel);
  --font-pixel: var(--pixel);
  --font-cuerpo: var(--lectura);
}

/* ---------- 2. Base y superficies del navegador ---------- */
html {
  background: var(--pz-0);
  color-scheme: dark;
  scrollbar-color: var(--pz-5) var(--pz-0);
  -webkit-tap-highlight-color: transparent;
}
body.bd-page {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: transparent;
  color: var(--tinta);
  font-family: var(--lectura);
  font-size: 16px;
  line-height: 1.6;
  caret-color: var(--oro);
  text-rendering: optimizeLegibility;
}
/* Suelo de piedra negra (en una capa aparte para no pixelar el arte de los Pokémon) */
body.bd-page::before,
body.bd-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body.bd-page::before {
  background: url(../img/mundo/blackstone.png) 0 0 / 64px 64px;
  image-rendering: pixelated;
}
body.bd-page::after {
  background:
    radial-gradient(130% 80% at 50% 0%, rgba(10, 8, 9, .25), rgba(10, 8, 9, .82) 72%),
    linear-gradient(to top, rgba(227, 38, 38, .09), transparent 40%);
}
::selection { background: var(--oro); color: #1c1300; text-shadow: none; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--pz-0); }
::-webkit-scrollbar-thumb { background: var(--pz-4); border: 2px solid var(--pz-0); box-shadow: inset 2px 2px 0 var(--pz-6); }
::-webkit-scrollbar-thumb:hover { background: var(--pz-5); }
:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 2px; }
.bd-page :where(main) a:where(:not([class])) { color: var(--oro-claro); }
.bd-page :where(main) a:where(:not([class])):hover { color: var(--oro); }
img { max-width: 100%; }
/* El pixel art del juego se ve nítido al escalarlo */
img[src*="/assets/img/mc/"], img[src*="/assets/img/items/"], img[src*="/assets/img/blocks/"], img[src*="/assets/img/mundo/"],
img.sprite, .mc-pixel { image-rendering: pixelated; }
.font-titulo, .mc-t { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; text-shadow: .125em .125em 0 color-mix(in srgb, currentColor 25%, #000); }
/* La fuente pixel se lee nítida en múltiplos de 8 px: se ajustan los tamaños heredados */
.font-titulo:is(.text-xs, .text-sm, .text-base, .text-lg) { font-size: 16px; line-height: 1.5; }
.font-titulo:is(.text-xl, .text-2xl) { font-size: 24px; line-height: 1.35; }
.font-titulo:is(.text-3xl, .text-4xl) { font-size: 32px; line-height: 1.25; }
.font-titulo:is(.text-5xl) { font-size: 48px; line-height: 1.15; }
.font-titulo:is(.text-6xl, .text-7xl) { font-size: 64px; line-height: 1.1; }
.tabular-nums, td, .mc-num { font-variant-numeric: tabular-nums; }
.bd-skip { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; background: var(--oro); color: #1c1300; font-family: var(--pixel); }
.bd-skip:focus { top: 12px; }
.bd-sr, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 3. Contenedor de página ---------- */
.bd-shell { display: flex; flex-direction: column; min-height: 100vh; }
.bd-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 24px 96px;
  box-sizing: border-box;
}
.bd-main > :first-child:not(.bd-cab):not(.mc-titulo-pantalla) { margin-top: 32px; }

/* ---------- 4. Botones (los del juego: bisel, contorno negro y texto con sombra) ---------- */
.bd-btn, .mc-btn {
  --b-fondo: var(--pz-4);
  --b-luz: #4f434a;
  --b-sombra: #120d10;
  --b-texto: var(--tinta);
  --b-borde: #000;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px 12px;
  box-sizing: border-box;
  border: 2px solid var(--b-borde);
  border-radius: 0;
  background: var(--b-fondo);
  box-shadow: inset 2px 2px 0 var(--b-luz), inset -2px -4px 0 var(--b-sombra);
  color: var(--b-texto);
  font-family: var(--pixel);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  text-shadow: .125em .125em 0 color-mix(in srgb, var(--b-texto) 25%, #000);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform 80ms var(--ease-out), box-shadow 80ms var(--ease-out), border-color 120ms ease, filter 120ms ease;
}
.bd-btn svg, .mc-btn svg { width: 18px; height: 18px; flex: none; }
.bd-btn img, .mc-btn img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
/* Iconos pixel dentro de botones: su propia proporción, sin estirar */
.bd-btn svg[shape-rendering="crispEdges"], .mc-btn svg[shape-rendering="crispEdges"] { width: auto; height: 12px; }
.mc-giro { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .bd-btn:hover, .mc-btn:hover { border-color: var(--tinta); }
}
.bd-btn:active, .mc-btn:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 var(--b-luz), inset -2px -2px 0 var(--b-sombra); }
.bd-btn:focus-visible, .mc-btn:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; }
/* Principal: bloque de oro */
.bd-btn-gold, .bd-btn-discord, .mc-btn-oro {
  --b-fondo: var(--oro); --b-luz: var(--oro-claro); --b-sombra: #9a6c10; --b-texto: #1c1300;
  text-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  .bd-btn-gold:hover, .bd-btn-discord:hover, .mc-btn-oro:hover { border-color: #fff6cf; filter: brightness(1.05); }
}
/* Peligro / en vivo: bloque de redstone */
.bd-btn-red, .mc-btn-rojo { --b-fondo: #c81e1e; --b-luz: var(--rojo-claro); --b-sombra: #5e0a0a; --b-texto: #fff; }
.bd-btn-dark, .mc-btn-piedra { --b-fondo: var(--pz-4); }
.bd-btn-ghost, .mc-btn-hueco {
  --b-borde: var(--pz-5);
  background: transparent;
  box-shadow: none;
}
.bd-btn-ghost:active, .mc-btn-hueco:active { box-shadow: none; }
.bd-btn-sm { min-height: 36px; padding: 7px 12px 9px; gap: 8px; }
.bd-btn-lg, .mc-btn-grande { min-height: 52px; padding: 14px 24px 16px; }
.bd-btn[disabled], .bd-btn[aria-disabled="true"], .mc-btn[disabled] {
  --b-fondo: var(--pz-3); --b-luz: var(--pz-4); --b-sombra: var(--pz-1); --b-texto: var(--tinta-3);
  cursor: not-allowed; transform: none; filter: none;
}
.bd-btn[data-cargando], .mc-btn[data-cargando] { pointer-events: none; cursor: progress; }
.bd-btn[data-cargando]::after, .mc-btn[data-cargando]::after {
  content: ""; width: 8px; height: 8px; background: currentColor; animation: mc-parpadeo .5s steps(2, jump-none) infinite;
}
@keyframes mc-parpadeo { 50% { opacity: .2; } }
.bd-icono-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--tinta-2); cursor: pointer; }
.bd-icono-btn:hover { color: var(--tinta); }
.bd-icono-btn svg { width: 20px; height: 20px; }

/* ---------- 5. Paneles, ranuras y tooltips ---------- */
.mc-panel, .bd-panel, .bd-game-panel {
  background: var(--pz-2);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0);
  padding: 20px;
  border-radius: 0;
}
.mc-panel-titulo, .bd-panel-titulo {
  margin: 0 0 12px;
  font-family: var(--pixel);
  font-size: 16px;
  font-weight: 400;
  color: var(--tinta-2);
  letter-spacing: 0;
  text-transform: none;
}
.mc-slot, .bd-slot {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  background: var(--pz-0);
  box-shadow: inset 2px 2px 0 #000, inset -2px -2px 0 var(--pz-5);
}
.mc-slot img, .bd-slot img { width: 32px; height: 32px; object-fit: contain; }
.mc-slot-g { width: 64px; height: 64px; }
.mc-slot-g img { width: 48px; height: 48px; }
.mc-cuenta { position: absolute; right: 3px; bottom: 1px; font-family: var(--pixel); font-size: 16px; line-height: 1; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }

.mc-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  max-width: min(300px, calc(100vw - 24px));
  padding: 6px 10px 8px;
  box-sizing: border-box;
  background: rgba(16, 5, 9, .96);
  border: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--oro), var(--rojo-oscuro)) 1;
  outline: 2px solid rgba(16, 5, 9, .96);
  pointer-events: none;
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1.3;
  color: #fff;
  text-shadow: .125em .125em 0 #3f3f3f;
  opacity: 0;
  transition: opacity 100ms ease-out;
}
.mc-tip[data-visible] { opacity: 1; }
.mc-tip-sub { display: block; color: var(--tinta-3); text-shadow: .125em .125em 0 #262626; }
.mc-tip-oro { color: var(--oro-claro); }

/* ---------- 6. Formularios (campos de texto del juego) ---------- */
.bd-page :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [type="submit"], [type="button"]), select, textarea) {
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 2px solid var(--pz-6);
  border-radius: 0;
  background: #050405;
  color: var(--tinta);
  font-family: var(--lectura);
  font-size: 16px;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 120ms ease;
}
.bd-page textarea { min-height: 96px; }
.bd-page :is(input, select, textarea)::placeholder { color: #8f857e; opacity: 1; }
.bd-page :is(input, select, textarea):hover { border-color: #7c6e75; }
.bd-page :is(input, select, textarea):focus { outline: none; border-color: var(--oro-claro); }
.bd-page :is(input, select, textarea):focus-visible { outline: none; }
.bd-page :is(input, select, textarea)[aria-invalid="true"], .bd-page :is(input, select, textarea):user-invalid { border-color: var(--rojo-claro); }
.bd-page select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' shape-rendering='crispEdges'%3E%3Cpath fill='%23f4c430' d='M0 0h2v2H0zM2 2h2v2H2zM4 4h2v2H4zM6 2h2v2H6zM8 0h2v2H8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px 9px;
  cursor: pointer;
}
.bd-page select option { background: var(--pz-2); color: var(--tinta); }
.bd-page input[type="checkbox"] {
  appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--pz-6);
  background: #050405;
  cursor: pointer;
  vertical-align: -5px;
}
.bd-page input[type="checkbox"]:checked {
  border-color: #000;
  background: var(--oro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath fill='%231c1300' d='M6 0h1v2H6zM5 2h1v1H5zM4 3h1v1H4zM3 4h1v1H3zM2 5h1v1H2zM1 4h1v1H1zM0 3h1v1H0z'/%3E%3C/svg%3E") center / 14px 12px no-repeat;
  box-shadow: inset 2px 2px 0 var(--oro-claro), inset -2px -2px 0 #9a6c10;
}
.bd-page input[type="radio"] { accent-color: var(--oro); width: 18px; height: 18px; }
.bd-page input[type="range"] { accent-color: var(--oro); }
.bd-page input[type="file"] { color: var(--tinta-2); font-size: 15px; }
.bd-page input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px 10px; border: 2px solid #000; background: var(--pz-4);
  box-shadow: inset 2px 2px 0 #4f434a, inset -2px -3px 0 #120d10; color: var(--tinta); font-family: var(--pixel); font-size: 16px; cursor: pointer;
}
.bd-page label { color: var(--tinta-2); }
.bd-page fieldset { border: 0; padding: 0; margin: 0; }
.bd-campo { display: grid; gap: 6px; }
.bd-campo > span, .mc-etq { font-family: var(--pixel); font-size: 16px; color: var(--tinta-2); }

/* ---------- 7. Etiquetas, tipos y estados ---------- */
.bd-tag, .mc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 5px;
  background: var(--pz-3);
  box-shadow: inset 0 0 0 2px var(--pz-5);
  color: var(--tinta-2);
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  border-radius: 0;
}
.mc-tag-oro { background: var(--oro-hondo); box-shadow: inset 0 0 0 2px var(--oro-oscuro); color: var(--oro-claro); }
.mc-tag-rojo { background: var(--rojo-hondo); box-shadow: inset 0 0 0 2px var(--rojo-oscuro); color: var(--rojo-claro); }
.mc-tag-verde { background: var(--verde-hondo); box-shadow: inset 0 0 0 2px #2a6b38; color: var(--verde); }
.bd-tipo {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px 5px;
  border-radius: 0 !important;
  font-family: var(--pixel);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: .125em .125em 0 rgba(0, 0, 0, .45);
}
.bd-tipo-g { padding: 6px 10px 8px; }
.bd-sello { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--pixel); font-size: 16px; color: var(--tinta-3); }
.bd-sello-rojo { color: var(--rojo-claro); }
.bd-sello-punto { width: 8px; height: 8px; background: currentColor; }
/* En vivo: antorcha de redstone */
.bd-en-vivo, .mc-vivo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 16px; color: var(--rojo-claro); }
.bd-en-vivo::before, .mc-vivo::before {
  content: ""; width: 8px; height: 8px; background: var(--rojo); box-shadow: 0 0 10px 2px rgba(227, 38, 38, .7);
  animation: mc-antorcha 1.6s ease-in-out infinite;
}
@keyframes mc-antorcha { 50% { box-shadow: 0 0 4px 0 rgba(227, 38, 38, .4); opacity: .7; } }
.bd-estado { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 5px; font-family: var(--pixel); font-size: 16px; line-height: 1; background: var(--pz-3); box-shadow: inset 0 0 0 2px var(--pz-5); color: var(--tinta-2); }
.bd-estado-en_curso { background: var(--rojo-hondo); box-shadow: inset 0 0 0 2px var(--rojo-oscuro); color: var(--rojo-claro); }

/* ---------- 8. Barra de experiencia (progreso) ---------- */
.mc-barra, .bd-barra, .bd-game-progress {
  position: relative;
  height: 14px;
  background: #000;
  box-shadow: inset 0 0 0 2px #000;
  overflow: hidden;
}
.mc-barra > *, .bd-barra > *, .bd-game-progress > * {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, var(--oro-claro) 0 3px, var(--oro) 3px 9px, var(--oro-oscuro) 9px);
  box-shadow: inset 0 0 0 2px #000;
}
/* Marcas de la barra: es un instrumento de medida, como la de experiencia */
.mc-barra::after, .bd-barra::after, .bd-game-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(0, 0, 0, .75) calc(10% - 2px) 10%);
  pointer-events: none;
}
.mc-barra-roja > * { background: linear-gradient(180deg, var(--rojo-claro) 0 3px, var(--rojo) 3px 9px, var(--rojo-oscuro) 9px); }

/* ---------- 9. Tablas: marcador del juego ---------- */
.bd-page main table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.bd-page main thead th {
  padding: 10px 12px;
  border-bottom: 2px solid #000;
  background: rgba(0, 0, 0, .35);
  color: var(--tinta-3);
  font-family: var(--pixel);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.bd-page main tbody td { padding: 10px 12px; border-bottom: 2px solid var(--pz-3); vertical-align: middle; }
.bd-page main tbody tr:hover td { background: rgba(255, 255, 255, .025); }

/* ---------- 10. Cabecera de página: rótulo sobre piedra dorada ---------- */
.bd-cab {
  position: relative;
  isolation: isolate;
  margin: 0 calc(50% - 50vw) 40px;
  padding: 48px max(24px, calc(50vw - var(--ancho) / 2 + 24px)) 36px;
  border-bottom: 4px solid #000;
  box-shadow: inset 0 -2px 0 var(--pz-4);
}
.bd-cab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 8, 9, .55), rgba(10, 8, 9, .86)),
    url(../img/mundo/blackstone-dorado.png) 0 0 / 64px 64px;
  image-rendering: pixelated;
}
.bd-cab-in { display: flex; align-items: center; gap: 24px; max-width: var(--ancho); margin: 0 auto; }
.bd-cab-icono { width: 72px; height: 72px; }
.bd-cab-icono img { width: 48px; height: 48px; }
.bd-cab-texto { min-width: 0; flex: 1; }
.bd-cab-texto > .bd-sello { display: none; } /* sin rótulos encima del título */
.bd-cab-titulo {
  margin: 0;
  font-family: var(--pixel);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
  color: var(--tinta);
  text-shadow: .125em .125em 0 #3f3c3a;
}
.bd-cab-titulo b, .bd-cab-titulo em, .bd-cab-titulo span { font-style: normal; font-weight: 400; color: var(--oro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.bd-cab-intro { margin: 12px 0 0; max-width: 62ch; color: var(--tinta-2); font-size: 18px; line-height: 1.55; }
.bd-cab-accion { display: flex; flex-wrap: wrap; gap: 12px; align-self: center; }

/* ---------- 11. Secciones ---------- */
.bd-sec, .mc-sec { margin-top: 72px; }
.bd-sec-cab, .mc-sec-cab { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.bd-sec-etq { display: none; }
.bd-sec-titulo, .mc-sec-titulo {
  margin: 0;
  font-family: var(--pixel);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
  color: var(--tinta);
  text-shadow: .125em .125em 0 #3f3c3a;
}
.bd-sec-sub, .mc-sec-sub { margin: 8px 0 0; max-width: 64ch; color: var(--tinta-2); }

/* ---------- 12. Vacío, aviso global y franja de estadísticas ---------- */
.bd-vacio {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 2px var(--pz-3);
  color: var(--tinta-2);
}
.bd-vacio p { margin: 0; max-width: 46ch; }
.bd-vacio-titulo { font-family: var(--pixel); font-size: 24px; color: var(--tinta); text-shadow: .125em .125em 0 #3f3c3a; }
/* Aviso global: barra de jefe arriba del todo */
.bd-aviso { position: relative; padding: 10px 24px 18px; text-align: center; background: rgba(10, 8, 9, .9); border-bottom: 2px solid #000; }
.bd-aviso span { font-family: var(--pixel); font-size: 16px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.bd-aviso::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: min(420px, 70vw);
  height: 6px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--rojo-claro) 0 2px, var(--rojo) 2px);
  box-shadow: 0 0 0 2px #000;
}
.bd-franja {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 8px 20px;
  background: rgba(0, 0, 0, .45);
  box-shadow: inset 0 0 0 2px var(--pz-3);
}
.bd-franja > * { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 0; border-bottom: 2px solid var(--pz-3); }
.bd-franja > * > div { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.bd-franja .bd-slot, .bd-franja .mc-slot { width: 40px; height: 40px; }
.bd-franja .bd-slot img, .bd-franja .mc-slot img { width: 24px; height: 24px; }
.bd-franja-num { order: 2; margin: 0; font-family: var(--pixel); font-size: 24px; color: #ff5555; text-shadow: .125em .125em 0 #3f1515; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-franja-etq { order: 1; margin: 0; color: var(--tinta-2); font-size: 15px; }

/* ---------- 13. Pasos (cómo unirse): logros encadenados con redstone ---------- */
.bd-misiones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.bd-mision { position: relative; padding: 20px; background: var(--pz-2); border: 2px solid #000; box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0); }
.bd-mision-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px;
  background: var(--oro); box-shadow: inset 2px 2px 0 var(--oro-claro), inset -2px -2px 0 #9a6c10; border: 2px solid #000;
  font-family: var(--pixel); font-size: 24px; color: #1c1300;
}
.bd-mision-etq { display: none; }
.bd-mision h3 { margin: 0 0 6px; font-family: var(--pixel); font-size: 24px; font-weight: 400; color: var(--tinta); text-shadow: .125em .125em 0 #3f3c3a; }
.bd-mision p { margin: 0; color: var(--tinta-2); }
.bd-revela { opacity: 1; }

/* ---------- 14. Avisos de la web: notificación de logro ---------- */
.mc-avisos {
  position: fixed;
  top: calc(var(--barra-alto) + 12px);
  right: 16px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.mc-logro {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
  background: var(--pz-2);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0), 0 12px 28px -8px rgba(0, 0, 0, .7);
  pointer-events: auto;
  transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out);
  @starting-style { transform: translateX(110%); opacity: 0; }
}
.mc-logro[data-saliendo] { transform: translateX(110%); opacity: 0; transition-duration: 200ms; }
.mc-logro-titulo { display: block; font-family: var(--pixel); font-size: 16px; color: var(--oro-claro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.mc-logro-error .mc-logro-titulo { color: var(--rojo-claro); text-shadow: .125em .125em 0 var(--rojo-hondo); }
.mc-logro p { margin: 2px 0 0; color: var(--tinta); font-size: 15px; line-height: 1.45; }
.mc-logro-cerrar { align-self: start; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--tinta-3); cursor: pointer; }
.mc-logro-cerrar:hover { color: var(--tinta); }
.mc-logro-cerrar svg { width: 14px; height: 14px; }

/* ---------- 15. Barra superior, menús de zona y usuario ---------- */
.mc-barra-sup {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--barra-alto);
  background: rgba(10, 8, 9, .94);
  border-bottom: 2px solid #000;
  box-shadow: 0 2px 0 var(--pz-3);
  backdrop-filter: blur(6px);
}
.mc-barra-in { display: flex; align-items: center; gap: 20px; height: 100%; max-width: calc(var(--ancho) + 48px); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.mc-marca { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.mc-marca img { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 #000); }
.mc-palabra { font-family: var(--pixel); font-size: 24px; line-height: 1; color: var(--rojo); text-shadow: .125em .125em 0 var(--rojo-hondo); white-space: nowrap; }
.mc-palabra b { font-weight: 400; color: var(--oro); text-shadow: .125em .125em 0 var(--oro-hondo); }

.mc-nav { display: flex; align-items: stretch; gap: 4px; height: 100%; margin-left: 12px; }
.mc-nav > a, .mc-menu > summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--tinta-2);
  text-decoration: none;
  text-shadow: .125em .125em 0 #262222;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  transition: color 120ms ease;
}
.mc-menu > summary::-webkit-details-marker { display: none; }
.mc-nav > a:hover, .mc-menu > summary:hover, .mc-menu[open] > summary { color: #fff; }
.mc-nav img { width: 24px; height: 24px; image-rendering: pixelated; }
.mc-nav > a[aria-current]::after, .mc-menu[data-activo] > summary::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 4px;
  background: var(--oro);
  box-shadow: 0 -2px 0 var(--oro-claro) inset;
}
.mc-nav > a[aria-current], .mc-menu[data-activo] > summary { color: var(--oro-claro); }
.mc-flecha { width: 10px; height: 6px; flex: none; transition: transform 160ms var(--ease-out); }
.mc-menu[open] .mc-flecha { transform: rotate(180deg); }
.mc-menu { position: relative; height: 100%; }
.mc-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 70;
  display: grid;
  gap: 2px;
  width: 340px;
  padding: 10px;
  box-sizing: border-box;
  background: var(--pz-2);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0), 0 18px 40px -12px rgba(0, 0, 0, .8);
  transform-origin: top left;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(-4px) scale(.98); }
}
.mc-menu-der .mc-menu-panel { left: auto; right: 0; transform-origin: top right; }
.mc-menu-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px;
  color: var(--tinta);
  text-decoration: none;
}
.mc-menu-item:hover, .mc-menu-item:focus-visible { background: rgba(255, 255, 255, .06); outline-offset: -2px; }
.mc-menu-item[aria-current] { background: var(--oro-hondo); }
.mc-menu-item strong { display: block; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: var(--tinta); text-shadow: .125em .125em 0 #3f3c3a; }
.mc-menu-item[aria-current] strong { color: var(--oro-claro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.mc-menu-item small { display: block; margin-top: 2px; color: var(--tinta-3); font-size: 14px; line-height: 1.35; }
.mc-menu-sep { height: 2px; margin: 6px 4px; background: var(--pz-4); }
.mc-menu-pie { margin-top: 4px; padding-top: 8px; border-top: 2px solid var(--pz-4); }
.mc-menu-pie button { width: 100%; }

.mc-barra-der { display: flex; align-items: center; gap: 12px; margin-left: auto; height: 100%; }
.mc-jugador > summary { gap: 10px; padding: 0 8px; color: var(--tinta); }
.mc-cara { width: 32px; height: 32px; flex: none; image-rendering: pixelated; border: 2px solid #000; background: var(--pz-3); }
.mc-gotas { display: inline-flex; align-items: center; gap: 4px; color: var(--oro-claro); }

/* ---------- 16. Hotbar del móvil y hojas de inventario ---------- */
.mc-hotbar { display: none; }
.mc-hoja-fondo { position: fixed; inset: 0; z-index: 64; border: 0; background: rgba(0, 0, 0, .6); opacity: 1; transition: opacity 200ms ease; @starting-style { opacity: 0; } }
.mc-hoja {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 66;
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  padding: 12px;
  background: var(--pz-2);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0), 0 -10px 40px rgba(0, 0, 0, .6);
  transition: transform 260ms var(--ease-out), opacity 200ms var(--ease-out);
  @starting-style { transform: translateY(24px); opacity: 0; }
}
.mc-hoja-titulo { margin: 4px 6px 10px; font-family: var(--pixel); font-size: 16px; color: var(--tinta-3); }

/* ---------- 17. Pie: ladrillos de piedra negra sobre el mar de lava ---------- */
.mc-pie { position: relative; isolation: isolate; margin-top: auto; padding-top: 12px; }
.mc-lava {
  height: 12px;
  background: url(../img/mundo/lava.png) 0 0 / 64px 256px repeat-x;
  image-rendering: pixelated;
  box-shadow: 0 -8px 24px rgba(227, 38, 38, .35), 0 -2px 0 #000;
  animation: mc-lava 14s linear infinite;
}
@keyframes mc-lava { to { background-position: 256px 0; } }
.mc-pie-cuerpo { position: relative; padding: 56px 24px 32px; border-top: 2px solid #000; }
.mc-pie-cuerpo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 8, 9, .35), rgba(10, 8, 9, .8)), url(../img/mundo/ladrillos.png) 0 0 / 64px 64px;
  image-rendering: pixelated;
}
.mc-pie-in { display: grid; grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(150px, 1fr)); gap: 40px 32px; max-width: var(--ancho); margin: 0 auto; }
.mc-pie-marca p { margin: 16px 0 20px; max-width: 40ch; color: var(--tinta-2); font-size: 15px; }
.mc-pie-marca strong { color: var(--tinta); font-weight: 700; }
.mc-pie h2 { margin: 0 0 14px; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: var(--oro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.mc-pie ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mc-pie li a { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; color: var(--tinta-2); text-decoration: none; font-size: 15px; }
.mc-pie li a:hover { color: #fff; }
.mc-pie li img { width: 20px; height: 20px; }
.mc-legal { max-width: var(--ancho); margin: 40px auto 0; padding-top: 20px; border-top: 2px solid rgba(0, 0, 0, .6); color: var(--tinta-3); font-size: 13px; line-height: 1.55; }
.mc-legal p { margin: 0 0 6px; max-width: 110ch; }

/* ---------- 17b. Componentes de contenido ---------- */
/* Marcador de clasificación: posición, cabeza, nombre y valor en rojo (como el marcador del juego) */
.mc-rk-panel { display: flex; flex-direction: column; min-width: 0; padding: 16px 16px 10px; }
.mc-rk-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mc-rk-cab h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-rk-cab .mc-slot { width: 40px; height: 40px; }
.mc-rk-cab .mc-slot img { width: 24px; height: 24px; }
.mc-rk { margin: 0; padding: 0; list-style: none; }
.mc-rk-fila { display: grid; grid-template-columns: 32px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 2px solid var(--pz-3); }
.mc-rk-fila:last-child { border-bottom: 0; }
.mc-rk-sin-cara { grid-template-columns: 32px minmax(0, 1fr) auto; }
.mc-rk-pos { display: grid; place-items: center; width: 28px; height: 28px; font-family: var(--pixel); font-size: 16px; color: var(--tinta-3); }
.mc-rk-pos.m1 { color: var(--oro-claro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.mc-rk-pos.m2 { color: #e2e2e2; text-shadow: .125em .125em 0 #383838; }
.mc-rk-pos.m3 { color: #e0915a; text-shadow: .125em .125em 0 #3a2312; }
.mc-rk-cara { width: 32px; height: 32px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; }
.mc-rk-nombre { min-width: 0; }
.mc-rk-nombre strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-rk-nombre small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta-3); font-size: 13px; }
.mc-rk-valor { text-align: right; }
.mc-rk-valor b { display: block; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: #ff5555; text-shadow: .125em .125em 0 #3f1515; font-variant-numeric: tabular-nums; }
.mc-rk-valor small { display: block; color: var(--tinta-3); font-size: 12px; line-height: 1.2; }
.mc-rk-propio { background: rgba(227, 38, 38, .12); box-shadow: inset 0 0 0 2px var(--rojo-oscuro); }

/* Conmutador de dos o más posiciones (botones del juego unidos) */
.mc-segmento { display: inline-flex; flex: none; border: 2px solid #000; background: #000; gap: 2px; }
.mc-segmento > * {
  min-height: 32px; padding: 4px 10px 6px; border: 0; background: var(--pz-3); box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-1);
  color: var(--tinta-3); font-family: var(--pixel); font-size: 16px; line-height: 1; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: color 120ms ease;
}
.mc-segmento > *:hover { color: #fff; }
.mc-segmento > [aria-pressed="true"], .mc-segmento > [aria-current], .mc-segmento > [aria-selected="true"] {
  background: var(--oro); box-shadow: inset 2px 2px 0 var(--oro-claro), inset -2px -2px 0 #9a6c10; color: #1c1300;
}

/* Lista de rasgos en un solo panel (sin tarjetas repetidas) */
.mc-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.mc-lista > li { display: grid; grid-template-columns: 64px 1fr; align-content: start; gap: 16px; padding: 24px; }
.mc-lista > li + li { box-shadow: inset 2px 0 0 var(--pz-3); }
.mc-lista h3 { margin: 4px 0 6px; font-family: var(--pixel); font-size: 24px; font-weight: 400; line-height: 1.2; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-lista p { margin: 0; color: var(--tinta-2); }
@media (max-width: 860px) { .mc-lista > li + li { box-shadow: inset 0 2px 0 var(--pz-3); } }

/* Jugador con su skin: placa de nombre encima y pedestal de piedra dorada */
.bd-jugador { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 4px; text-align: center; }
.bd-jugador-nick {
  order: -1; max-width: 100%; margin: 0 0 8px; padding: 2px 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(0, 0, 0, .5); font-family: var(--pixel); font-size: 16px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f;
}
.bd-jugador-skin { display: grid; place-items: end center; width: 96px; height: 180px; }
.bd-jugador-skin img { width: auto; max-width: 100%; height: 172px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.bd-jugador-base { width: 80px; height: 20px; background: url(../img/mundo/blackstone-dorado.png) 0 0 / 40px 40px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, inset 0 2px 0 rgba(255, 255, 255, .12); }
.bd-jugador-rol { margin: 10px 0 0; font-family: var(--pixel); font-size: 16px; color: var(--oro-claro); text-shadow: .125em .125em 0 var(--oro-hondo); line-height: 1.3; }
.bd-corona { position: absolute; top: 34px; right: calc(50% - 46px); width: 24px; height: 24px; image-rendering: pixelated; z-index: 1; }
.mc-jugadores { display: grid; justify-content: center; grid-template-columns: repeat(auto-fill, minmax(132px, 156px)); gap: 24px 12px; padding: 24px 12px 20px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 2px var(--pz-3); }

/* Estandarte (aliados, avisos destacados) */
.bd-transmision { position: relative; isolation: isolate; display: flex; align-items: center; gap: 20px; padding: 28px; border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--oro-oscuro); }
.bd-transmision::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 8, 9, .92), rgba(10, 8, 9, .7)), url(../img/mundo/blackstone-dorado.png) 0 0 / 64px 64px; image-rendering: pixelated; }
.bd-transmision .mc-slot, .bd-transmision .bd-slot { width: 64px; height: 64px; }
.bd-transmision .mc-slot img, .bd-transmision .bd-slot img { width: 40px; height: 40px; }
.bd-transmision h2 { margin: 0; font-family: var(--pixel); font-size: 32px; font-weight: 400; color: var(--oro); text-shadow: .125em .125em 0 var(--oro-hondo); text-transform: none; }
.bd-transmision p { margin: 8px 0 0; color: var(--tinta-2); max-width: 60ch; }
.mc-cierre { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 72px; }

/* Lista de entradas (pantalla «Seleccionar mundo»): portada, Diosesmon y accesos */
.mc-mundos { display: grid; gap: 4px; padding: 6px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 2px var(--pz-3); }
.mc-mundo {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border: 2px solid transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.mc-mundo:hover, .mc-mundo:focus-visible { border-color: #fff; background: rgba(255, 255, 255, .04); outline: none; }
.mc-mundo .mc-slot-g { position: relative; }
/* Al pasar por encima aparece el «jugar» sobre el icono */
.mc-mundo .mc-slot-g::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M0 0h1v7H0zM1 1h1v5H1zM2 2h1v3H2zM3 3h1v1H3z'/%3E%3C/svg%3E") center / 20px 28px no-repeat;
  opacity: 0;
  transition: opacity 120ms ease;
}
.mc-mundo:hover .mc-slot-g::after, .mc-mundo:focus-visible .mc-slot-g::after { opacity: 1; }
.mc-mundo-txt { display: grid; gap: 2px; min-width: 0; }
.mc-mundo-txt strong { font-family: var(--pixel); font-size: 24px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-mundo-txt span { color: var(--tinta-2); }
.mc-mundo-txt .mc-mundo-meta { color: var(--tinta-3); font-size: 14px; }

@media (max-width: 560px) {
  .mc-servidor { grid-template-columns: 64px minmax(0, 1fr); }
  .mc-servidor-der { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; }
  .bd-campeon { gap: 14px; padding: 14px; }
  .bd-campeon-nombre { font-size: 24px; }
  .mc-mundo { gap: 12px; }
  .mc-mundo-txt strong { font-size: 16px; }
}

/* ---------- 17c. Filtros (inventario creativo) y fichas de la Pokédex ---------- */
.bd-filtros { padding: 16px; background: var(--pz-2); border: 2px solid #000; box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0); }
.bd-filtros-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bd-buscar { position: relative; display: flex; flex: 1 1 280px; min-width: 0; }
.bd-buscar svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--tinta-3); pointer-events: none; }
.bd-page .bd-buscar input { width: 100%; padding-left: 44px; }
.bd-page .bd-buscar input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); }
.bd-select { flex: 0 1 260px; }
/* Opción del juego: casilla + texto dentro de un botón */
.bd-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 2px; box-sizing: border-box;
  border: 2px solid #000; background: var(--pz-3); box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-1);
  color: var(--tinta-2) !important; font-family: var(--pixel); font-size: 16px; line-height: 1; cursor: pointer; user-select: none;
  transition: border-color 120ms ease, color 120ms ease;
}
.bd-toggle:hover { border-color: var(--tinta); color: #fff !important; }
.bd-toggle:has(input:checked) { color: #fff !important; }
.bd-toggle-oro:has(input:checked) { border-color: var(--oro); color: var(--oro-claro) !important; }
.bd-toggle:has(input:focus-visible) { outline: 2px solid var(--oro-claro); outline-offset: 2px; }
.mc-desliza { display: flex; gap: 6px; margin-top: 12px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.mc-desliza > * { flex: none; }
@media (min-width: 1024px) { .mc-desliza:not(.mc-segmento) { flex-wrap: wrap; overflow: visible; } }
.mc-desliza.mc-segmento { gap: 2px; border: 2px solid #000; width: max-content; max-width: 100%; box-sizing: border-box; padding-bottom: 0; }
.mc-segmento small { margin-left: 6px; font-family: var(--lectura); font-size: 12px; opacity: .75; }
.bd-chip-tipo { padding: 0; border: 0; background: none; cursor: pointer; }
.bd-chip-tipo[aria-pressed="true"] .bd-tipo { outline: 2px solid #fff; outline-offset: 1px; }
.mc-rejilla-dex { margin-top: 16px; }
.mc-vacio-dex { margin-top: 24px; }
.mc-mas-dex { margin-top: 32px; text-align: center; }
.mc-paginas { flex-wrap: wrap; justify-content: center; }
.bd-resumen { margin: 16px 0 0; font-family: var(--pixel); font-size: 16px; color: var(--tinta-2); }

.bd-rejilla-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.bd-dex {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 10px 12px;
  background:
    radial-gradient(60% 40% at 50% 42%, color-mix(in srgb, var(--tipo, var(--rojo)) 22%, transparent), transparent 70%),
    var(--pz-1);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #000, inset -2px -2px 0 var(--pz-4);
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: border-color 100ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .bd-dex:hover { border-color: #fff; }
  .bd-dex:hover .bd-dex-sprite img { transform: translateY(-3px); }
}
.bd-dex:focus-visible { border-color: var(--oro-claro); outline: none; }
.bd-dex-top { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 20px; }
.bd-dex-num { font-family: var(--pixel); font-size: 16px; color: var(--tinta-3); text-shadow: .125em .125em 0 #1d1a19; }
.bd-dex-marcas { display: flex; gap: 4px; }
.bd-dex-marca { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.bd-dex-marca img { width: 16px; height: 16px; image-rendering: pixelated; }
.bd-dex-marca.shiny { font-family: var(--pixel); font-size: 16px; color: var(--oro-claro); }
.bd-dex-sprite { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 128px; }
.bd-dex-sprite img { width: 100%; height: auto; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .55)); transition: transform 160ms var(--ease-out); }
.bd-dex-nombre { max-width: 100%; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.bd-dex-tipos { display: flex; flex-wrap: wrap; justify-content: center; align-content: start; gap: 4px; min-height: 52px; }
.bd-dex-cat { font-family: var(--pixel); font-size: 16px; color: var(--oro-claro); text-shadow: .125em .125em 0 var(--oro-hondo); }
.bd-dex-nd { font-size: 12px; color: var(--tinta-3); }
.bd-dex.nd .bd-dex-sprite img { filter: grayscale(.85) brightness(.7); }
@media (max-width: 560px) {
  .bd-rejilla-dex { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-select, .bd-toggle { flex: 1 1 auto; }
}

/* Clase de movimiento (ficha y Team Builder) */
.mc-movs-clase { font-size: 13px; }
.mc-movs-clase.fisico { color: #ff8a5a; }
.mc-movs-clase.especial { color: #7cc0ff; }
.mc-movs-clase.estado { color: var(--tinta-3); }

/* ---------- 17d. Torneos: lista de servidores, campeón y cuadro con cable de redstone ---------- */
.mc-servidor { grid-template-columns: 64px minmax(0, 1fr) auto; }
.mc-servidor .mc-mundo-txt b { color: var(--oro-claro); font-weight: 700; }
.mc-servidor-der { display: grid; justify-items: end; gap: 8px; }
.mc-jugadores-num { font-family: var(--pixel); font-size: 16px; color: var(--tinta-3); white-space: nowrap; }
.mc-jugadores-num b { font-weight: 400; color: #fff; }
.mc-etiquetas-cab { margin: 0 0 10px; }
.mc-premio { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; color: var(--tinta-2); font-size: 17px; }
.mc-premio img { width: 24px; height: 24px; }
.mc-premio strong { color: var(--oro-claro); }
.mc-inscritos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.bd-campeon {
  display: flex; align-items: center; gap: 20px; margin-bottom: 8px; padding: 18px 22px;
  background: linear-gradient(90deg, rgba(244, 196, 48, .14), rgba(244, 196, 48, .03)), var(--pz-2);
  border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--oro-oscuro), inset 0 0 24px rgba(244, 196, 48, .12);
}
.bd-campeon > div { min-width: 0; overflow-wrap: anywhere; }
.bd-campeon-etq { margin: 0; font-family: var(--pixel); font-size: 16px; color: #d0a8ff; text-shadow: .125em .125em 0 #2c1a40; }
.bd-campeon-nombre { margin: 4px 0 0; font-family: var(--pixel); font-size: 32px; line-height: 1.1; color: var(--oro); text-shadow: .125em .125em 0 var(--oro-hondo); }

.cuadro-caja { overflow-x: auto; padding-bottom: 12px; }
.cuadro { display: flex; gap: 48px; width: max-content; min-width: 100%; align-items: stretch; }
.cuadro-ronda { display: flex; flex-direction: column; flex: none; width: 230px; }
.cuadro-admin .cuadro-ronda { width: 290px; }
.cuadro-titulo { margin: 0 0 6px; font-family: var(--pixel); font-size: 16px; color: var(--oro-claro); text-align: center; text-shadow: .125em .125em 0 var(--oro-hondo); }
.cuadro-cuerpo { flex: 1; display: flex; flex-direction: column; }
.cuadro-par { position: relative; flex: 1; display: flex; flex-direction: column; }
.cuadro-hueco { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cuadro-partida { position: relative; margin: 6px 0; background: var(--pz-2); border: 2px solid #000; box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0); }
.cuadro-bye { opacity: .6; }
.cuadro-fila { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px; }
.cuadro-fila + .cuadro-fila { border-top: 2px solid var(--pz-3); }
.cuadro-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--tinta); }
.cuadro-nombre em { font-style: normal; font-weight: 400; color: var(--tinta-3); }
.cuadro-marcador { font-family: var(--pixel); font-size: 16px; color: var(--tinta-2); }
.cuadro-fila.gana { background: rgba(244, 196, 48, .1); }
.cuadro-fila.gana .cuadro-nombre, .cuadro-fila.gana .cuadro-marcador { color: var(--oro-claro); }
.cuadro-fila.gana .cuadro-nombre::before { content: "✓ "; font-family: var(--pixel); }
.cuadro-fila.pierde .cuadro-nombre { color: var(--tinta-3); text-decoration: line-through; text-decoration-thickness: 2px; }
/* Cable de redstone: apagado (rojo oscuro) hasta que la partida tiene ganador */
.cuadro-ronda:not(:last-child) .cuadro-partida::after { content: ""; position: absolute; left: calc(100% + 2px); top: 50%; width: 22px; height: 2px; margin-top: -1px; background: #4a0d0d; }
.cuadro-ronda:not(:last-child) .cuadro-partida.cuadro-hecha::after { background: #ff3b2f; box-shadow: 0 0 6px rgba(255, 59, 47, .8); }
.cuadro-ronda:not(:last-child) .cuadro-par-doble::after { content: ""; position: absolute; left: calc(100% + 24px); top: 25%; bottom: 25%; width: 2px; background: #4a0d0d; }
.cuadro-ronda:not(:last-child) .cuadro-par-doble::before { content: ""; position: absolute; left: calc(100% + 24px); top: 50%; width: 24px; height: 2px; margin-top: -1px; background: #4a0d0d; }
.cuadro-ronda:not(:last-child) .cuadro-par-doble:has(.cuadro-hecha)::after,
.cuadro-ronda:not(:last-child) .cuadro-par-doble:has(.cuadro-hecha)::before { background: #c42020; box-shadow: 0 0 6px rgba(255, 59, 47, .55); }

/* Controles del staff dentro del cuadro */
.adm-resultado { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-top: 2px solid var(--pz-3); }
.bd-page .adm-marcador { width: 46px; min-height: 32px; padding: 4px 6px; text-align: center; }
.adm-gana, .adm-deshacer {
  min-height: 32px; padding: 4px 8px 6px; border: 2px solid #000; background: var(--pz-4); box-shadow: inset 2px 2px 0 #4f434a, inset -2px -3px 0 #120d10;
  color: var(--tinta); font-family: var(--pixel); font-size: 16px; line-height: 1; cursor: pointer;
}
.adm-gana:hover, .adm-deshacer:hover { border-color: #fff; }

/* Plegable con flecha (movimientos de la ficha, ayuda de Farmermon) */
.mc-movs { border-top: 2px solid var(--pz-3); }
.mc-movs summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; list-style: none; cursor: pointer;
  font-family: var(--pixel); font-size: 16px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f;
}
.mc-movs summary::-webkit-details-marker { display: none; }
.mc-movs summary .mc-flecha { transform: rotate(-90deg); color: var(--tinta-3); }
.mc-movs[open] summary .mc-flecha { transform: none; }
.mc-movs summary:hover { color: var(--oro-claro); }
.mc-movs-num { margin-left: auto; color: var(--tinta-3); }
.mc-movs summary img { width: 20px; height: 20px; image-rendering: pixelated; }
/* Casilla +/- de los desplegables grandes (vender, pedir materiales) */
.farm-pedido-abrir {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding-bottom: 2px; box-sizing: border-box; border: 2px solid #000; background: var(--oro);
  box-shadow: inset 2px 2px 0 var(--oro-claro), inset -2px -2px 0 #9a6c10; font-family: var(--pixel); font-size: 24px; line-height: 1; color: #1c1300;
}
.farm-pedido-abrir::before { content: "+"; }
details[open] > summary .farm-pedido-abrir::before { content: "-"; }
/* Enlaces dentro del texto: oro, como las acciones */
.bd-page main a.text-delta { color: var(--oro-claro) !important; }
.bd-page main a.text-delta:hover { color: #fff !important; }
.bd-sec-sub code, .bd-cab-intro code { white-space: nowrap; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1100px) {
  .mc-nav > a, .mc-menu > summary { padding: 0 9px; }
  .mc-nav img { display: none; }
}
@media (max-width: 1023px) {
  :root { --barra-alto: 56px; }
  .mc-barra-in { padding: 0 16px; gap: 12px; }
  .mc-nav { display: none; }
  .mc-palabra { font-size: 16px; }
  .mc-marca img { width: 34px; height: 34px; }
  .mc-hotbar {
    position: fixed;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 65;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: min(440px, calc(100vw - 16px));
    transform: translateX(-50%);
    padding: 4px;
    box-sizing: border-box;
    background: rgba(10, 8, 9, .96);
    border: 2px solid #000;
    box-shadow: inset 0 0 0 2px var(--pz-5), 0 8px 30px rgba(0, 0, 0, .6);
  }
  .mc-hotbar > * {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-height: 56px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    box-shadow: inset 2px 2px 0 #000, inset -2px -2px 0 var(--pz-4);
    color: var(--tinta-2);
    font-family: var(--pixel);
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
  }
  .mc-hotbar img { width: 26px; height: 26px; image-rendering: pixelated; }
  .mc-hotbar > [aria-current], .mc-hotbar > [aria-expanded="true"] { color: #fff; }
  /* Ranura seleccionada: el marco blanco de la hotbar */
  .mc-hotbar > [aria-current]::after, .mc-hotbar > [aria-expanded="true"]::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000;
    pointer-events: none;
  }
  .mc-solo-escritorio { display: none !important; }
  .bd-main { padding: 0 16px 128px; }
  .mc-pie-cuerpo { padding-bottom: 120px; }
  .mc-pie-in { grid-template-columns: 1fr 1fr; }
  .mc-pie-marca { grid-column: 1 / -1; }
  .mc-avisos { top: calc(var(--barra-alto) + 8px); right: 8px; width: calc(100vw - 16px); }
  .bd-cab { padding: 32px 16px 28px; margin-bottom: 28px; }
  .bd-cab-titulo { font-size: 32px; }
  .bd-cab-intro { font-size: 16px; }
  .bd-sec, .mc-sec { margin-top: 56px; }
  .bd-sec-titulo, .mc-sec-titulo { font-size: 24px; }
  .bd-franja { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .mc-solo-movil { display: none !important; }
}
@media (max-width: 640px) {
  .bd-franja { grid-template-columns: 1fr; }
  .bd-cab-in { flex-wrap: wrap; gap: 16px; }
  .bd-cab-icono { width: 56px; height: 56px; }
  .bd-cab-icono img { width: 40px; height: 40px; }
  .bd-cab-accion { width: 100%; }
  .bd-cab-accion > * { flex: 1 1 auto; }
  .mc-pie-in { grid-template-columns: 1fr; gap: 28px; }
  .mc-pie-cols { display: contents; }
}

/* ---------- 19. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .bd-btn, .mc-btn, .mc-logro, .mc-menu-panel, .mc-hoja { transition-property: opacity, border-color, color, background-color; }
}

/* ---------- 20. Escenario: el Pokémon sobre un pedestal de piedra dorada con el brillo de su tipo ---------- */
.bd-escenario {
  position: relative;
  display: grid;
  place-items: end center;
  aspect-ratio: 1;
  padding: 16px 16px 30px;
  box-sizing: border-box;
  background:
    radial-gradient(55% 45% at 50% 58%, color-mix(in srgb, var(--tipo, var(--rojo)) 42%, transparent), transparent 72%),
    rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 0 2px var(--pz-3);
  overflow: hidden;
}
.bd-escenario::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 18px;
  height: 24px;
  background: url(../img/mundo/blackstone-dorado.png) 0 0 / 32px 32px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px #000, inset 0 2px 0 rgba(255, 255, 255, .15), 0 10px 24px rgba(0, 0, 0, .6);
}
.bd-escenario > span:first-child, .bd-escenario > img { position: relative; z-index: 1; display: block; width: 88%; }
.bd-escenario img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .55)); }

/* ---------- 21. Lista de jugadores (tecla Tab) y pantalla de «Has muerto» ---------- */
.mc-titulo-icono { display: flex; align-items: center; gap: 14px; }
.mc-titulo-icono .mc-slot { width: 44px; height: 44px; }
.mc-titulo-icono .mc-slot img { width: 28px; height: 28px; }
.mc-tab { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px; margin: 0; padding: 6px; list-style: none; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .4); }
.mc-tab-jugador { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; background: rgba(255, 255, 255, .04); }
.mc-inicial { display: grid; place-items: center; background: var(--pz-4); font-family: var(--pixel); font-size: 16px; color: #fff; }

.mc-muerte {
  display: grid; justify-items: center; align-content: center; gap: 10px;
  min-height: calc(100svh - var(--barra-alto) - 160px); margin: 0 calc(50% - 50vw); padding: 64px 24px; box-sizing: border-box; text-align: center;
  background: linear-gradient(180deg, rgba(120, 10, 10, .55), rgba(60, 4, 4, .75));
}
.mc-muerte h1 { margin: 0; font-family: var(--pixel); font-size: 48px; font-weight: 400; line-height: 1.15; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; text-wrap: balance; }
.mc-muerte-razon { margin: 8px 0 0; color: #f2d6d6; font-size: 17px; }
.mc-muerte-puntos { margin: 6px 0 24px; font-family: var(--pixel); font-size: 16px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-muerte-puntos b { font-weight: 400; color: #ffff55; text-shadow: .125em .125em 0 #3f3f15; }
.mc-muerte-botones { display: grid; gap: 8px; width: min(400px, 100%); }
.mc-muerte-botones .bd-btn { width: 100%; }
@media (max-width: 640px) { .mc-muerte h1 { font-size: 32px; } }

/* ---------- 22. Código en línea y guía de ayuda ---------- */
.bd-page main :not(pre) > code { padding: 1px 5px; background: #000; color: var(--oro-claro); font-size: .87em; overflow-wrap: anywhere; }
.ay-pasos { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ay-pasos > li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 16px 20px; }
.ay-pasos > li + li { box-shadow: inset 0 2px 0 var(--pz-3); }
.ay-pasos h3 { margin: 2px 0 6px; font-family: var(--pixel); font-size: 16px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.ay-pasos p { margin: 0; color: var(--tinta-2); font-size: 15px; }
.ay-pasos strong { color: #fff; }
.ay-final { margin-top: 24px; align-items: flex-start; }
.ay-final h2 { font-size: 24px; }

/* ---------- 23. Tu partida y marcador lateral (portada con sesión y Mi clan) ---------- */
.mc-partida { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; margin-top: 40px; }
.mc-partida-cab { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.mc-partida-cab p { margin: 4px 0 0; color: var(--tinta-2); }
.mc-partida-cab strong { color: var(--tinta); }
.mc-cara-g { width: 56px; height: 56px; }
.mc-estadisticas { display: grid; gap: 0; margin: 0; }
.mc-estadisticas > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 2px solid var(--pz-3); }
.mc-estadisticas dt { color: var(--tinta-2); }
.mc-estadisticas dd { margin: 0; font-family: var(--pixel); font-size: 24px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; font-variant-numeric: tabular-nums; }
.mc-estadisticas small { font-size: 16px; color: var(--tinta-3); text-shadow: none; }
.mc-oro { color: var(--oro-claro) !important; text-shadow: .125em .125em 0 var(--oro-hondo) !important; }
.mc-siguiente { margin-top: 20px; }
.mc-siguiente p { margin: 0 0 10px; color: var(--tinta-2); }
.mc-siguiente strong { color: var(--oro-claro); }
.mc-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Marcador lateral del juego: nombres a la izquierda, puntos en rojo a la derecha */
.mc-marcador { align-self: start; padding: 4px 0 8px; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .4); }
.mc-marcador h2 { margin: 0 0 4px; padding: 8px 12px; background: rgba(0, 0, 0, .35); font-family: var(--pixel); font-size: 16px; font-weight: 400; text-align: center; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-marcador ol { margin: 0; padding: 0 4px; list-style: none; }
.mc-marcador li { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 10px; padding: 5px 8px; font-family: var(--pixel); font-size: 16px; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-marcador li img { width: 16px; height: 16px; image-rendering: pixelated; }
.mc-marcador li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-marcador li b { font-weight: 400; color: #ff5555; text-shadow: .125em .125em 0 #3f1515; font-variant-numeric: tabular-nums; }
.mc-marcador li.mc-yo { background: rgba(244, 196, 48, .14); }
.mc-marcador-vacio { margin: 0; padding: 16px 12px; color: var(--tinta-2); text-align: center; }
.mc-marcador-mas { display: block; margin: 8px 12px 0; color: var(--oro-claro); font-size: 15px; text-align: right; }

@media (max-width: 1023px) { .mc-partida { grid-template-columns: 1fr; } }

/* ---------- 24. Lista de entradas en dos columnas, botones en fila y entrada con Discord ---------- */
.mc-mundos-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .mc-mundos-2 { grid-template-columns: 1fr; } }
.mc-botones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px !important; }
.mc-entrada { display: grid; justify-items: center; gap: 12px; max-width: 520px; margin: 64px auto 0; padding: 32px 24px; text-align: center; background: var(--pz-2); border: 2px solid #000; box-shadow: inset 2px 2px 0 var(--pz-4), inset -2px -2px 0 var(--pz-0); }
.mc-entrada img { width: 96px; height: 96px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.mc-entrada h1 { margin: 4px 0 0; font-family: var(--pixel); font-size: 32px; font-weight: 400; color: #fff; text-shadow: .125em .125em 0 #3f3f3f; }
.mc-entrada p { margin: 0; color: var(--tinta-2); }
.mc-entrada form { margin-top: 8px; }
.mc-entrada-nota { font-size: 14px; }
