:root {
    --background: 244 245 247; /* #F4F5F7 */
    --surface: 255 255 255;
    --elevated: 255 255 255;
    --primary: 217 4 41;       /* #D90429 */
    --secondary: 251 133 0;    /* #FB8500 */
    --text: 33 37 41;          /* #212529 */
    --soft: 108 117 125;
    --edge: 222 226 230;
    --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-display: "Poppins", "Inter", sans-serif;
}

.dark {
    --background: 15 17 21;
    --surface: 26 29 36;
    --elevated: 31 35 44;
    --primary: 255 62 62;
    --secondary: 255 183 3;
    --text: 248 249 250;
    --soft: 156 163 175;
    --edge: 55 60 72;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.dark { color-scheme: dark; }

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(900px 420px at 12% -10%, rgb(var(--primary) / 0.07), transparent 60%),
        radial-gradient(900px 420px at 95% -10%, rgb(var(--secondary) / 0.09), transparent 60%),
        rgb(var(--background));
    color: rgb(var(--text));
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color .35s ease, color .35s ease;
}

.topbar, .pagina, .card, .sidebar, footer, .guia,
.campo select, .campo input {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}

/* ============ HEADER CENTRADO ============ */
.topbar {
    background: rgb(var(--surface) / 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgb(var(--edge));
    position: sticky; top: 0; z-index: 40;
}
.topbar .inner {
    max-width: 1200px; margin: 0 auto;
    padding: 14px 60px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.topbar .titulo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.05rem, 2.4vw, 1.5rem);
    letter-spacing: .3px;
    color: rgb(var(--text));
    display: inline-flex; align-items: center; gap: 12px;
}
.topbar .titulo b { color: rgb(var(--primary)); }
.topbar .titulo-texto { min-width: 0; text-align: center; line-height: 1.25; }
.topbar .titulo > svg { flex: none; }
@media (max-width: 860px) {
    .topbar .inner {
        padding: 12px 100px 12px 12px;
        justify-content: flex-start;
    }
    .topbar .titulo {
        font-size: clamp(.92rem, 3.7vw, 1.15rem);
        gap: 8px;
        flex: 1 1 auto;
        justify-content: center;
    }
    .topbar .titulo > svg { width: 21px; height: 21px; }
}
@media (max-width: 430px) {
    .topbar .titulo { font-size: clamp(.82rem, 3.9vw, 1rem); gap: 6px; }
    .topbar .titulo > svg { width: 18px; height: 18px; }
}

/* ============ TOGGLE CLARO/OSCURO ============ */
.theme-toggle {
    position: fixed; top: 10px; right: 14px; z-index: 70;
    width: 42px; height: 42px;
    border-radius: 9999px;
    display: grid; place-items: center;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--surface));
    color: rgb(var(--text));
    box-shadow: 0 10px 40px -12px rgb(0 0 0 / 0.35);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle .moon { display: block; color: rgb(var(--primary)); }
.theme-toggle .sun  { display: none;  color: rgb(var(--secondary)); }
.dark .theme-toggle .moon { display: none; }
.dark .theme-toggle .sun  { display: block; }

/* ============ MENU LATERAL MOVIL ============ */
.nav-toggle {
    position: fixed; top: 10px; right: 66px; z-index: 70;
    width: 42px; height: 42px;
    border-radius: 9999px;
    display: none; place-items: center;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--surface));
    color: rgb(var(--text));
    box-shadow: 0 10px 40px -12px rgb(0 0 0 / 0.35);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, border-color .2s ease;
}
.nav-toggle:hover { transform: scale(1.08); }
.nav-toggle:active { transform: scale(.92); }
.nav-toggle:active svg { transform: scale(.9); }
.nav-toggle svg, .nav-cerrar svg { width: 20px; height: 20px; display: block; }

.nav-cerrar {
    position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 2;
    width: 40px; height: 40px;
    border-radius: 9999px;
    display: none; place-items: center;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--elevated));
    color: rgb(var(--soft));
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.nav-cerrar:hover { color: rgb(var(--text)); }

.nav-velo {
    position: fixed; inset: 0; z-index: 80;
    display: none;
    background: rgb(9 10 12 / .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

/* ============ LAYOUT ============ */
.layout { display: flex; max-width: 1200px; margin: 0 auto; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
    width: 260px; flex: none;
    position: sticky; top: 0; height: 100vh;
    padding: 24px 14px;
    display: flex; flex-direction: column; gap: 4px;
    overflow-y: auto;
}
.sidebar .grupo {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: rgb(var(--soft));
    padding: 16px 12px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 0.75rem;
    text-decoration: none;
    font-size: .9rem; font-weight: 600;
    color: rgb(var(--soft));
    position: relative;
    transition: background-color .2s ease, color .2s ease;
}
.nav-link:hover { background: rgb(var(--primary) / .06); color: rgb(var(--text)); }
.nav-link.activo { background: rgb(var(--primary) / .10); color: rgb(var(--primary)); }
.nav-link.activo::before {
    content: ""; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 9999px;
    background: rgb(var(--primary));
}
.nav-link .chip, .nav-cat .chip {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    border-radius: 0.6rem;
    color: rgb(var(--soft));
    background: rgb(var(--edge) / .45);
    transition: all .2s ease;
}
.nav-link .chip svg, .nav-cat .chip svg { width: 17px; height: 17px; }
.nav-link.activo .chip, .nav-cat.abierto .chip { background: rgb(var(--primary)); color: #fff; box-shadow: 0 6px 16px -6px rgb(var(--primary) / .6); }
.nav-link:hover .chip { background: rgb(var(--primary)); color: #fff; }

.nav-cat { display: flex; flex-direction: column; }
.nav-cat > button {
    display: flex; align-items: center; gap: 12px; width: 100%;
    background: transparent; border: 0; cursor: pointer;
    padding: 10px 12px; border-radius: 0.75rem;
    font-family: var(--font-sans);
    font-size: .9rem; font-weight: 600;
    color: rgb(var(--soft)); text-align: left;
    transition: background-color .2s ease, color .2s ease;
}
.nav-cat > button:hover { background: rgb(var(--primary) / .06); color: rgb(var(--text)); }
.nav-cat.abierto > button { color: rgb(var(--primary)); }
.nav-cat > button .chevron {
    margin-left: auto; flex: none;
    transition: transform .25s ease;
    color: rgb(var(--soft));
}
.nav-cat.abierto > button .chevron { transform: rotate(90deg); color: rgb(var(--primary)); }

.nav-cat .sub { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.nav-cat.abierto .sub { max-height: 400px; }
.sub-item {
    display: flex; align-items: center; gap: 10px;
    margin: 2px 0 2px 22px;
    padding: 7px 12px;
    border-radius: 0.6rem;
    font-size: .82rem; font-weight: 500;
    color: rgb(var(--soft));
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.sub-item svg { width: 15px; height: 15px; flex: none; color: rgb(var(--soft)); transition: color .2s ease; }
.sub-item:hover { background: rgb(var(--primary) / .06); color: rgb(var(--text)); }
.sub-item:hover svg { color: rgb(var(--primary)); }
.sub-item.activo { position: relative; background: rgb(var(--primary) / .10); color: rgb(var(--primary)); font-weight: 600; }
.sub-item.activo::before {
    content: ""; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 14px; border-radius: 9999px;
    background: rgb(var(--primary));
}
.sub-item.activo svg { color: rgb(var(--primary)); }

.sidebar .pie {
    margin-top: auto; padding: 12px;
    font-size: .72rem; color: rgb(var(--soft));
    border-top: 1px solid rgb(var(--edge) / .6);
}

/* ============ CONTENIDO ============ */
.contenido { flex: 1; min-width: 0; padding: 32px 24px 48px; }

.pagina {
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px -12px rgb(0 0 0 / 0.35);
    padding: clamp(20px, 3.5vw, 40px);
}
.pagina .intro h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: 10px;
}
.pagina .intro h1 span { color: rgb(var(--primary)); }
.pagina .intro p { color: rgb(var(--soft)); max-width: 680px; font-size: .98rem; }
.pagina .intro .tag { margin-top: 12px; }

.seccion { margin-top: 38px; }
.seccion .cab { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.seccion .cab h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.seccion .cab .espacer { flex: 1; height: 1px; background: rgb(var(--edge)); }

/* ============ BOTONES ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; cursor: pointer;
    border-radius: 0.75rem;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-weight: 600; font-size: .9rem;
    color: #fff;
    background: rgb(var(--primary));
    box-shadow: 0 8px 24px -10px rgb(var(--primary) / 0.55);
    transition: all .2s ease;
    text-decoration: none;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.98); }
.btn.pequeno { padding: 8px 16px; font-size: .84rem; border-radius: 0.7rem; }
.btn.ambar { background: rgb(var(--secondary)); box-shadow: 0 8px 24px -10px rgb(var(--secondary) / 0.55); }
.btn.borde {
    background: transparent; color: rgb(var(--text));
    border: 1px solid rgb(var(--edge));
    box-shadow: none;
}
.btn.borde:hover { background: rgb(var(--primary) / .08); border-color: rgb(var(--primary) / .4); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn:disabled:hover { filter: none; }

/* ============ TARJETAS ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 1.1rem;
    box-shadow: 0 10px 40px -12px rgb(0 0 0 / 0.35);
    padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px -14px rgb(0 0 0 / 0.4); }
.card .icono {
    width: 48px; height: 48px; border-radius: 0.8rem;
    display: grid; place-items: center;
    background: rgb(var(--primary)); color: #fff;
    box-shadow: 0 8px 18px -8px rgb(var(--primary) / 0.7);
}
.card .icono.ambar { background: rgb(var(--secondary)); box-shadow: 0 8px 18px -8px rgb(var(--secondary) / 0.7); }
.card .icono.azul { background: rgb(9 105 218); box-shadow: 0 8px 18px -8px rgb(9 105 218 / 0.7); }
.card .icono svg { width: 22px; height: 22px; }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.card p { font-size: .87rem; color: rgb(var(--soft)); flex: 1; }

.tag {
    align-self: flex-start;
    font-size: .72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    background: rgb(var(--primary) / .1); color: rgb(var(--primary));
}
.tag.gris { background: rgb(var(--edge) / .5); color: rgb(var(--soft)); }

.cat-lista { list-style: none; display: grid; gap: 8px; }
.cat-lista li { display: flex; gap: 9px; font-size: .86rem; color: rgb(var(--soft)); align-items: flex-start; }
.cat-lista li::before {
    content: ""; flex: none; width: 7px; height: 7px;
    border-radius: 9999px; background: rgb(var(--primary));
    margin-top: 8px;
}

/* ============ GUÍAS ============ */
.guia {
    display: flex; align-items: center; gap: 16px;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--surface));
    border-radius: 0.9rem;
    padding: 14px 16px; margin-bottom: 12px;
}
.guia:hover { border-color: rgb(var(--primary) / .4); }
.guia .n {
    width: 40px; height: 40px; flex: none;
    display: grid; place-items: center;
    border-radius: 0.7rem;
    font-weight: 800; font-size: .95rem;
    color: rgb(var(--primary)); background: rgb(var(--primary) / .1);
}
.guia .info { flex: 1; min-width: 0; }
.guia .info .cat { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgb(var(--soft)); }
.guia .info h3 { font-family: var(--font-display); font-weight: 600; font-size: .94rem; margin-top: 2px; }
.guia .acciones { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.acciones-guia { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ============ LIENZO HERRAMIENTA ============ */
.lienzo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 20px; }
.lienzo .nota { font-size: .86rem; color: rgb(var(--soft)); }
.campo label { display: block; font-size: .74rem; font-weight: 600; color: rgb(var(--soft)); margin-bottom: 6px; }
.campo select, .campo input {
    width: 205px; font-family: var(--font-sans); font-size: 16px;
    padding: 10px 12px;
    border: 1px solid rgb(var(--edge));
    border-radius: 0.75rem;
    background: rgb(var(--surface));
    color: rgb(var(--text));
    outline: none;
}
.campo select:focus, .campo input:focus {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 3px rgb(var(--primary) / .22);
}
.resultado { font-size: .9rem; color: rgb(var(--text)); }
.resultado b { color: rgb(var(--primary)); }

/* ============ AVISO TEMPORAL ============ */
.aviso {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .84rem; color: rgb(var(--soft));
    border: 1.5px dashed rgb(var(--edge));
    border-radius: 0.9rem;
    padding: 14px 16px;
    margin-top: 18px;
}
.aviso svg { width: 17px; height: 17px; flex: none; color: rgb(var(--primary)); margin-top: 3px; }

/* ============ PIE ============ */
footer { max-width: 1200px; margin: 0 auto; padding: 22px 24px 40px; color: rgb(var(--soft)); font-size: .8rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
footer b { color: rgb(var(--text)); }

/* ============ POKÉDEX ============ */
.oculto { display: none !important; }
.dex-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.dex-toolbar input {
    font-family: var(--font-sans); font-size: 16px;
    padding: 10px 14px;
    border: 1px solid rgb(var(--edge));
    border-radius: 0.75rem;
    background: rgb(var(--surface));
    color: rgb(var(--text));
    outline: none;
    flex: 1; min-width: 220px; max-width: 420px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dex-toolbar input:focus { border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .22); }
.dex-contador { font-size: .84rem; font-weight: 600; color: rgb(var(--soft)); }
.dex-mensaje {
    margin-top: 22px;
    padding: 44px 20px;
    text-align: center;
    font-size: .9rem;
    color: rgb(var(--soft));
    border: 1.5px dashed rgb(var(--edge));
    border-radius: 0.9rem;
}
.dex-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 22px; }
.dex-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 6px 12px;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.9rem;
    cursor: pointer;
    font-family: var(--font-sans);
    color: rgb(var(--text));
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dex-card:hover { border-color: rgb(var(--primary) / .5); transform: translateY(-3px); box-shadow: 0 12px 30px -14px rgb(0 0 0 / .35); }
.dex-card .dex-num { font-size: .66rem; font-weight: 800; letter-spacing: .6px; color: rgb(var(--soft)); }
.dex-card img { width: 62px; height: 62px; image-rendering: pixelated; }
.dex-card .dex-nombre { font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.3; }
@media (max-width: 1180px) { .dex-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 880px) { .dex-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .dex-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 430px) { .dex-grid { grid-template-columns: repeat(2, 1fr); } }
.dex-modal {
    position: fixed; inset: 0;
    z-index: 60;
    display: flex; justify-content: center; align-items: flex-start;
    padding: 5vh 16px 80px;
    overflow-y: auto;
    background: rgb(0 0 0 / .55);
    backdrop-filter: blur(3px);
}
.dex-ficha {
    width: min(920px, 100%);
    margin-top: 4vh;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    padding: 22px 24px 16px;
    font-family: var(--font-sans);
    animation: apar-ficha .22s ease;
}
@keyframes apar-ficha { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html.scroll-lock, html.scroll-lock body { overflow: hidden; }
.ficha-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ficha-cab h2 { font-size: 1.55rem; font-weight: 800; margin: 4px 0 8px; letter-spacing: .5px; }
.ficha-cab .dex-num { font-size: .78rem; font-weight: 800; color: rgb(var(--soft)); letter-spacing: 1px; }
.ficha-tipos { display: flex; gap: 6px; flex-wrap: wrap; }
.ficha-tipo { padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; letter-spacing: .3px; text-shadow: 0 1px 2px rgb(0 0 0 / .35); }
.ficha-cerrar {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    background: rgba(127,127,127,.14);
    color: rgb(var(--text));
    box-shadow: none; padding: 0;
    border-radius: 999px;
}
.ficha-cerrar:hover { background: rgba(127,127,127,.28); box-shadow: none; transform: none; }
.ficha-narra {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgb(var(--surface) / .5);
    border: 1px solid rgb(var(--edge));
    border-left: 3px solid rgb(var(--primary));
    border-radius: 0.6rem;
    font-size: .9rem; line-height: 1.65;
}
.ficha-genus { font-weight: 800; margin-bottom: 4px; color: rgb(var(--primary)); }
.ficha-narra p { margin: 0; }
.ficha-cuerpo { display: grid; grid-template-columns: 300px 1fr; gap: 24px; margin-top: 22px; }
.ficha-titulo { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: rgb(var(--soft)); margin: 22px 0 10px; }
.ficha-sprite {
    border: 1px solid rgb(var(--edge));
    border-radius: 0.9rem;
    background: rgb(var(--surface) / .6);
    display: grid; place-items: center;
    padding: 18px;
}
.ficha-sprite img { width: 130px; height: 130px; image-rendering: pixelated; }
.evo-fila { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.evo-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.8rem;
    padding: 8px 8px 9px;
    font-family: var(--font-sans);
    color: rgb(var(--text));
    max-width: 92px; text-align: center;
    transition: transform .2s ease, border-color .2s ease;
    flex: none;
}
.evo-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .4); }
.evo-btn img { width: 56px; height: 56px; image-rendering: pixelated; }
.evo-btn span { font-size: .72rem; font-weight: 600; line-height: 1.25; }
.evo-btn.actual { border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .18); }
.evo-borde {
    flex: none;
    border: 1px dashed rgb(var(--edge));
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .66rem; font-weight: 600; line-height: 1.3;
    color: rgb(var(--soft));
    max-width: 130px; text-align: center;
}
.stat-fila { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.stat-nombre { flex: none; width: 66px; font-size: .75rem; font-weight: 600; color: rgb(var(--soft)); }
.stat-barra { flex: 1; background: rgb(var(--edge) / .5); border-radius: 999px; height: 11px; overflow: hidden; position: relative; }
.stat-relleno { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgb(var(--primary)), #ffce54); border-radius: 999px; }
.stat-num { flex: none; width: 30px; text-align: right; font-size: .8rem; font-weight: 700; }
.stat-total { font-size: .8rem; color: rgb(var(--soft)); margin-top: 4px; }
.stat-total b { color: rgb(var(--text)); }
.ficha-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; align-items: baseline; }
.ficha-info .et { font-size: .75rem; font-weight: 600; color: rgb(var(--soft)); }
.ficha-info .val { font-size: .87rem; font-weight: 600; line-height: 1.5; }
.mv-tabla-wrap { max-height: 340px; overflow-y: auto; border: 1px solid rgb(var(--edge)); border-radius: 0.8rem; }
.mv-tabla { width: 100%; font-size: .8rem; border-collapse: collapse; }
.mv-tabla thead th { position: sticky; top: 0; background: rgb(var(--surface)); z-index: 1; font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; color: rgb(var(--soft)); }
.mv-tabla td, .mv-tabla th { padding: 7px 10px; text-align: left; border-bottom: 1px solid rgb(var(--edge) / .55); }
.mv-tabla tbody tr:hover { background: rgb(var(--surface) / .6); }
.mv-pista { font-size: .7rem; color: rgb(var(--soft)); margin: 7px 2px 0; }
.mv-cell {
    font: inherit; color: rgb(var(--primary)); background: none;
    border: 0; padding: 0; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
}
.mv-cell:hover { text-decoration-thickness: 2px; }

/* ============ DEX DE MOVIMIENTOS ============ */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; margin-top: 22px; }
.mv-card {
    display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
    text-align: left;
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.9rem;
    padding: 14px 15px;
    font-family: var(--font-sans);
    color: rgb(var(--text));
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.mv-card:hover {
    transform: translateY(-3px);
    border-color: rgb(var(--primary) / .5);
    box-shadow: 0 12px 30px -14px rgb(0 0 0 / .35);
}
.mv-card-nombre { font-size: .92rem; font-weight: 700; line-height: 1.3; }
.mv-card-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.mv-card .ficha-tipo { font-size: .68rem; padding: 2px 10px; }
.mv-card-datos { font-size: .72rem; color: rgb(var(--soft)); font-weight: 600; }
.mov-cat {
    padding: 2px 10px; border-radius: 999px;
    background: rgba(127,127,127,.16);
    color: rgb(var(--soft));
    font-size: .68rem; font-weight: 700; letter-spacing: .3px;
}
.mov-modal {
    position: fixed; inset: 0;
    z-index: 65;
    display: flex; justify-content: center; align-items: flex-start;
    padding: 14vh 16px 80px;
    overflow-y: auto;
    background: rgb(0 0 0 / .55);
    backdrop-filter: blur(3px);
}
.mov-ficha {
    width: min(460px, 100%);
    background: rgb(var(--surface));
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    padding: 20px 22px 18px;
    font-family: var(--font-sans);
    animation: apar-ficha .22s ease;
    box-shadow: 0 30px 60px -20px rgb(0 0 0 / .5);
}
.mov-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mov-nombre { font-size: 1.3rem; font-weight: 800; margin: 0 0 2px; }
.mov-sub { font-size: .78rem; color: rgb(var(--soft)); font-weight: 600; }
.mov-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mov-datos {
    margin: 16px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.mov-dato {
    background: rgb(var(--surface) / .5);
    border: 1px solid rgb(var(--edge) / .6);
    border-radius: 0.7rem;
    padding: 8px 10px;
    text-align: center;
}
.mov-dato dt { font-size: .62rem; text-transform: uppercase; letter-spacing: .8px; color: rgb(var(--soft)); font-weight: 800; }
.mov-dato dd { margin: 3px 0 0; font-size: .95rem; font-weight: 800; }
.mov-desc {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgb(var(--surface) / .5);
    border: 1px solid rgb(var(--edge));
    border-left: 3px solid rgb(var(--primary));
    border-radius: 0.6rem;
    font-size: .88rem; line-height: 1.6;
}
@media (max-width: 700px) {
    .ficha-cuerpo { grid-template-columns: 1fr; }
    .dex-modal { padding: 3vh 12px 60px; }
    .dex-ficha { padding: 18px 16px 14px; }
    .evo-fila { justify-content: flex-start; }
    .mov-modal { padding: 10vh 12px 60px; }
    .mov-ficha { padding: 16px 16px 14px; }
    .mov-datos { grid-template-columns: repeat(2, 1fr); }
}

/* ============ FILTROS, POPS Y OBJETOS ============ */
.filtros { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.filtros select, .filtros input {
    font-family: var(--font-sans); font-size: 15px;
    padding: 10px 14px;
    border: 1px solid rgb(var(--edge));
    border-radius: 0.75rem;
    background: rgb(var(--surface));
    color: rgb(var(--text));
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.filtros input { flex: 1; min-width: 200px; max-width: 380px; }
.filtros select {
    cursor: pointer;
    padding-right: 36px;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2388908d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.filtros select:focus, .filtros input:focus { border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .22); }
.filtros .dex-contador { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid rgb(var(--edge)); border-radius: 0.75rem; overflow: hidden; }
.seg button {
    border: 0; background: transparent; cursor: pointer;
    padding: 10px 16px;
    font-family: var(--font-sans); font-size: .84rem; font-weight: 600;
    color: rgb(var(--soft));
    transition: background-color .2s ease, color .2s ease;
}
.seg button + button { border-left: 1px solid rgb(var(--edge)); }
.seg button.activo { background: rgb(var(--primary)); color: #fff; }
.dex-valor { font-size: .8rem; font-weight: 800; color: rgb(var(--primary)); letter-spacing: .2px; }

/* ============ SIMULADOR DE CRIANZA ============ */
.crianza { display: flex; flex-direction: column; gap: 18px; }
.crianza-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.crianza-panel {
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    background: rgb(var(--surface));
    padding: 18px 18px 20px;
    display: flex; flex-direction: column; gap: 14px;
    box-shadow: 0 12px 30px -24px rgb(0 0 0 / .35);
}
.crianza-cab {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
    padding-bottom: 12px; border-bottom: 1px solid rgb(var(--edge)); margin-bottom: 2px;
}
.crianza-cab b {
    background: rgb(var(--primary)); color: #fff;
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .82rem; flex: none;
}
.crianza-fila { display: flex; flex-direction: column; gap: 7px; }
.crianza-lbl { font-size: .84rem; font-weight: 600; color: rgb(var(--text)); }
.crianza-hint { font-weight: 500; color: rgb(var(--soft)); font-size: .78rem; }
.crianza-in, .crianza-range {
    font-family: var(--font-sans); font-size: .9rem;
    color: rgb(var(--text));
    background: rgb(var(--background));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.6rem;
    padding: 9px 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    width: 100%;
}
.crianza-in:focus, .crianza-range:focus {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 3px rgb(var(--primary) / .22);
}
.crianza-in[type="number"] { max-width: 190px; }
.crianza-ayuda { font-size: .76rem; color: rgb(var(--soft)); line-height: 1.45; }
.crianza-k { display: flex; flex-wrap: wrap; gap: 8px; }
.crianza-kbtn {
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    color: rgb(var(--text));
    font-family: var(--font-sans); font-weight: 700; font-size: .84rem;
    border-radius: 0.6rem; padding: 9px 14px; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.crianza-kbtn:hover { border-color: rgb(var(--primary)); }
.crianza-kbtn.on {
    background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #fff;
}
.crianza-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.crianza-chip {
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    color: rgb(var(--soft));
    font-family: var(--font-sans); font-weight: 600; font-size: .78rem;
    border-radius: 999px; padding: 6px 12px; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.crianza-chip:hover { border-color: rgb(var(--primary)); color: rgb(var(--text)); }
.crianza-chip.on {
    background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #fff;
}
.crianza-check {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: .87rem; font-weight: 600; cursor: pointer; line-height: 1.5;
}
.crianza-check input { margin-top: 3px; accent-color: rgb(var(--primary)); cursor: pointer; width: 15px; height: 15px; flex: none; }
.crianza-tengo { display: flex; align-items: center; gap: 12px; }
.crianza-range { flex: 1; padding: 0; height: 34px; }
.crianza-val { font-size: .82rem; font-weight: 700; color: rgb(var(--primary)); min-width: 58px; text-align: right; }
.crianza-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; }
.crianza-poke { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.crianza-sprite {
    width: 72px; height: 72px; image-rendering: pixelated;
    background: rgb(var(--background));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.8rem; padding: 4px;
}
.crianza-poke-info { display: flex; flex-direction: column; gap: 6px; min-width: 180px; flex: 1; }
.crianza-nombre { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.crianza-num { color: rgb(var(--soft)); font-weight: 600; font-size: .78rem; }
.crianza-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.crianza-filas { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: rgb(var(--soft)); }
.crianza-aviso {
    background: rgb(var(--secondary) / 0.12);
    border: 1px solid rgb(var(--secondary) / 0.45);
    color: rgb(var(--text));
    border-radius: 0.6rem;
    padding: 9px 12px;
    font-size: .82rem;
    line-height: 1.5;
}
.crianza-res {
    display: flex; flex-direction: column; gap: 16px;
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    background: rgb(var(--surface));
    padding: 20px 20px 22px;
    box-shadow: 0 18px 40px -28px rgb(0 0 0 / .45);
}
.crianza-res .crianza-cab { border-bottom: 1px solid rgb(var(--edge)); margin-bottom: 0; }
.crianza-tarjetas { display: flex; flex-wrap: wrap; gap: 10px; }
.crianza-tarjeta {
    flex: 1 1 140px;
    border: 1px solid rgb(var(--edge));
    border-radius: 0.8rem;
    background: rgb(var(--background));
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 2px;
}
.crianza-tarjeta .crianza-num { font-size: .72rem; }
.crianza-tarjeta b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.crianza-tarjeta small { color: rgb(var(--soft)); font-size: .74rem; }
.crianza-columna2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crianza-pres, .crianza-itinerario { min-width: 0; }
.crianza-pres h3, .crianza-itinerario h3 { font-family: var(--font-display); font-size: .95rem; margin-bottom: 10px; }
.crianza-tabla { width: 100%; border-collapse: collapse; font-size: .84rem; }
.crianza-tabla th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .4px;
    color: rgb(var(--soft)); padding: 6px 8px; border-bottom: 1px solid rgb(var(--edge));
}
.crianza-tabla td { padding: 7px 8px; border-bottom: 1px solid rgb(var(--edge)); vertical-align: top; }
.crianza-tabla .crianza-der { text-align: right; white-space: nowrap; }
.crianza-tabla .crianza-tot td { border-top: 2px solid rgb(var(--primary)); border-bottom: 0; font-size: .95rem; }
.crianza-tot { color: rgb(var(--text)); }
.crianza-band {
    margin-top: 12px; font-size: .8rem; color: rgb(var(--soft));
    background: rgb(var(--background));
    border: 1px dashed rgb(var(--edge));
    border-radius: 0.6rem; padding: 9px 12px; line-height: 1.5;
}
.crianza-rondas { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.crianza-rondas li {
    border: 1px solid rgb(var(--edge));
    border-radius: 0.6rem;
    background: rgb(var(--background));
    padding: 8px 12px;
    font-size: .82rem;
    position: relative;
}
.crianza-rondas li::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; border-radius: 0.6rem 0 0 0.6rem;
    background: linear-gradient(to bottom, rgb(var(--primary)), rgb(var(--secondary)));
}
.crianza-rondas li:not(:last-child) { margin-left: 2px; }
.crianza-lane { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.crianza-arbol {
    margin-top: 18px;
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    padding: 14px 16px;
}
.crianza-arbol-tit { font-family: var(--font-display); font-size: 1rem; margin-bottom: 12px; }
.crianza-arbol-tit small { font-family: var(--font-base); font-weight: 400; font-size: .76rem; color: rgb(var(--soft)); }
.crianza-arbol-ronda {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 14px;
    border-left: 3px solid rgba(var(--primary), .18);
    padding-left: 12px;
}
.crianza-arbol-ronda-tit {
    font-family: var(--font-display); font-size: .85rem; color: rgb(var(--primary));
}
.crianza-arbol-ronda-tit small {
    font-family: var(--font-base); font-weight: 400; font-size: .72rem; color: rgb(var(--soft));
}
.crianza-arbol-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 2px 0;
}
.crianza-arbol-row.esp {
    background: rgba(var(--secondary), .07);
    border-radius: .6rem;
    padding: 5px 8px;
}
.crianza-arbol-card {
    flex: 0 1 auto; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    border-radius: .6rem;
    padding: 5px 9px;
    font-size: .78rem;
}
.crianza-arbol-card b { line-height: 1.2; }
.crianza-arbol-card small { color: rgb(var(--soft)); font-size: .68rem; line-height: 1.3; }
.crianza-arbol-card.esp { border-color: rgb(var(--secondary)); border-left-width: 4px; }
.crianza-arbol-card.egg { border-color: rgb(var(--primary)); border-left-width: 4px; }
.crianza-arbol-card.ditto { border-left-width: 4px; border-style: dashed; }
.crianza-arbol-card.cr { font-weight: 600; }
.crianza-arbol-card.cr.fin {
    border: 2px solid rgb(var(--primary));
    box-shadow: 0 0 0 3px rgba(var(--primary), .12);
}
.crianza-arbol-marca { color: rgb(var(--primary)); font-weight: 600; font-size: .66rem !important; }
.crianza-arbol-piedra { color: rgb(var(--secondary)); font-weight: 700; font-size: .62rem !important; letter-spacing: .4px; }
.crianza-arbol-x, .crianza-arbol-arrow {
    flex: none; font-size: 1rem; color: rgb(var(--soft));
}
.crianza-arbol-resumen {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
    margin-top: 12px;
}
.crianza-arbol-resumen .crianza-lbl { font-size: .8rem; font-weight: 600; }
.crianza-arbol-chip {
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .72rem; color: rgb(var(--soft));
}
.crianza-arbol-chip.mov { border-color: rgb(var(--primary)); color: rgb(var(--primary)); }
.crianza-arbol-chip.nat { border-color: rgb(var(--secondary)); color: rgb(var(--secondary)); }
.crianza-arbol-fin {
    margin-top: 14px;
    border: 2px solid rgb(var(--primary));
    box-shadow: 0 0 0 3px rgba(var(--primary), .12);
    background: linear-gradient(to bottom, rgb(var(--background)), rgba(var(--primary), .06));
    border-radius: .8rem;
    padding: 10px 14px;
    font-size: .9rem;
}
.crianza-arbol-fin b { color: rgb(var(--primary)); font-family: var(--font-display); letter-spacing: .5px; }
.crianza-arbol-planb {
    margin-top: 12px;
    border: 1px solid rgb(var(--secondary));
    border-radius: .8rem;
    padding: 10px 14px;
    font-size: .8rem;
    background: rgba(var(--secondary), .05);
}
.crianza-arbol-planb b { color: rgb(var(--secondary)); }
.crianza-arbol-planb ol { margin: 6px 0 4px 18px; padding: 0; }
.crianza-arbol-planb li { margin: 2px 0; }
.crianza-arbol-desciende {
    margin-top: 14px;
    border: 1px dashed rgb(var(--secondary));
    border-radius: .8rem;
    padding: 10px 14px;
    display: flex; flex-direction: column; gap: 8px;
}
.crianza-arbol-desciende .crianza-arbol-ronda-tit { margin-top: 0; }
.cd-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.cd-row b { color: rgb(var(--soft)); }
.cd-row small { color: rgb(var(--soft)); opacity: .75; }
.cd-cond { color: rgb(var(--secondary)); font-weight: 700; font-size: .72rem; }
.cd-ancla { border-top: 1px dotted rgb(var(--edge)); padding-top: 8px; }
.cd-ancla b { color: rgb(var(--secondary)); }
.crianza-arbol-ladder {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    margin-top: 16px; padding: 10px 12px;
    border: 1px dashed rgb(var(--primary));
    border-radius: .8rem;
}
.crianza-arbol-ladder .crianza-lbl { color: rgb(var(--primary)); font-weight: 700; }
.crianza-arbol-chain { font-size: .78rem; color: rgb(var(--soft)); text-align: center; line-height: 1.5; }
.crianza-arbol .crianza-ayuda { margin-top: 10px; }
.czegg-item {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 4px 8px; margin-top: 4px;
    border-radius: 6px; font-size: .78rem;
    background: rgba(var(--primary), .05);
}
.czegg-item b { color: rgb(var(--text)); }
.czegg-item small { color: rgb(var(--soft)); }
.czegg-todo {
    margin-left: auto; font-size: .68rem; font-weight: 700;
    color: rgb(var(--primary));
    border: 1px solid rgb(var(--primary)); border-radius: 999px;
    padding: 1px 8px;
}
#czEggGuia .crianza-lbl { margin-bottom: 4px; }
#czEggGuia { margin-top: 8px; }
@media (max-width: 640px) {
    .crianza-arbol-row { align-items: stretch; }
    .crianza-arbol-card { flex: 1 1 auto; min-width: 0; }
}
.crianza-lane .crianza-lbl { font-size: .8rem; }
.crianza-nota {
    font-size: .8rem; color: rgb(var(--soft)); line-height: 1.55;
    border-left: 3px solid rgb(var(--edge)); padding-left: 12px;
}

/* ============ PLANIFICADOR DE BAYAS ============ */
.bayas { display: flex; flex-direction: column; gap: 18px; }
.bayas-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.bayas-panel {
    border: 1px solid rgb(var(--edge));
    background: linear-gradient(to bottom, rgb(var(--background)), rgb(var(--background)));
    border-radius: 1rem;
    padding: 16px 18px;
    box-shadow: 0 14px 38px -24px rgb(0 0 0 / .35);
}
.bayas-cab { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgb(var(--soft)); display: flex; align-items: center; gap: 7px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgb(var(--edge)); }
.bayas-cab b { color: rgb(var(--primary)); font-family: var(--font-display); font-size: 1rem; }
.bayas-cab2 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid rgb(var(--edge)); display: flex; align-items: baseline; gap: 8px; }
.bayas-fila { display: flex; flex-direction: column; gap: 7px; }
.bayas-lbl { font-size: .84rem; font-weight: 600; color: rgb(var(--text)); }
.bayas-in {
    width: 100%; box-sizing: border-box;
    border: 1px solid rgb(var(--edge)); border-radius: .7rem;
    background: rgb(var(--background)); color: rgb(var(--text));
    padding: 9px 12px; font-size: .9rem; font-family: var(--font-base);
}
.bayas-in:focus { outline: none; border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .22); }
.bayas-ayuda { font-size: .76rem; color: rgb(var(--soft)); line-height: 1.45; }
.bayas-info { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.bayas-info-nombre { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bayas-info-nombre b { font-family: var(--font-display); font-size: .98rem; }
.bayas-info-nombre span { color: rgb(var(--soft)); font-size: .76rem; }
.bayas-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px;
    font-size: .76rem; color: rgb(var(--soft));
}
.bayas-info-grid b { color: rgb(var(--text)); font-weight: 700; }
.bayas-info-e {
    font-size: .8rem; line-height: 1.5;
    border-left: 3px solid rgb(var(--primary)); padding-left: 10px;
    color: rgb(var(--soft));
}
.bayas-info-cad {
    font-size: .76rem; color: rgb(var(--primary)); font-weight: 600;
    background: rgb(var(--primary) / .06);
    border: 1px dashed rgb(var(--primary) / .3);
    border-radius: .6rem; padding: 7px 10px; line-height: 1.5;
}
.bayas-info .btn { align-self: flex-start; }
.bayas-tabla { width: 100%; border-collapse: collapse; font-size: .84rem; margin-top: 12px; }
.bayas-tabla th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .4px;
    color: rgb(var(--soft)); padding: 6px 8px; border-bottom: 1px solid rgb(var(--edge));
}
.bayas-tabla td { padding: 7px 8px; border-bottom: 1px solid rgb(var(--edge)); vertical-align: top; }
.bayas-tabla .bayas-der { text-align: right; white-space: nowrap; }
.bayas-tabla .bayas-tot td { border-top: 2px solid rgb(var(--primary)); border-bottom: 0; font-size: .95rem; font-weight: 700; }
#byAviso {
    font-size: .84rem; line-height: 1.5;
    background: rgb(var(--secondary) / .09);
    border: 1px solid rgb(var(--secondary) / .4);
    color: rgb(var(--text));
    border-radius: .7rem; padding: 9px 13px;
}
#byAviso:empty { display: none; }
#byAviso b { color: rgb(var(--secondary)); }
.bayas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.bayas-card {
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    border-radius: 1rem;
    padding: 13px 15px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.bayas-card:hover { border-color: rgb(var(--primary) / .45); transform: translateY(-2px); box-shadow: 0 14px 32px -18px rgb(0 0 0 / .4); }
.bayas-card.ambar { border-color: rgb(var(--secondary)); box-shadow: 0 0 0 3px rgb(var(--secondary) / .14); }
.bayas-card.rojo { border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .18); animation: bayas-pulso 1.6s ease-in-out infinite; }
.bayas-card.lista { border-color: rgb(var(--primary) / .55); }
@keyframes bayas-pulso { 0%, 100% { box-shadow: 0 0 0 3px rgb(var(--primary) / .12); } 50% { box-shadow: 0 0 0 6px rgb(var(--primary) / .05); } }
.bayas-card-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bayas-card-cab b { font-family: var(--font-display); font-size: .95rem; }
.bayas-icono { color: #2f9e44; display: inline-flex; flex: none; }
.bayas-icono svg { width: 20px; height: 20px; fill: currentColor; }
.bayas-icono svg path { fill: #2f9e44; }
.bayas-gotas { display: flex; align-items: center; gap: 3px; }
.bayas-gota { width: 13px; height: 15px; display: block; color: rgb(var(--edge)); fill: none; stroke: currentColor; stroke-width: 1.1; }
.bayas-gota.llena { color: #3aa0ff; fill: currentColor; stroke: #3aa0ff; stroke-width: .4; }
.bayas-gota.llena.inundada { animation: bayas-inunda 1s steps(2, start) infinite; }
.bayas-gota.vacia-roja { color: rgb(var(--primary)); stroke-width: 1.3; animation: bayas-blink 1s steps(2, start) infinite; }
@keyframes bayas-blink { to { visibility: hidden; } }
@keyframes bayas-inunda { to { opacity: .4; } }
.bayas-inundada { font-weight: 700; color: #3aa0ff; }
.bayas-gotas-num { font-size: .7rem; font-weight: 700; color: rgb(var(--soft)); margin-left: 4px; }
.bayas-h {
    flex: none; font-size: .68rem; font-weight: 700;
    color: rgb(var(--primary)); border: 1px solid rgb(var(--primary) / .4);
    border-radius: 999px; padding: 2px 9px;
}
.bayas-rondas { display: flex; flex-wrap: wrap; gap: 6px; }
.bayas-r {
    font-size: .68rem; font-weight: 600; color: rgb(var(--soft));
    background: rgb(var(--edge) / .45); border-radius: 999px; padding: 3px 9px;
    white-space: nowrap;
}
.bayas-r.ok { color: rgb(var(--primary)); background: rgb(var(--primary) / .1); text-decoration: line-through; text-decoration-color: rgb(var(--primary) / .5); }
.bayas-r.act { color: #fff; background: rgb(var(--secondary)); border: 1px solid rgb(var(--secondary)); }
.bayas-estado { font-size: .8rem; font-weight: 600; }
.bayas-card.rojo .bayas-estado, .bayas-card.ambar .bayas-estado { color: rgb(var(--secondary)); }
.bayas-card.rojo .bayas-estado { color: rgb(var(--primary)); }
.bayas-cosecha { font-size: .76rem; color: rgb(var(--soft)); }
.bayas-cosecha b { color: rgb(var(--text)); }
.bayas-botones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.bayas-vacio {
    font-size: .86rem; color: rgb(var(--soft));
    border: 1.5px dashed rgb(var(--edge)); border-radius: .8rem;
    padding: 18px 16px; text-align: center;
}

/* ============ EGG MOVES ============ */
.evm { display: flex; flex-direction: column; gap: 20px; margin-top: 6px; }
.evm-paso { display: flex; flex-direction: column; gap: 8px; }
.evm-lbl { font-size: .84rem; font-weight: 700; color: rgb(var(--text)); }
.evm-busca { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.evm-in {
    font-family: var(--font-sans); font-size: .92rem;
    color: rgb(var(--text));
    background: rgb(var(--background));
    border: 1px solid rgb(var(--edge));
    border-radius: 0.6rem;
    padding: 9px 12px;
    outline: none;
    min-width: 220px;
    max-width: 340px;
    flex: 1;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.evm-in:focus { border-color: rgb(var(--primary)); box-shadow: 0 0 0 3px rgb(var(--primary) / .22); }
.evm-ayuda { font-size: .78rem; color: rgb(var(--soft)); line-height: 1.5; }
.evm-aviso {
    font-size: .84rem; line-height: 1.5;
    background: rgb(var(--secondary) / .09);
    border: 1px solid rgb(var(--secondary) / .4);
    color: rgb(var(--text));
    border-radius: .7rem; padding: 9px 13px;
}
.evm-aviso:empty { display: none; }
.evm-aviso b { color: rgb(var(--secondary)); }
.evm-poke {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    border: 1px solid rgb(var(--edge));
    border-radius: .9rem;
    background: rgb(var(--background));
    padding: 12px 14px;
}
.evm-sprite {
    width: 64px; height: 64px; image-rendering: pixelated; flex: none;
    background: rgb(var(--background));
    border: 1px solid rgb(var(--edge));
    border-radius: .8rem; padding: 3px;
}
.evm-poke-info { display: flex; flex-direction: column; gap: 5px; min-width: 180px; flex: 1; }
.evm-nombre { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.evm-num { color: rgb(var(--soft)); font-weight: 600; font-size: .76rem; }
.evm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.evm-grupo {
    font-size: .7rem; font-weight: 600; color: rgb(var(--soft));
    background: rgb(var(--edge) / .45); border-radius: 999px; padding: 3px 9px;
    white-space: nowrap;
}
.evm-grupo.comp { color: #fff; background: rgb(var(--primary)); }
.evm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.evm-mov {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgb(var(--edge));
    background: rgb(var(--background));
    color: rgb(var(--text));
    font-family: var(--font-sans); font-weight: 700; font-size: .84rem;
    border-radius: 0.7rem; padding: 8px 13px; cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.evm-mov:hover { border-color: rgb(var(--primary)); }
.evm-mov.on {
    background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #fff;
}
.evm-mov-tipo {
    font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    color: rgb(var(--soft));
    border: 1px solid rgb(var(--edge));
    border-radius: 999px; padding: 2px 7px;
}
.evm-mov.on .evm-mov-tipo { color: rgb(var(--background)); border-color: rgb(var(--background) / .5); }
.evm-mov em { font-style: normal; color: rgb(var(--soft)); font-weight: 600; font-size: .7rem; }
.evm-mov.on em { color: rgb(var(--background) / .8); }
.evm-bloque {
    display: flex; flex-direction: column; gap: 12px;
    border: 1px solid rgb(var(--edge));
    border-radius: 1rem;
    background: rgb(var(--surface));
    padding: 16px 18px 18px;
    box-shadow: 0 14px 30px -24px rgb(0 0 0 / .4);
}
.evm-movcab { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.evm-movcab h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.evm-chips-peq { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.evm-tipo {
    font-size: .7rem; font-weight: 700; color: #fff;
    border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.evm-cat { font-size: .74rem; font-weight: 600; color: rgb(var(--soft)); }
.evm-desc { font-size: .82rem; color: rgb(var(--soft)); line-height: 1.5; max-width: 640px; }
.evm-nota {
    font-size: .82rem; line-height: 1.5;
    background: rgb(var(--edge) / .35);
    border-radius: .6rem; padding: 8px 11px;
    color: rgb(var(--soft));
}
.evm-nota.ok { background: rgb(var(--primary) / .08); color: rgb(var(--text)); border: 1px solid rgb(var(--primary) / .3); }
.evm-donantes {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
}
.evm-card {
    display: flex; gap: 10px; align-items: center;
    border: 1px solid rgb(var(--edge));
    border-radius: .8rem;
    background: rgb(var(--background));
    padding: 9px 11px;
}
.evm-card .evm-sprite { width: 46px; height: 46px; }
.evm-card-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.evm-card-nombre { font-family: var(--font-display); font-weight: 700; font-size: .86rem; }
.evm-card-fuente { font-size: .72rem; color: rgb(var(--soft)); }
.evm-card-sexo { font-size: .7rem; color: rgb(var(--soft)); }
.evm-comunes { border-color: rgb(var(--primary) / .45); }
.evm-comunes h4 { color: rgb(var(--primary)); }

/* ============ MÓVIL ============ */
@media (max-width: 860px) {
    .layout { flex-direction: column; }

    .nav-toggle { display: grid; }
    .nav-cerrar { display: grid; }
    .nav-velo { display: block; }
    html.nav-abierto .nav-velo { opacity: 1; visibility: visible; pointer-events: auto; }
    html.nav-abierto, html.nav-abierto body { overflow: hidden; }

    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 82vw; max-width: 320px; height: 100%;
        flex-direction: column; align-items: stretch;
        padding: calc(60px + env(safe-area-inset-top, 0px)) 14px calc(22px + env(safe-area-inset-bottom, 0px));
        gap: 4px;
        background: rgb(var(--surface));
        border-right: 1px solid rgb(var(--edge));
        box-shadow: 0 0 70px -12px rgb(0 0 0 / .45);
        z-index: 90;
        transform: translateX(-102%);
        transition: transform .3s cubic-bezier(.32, .72, 0, 1), background-color .35s ease,
                    color .35s ease, border-color .35s ease, box-shadow .35s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    html.nav-abierto .sidebar { transform: translateX(0); }

    .sidebar .grupo { width: auto; padding: 16px 12px 6px; }
    .sidebar .pie { display: block; }

    .nav-link, .nav-cat > button { padding: 12px; font-size: .95rem; }
    .nav-link .chip, .nav-cat .chip { width: 38px; height: 38px; }
    .sub-item { padding: 11px 12px; font-size: .88rem; }
    .nav-cat.abierto .sub { max-height: 1200px; }

    .crianza-columna2 { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
    .theme-toggle, .nav-toggle { width: 38px; height: 38px; top: 8px; right: 10px; }
    .nav-toggle { right: 54px; }
    .sidebar { width: 86vw; }
}