/* ============================================================
   Jugadores y comunidad (área 3): perfil, estadísticas, progresos, clasificación, directorio,
   clanes, castillos y mercado. Sobre las clases del tema (mc-panel, mc-tooltip, mc-ranura).
   ============================================================ */

/* Colores de chat del juego (&0-&f, &l &o &n &m) */
.jg-c0 { color: #000; } .jg-c1 { color: #0000aa; } .jg-c2 { color: #00aa00; } .jg-c3 { color: #00aaaa; }
.jg-c4 { color: #aa0000; } .jg-c5 { color: #aa00aa; } .jg-c6 { color: #ffaa00; } .jg-c7 { color: #aaaaaa; }
.jg-c8 { color: #555555; } .jg-c9 { color: #5555ff; } .jg-ca { color: #55ff55; } .jg-cb { color: #55ffff; }
.jg-cc { color: #ff5555; } .jg-cd { color: #ff55ff; } .jg-ce { color: #ffff55; } .jg-cf { color: #ffffff; }
.jg-l { font-weight: 700; } .jg-o { font-style: italic; } .jg-n { text-decoration: underline; } .jg-m { text-decoration: line-through; }
.mc-panel .jg-ce, .card .jg-ce { color: #8a7a00; } .mc-panel .jg-ca, .card .jg-ca { color: #1d7a1d; } .mc-panel .jg-cf { color: #303030; }
.mc-panel .jg-cb { color: #117a7a; } .mc-panel .jg-c6 { color: #9a5c00; } .mc-panel .jg-c7 { color: #555; }

.jg-gris { color: #a0a0a0; }
.mc-panel .jg-gris { color: #555; }
.jg-titulo { margin-bottom: .25rem; }
.jg-subtitulo { color: #c4c4c4; text-shadow: 1px 1px 0 #000; margin-bottom: 1.25rem; }
.jg-h2 { font-size: 1.3rem; margin: 1.5rem 0 .75rem; }
.jg-h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.jg-cargando, .jg-error { font-family: var(--mc-pixel); font-size-adjust: .5; color: #aaa; margin: 1rem 0; }
.jg-error { color: var(--mc-rojo, #ff5555); }

/* Pestañas entre páginas de comunidad */
.jg-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.25rem; }
.jg-nav-tab {
    display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem;
    background: #6f6f6f; color: #fff; border: 2px solid #000;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .45), inset -2px -2px 0 rgba(0, 0, 0, .35);
    font-family: var(--mc-pixel); font-size-adjust: .5; text-shadow: 2px 2px 0 #3f3f3f;
}
.jg-nav-tab img { image-rendering: pixelated; }
.jg-nav-tab:hover, .jg-nav-tab:focus-visible { background: #6b74c9; color: #ffffa0; }
.jg-nav-tab.activa { background: #3c8527; color: #ffff55; }
.jg-nav-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Aviso sin servidor */
.jg-offline { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; color: #ffaaaa; }
.jg-offline img { image-rendering: pixelated; }
.jg-vacio { text-align: center; padding: 2rem 1rem; }
.jg-vacio img { image-rendering: pixelated; margin-bottom: .75rem; }

/* LED y corazones */
.jg-led { display: inline-block; width: 10px; height: 10px; background: #555; border: 2px solid #000; vertical-align: 0; }
.jg-led.on { background: #55ff55; box-shadow: 0 0 6px #55ff55; }
.jg-corazones { display: inline-flex; gap: 1px; vertical-align: -3px; margin-left: .4rem; }
.jg-corazon { width: 16px; height: 16px; image-rendering: pixelated; background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3e%3cpath fill='%23000' d='M1 1h3v1h1V1h3v1h1v3H8v1H7v1H6v1H5v1H4V8H3V7H2V6H1V5H0V2h1z'/%3e%3cpath fill='%23383838' d='M1 2h3v1h1V2h3v3H7v1H6v1H5v1H4V7H3V6H2V5H1z'/%3e%3c/svg%3e") 0 0 / 100% 100%; }
.jg-corazon.lleno { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3e%3cpath fill='%23000' d='M1 1h3v1h1V1h3v1h1v3H8v1H7v1H6v1H5v1H4V8H3V7H2V6H1V5H0V2h1z'/%3e%3cpath fill='%23e01818' d='M1 2h3v1h1V2h3v3H7v1H6v1H5v1H4V7H3V6H2V5H1z'/%3e%3cpath fill='%23ff9a9a' d='M2 3h1v1H2z'/%3e%3c/svg%3e"); }
.jg-corazon.medio { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3e%3cpath fill='%23000' d='M1 1h3v1h1V1h3v1h1v3H8v1H7v1H6v1H5v1H4V8H3V7H2V6H1V5H0V2h1z'/%3e%3cpath fill='%23383838' d='M1 2h3v1h1V2h3v3H7v1H6v1H5v1H4V7H3V6H2V5H1z'/%3e%3cpath fill='%23e01818' d='M1 2h3v1h1v5H4V7H3V6H2V5H1z'/%3e%3c/svg%3e"); }

/* ---------- Perfil: cabecera ---------- */
.jg-cabecera { display: flex; gap: 1.5rem; padding: 1.25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.jg-skin {
    flex: 0 0 auto; width: 228px; height: 308px; position: relative;
    background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737;
    display: flex; align-items: center; justify-content: center;
}
.jg-skin canvas { display: block; cursor: grab; }
.jg-skin-reserva { display: none; image-rendering: pixelated; }
.jg-ficha { flex: 1 1 min(100%, 320px); min-width: 0; }
.jg-nombre { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: .3rem; overflow-wrap: anywhere; }
.jg-prefijo { margin-right: .35rem; text-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
.mc-panel .jg-prefijo .jg-cc, .mc-panel .jg-prefijo .jg-c9, .mc-panel .jg-prefijo .jg-ca, .mc-panel .jg-prefijo .jg-cb { filter: brightness(.75); }
.jg-estado { margin-bottom: .6rem; }
.jg-insignias { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.jg-insignia {
    font-family: var(--mc-pixel); font-size-adjust: .5; padding: .15rem .55rem; color: #fff;
    background: rgba(16, 0, 16, .92); border: 2px solid #5000ff; text-shadow: 1px 1px 0 #000; cursor: default;
}
.jg-ins-oro { border-color: #ffaa00; color: #ffdd55; }
.jg-ins-plata { border-color: #aaa; color: #e8e8e8; }
.jg-ins-morado { border-color: #aa00aa; color: #ff88ff; }
.jg-ins-rojo { border-color: #aa0000; color: #ff7777; }
.jg-ins-aqua { border-color: #00aaaa; color: #77ffff; }
.jg-ins-web { border-color: #3c8527; color: #8fff6f; }
.jg-ins-rol { border-color: #5555ff; color: #aab0ff; }
.jg-g-vip { border-color: #55ff55; color: #55ff55; }
.jg-g-mvp { border-color: #55ffff; color: #55ffff; }
.jg-g-leyenda { border-color: #ffaa00; color: #ffff55; }
.jg-g-moderador { border-color: #5555ff; color: #8888ff; }
.jg-g-admin { border-color: #ff5555; color: #ff5555; }

.jg-hud { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .5rem; margin-bottom: .8rem; }
.jg-dato { display: flex; align-items: center; gap: .5rem; background: rgba(0, 0, 0, .08); border: 2px solid #8b8b8b; padding: .35rem .5rem; }
.jg-dato img { width: 28px; height: 28px; image-rendering: pixelated; flex: 0 0 auto; }
.jg-dato small { display: block; font-size: .78rem; color: #4a4a4a; }
.jg-dato b { font-family: var(--mc-pixel); font-size-adjust: .5; font-weight: 400; font-size: 1.15rem; color: #202020; }

.jg-xp { position: relative; padding-top: 1.5rem; margin-bottom: .9rem; max-width: 520px; }
.jg-xp-nivel { position: absolute; left: 50%; top: 0; transform: translateX(-50%); white-space: nowrap; font-family: var(--mc-pixel); font-size-adjust: .5; color: #80ff20; text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000; }
.jg-xp-barra { height: 12px; background: #000; border: 2px solid #000; box-shadow: inset 0 0 0 1px #2a2a2a; }
.jg-xp-barra > div { height: 100%; background: linear-gradient(#c4ff7a 0 34%, #80ff20 34% 67%, #3c8527 67%); }

.jg-lineas { list-style: none; padding: 0; margin: 0 0 .8rem; }
.jg-lineas li { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .25rem; }
.jg-lineas img { width: 20px; height: 20px; image-rendering: pixelated; }
.jg-tarjeta-acciones { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- Pestañas del perfil (como las de la mesa de crafteo creativa) ---------- */
.jg-pestanas { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: -2px; position: relative; z-index: 1; }
.jg-pestana {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; color: #e0e0e0;
    background: #3a3a3a; border: 2px solid #000; border-bottom: 0;
    font-family: var(--mc-pixel); font-size-adjust: .5; text-shadow: 2px 2px 0 #000;
}
.jg-pestana img { width: 22px; height: 22px; image-rendering: pixelated; }
.jg-pestana.activa { background: rgba(10, 10, 10, .92); color: #ffff55; padding-bottom: calc(.45rem + 2px); }
.jg-pestana:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.jg-oscuro { background: rgba(10, 10, 10, .92); border: 2px solid #000; box-shadow: inset 2px 2px 0 #2c2c2c, 4px 4px 0 rgba(0, 0, 0, .45); color: #e8e8e8; padding: 1rem; }
.jg-panel-tab { min-height: 240px; margin-bottom: 1.5rem; }

/* Estadísticas */
.jg-subtabs { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.jg-subtabs .btn.activa { --mc-btn-fondo: #3c8527; color: #ffff55; }
.jg-filtro { max-width: 220px; margin-left: auto; }
.jg-stats { max-height: 620px; overflow: auto; }
.jg-tabla-stats { width: 100%; border-collapse: collapse; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-tabla-stats td, .jg-tabla-stats th { padding: .3rem .6rem; border-bottom: 1px solid #262626; }
.jg-tabla-stats tbody tr:nth-child(odd) { background: rgba(255, 255, 255, .04); }
.jg-tabla-stats tbody tr:hover { background: rgba(80, 0, 255, .18); }
.jg-tabla-stats th { position: sticky; top: 0; background: #151515; color: #ffff55; font-weight: 400; z-index: 1; }
.jg-valor { text-align: right; white-space: nowrap; color: #fff; }
.jg-cero { color: #555; }
.jg-obj { display: flex; align-items: center; gap: .5rem; }
.mc-ranura.jg-mini { width: 30px; height: 30px; }
.mc-ranura.jg-mini img { width: 24px; height: 24px; }
.jg-lista-mobs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem; }
.jg-lista-mobs li { display: flex; gap: .5rem; align-items: center; padding: .3rem; background: rgba(255, 255, 255, .04); }
.jg-mob-texto { display: flex; flex-direction: column; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-mob-texto b { font-weight: 400; color: #fff; }

/* Progresos */
.jg-logros-cab { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.jg-logros-cab .mc-nombre { font-family: var(--mc-pixel); font-size-adjust: .5; color: #fff; }
.jg-logros-cab .jg-xp-barra { flex: 1 1 200px; max-width: 400px; }
.jg-logros-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.jg-logros-tab {
    width: 56px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
    background: #8b8b8b; border: 2px solid #000; border-bottom: 0;
    box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px 0 0 #555; color: #000;
}
.jg-logros-tab img { image-rendering: pixelated; }
.jg-logros-tab.activa { background: #c6c6c6; height: 56px; margin-bottom: -4px; }
.jg-logros-tab:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.jg-logros-ventana { border: 4px solid #c6c6c6; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #555; background: #000; max-height: 600px; overflow: auto; }
.jg-arbol { position: relative; background-repeat: repeat; background-size: 32px 32px; image-rendering: pixelated; min-width: 100%; }
.jg-arbol::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); pointer-events: none; }
.jg-arbol svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.jg-linea-borde { fill: none; stroke: #000; stroke-width: 6; }
.jg-linea { fill: none; stroke: #fff; stroke-width: 2; }
.jg-logro {
    position: absolute; width: 52px; height: 52px; padding: 0; border: 0; cursor: pointer;
    background: transparent no-repeat 0 0 / 100% 100%; image-rendering: pixelated;
    display: flex; align-items: center; justify-content: center;
}
.jg-logro img { image-rendering: pixelated; pointer-events: none; }
.jg-logro:not(.hecho) img { filter: saturate(.85); }
.jg-logro:hover, .jg-logro:focus-visible { filter: brightness(1.15); outline: 2px solid #fff; outline-offset: 1px; z-index: 2; }
.jg-logro-tip { position: fixed; z-index: 1090; min-width: 220px; max-width: 320px; pointer-events: none; font-family: var(--mc-pixel); font-size-adjust: .5; background: rgba(16, 0, 16, .94); border: 2px solid #28007f; }
.jg-logro-tip-titulo { padding: .45rem .7rem; color: #fff; background: #0c4ca7; text-shadow: 2px 2px 0 #000; border-bottom: 2px solid #000; }
.jg-logro-tip-titulo.hecho { background: #c39b00; }
.jg-logro-tip-titulo.hecho.jg-tipo-challenge { background: #8a2be2; }
.jg-logro-tip-desc { padding: .45rem .7rem 0; }
.jg-logro-tip-meta { padding: .3rem .7rem .5rem; color: #aaa; font-size: .9em; }

/* Actividad */
.jg-act-resumen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.jg-act-resumen > div { background: rgba(255, 255, 255, .05); border: 2px solid #262626; padding: .5rem .7rem; }
.jg-act-resumen small { display: block; color: #aaa; }
.jg-act-resumen b { font-family: var(--mc-pixel); font-size-adjust: .5; font-weight: 400; font-size: 1.2rem; color: #55ff55; }
.jg-barras { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-bottom: 1.3rem; border-bottom: 2px solid #3a3a3a; }
.jg-barra { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.jg-barra span { display: block; width: 100%; min-height: 2px; background: linear-gradient(#80ff20, #3c8527); box-shadow: inset -2px 0 0 rgba(0, 0, 0, .35); }
.jg-barra small { position: absolute; bottom: -1.3rem; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; color: #aaa; }
.jg-calor { display: grid; grid-template-columns: 3rem repeat(24, minmax(10px, 1fr)); gap: 2px; overflow-x: auto; font-size: .72rem; }
.jg-calor-h, .jg-calor-d { color: #aaa; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-calor-c { height: 16px; background: rgba(85, 255, 85, calc(.06 + var(--n, 0) * .94)); border: 1px solid #111; }

/* Hazañas */
.jg-hazanas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.jg-hazanas h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.jg-hazanas dl { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; margin: 0; }
.jg-hazanas dt { font-weight: 400; color: #aaa; }
.jg-hazanas dd { margin: 0; color: #fff; text-align: right; font-family: var(--mc-pixel); font-size-adjust: .5; }

/* Aviso tipo logro */
.jg-toast {
    position: fixed; right: 1rem; top: 5rem; z-index: 1095; transform: translateX(130%); visibility: hidden;
    background: #212121; color: #ffff55; border: 2px solid #000; padding: .6rem 1rem;
    box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #111, 4px 4px 0 rgba(0, 0, 0, .5);
    font-family: var(--mc-pixel); font-size-adjust: .5; transition: transform .25s steps(5), visibility .25s;
}
.jg-toast.visible { transform: none; visibility: visible; }

/* ---------- Clasificación ---------- */
.jg-tablas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.jg-tabla-titulo { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin-bottom: .6rem; }
.jg-tabla-titulo img { image-rendering: pixelated; }
.jg-top { list-style: none; padding: 0; margin: 0; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-top li { display: flex; align-items: center; gap: .5rem; padding: .2rem .3rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.jg-top li.jg-oculta { display: none; }
.jg-puesto { width: 1.8rem; text-align: right; color: #888; }
.jg-podio-1 .jg-puesto { color: #ffaa00; } .jg-podio-2 .jg-puesto { color: #e0e0e0; } .jg-podio-3 .jg-puesto { color: #cd7f32; }
.jg-podio-1 { background: rgba(255, 170, 0, .1); }
.jg-top-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.jg-top-nombre img { image-rendering: pixelated; flex: 0 0 auto; }
.jg-top-valor { color: #55ff55; white-space: nowrap; }

/* ---------- Directorio ---------- */
.jg-dir-barra, .jg-merc-barra { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.jg-dir-barra .form-select, .jg-merc-barra .form-select { max-width: 220px; }
.jg-buscador { position: relative; flex: 1 1 260px; max-width: 420px; }
.jg-sugerencias { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; list-style: none; margin: 2px 0 0; padding: .25rem; }
.jg-sugerencias a { display: flex; gap: .5rem; align-items: center; padding: .3rem .5rem; color: #fff; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-sugerencias img { image-rendering: pixelated; }
.jg-sugerencias li[aria-selected="true"] a, .jg-sugerencias a:hover { background: rgba(80, 0, 255, .35); color: #ffff55; }
.jg-directorio { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .5rem; }
.jg-dir-jugador { display: flex; gap: .6rem; align-items: center; padding: .4rem; background: rgba(0, 0, 0, .55); border: 2px solid #000; color: #fff; height: 100%; }
.jg-dir-jugador:hover, .jg-dir-jugador:focus-visible { border-color: #5000ff; background: rgba(16, 0, 16, .9); color: #ffff55; }
.jg-dir-jugador img { image-rendering: pixelated; }
.jg-dir-texto { display: flex; flex-direction: column; min-width: 0; }
.jg-dir-nombre { font-family: var(--mc-pixel); font-size-adjust: .5; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-dir-meta { font-size: .8rem; color: #aaa; }
.jg-vacio-lista { color: #ccc; }

/* ---------- Clanes ---------- */
.jg-records-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .75rem; margin-bottom: 1rem; }
.jg-record { display: flex; flex-direction: column; gap: .1rem; }
.jg-record b { font-family: var(--mc-pixel); font-size-adjust: .5; font-weight: 400; font-size: 1.4rem; color: #fff; }
.jg-clan { margin-bottom: 1rem; padding: 1rem 1.2rem; scroll-margin-top: 5rem; }
.jg-clan:target { outline: 3px solid #ffff55; }
.jg-clan-cab { display: flex; gap: .9rem; align-items: center; margin-bottom: .6rem; }
.jg-clan-nombre { font-size: 1.4rem; margin: 0; }
.jg-clan-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; margin: 0; }
.jg-clan-datos div { background: rgba(0, 0, 0, .08); border: 2px solid #8b8b8b; padding: .3rem .5rem; }
.jg-clan-datos dt { font-weight: 400; font-size: .8rem; color: #4a4a4a; }
.jg-clan-datos dd { margin: 0; font-family: var(--mc-pixel); font-size-adjust: .5; font-size: 1.15rem; color: #202020; }
.jg-miembros { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.jg-miembro { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .5rem; background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737; color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.jg-miembro img { image-rendering: pixelated; }
.jg-miembro small { color: #e0e0e0; }
.jg-miembro .jg-rango-lider { color: #ffff55; }
.jg-miembro .jg-rango-oficial { color: #55ffff; }
.jg-historial { margin-top: .8rem; }
.jg-historial summary { cursor: pointer; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-historial ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.jg-res-victoria b { color: #1d7a1d; } .jg-res-derrota b, .jg-res-rendicion b { color: #a11; }

/* ---------- Castillos ---------- */
.jg-castillos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.jg-castillo header { display: flex; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.jg-castillo h3 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.jg-castillo-sub { margin: 0; color: #aaa; font-size: .9rem; }
.jg-castillo-datos { list-style: none; padding: 0; margin: 0 0 .5rem; color: #d0d0d0; font-size: .92rem; }
.jg-castillo-datos li { margin-bottom: .15rem; }
.jg-integridad { display: inline-block; width: 90px; height: 10px; background: #000; border: 2px solid #000; vertical-align: -1px; }
.jg-integridad span { display: block; height: 100%; background: linear-gradient(#80ff20, #3c8527); }
.jg-castillo-dueno { display: inline-flex; gap: .35rem; align-items: center; font-family: var(--mc-pixel); font-size-adjust: .5; color: #8f8fff; }
.jg-castillo-dueno img { image-rendering: pixelated; }

/* ---------- Mercado ---------- */
.jg-ricos { margin-bottom: 1rem; max-width: 420px; }
.jg-ricos h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.jg-mercado { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .35rem; }
.jg-mercado li { display: flex; gap: .55rem; align-items: center; padding: .25rem .4rem; background: rgba(0, 0, 0, .55); border: 2px solid #000; cursor: default; }
.jg-mercado li:hover, .jg-mercado li:focus-visible { border-color: #5000ff; background: rgba(16, 0, 16, .9); outline: none; }
.jg-merc-texto { display: flex; flex-direction: column; min-width: 0; }
.jg-merc-nombre { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-merc-precios { display: flex; gap: .7rem; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-flotante { position: fixed; z-index: 1090; pointer-events: none; max-width: 320px; font-family: var(--mc-pixel); font-size-adjust: .5; }
.jg-flotante .mc-nombre { color: #fff; }

/* Vincular */
.jg-aviso-recompensa { display: flex; gap: .7rem; align-items: center; color: #ffff55; }
.jg-aviso-recompensa img { image-rendering: pixelated; }

/* Admin */
.jg-admin .jg-admin-banner { max-width: 100%; height: auto; image-rendering: pixelated; border: 2px solid #000; }
.jg-admin .jg-admin-tabla { max-width: 640px; }

@media (max-width: 575.98px) {
    .jg-cabecera { padding: .9rem; }
    .jg-skin { width: 100%; }
    .jg-filtro { margin-left: 0; max-width: none; flex: 1 1 100%; }
    .jg-tabla-objetos th:nth-child(n+5), .jg-tabla-objetos td:nth-child(n+5) { display: none; }
}

/* ---------- Perfil de un rango VIP (data/rangos.json): borde del color del rango; LEYENDA, marco de oro ---------- */
.jg-cabecera.jg-vip { box-shadow: inset 0 0 0 3px var(--rango), 0 0 24px color-mix(in srgb, var(--rango) 35%, transparent); }
.jg-cabecera.jg-vip-leyenda {
    border: 4px solid transparent;
    border-image: linear-gradient(135deg, #fff2a8, #ffc93a 30%, #9a5e08 55%, #ffe27a 80%, #b97a0c) 1;
    box-shadow: 0 0 28px rgba(255, 201, 58, .45);
}
.jg-cabecera.jg-vip .jg-skin { background: radial-gradient(closest-side, color-mix(in srgb, var(--rango) 40%, transparent), transparent 80%); }
