/* xp2 (24-10-2026): Ape XP for the people who can see it (the superadmins until the launch, xp3): the ring in the menu,
   the card on /profile, the celebration and /xp. --xp-c = the rank's colour, --xp-p = % of the way to the next level. */
@property --xp-p { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------- Ring (menu avatar) ---------- */
.user-chip > .xp-ava, .drawer-me > .xp-ava { overflow: visible; }     /* the chip clips its spans (basc.css) */
.xp-ava { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
    background: conic-gradient(var(--xp-c) calc(var(--xp-p) * 1%), rgba(255,255,255,0.13) 0);
    animation: xp-fill 1.1s cubic-bezier(.2,.8,.2,1) both; }
.xp-ava img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #12052a; box-shadow: none !important; }
.xp-ava--lg { width: 46px; height: 46px; }
.xp-ava--lg img { width: 40px; height: 40px; }
.xp-lv { position: absolute; z-index: 1; right: -6px; bottom: -4px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; display: grid; place-items: center;
    font-style: normal; font-size: 0.66rem; font-weight: 900; line-height: 1; color: var(--xp-c); background: #0d0920;
    border: 1.5px solid var(--xp-c); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #12052a, 0 0 10px color-mix(in srgb, var(--xp-c) 55%, transparent); }
.user-chip.has-xp { padding-left: 3px; }
.user-chip.has-xp:hover .xp-ava { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--xp-c) 60%, transparent)); }
@keyframes xp-fill { from { --xp-p: 0; } }

/* The "+N XP" toast under the menu chip (xp.js: what changed since your last page) */
.xp-toast { position: fixed; z-index: 120; padding: 7px 14px; border-radius: 999px; font-weight: 900; font-size: 0.86rem; color: #0b0f17;
    background: var(--xp-c, #3ddc84); box-shadow: 0 10px 30px color-mix(in srgb, var(--xp-c, #3ddc84) 45%, transparent);
    pointer-events: none; animation: xp-toast 2.8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes xp-toast { 0% { opacity: 0; transform: translateY(-6px) scale(.8); } 12% { opacity: 1; transform: translateY(0) scale(1.06); }
    20% { transform: scale(1); } 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } }

/* Drawer (phones): your rank and progress under your name */
.drawer-xp { position: relative; display: grid !important; gap: 2px; margin: 10px 0 8px; padding: 10px 14px 14px !important; border-radius: 14px;
    background: color-mix(in srgb, var(--xp-c) 10%, rgba(0,0,0,0.25)); border: 1px solid color-mix(in srgb, var(--xp-c) 35%, transparent); overflow: hidden; }
.drawer-xp span { font-size: 0.92rem; } .drawer-xp b { color: var(--xp-c); }
.drawer-xp small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.drawer-xp i { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--xp-p) * 1%); background: var(--xp-c); border-radius: 0 3px 3px 0; animation: xp-fill 1.1s cubic-bezier(.2,.8,.2,1) both; }

/* ---------- Big ring, pill, bar ---------- */
.xp-ring { --size: 92px; display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%; position: relative;
    background: radial-gradient(closest-side, #0d0920 80%, transparent 81% 100%), conic-gradient(var(--xp-c) calc(var(--xp-p) * 1%), rgba(255,255,255,0.08) 0);
    box-shadow: 0 0 34px color-mix(in srgb, var(--xp-c) 28%, transparent), inset 0 0 0 1px rgba(255,255,255,0.06);
    animation: xp-fill 1.4s cubic-bezier(.2,.8,.2,1) both; }
.xp-ring-in { display: grid; text-align: center; line-height: 1; }
.xp-ring-in b { font-size: calc(var(--size) * 0.36); font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 18px color-mix(in srgb, var(--xp-c) 60%, transparent); }
.xp-ring-in small { margin-top: 4px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.xp-ring--lg { --size: 116px; }
.xp-ring--xl { --size: 150px; }
.xp-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 900; letter-spacing: 0.01em; white-space: nowrap;
    color: var(--xp-c); background: color-mix(in srgb, var(--xp-c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--xp-c) 45%, transparent); }
.xp-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--xp-c); box-shadow: 0 0 10px var(--xp-c); }
.xp-pill em { font-style: normal; font-weight: 700; color: #e2e8f0; }
.xp-bar { display: grid; gap: 8px; }
.xp-bar-track { height: 10px; border-radius: 10px; background: rgba(255,255,255,0.07); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.xp-bar-track i { display: block; height: 100%; width: calc(var(--xp-p) * 1%); min-width: 6px; border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--xp-c) 55%, #fff 0%), var(--xp-c)); box-shadow: 0 0 14px color-mix(in srgb, var(--xp-c) 60%, transparent);
    animation: xp-fill 1.4s cubic-bezier(.2,.8,.2,1) both; }
.xp-bar-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.84rem; color: var(--muted); font-weight: 700; }
.xp-bar-text b { color: #fff; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* ---------- Profile card ---------- */
.xp-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border-radius: var(--radius);
    background: radial-gradient(520px 260px at 0% 0%, color-mix(in srgb, var(--xp-c) 14%, transparent), transparent 70%), linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    border: 1px solid color-mix(in srgb, var(--xp-c) 30%, var(--line)); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.xp-card-main { display: grid; gap: 18px; min-width: 0; }
.xp-card-top { display: flex; align-items: center; gap: 20px; }
.xp-card-id { display: grid; gap: 6px; min-width: 0; }
.xp-card-id .xp-pill { justify-self: start; }
.xp-card-xp { font-size: 1.9rem; font-weight: 900; line-height: 1.1; } .xp-card-xp b { font-variant-numeric: tabular-nums; }
.xp-card-id small { color: var(--muted); font-size: 0.86rem; }
.xp-split, .xpl-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xp-split span, .xpl-split span { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,0.25); border: 1px solid var(--line); }
.xp-split small, .xpl-split small { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.xp-split b, .xpl-split b { font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.xp-split-create { box-shadow: inset 3px 0 0 #f97316; } .xp-split-eco { box-shadow: inset 3px 0 0 #00ddeb; } .xp-split-play { box-shadow: inset 3px 0 0 #a78bfa; }
.xp-sites { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.86rem; color: var(--muted); font-weight: 700; }
.xp-sites span { display: inline-flex; align-items: center; gap: 7px; } .xp-sites b { color: #fff; font-variant-numeric: tabular-nums; }
.xp-sites img { border-radius: 50%; }
/* xelogo1 (Mortimer, 25-10-2026: «este no es el icono original de xelementia»): XElementia's own logo (static/img/tribes/
   xelementia-logo.webp, the one of the home tribes and the Passport) instead of a rainbow dot; whole, never cut round */
.xp-sites img.xp-xe-logo { width: auto; height: 24px; margin: -3px 0; border-radius: 0; }
.xp-card-recent { margin-top: 22px; }
.xp-card-recent h3 { margin: 0 0 10px; font-size: 1rem; font-weight: 900; }
.xp-preview { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 0.86rem; font-weight: 700;
    color: #fbcfe8; background: rgba(255,111,181,0.08); border: 1px dashed rgba(255,111,181,0.4); }

/* ADN Ape pentagon */
.xp-adn { margin: 0; display: grid; gap: 10px; justify-items: center; }
.xp-adn-plot { position: relative; width: min(100%, 300px); aspect-ratio: 1; }
.xp-adn--big .xp-adn-plot { width: min(100%, 430px); }
.xp-adn svg { position: absolute; inset: 14%; width: 72%; height: 72%; overflow: visible; }
.xp-adn-grid { fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 0.8; }
.xp-adn-grid:last-of-type { stroke: rgba(255,255,255,0.16); }
.xp-adn-axis { stroke: rgba(255,255,255,0.08); stroke-width: 0.8; }
.xp-adn-shape { fill: color-mix(in srgb, var(--xp-c) 30%, transparent); stroke: var(--xp-c); stroke-width: 2; stroke-linejoin: round;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--xp-c) 60%, transparent)); transform-origin: 100px 100px; animation: xp-adn 1.1s .2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes xp-adn { from { transform: scale(0.1); opacity: 0; } }
.xp-adn.is-empty .xp-adn-shape { opacity: 0.35; }
/* labels sit on the corners of the outer pentagon (the SVG is 72% of the box, from 14%: _xp.html places them) */
.xp-adn-l { position: absolute; display: grid; text-align: center; line-height: 1.1; transform: translate(-50%, -50%); white-space: nowrap; }
.xp-adn-l b { font-size: 0.78rem; font-weight: 900; color: #e2e8f0; }
.xp-adn-l small { font-size: 0.72rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.xp-adn-l.is-top b { color: var(--xp-c); }
.xp-adn-l--0 { margin-top: -18px; } .xp-adn-l--1 { margin-left: 26px; } .xp-adn-l--2 { margin: 14px 0 0 12px; } .xp-adn-l--3 { margin: 14px 0 0 -12px; } .xp-adn-l--4 { margin-left: -26px; }
.xp-adn figcaption { font-size: 0.86rem; color: var(--muted); text-align: center; } .xp-adn figcaption b { color: var(--xp-c); }

/* Movements */
.xp-moves { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.xp-moves li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,0.22); border: 1px solid var(--line); }
.xp-move-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.xp-move-dot--create { background: #f97316; box-shadow: 0 0 10px #f97316; } .xp-move-dot--eco { background: #00ddeb; box-shadow: 0 0 10px #00ddeb; } .xp-move-dot--play { background: #a78bfa; box-shadow: 0 0 10px #a78bfa; }
.xp-move-main { display: grid; min-width: 0; flex: 1; }
.xp-move-main b { font-size: 0.92rem; }
.xp-move-main a, .xp-move-main span { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-move-main a:hover { color: var(--cyan); }
.xp-move-side { display: grid; justify-items: end; flex: none; }
.xp-move-side b { color: #4ade80; font-weight: 900; font-variant-numeric: tabular-nums; }
.xp-move-side small { font-size: 0.74rem; color: var(--muted); }

/* ---------- Celebration ---------- */
.xpl { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.xpl[hidden] { display: none; }
.xpl-backdrop { position: absolute; inset: 0; background: rgba(5,2,12,0.78); backdrop-filter: blur(6px); animation: xpl-fade .35s both; }
.xpl-box { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; justify-items: center; gap: 14px; text-align: center;
    padding: 34px 28px 26px; border-radius: 24px; isolation: isolate; overflow-x: hidden;
    background: radial-gradient(420px 260px at 50% 0%, color-mix(in srgb, var(--xp-c) 26%, transparent), transparent 70%), linear-gradient(180deg, #1a0b38, #0d0620);
    border: 1px solid color-mix(in srgb, var(--xp-c) 45%, transparent); box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 80px color-mix(in srgb, var(--xp-c) 25%, transparent);
    animation: xpl-pop .6s cubic-bezier(.2,1.3,.3,1) both; }
.xpl-rays { position: absolute; z-index: -1; top: -160px; left: 50%; width: 520px; height: 520px; margin-left: -260px; border-radius: 50%; opacity: 0.45;
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--xp-c) 40%, transparent) 0 6deg, transparent 6deg 18deg);
    -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 100%); mask: radial-gradient(closest-side, #000 20%, transparent 100%);
    animation: xpl-spin 24s linear infinite; }
.xpl-eyebrow { font-size: 0.76rem; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; color: var(--xp-c); }
.xpl .xp-ring { animation: xp-fill 1.6s .25s cubic-bezier(.2,.8,.2,1) both, xpl-glow 2.4s 1.2s ease-in-out infinite; }
.xpl h2 { margin: 4px 0 0; font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 900; line-height: 1.1; }
.xpl h2 span { color: var(--xp-c); }
.xpl p { margin: 0; color: #d7deea; max-width: 360px; }
.xpl-split { width: 100%; }
.xpl-unlock { display: grid; gap: 3px; width: 100%; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--xp-c) 10%, rgba(0,0,0,0.3)); border: 1px solid color-mix(in srgb, var(--xp-c) 35%, transparent); }
.xpl-unlock small { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--xp-c); }
.xpl-unlock em { font-size: 0.8rem; color: var(--muted); font-style: normal; }
.xpl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; margin-top: 6px; }
.xpl-actions .btn { flex: 1 1 auto; white-space: nowrap; padding: 13px 20px; }
.xpl-note { font-size: 0.78rem !important; color: #fbcfe8 !important; }
.xpl.is-closing .xpl-box { animation: xpl-out .25s both; } .xpl.is-closing .xpl-backdrop { animation: xpl-fade .25s reverse both; }
@keyframes xpl-fade { from { opacity: 0; } }
@keyframes xpl-pop { from { opacity: 0; transform: translateY(30px) scale(0.86); } }
@keyframes xpl-out { to { opacity: 0; transform: scale(0.94); } }
@keyframes xpl-spin { to { transform: rotate(360deg); } }
@keyframes xpl-glow { 50% { box-shadow: 0 0 60px color-mix(in srgb, var(--xp-c) 55%, transparent), inset 0 0 0 1px rgba(255,255,255,0.08); } }
body.xpl-open { overflow: hidden; }

/* ---------- /xp ---------- */
.xp-head { overflow: hidden; background: radial-gradient(700px 360px at 100% 0%, color-mix(in srgb, var(--xp-c) 22%, transparent), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(249,115,22,0.16), transparent 70%), rgba(9,5,20,0.78); }
.xp-head-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 36px; align-items: center; }
.xp-head-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.xp-head-me { display: grid; gap: 16px; padding: 22px; border-radius: 20px; background: rgba(0,0,0,0.32); border: 1px solid color-mix(in srgb, var(--xp-c) 35%, var(--line)); backdrop-filter: blur(6px); }
.xp-head-me-top { display: flex; align-items: center; gap: 18px; }
.xp-head-me-top > div { display: grid; gap: 8px; min-width: 0; justify-items: start; }
.xp-head-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.1rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-head-name img { border-radius: 50%; }
.xp-head-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.xp-head-stats span { display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.xp-head-stats small { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.xp-head-stats b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.xp-head-built { color: var(--muted); font-size: 0.78rem; }
.xp-preview-wrap .xp-preview { margin: 22px 0 0; }

.xp-earn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.xp-earn-card { --tone: #f97316; display: grid; align-content: start; gap: 14px; padding: 22px; border-radius: var(--radius);
    background: linear-gradient(170deg, color-mix(in srgb, var(--tone) 12%, transparent), rgba(255,255,255,0.02) 55%); border: 1px solid color-mix(in srgb, var(--tone) 30%, var(--line));
    transition: transform .25s, box-shadow .25s; }
.xp-earn-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px color-mix(in srgb, var(--tone) 18%, transparent); }
.xp-earn-card--eco { --tone: #00ddeb; } .xp-earn-card--play { --tone: #a78bfa; }
.xp-earn-card header { display: grid; gap: 4px; }
.xp-earn-tag { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #0b0f17; background: var(--tone); }
.xp-earn-card h3 { margin: 6px 0 0; font-size: 1.25rem; font-weight: 900; }
.xp-earn-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.xp-earn-mine { margin-top: 4px; font-size: 1.3rem; font-weight: 900; color: var(--tone); font-variant-numeric: tabular-nums; }
.xp-earn-mine small { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.xp-earn-card ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.xp-earn-card li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,0.22); font-size: 0.88rem; }
.xp-earn-card li span { display: grid; gap: 1px; }
.xp-earn-card li small { font-size: 0.74rem; color: var(--muted); }
.xp-earn-card li b { flex: none; color: var(--tone); font-weight: 900; font-variant-numeric: tabular-nums; }

.xp-fire { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 30px; border-radius: 22px; overflow: hidden;
    background: radial-gradient(500px 260px at 0% 50%, rgba(249,115,22,0.3), transparent 70%), radial-gradient(400px 240px at 100% 100%, rgba(236,72,153,0.2), transparent 70%), rgba(14,6,28,0.85);
    border: 1px solid rgba(249,115,22,0.4); }
.xp-fire-flame { font-size: 4.4rem; line-height: 1; filter: drop-shadow(0 0 24px rgba(249,115,22,0.7)); animation: xp-flicker 2.6s ease-in-out infinite; }
@keyframes xp-flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
.xp-fire-copy h2 { margin: 10px 0 6px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 900; line-height: 1.1; }
.xp-fire-copy h2 span { color: var(--orange); }
.xp-fire-copy p { margin: 0; color: #e2e8f0; max-width: 560px; }
.xp-fire-copy p b { color: #fdba74; }
.xp-fire-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 210px; }
.xp-fire-steps li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,0.28); font-size: 0.86rem; font-weight: 700; color: #e2e8f0; }
.xp-fire-steps b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #f97316, #ec4899); font-weight: 900; color: #fff; }

.xp-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.xp-rank { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); transition: transform .25s, border-color .25s; }
.xp-rank:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--xp-c) 45%, transparent); }
.xp-rank-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; font-weight: 900; font-size: 1.05rem;
    color: var(--xp-c); background: color-mix(in srgb, var(--xp-c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--xp-c) 45%, transparent); }
.xp-rank-main { display: grid; gap: 2px; min-width: 0; }
.xp-rank-main b { color: var(--xp-c); font-size: 1.02rem; font-weight: 900; }
.xp-rank-main small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.xp-rank-main p { margin: 4px 0 0; font-size: 0.86rem; color: #d7deea; }
.xp-rank.is-done { opacity: 0.8; }
.xp-rank.is-here { background: linear-gradient(160deg, color-mix(in srgb, var(--xp-c) 16%, transparent), rgba(255,255,255,0.02)); border-color: var(--xp-c);
    box-shadow: 0 0 30px color-mix(in srgb, var(--xp-c) 22%, transparent); }
.xp-rank.is-here .xp-rank-badge { color: #0b0f17; background: var(--xp-c); }
.xp-rank-you, .xp-rank-ok { position: absolute; top: 12px; right: 12px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.xp-rank-you { padding: 3px 9px; border-radius: 999px; color: #0b0f17; background: var(--xp-c); }
.xp-rank-ok { color: var(--xp-c); font-size: 0.9rem; }

.xp-adn-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: 26px; border-radius: var(--radius);
    background: radial-gradient(400px 300px at 25% 50%, color-mix(in srgb, var(--xp-c) 10%, transparent), transparent 70%), rgba(255,255,255,0.02); border: 1px solid var(--line); }
.xp-facets { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.xp-facets li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.22); border: 1px solid var(--line); font-size: 0.88rem; }
.xp-facets li b { font-weight: 900; } .xp-facets li span { color: var(--muted); } .xp-facets li em { font-style: normal; font-weight: 900; font-variant-numeric: tabular-nums; }
.xp-facets li.is-top { border-color: color-mix(in srgb, var(--xp-c) 50%, transparent); } .xp-facets li.is-top b, .xp-facets li.is-top em { color: var(--xp-c); }

.xp-latest { max-width: 760px; }
.xp-fair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.xp-fair li { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.xp-fair b { font-weight: 900; } .xp-fair b::before { content: '✓'; margin-right: 8px; color: #4ade80; }
.xp-fair span { color: var(--muted); font-size: 0.88rem; }
.xp-fair li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }   /* xpage1: 7 rules, the last one alone takes the row */
.xp-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.xp-next li { position: relative; display: grid; gap: 4px; padding: 18px; border-radius: 16px; overflow: hidden;
    background: linear-gradient(160deg, rgba(147,112,219,0.1), rgba(255,255,255,0.02)); border: 1px dashed rgba(147,112,219,0.4); }
.xp-next li > span { font-size: 1.6rem; line-height: 1; }
.xp-next b { margin-top: 6px; font-weight: 900; } .xp-next small { color: var(--muted); font-size: 0.86rem; }
.xp-next li::after { content: 'Soon'; position: absolute; top: 14px; right: 14px; padding: 2px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: #c4b5fd; border: 1px solid rgba(196,181,253,0.4); }

@media (max-width: 960px) {
    .xp-head-grid, .xp-card, .xp-adn-wrap { grid-template-columns: minmax(0, 1fr); }
    .xp-earn, .xp-fair, .xp-next { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .xp-fair li:last-child:nth-child(3n+1) { grid-column: auto; } .xp-fair li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .xp-fire { grid-template-columns: auto minmax(0, 1fr); } .xp-fire-steps { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .xp-card { padding: 18px; gap: 22px; }
    .xp-card-top { gap: 14px; } .xp-ring--lg { --size: 92px; } .xp-card-xp { font-size: 1.5rem; }
    .xp-split span, .xpl-split span { padding: 8px 10px; } .xp-split b, .xpl-split b { font-size: 1.05rem; }
    .xp-earn, .xp-fair, .xp-next { grid-template-columns: minmax(0, 1fr); }
    .xp-head-me { padding: 16px; } .xp-head-stats span { padding: 7px 9px; }
    .xp-fire { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 16px; text-align: left; } .xp-fire-flame { font-size: 3.2rem; }
    .xp-fire-steps { grid-template-columns: minmax(0, 1fr); }
    .xp-adn-wrap { padding: 16px; } .xp-facets li { grid-template-columns: minmax(0, 1fr) auto; } .xp-facets li span { grid-column: 1 / -1; grid-row: 2; }
    .xp-adn-l b { font-size: 0.72rem; } .xp-adn-l small { font-size: 0.66rem; }
    .xpl-box { padding: 28px 18px 20px; } .xp-ring--xl { --size: 124px; }
    .xp-moves li { padding: 9px 11px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .xp-ava, .xp-ring, .xp-bar-track i, .drawer-xp i, .xp-adn-shape, .xpl-rays, .xpl-box, .xp-fire-flame, .xp-toast { animation: none !important; }
}

/* xp3: /xp for a visitor (log in to see your level) and the unlocks still to come */
.xp-head-me--anon .xp-head-me-top > div { gap: 4px; }
.xp-head-me--anon .xp-head-name { white-space: normal; overflow: visible; }
.xp-head-me--anon .btn { justify-self: start; }
@media (max-width: 560px) { .xp-head-me--anon .btn { justify-self: stretch; justify-content: center; text-align: center; white-space: nowrap; padding-inline: 12px; font-size: 0.92rem; } }
.xp-rank-soon { margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.1em;
    text-transform: uppercase; color: #c4b5fd; border: 1px solid rgba(196,181,253,0.4); vertical-align: middle; }

/* ---------- xp4 (25-10-2026): the season race, the weekly streak and La Jungla on /xp ---------- */
.xps-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.xps-board, .xps-streak, .xps-last, .xps-jungle { border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); }
.xps-board { padding: 18px 18px 16px; }
.xps-board > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.xps-board > header b { font-size: 1.05rem; font-weight: 900; } .xps-board > header small { color: var(--muted); }
.xps-top { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.xps-top li { display: grid; grid-template-columns: 38px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px;
    background: rgba(255,255,255,0.025); border: 1px solid transparent; }
.xps-top li.is-podium { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 16%, transparent), rgba(255,255,255,0.02)); border-color: color-mix(in srgb, var(--pc) 35%, transparent); }
.xps-top li.is-p1 { --pc: #ffc94a; } .xps-top li.is-p2 { --pc: #c9d3df; } .xps-top li.is-p3 { --pc: #e0905a; }
.xps-top li.is-me { outline: 2px solid var(--cyan); outline-offset: -2px; }
.xps-place { font-weight: 900; font-size: 0.95rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.is-podium .xps-place { font-size: 1.35rem; }
.xps-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.xps-name { display: flex; align-items: center; min-width: 0; font-weight: 800; }
.xps-name .xps-n { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xps-name .xp-tag { flex: none; margin-left: 6px; }
.xps-name .xps-who { color: inherit; text-shadow: none; background: none; padding: 0; margin: 0; cursor: pointer; }
.xps-xp { font-weight: 900; font-variant-numeric: tabular-nums; } .xps-xp small { color: var(--muted); font-weight: 700; }
.xps-empty, .xps-you { margin: 8px 0 0; color: var(--muted); }
.xps-you b { color: var(--text, #fff); }
.xps-prizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.xps-prizes li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 800;
    background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.xps-note { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); }
.xps-side { display: grid; gap: 18px; }
.xps-streak { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px; }
.xps-streak.is-on { background: linear-gradient(150deg, rgba(249,115,22,0.16), rgba(236,72,153,0.08)); border-color: rgba(249,115,22,0.45); }
.xps-streak-flame { font-size: 2.4rem; line-height: 1; filter: grayscale(1) opacity(.55); }
.xps-streak.is-on .xps-streak-flame { filter: none; animation: xp-tag-flick 2.4s ease-in-out infinite; }
.xps-streak b { font-weight: 900; } .xps-streak p { margin: 4px 0 10px; color: var(--muted); font-size: 0.9rem; } .xps-streak p b { color: #fdba74; }
.xps-streak small { color: var(--muted); font-size: 0.8rem; }
.xps-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.xps-steps li { text-align: center; padding: 4px 0; border-radius: 8px; font-size: 0.72rem; font-weight: 900; color: var(--muted); background: rgba(255,255,255,0.05); }
.xps-steps li.is-on { color: #fff7ed; background: linear-gradient(135deg, #f97316, #ec4899); }
.xps-last { padding: 16px 18px; } .xps-last > b { font-weight: 900; font-size: 0.9rem; }
.xps-last ol { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.xps-last li { display: grid; grid-template-columns: 24px 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem; }
.xps-last li img { border-radius: 50%; } .xps-last li small { color: var(--muted); font-weight: 700; }
.xps-jungle { margin-top: 18px; padding: 20px; background: linear-gradient(160deg, rgba(61,220,132,0.08), rgba(255,255,255,0.02)); border-color: rgba(61,220,132,0.25); }
.xps-jungle > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 14px; }
.xps-jungle h3 { margin: 4px 0 6px; font-size: 1.35rem; font-weight: 900; } .xps-jungle header p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
.xps-jungle .xps-mine { color: var(--text, #fff); font-weight: 700; text-align: right; max-width: 34ch; }
.xps-tribes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.xps-tribes li { position: relative; display: grid; align-content: start; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(0,0,0,0.22);
    border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); }
.xps-tribes li.is-lead { box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 60%, transparent), 0 0 22px color-mix(in srgb, var(--tc) 25%, transparent); }
.xps-tribes li.is-mine { background: color-mix(in srgb, var(--tc) 14%, rgba(0,0,0,0.22)); }
.xps-tribes li.is-mine::after { content: 'Your tribe'; position: absolute; top: 10px; right: 10px; font-size: 0.66rem; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--tc); }
.xps-tribe-place { font-weight: 900; color: var(--tc); font-variant-numeric: tabular-nums; }
.xps-tribes b { font-weight: 900; }
.xps-tribe-bar { display: block; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.xps-tribe-bar i { display: block; height: 100%; width: calc(var(--tw) * 1%); border-radius: inherit; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.xps-tribes small { color: var(--muted); font-size: 0.78rem; }
.xps-join { justify-self: start; padding: 6px 14px; font-size: 0.82rem; }
.xps-error { margin: 10px 0 0; color: #fca5a5; font-weight: 700; }
.xp-next li:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 1100px) {
    .xps-tribes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .xps-grid { grid-template-columns: minmax(0, 1fr); }
    .xps-jungle > header { grid-template-columns: minmax(0, 1fr); } .xps-jungle .xps-mine { text-align: left; }
    .xp-next li:last-child:nth-child(3n+2) { grid-column: auto; } .xp-next li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .xps-tribes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .xps-tribes li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .xps-top li { grid-template-columns: 30px 30px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
    .xps-ava { width: 30px; height: 30px; }
    .xp-next li:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .xps-streak.is-on .xps-streak-flame { animation: none; } }
/* xp4: this season on the /profile card */
.xp-season-chip { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; font-size: 0.86rem; color: var(--muted);
    text-decoration: none; background: rgba(255,201,74,0.07); border: 1px solid rgba(255,201,74,0.28); transition: border-color .2s ease; }
.xp-season-chip b { color: var(--text, #fff); } .xp-season-chip:hover { border-color: rgba(255,201,74,0.6); }
