/* Rosetta · "Nexo": fondo claro, azul marino y rojo del logo, el jugador en el centro de sus webs */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #14213d; --ink2: #5b667d; --ink3: #97a0b3; --line: #e4e8f0; --accent: #14213d; --red: #e63946; --soft: #eef1f7;
  --ok: #0f8a62; --warn: #b45f06; --shut: #8b93a5; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: Sora, -apple-system, sans-serif; color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
  background: #fff linear-gradient(180deg, #f3f5fa, #fff 480px) no-repeat; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* cabecera */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem; background: rgba(243,245,250,.9); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .65rem; } .brand span { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #14213d; }
.topsearch { position: relative; flex: 1; max-width: 460px; margin: 0 auto; }
.topsearch input { width: 100%; padding: .6rem 1.1rem; border: 1px solid #dbe0ea; border-radius: 999px; font: inherit; font-size: .9rem; background: #fff; box-shadow: 0 6px 20px -12px rgba(20,33,61,.45); }
.topsearch input:focus, .bigsearch input:focus { outline: 3px solid rgba(230,57,70,.22); border-color: var(--red); }
.lang { margin-left: auto; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; padding: .3rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--ink2); }
.lang button.on { background: var(--accent); color: #fff; }

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.2rem 3.5rem; }

/* portada */
.hero { text-align: center; padding: 4rem 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.08; } .hero h1 em { font-style: normal; color: var(--red); }
.hero p { color: var(--ink2); max-width: 540px; margin: 1rem auto 1.8rem; line-height: 1.65; }
.bigsearch { position: relative; max-width: 600px; margin: 0 auto; }
.bigsearch input { width: 100%; font: inherit; padding: 1.1rem 1.5rem; border-radius: 999px; border: 1px solid #dbe0ea; background: #fff; box-shadow: 0 18px 40px -18px rgba(20,33,61,.5); }
.drop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 50px -20px rgba(20,33,61,.4); z-index: 30; text-align: left; max-height: 55vh; overflow-y: auto; }
.opt { display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; } .opt:hover, .opt.sel { background: var(--soft); }
.opt b { font-weight: 600; font-size: .92rem; } .opt .m { color: var(--ink2); font-size: .8rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 1.4rem; color: var(--ink2); text-align: center; }
.stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; margin: 2rem 0 1rem; text-align: center; }
.stat b { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.04em; } .stat span { color: var(--ink2); font-size: .8rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .85rem; }
.pcard { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; transition: transform .15s, border-color .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 16px 30px -18px rgba(20,33,61,.6); }
.pcard .t { flex: 1; min-width: 0; } .pcard .t b { display: block; font-size: .95rem; font-weight: 700; } .pcard .t small { display: block; color: var(--ink2); font-size: .78rem; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-family: var(--mono); font-size: .72rem; font-weight: 600; color: var(--red); background: #fdecee; border-radius: 999px; padding: .2rem .55rem; white-space: nowrap; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; margin-top: 2.5rem; }
.feat > div { background: var(--soft); border-radius: 18px; padding: 1.3rem; } .feat h3 { font-size: .98rem; margin-bottom: .4rem; } .feat p { color: var(--ink2); font-size: .86rem; line-height: 1.6; }

/* retratos */
.av { position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* las fotos de Commons suelen ser de cuerpo o medio cuerpo: se encuadra la parte alta, donde está la cara */
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; background: #fff; }
.credit { text-align: center; color: var(--ink3); font-size: .68rem; margin: -.3rem auto .4rem; max-width: 640px; line-height: 1.4; } .credit a { text-decoration: underline; } .credit a:hover { color: var(--red); }
/* portada: tarjetas verticales con la foto grande */
#feat { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#feat .pcard { flex-direction: column; text-align: center; gap: .75rem; padding: 1.2rem .7rem 1rem; }
#feat .av { width: 120px; height: 120px; max-width: 100%; height: auto; aspect-ratio: 1; font-size: 1.8rem; }
#feat .pcard .t { width: 100%; }
#feat .pcard .t small { white-space: normal; line-height: 1.45; margin-top: .3rem; }
@media (max-width: 900px) { #feat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { #feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feat-credit { max-width: 900px; margin: .8rem auto 0; } .drop .credit { margin: .4rem auto; padding: 0 .8rem; }
.av.xl { width: 100%; height: auto; aspect-ratio: 1; font-size: clamp(1.4rem, 4vw, 2.3rem); box-shadow: 0 0 0 10px rgba(20,33,61,.11); }

/* órbita */
.back { display: inline-block; margin: 1rem 0 0; color: var(--ink2); font-size: .85rem; } .back:hover { color: var(--red); }
.orbit { position: relative; width: min(600px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit.solo { width: 160px; margin-top: 1rem; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; } .orbit line { stroke: var(--accent); stroke-opacity: .18; stroke-width: .25; }
.node { position: absolute; transform: translate(-50%, -50%); }
.node .logo { width: clamp(32px, 8vw, 54px); height: clamp(32px, 8vw, 54px); border-radius: 50%; box-shadow: 0 8px 20px -8px rgba(20,33,61,.4); transition: transform .15s; }
.node:hover .logo, .node:focus-visible .logo { transform: scale(1.2); }
.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22%; }
.core::after { content: ""; position: absolute; right: 2%; top: 2%; width: 24%; aspect-ratio: 1; border-radius: 50%; background: var(--red); border: 3px solid #fff; }
.orbit.solo .core { width: 70%; }

/* datos del jugador */
.fh { text-align: center; margin-top: .6rem; }
.fh h1 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.rid { display: inline-flex; align-items: center; gap: .6rem; margin-top: .8rem; padding: .35rem .4rem .35rem .9rem; background: var(--ink); color: #fff; border: 0; border-radius: 99px; cursor: pointer; font: inherit; }
.rid small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.rid code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .92rem; font-weight: 600; background: #fff; color: var(--ink); border-radius: 99px; padding: .15rem .7rem; min-width: 14ch; text-align: center; }
.rid:hover code { color: var(--red); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .45rem .85rem; font-size: .85rem; } .fact small { display: block; color: var(--ink3); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cnt { margin-top: 1rem; color: var(--ink2); font-size: .86rem; } .cnt b { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; } .dot.open { background: var(--red); } .dot.shut { background: var(--shut); }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
.btn { border: 1px solid #dbe0ea; background: #fff; border-radius: 999px; padding: .55rem 1.1rem; font-size: .82rem; font-weight: 600; color: var(--ink); }
.btn:hover { border-color: var(--red); color: var(--red); } .btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.pri:hover { color: #fff; background: var(--red); border-color: var(--red); }
.warn { display: inline-block; margin-top: .9rem; font-size: .8rem; color: var(--warn); background: #fff4e5; border-radius: 10px; padding: .45rem .75rem; }

/* listas de proveedores */
h2.sec { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 800; margin-top: 2.6rem; } h2.sec em { font-style: normal; font-size: .72rem; font-weight: 700; color: #fff; background: var(--red); border-radius: 999px; padding: .15rem .55rem; }
.secsub { color: var(--ink2); font-size: .82rem; margin: .25rem 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: .8rem; }
.tile { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .85rem; position: relative; }
.tile.link:hover { border-color: var(--red); box-shadow: 0 14px 28px -18px rgba(20,33,61,.65); }
.tile.closed { background: #f5f6f8; border: 1px dashed #cdd2dc; } .tile.closed .logo { filter: grayscale(1); opacity: .75; } .tile.closed b { color: #58617a; }
.logo { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; background: #fff; border: 1px solid rgba(0,0,0,.09); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; color: #58617a; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* logos que llegan al borde de su imagen: necesitan margen dentro del cuadro (y más en los círculos de la órbita) */
.logo img[src*="/11v11."] { padding: 13%; }
.logo img[src*="/eufootball."] { padding: 5%; }
.node .logo img[src*="/11v11."] { padding: 18%; }
.node .logo img[src*="/eufootball."] { padding: 17%; }
.logo img[src*="/footballdatabase."], .logo img[src*="/soccerbase."] { padding: 6%; }
.logo img[src*="/bdfa."], .logo img[src*="/soccerpunter."] { padding: 5%; }
.node .logo img[src*="/footballdatabase."] { padding: 18%; }
.node .logo img[src*="/soccerbase."] { padding: 16%; }
.node .logo img[src*="/bdfa."], .node .logo img[src*="/soccerpunter."] { padding: 10%; }
.node .logo img[src*="/SoFifa."] { padding: 9%; }
.tile .body { flex: 1; min-width: 0; } .tile .body b { display: block; font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.idbox { font-family: var(--mono); font-size: .78rem; color: var(--ink2); word-break: break-all; cursor: copy; margin-top: .15rem; } .idbox:hover { color: var(--red); } .idbox .cp { margin-left: .4rem; font-size: .66rem; color: var(--ok); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: .3rem .55rem; margin-top: .3rem; font-size: .64rem; } .meta:empty { display: none; }
.how { color: var(--ink3); } .st { font-weight: 600; } .st.verificado { color: var(--ok); } .st.del_proyecto, .st.de_wikidata { color: var(--ink3); } .st.sin_verificar { color: var(--warn); }
.note { color: var(--ink3); font-size: .68rem; line-height: 1.35; }
.side { display: flex; flex-direction: column; align-items: center; gap: .45rem; align-self: stretch; }
/* toda la tarjeta es el enlace: una capa por encima de la tarjeta; el id y el "?" quedan por encima de la capa */
.cover { position: absolute; inset: 0; border-radius: 18px; }
.cover:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; }
.tile.link { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; } .tile.link:hover { transform: translateY(-2px); }
.idline { display: flex; align-items: center; gap: .4rem; } .idbox { position: relative; z-index: 2; width: fit-content; max-width: 100%; }
.mini { position: relative; z-index: 2; color: var(--ink3); display: flex; } .mini:hover { color: var(--red); }
.q, .how, .st { position: relative; z-index: 2; }
.ico { margin-top: auto; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--ink3); opacity: .55; }
.tile.link:hover .ico { opacity: 1; color: var(--red); }
.lock { margin-top: auto; width: 30px; height: 30px; color: var(--shut); display: flex; align-items: center; justify-content: center; }
.q { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 1px solid #d8dde8; color: var(--ink2); font-size: .66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: help; }
.q:hover, .q:focus { background: var(--red); border-color: var(--red); color: #fff; outline: none; }
.q .tip { position: absolute; right: -4px; top: 26px; z-index: 10; width: max-content; max-width: min(230px, 70vw); background: var(--ink); color: #fff; font-size: .74rem; font-weight: 500; line-height: 1.45; padding: .55rem .7rem; border-radius: 10px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; text-align: left; }
.q:hover .tip, .q:focus .tip { opacity: 1; visibility: visible; }

footer { border-top: 1px solid var(--line); padding: 1.6rem 1.5rem 2rem; color: var(--ink2); font-size: .76rem; line-height: 1.6; text-align: center; }
footer p { max-width: 820px; margin: .2rem auto; }
footer .by { font-size: .95rem; font-weight: 600; color: var(--ink); } footer .contact { font-size: .84rem; margin-bottom: 1rem; }
footer .by a, footer .contact a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; } footer .by a:hover, footer .contact a:hover { color: var(--red); }
@media (max-width: 720px) { .top { padding: .6rem 1rem; } .topsearch { display: none !important; } main { padding: 0 1rem 2.5rem; } .stats { gap: 1.4rem; } }
