:root {
  --rojo: #d62828; --rojo-osc: #9d1c1c; --fondo: #f6f4f0; --tarjeta: #ffffff;
  --texto: #1f2328; --gris: #6b7078; --borde: #e3e0da; --acento: #2a6fdb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--fondo); color: var(--texto); line-height: 1.45; }
header { background: var(--rojo); color: #fff; padding: 0 24px; display: flex; flex-wrap: wrap;
         align-items: center; gap: 8px 32px; box-shadow: 0 2px 0 var(--rojo-osc); }
.marca { font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.ball { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #1f2328;
        background: linear-gradient(#fff 0 44%, #1f2328 44% 56%, #fff 56%); position: relative; }
.ball::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; border: 2px solid #1f2328; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
nav a:hover { background: rgba(255,255,255,.15); }
nav a.activo { background: #fff; color: var(--rojo); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { margin: 8px 0 4px; } h2 { margin-top: 28px; }
.pregunta, .intro p { color: var(--gris); margin-top: 0; }
form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; background: var(--tarjeta);
       border: 1px solid var(--borde); border-radius: 12px; padding: 16px; margin: 16px 0; }
label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 600; gap: 4px; }
label.radio { flex-direction: row; align-items: center; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; align-items: center; }
legend { font-size: .85rem; font-weight: 600; float: left; margin-right: 8px; }
select, input { font: inherit; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 8px; min-width: 160px; background: #fff; }
input[type=radio] { min-width: 0; }
input[type=number] { min-width: 90px; width: 90px; }
button { font: inherit; font-weight: 700; background: var(--rojo); color: #fff; border: 0; border-radius: 8px;
         padding: 9px 18px; cursor: pointer; }
button:hover { background: var(--rojo-osc); }
.conteo { color: var(--gris); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; background: var(--tarjeta); border-radius: 12px; overflow: hidden;
        border: 1px solid var(--borde); }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--borde); vertical-align: middle; }
th { background: #faf8f5; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gris); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.pk { color: var(--acento); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pk:hover { text-decoration: underline; }
.sprite { width: 40px; height: 40px; image-rendering: pixelated; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; }
.tarjeta h3 { margin: 0 0 8px; color: var(--rojo); }
.tarjeta dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 0 0 10px; font-size: .9rem; }
.tarjeta dt { color: var(--gris); } .tarjeta dd { margin: 0; text-align: right; font-weight: 600; }
.mini { font-size: .85rem; color: var(--acento); text-decoration: none; font-weight: 600; }
.cadenas { list-style: none; padding: 0; display: grid; gap: 10px; }
.cadenas li { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 8px 14px;
              display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.flecha { color: var(--gris); font-weight: 700; }
.metodos { margin-left: auto; font-size: .8rem; color: var(--gris); background: #f1eee9; padding: 3px 8px; border-radius: 999px; }
.tipo { display: inline-block; font-size: .72rem; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px;
        background: #888; text-transform: uppercase; letter-spacing: .03em; }
.t-normal{background:#9a9a78}.t-fire{background:#e2712b}.t-water{background:#4f7fe0}.t-grass{background:#5ca93a}
.t-electric{background:#d8b00f}.t-ice{background:#5cbcbc}.t-fighting{background:#b2302a}.t-poison{background:#93409a}
.t-ground{background:#c9a24c}.t-flying{background:#8f7fd6}.t-psychic{background:#e5507a}.t-bug{background:#8fa21a}
.t-rock{background:#a8902f}.t-ghost{background:#674f8e}.t-dragon{background:#5f2ff0}.t-dark{background:#5c4a3d}
.t-steel{background:#8f8fae}.t-fairy{background:#d27aa0}.t-stellar{background:#3b8fa8}
.pos { color: #1e7a3a; } .gris { color: var(--gris); }
.error { background: #fde8e8; border: 1px solid #f3b4b4; color: #8a1c1c; padding: 12px 16px; border-radius: 10px; }
.ficha .cabecera { display: flex; align-items: center; gap: 16px; }
.ficha .cabecera .sprite { width: 120px; height: 120px; background: #fff; border-radius: 50%; border: 1px solid var(--borde); }
.ficha small { color: var(--gris); font-weight: 500; }
.stats { display: grid; grid-template-columns: 90px 1fr 40px; gap: 6px 10px; align-items: center; max-width: 520px; }
.stats meter { width: 100%; height: 14px; } .stats b { text-align: right; }
footer { text-align: center; color: var(--gris); font-size: .8rem; padding: 24px; }
@media (max-width: 600px) { header { padding: 0 16px; } select, input { min-width: 0; width: 100%; } label { flex: 1 1 100%; } }

/* Regiones sin datos de encuentros en PokéAPI */
.sin-datos { color: #8a8a8a; font-style: italic; font-weight: normal; cursor: help; }
.nota { margin-top: 1rem; font-size: .85rem; color: #6b6b6b; max-width: 70ch; }
