/* roster.css — 🎭 «Every character on show, not every character to use» (2026-10-29): ONE look for a roster tile (js/roster.js)
   on every «Elige tu personaje» (the kid's profile, the PIN lobby) and for the rarity chips of the Draly Souk. The rarity is
   the frame's colour + a small label: Común grey · Raro blue · Épico purple · Legendario gold. Locked = the picture dimmed
   with 🔒 and its price; a SHADOW = the character's own picture with its colours put out (its alpha drawn black) and a gold
   glow, «?» over it; free / owned = full colour, the one in use with a gold ring and ✓. */
:root {
  --ro-comun: #a9afba; --ro-comun-bg: #eef0f3; --ro-comun-ink: #4b5361;
  --ro-raro: #3f7be0; --ro-raro-bg: #e4eefd; --ro-raro-ink: #1d4a9e;
  --ro-epico: #8a4fe0; --ro-epico-bg: #f0e7fd; --ro-epico-ink: #57289f;
  --ro-leg: #d9a93a; --ro-leg-2: #a8771c; --ro-leg-bg: #fff4d1; --ro-leg-ink: #6e4f0c;
  --ro-night: #1d1631; --ro-night-2: #33224d; --ro-glow: #ffd36a;
}
.ro-chip {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px;
  font: 800 10.5px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; letter-spacing: .02em; white-space: nowrap;
  background: var(--ro-comun-bg); color: var(--ro-comun-ink); box-shadow: inset 0 0 0 1.5px var(--ro-comun);
}
.ro-chip.ro-c-raro { background: var(--ro-raro-bg); color: var(--ro-raro-ink); box-shadow: inset 0 0 0 1.5px var(--ro-raro); }
.ro-chip.ro-c-epico { background: var(--ro-epico-bg); color: var(--ro-epico-ink); box-shadow: inset 0 0 0 1.5px var(--ro-epico); }
.ro-chip.ro-c-legendario { background: linear-gradient(180deg, #fff6d8, #ffe39a); color: var(--ro-leg-ink); box-shadow: inset 0 0 0 1.5px var(--ro-leg); }

/* the grid of tiles: 3 on a phone, more on a laptop */
.ro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .ro-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ro-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }

.ro-tile {
  --ro-f: var(--ro-comun); --ro-bg: var(--ro-comun-bg);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
  padding: 24px 6px 8px; border-radius: 16px; border: 0; margin: 0; text-align: center; text-decoration: none; color: #2a2320;
  background: #fffdf8; box-shadow: inset 0 0 0 2.5px var(--ro-f), 0 3px 0 rgba(28, 26, 23, .08);
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 120ms cubic-bezier(.23, 1, .32, 1), box-shadow 160ms ease;
}
.ro-tile:active { transform: scale(.96); }
.ro-tile:focus-visible { outline: 3px solid #5a1010; outline-offset: 2px; }
.ro-tile .ro-chip { position: absolute; top: 5px; left: 5px; }
.ro-tile.ro-r-raro { --ro-f: var(--ro-raro); --ro-bg: var(--ro-raro-bg); }
.ro-tile.ro-r-epico { --ro-f: var(--ro-epico); --ro-bg: var(--ro-epico-bg); }
.ro-tile.ro-r-legendario { --ro-f: var(--ro-leg); --ro-bg: var(--ro-leg-bg); box-shadow: inset 0 0 0 2.5px var(--ro-leg), inset 0 0 0 4px rgba(255, 228, 150, .6), 0 3px 0 rgba(28, 26, 23, .1); }
.ro-pic {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; max-width: 104px; border-radius: 14px; overflow: visible;
  background: radial-gradient(circle at 50% 58%, var(--ro-bg) 0 58%, transparent 72%);
}
.ro-pic img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.ro-pic.is-round img { border-radius: 50%; }
.ro-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%;
  font: 800 12.5px/1.15 'Baloo 2', 'Nunito', system-ui, sans-serif; min-height: 2.3em;
}
.ro-foot { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: 800 12px/1 'Nunito', system-ui, sans-serif; color: #5a4a3a; min-height: 18px; }
.ro-foot b { font-weight: 900; color: #2a2320; }
.ro-coin { width: 16px; height: 16px; flex: none; }
.ro-from { font-weight: 700; font-size: 10.5px; color: #7a6a58; }

/* locked: dimmed, 🔒, the price */
.ro-tile.is-locked .ro-pic img { filter: grayscale(.55) brightness(.95); opacity: .6; }
.ro-lockb {
  position: absolute; right: 2px; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #2a2320; color: #fff; box-shadow: 0 0 0 2.5px #fffdf8;
}
/* in use: a gold ring and ✓ */
.ro-tile.is-on { box-shadow: inset 0 0 0 3.5px #b88b2c, 0 0 0 3px rgba(232, 200, 120, .55), 0 3px 0 rgba(28, 26, 23, .1); background: #fff7e2; }
.ro-on { position: absolute; right: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #1f6b45; color: #fff; box-shadow: 0 0 0 2.5px #fff7e2; }
/* (✨ 2026-11-01) «¡Equipado!» under the one the kid plays as */
/* (a tab on the tile's bottom edge: it never makes the tile taller, so a row never jumps when the kid changes pick) */
.ro-foot.is-eq { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); z-index: 2; min-height: 0; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: linear-gradient(180deg, #fff1bd, #ffd36a); color: #4a3406; font-weight: 900;
  box-shadow: inset 0 0 0 1.5px #b88b2c, 0 2px 4px rgba(28, 26, 23, .18); }

/* a SHADOW (an unrevealed legendary) and an earned-only look: the night tile, the silhouette from the picture's own alpha,
   the gold glow, «?» */
.ro-tile.is-shadow, .ro-tile.is-earn {
  background: radial-gradient(120% 90% at 50% 30%, var(--ro-night-2), var(--ro-night) 70%); color: #fff4d6;
}
.ro-tile.is-shadow .ro-pic, .ro-tile.is-earn .ro-pic { background: radial-gradient(circle at 50% 55%, rgba(255, 211, 106, .38) 0 34%, rgba(255, 211, 106, 0) 66%); }
.ro-tile.is-shadow .ro-pic img, .ro-tile.is-earn .ro-pic img, .ro-shadow {
  filter: brightness(0) drop-shadow(0 0 1.5px rgba(255, 220, 130, .95)) drop-shadow(0 0 9px rgba(255, 196, 64, .7));
}
.ro-q {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 800 38px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; color: var(--ro-glow); text-shadow: 0 0 10px rgba(255, 190, 60, .9), 0 2px 0 #6e4f0c;
}
.ro-tile.is-shadow .ro-name, .ro-tile.is-earn .ro-name { color: #fff4d6; }
.ro-foot.is-gold { color: #ffe39a; }
.ro-foot.is-gold b { color: #fff; }
.ro-tile.is-earn .ro-foot { font-size: 10.5px; line-height: 1.15; text-align: center; min-height: 2.3em; }
@media (prefers-reduced-motion: no-preference) {
  .ro-tile.is-shadow .ro-pic::after, .ro-tile.is-earn .ro-pic::after {
    content: ''; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 18px 4px rgba(255, 200, 80, .35); animation: roGlow 3.2s ease-in-out infinite;
  }
}
@keyframes roGlow { 50% { opacity: .35; transform: scale(.94); } }

/* the sections of the picker: a tier's title with its chip and its count */
.ro-sec { margin: 18px 0 0; }
.ro-sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 800 15px/1.2 'Baloo 2', 'Nunito', system-ui, sans-serif; color: #2a2320; }
.ro-sec-h .ro-n { font: 700 12px/1 'Nunito', system-ui, sans-serif; color: #7a6a58; }
.ro-sec-sub { margin: -4px 0 8px; font: 600 12.5px/1.35 'Nunito', system-ui, sans-serif; color: #6b5d4f; }

/* «¡Se reveló un legendario!» / «¡Lo ganaste!»: once, the silhouette lights up into the character */
.ro-moment {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(90% 70% at 50% 40%, rgba(60, 40, 90, .92), rgba(20, 14, 34, .96));
}
.ro-moment-card { position: relative; width: min(360px, 100%); text-align: center; color: #fff4d6; }
.ro-moment-k { margin: 0 0 4px; font: 800 13px/1.2 'Nunito', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #ffe39a; }
.ro-moment-t { margin: 0 0 10px; font: 800 28px/1.1 'Baloo 2', 'Nunito', system-ui, sans-serif; }
.ro-moment-pic { position: relative; width: min(240px, 66vw); aspect-ratio: 1; margin: 0 auto; }
.ro-moment-pic img { width: 100%; height: 100%; object-fit: contain; filter: none; transition: filter 1100ms cubic-bezier(.23, 1, .32, 1); }
.ro-moment-pic.is-dark img { filter: brightness(0) drop-shadow(0 0 2px rgba(255, 220, 130, .95)) drop-shadow(0 0 14px rgba(255, 196, 64, .8)); }
.ro-moment-rays { position: absolute; inset: -18%; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 214, 110, .22) 0 10deg, transparent 10deg 24deg); opacity: 0; transition: opacity 900ms ease; }
.ro-moment-pic:not(.is-dark) .ro-moment-rays { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .ro-moment-pic:not(.is-dark) .ro-moment-rays { animation: roSpin 14s linear infinite; } }
@keyframes roSpin { to { transform: rotate(360deg); } }
.ro-moment-name { margin: 12px 0 2px; font: 800 22px/1.15 'Baloo 2', 'Nunito', system-ui, sans-serif; }
.ro-moment-sub { margin: 0 0 14px; font: 600 14px/1.35 'Nunito', system-ui, sans-serif; color: #f1e3c2; }
.ro-moment-acts { display: grid; gap: 8px; }
.ro-moment-go, .ro-moment-ok {
  display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 14px; border: 0; cursor: pointer;
  font: 800 16px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; text-decoration: none;
}
.ro-moment-go { background: linear-gradient(180deg, #f3d27a, #c9971c); color: #2a1d05; box-shadow: 0 4px 0 #8a6414; }
.ro-moment-ok { background: transparent; color: #fff4d6; box-shadow: inset 0 0 0 2px rgba(255, 244, 214, .5); }
.ro-moment-x { position: absolute; top: -6px; right: -4px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; cursor: pointer; }
.ro-moment :focus-visible { outline: 3px solid #ffe39a; outline-offset: 2px; }

/* the PIN lobby (player.html): the roster under «Elige tu avatar», and the frame of the skins the kid owns */
.avatar-roster { width: 100%; max-width: 480px; margin: 16px auto 8px; text-align: left; }
.avatar-roster-h { margin: 0 0 2px; font: 800 17px/1.2 'Baloo 2', 'Nunito', system-ui, sans-serif; color: inherit; }
.avatar-roster-sub { margin: 0 0 10px; font: 700 13px/1.3 'Nunito', system-ui, sans-serif; opacity: .8; }
.avatar-roster-grid { min-height: 40px; }
.avatar-roster .ro-tile { padding-top: 22px; }
.avatar-roster-info:empty { display: none; }
.avatar-roster-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding: 10px 12px; border-radius: 14px;
  background: #fffdf8; color: #2a2320; box-shadow: inset 0 0 0 2px #e2d4b4; font: 700 14px/1.3 'Nunito', system-ui, sans-serif;
}
.avatar-roster-info a { margin-left: auto; padding: 8px 12px; border-radius: 10px; background: #5a1010; color: #e8c878; font-weight: 800; text-decoration: none; }
.avatar-cell.ro-cell-raro { box-shadow: inset 0 0 0 3px var(--ro-raro); }
.avatar-cell.ro-cell-epico { box-shadow: inset 0 0 0 3px var(--ro-epico); }
.avatar-cell.ro-cell-legendario { box-shadow: inset 0 0 0 3px var(--ro-leg); }

/* (review of the shots 2026-10-29) a tier's title in its own colour, a bar beside it (no second chip) */
.ro-sec-h { padding-left: 10px; border-left: 4px solid var(--ro-comun); }
.ro-sec-h.ro-h-raro { border-color: var(--ro-raro); color: var(--ro-raro-ink); }
.ro-sec-h.ro-h-epico { border-color: var(--ro-epico); color: var(--ro-epico-ink); }
.ro-sec-h.ro-h-legendario { border-color: var(--ro-leg); color: var(--ro-leg-ink); }
body .ro-moment .ro-moment-t:focus, body .ro-moment .ro-moment-t:focus-visible { outline: none !important; box-shadow: none !important; }
.ro-moment-rays { -webkit-mask-image: radial-gradient(circle, #000 28%, transparent 70%); mask-image: radial-gradient(circle, #000 28%, transparent 70%); }

/* 🐉✨ 2026-11-09 MÍTICO, above Legendario (his words: «unattainable, of course, very expensive for them to be motivated»):
   a prism, ruby to jade, never a shadow. The chip wears the prism; a tile its ruby frame with a jade inner line and a
   soft glow; a tier's title the prism bar. Nothing moves here. */
:root {
  --ro-mit: #d93d78; --ro-mit-2: #2bb8a6; --ro-mit-bg: #fde9f2; --ro-mit-ink: #8a1747;
  --ro-prism: linear-gradient(100deg, #ff5fa2 0%, #ffb347 24%, #ffe27a 42%, #57e0c8 64%, #7aa8ff 84%, #c48bff 100%);
}
.ro-chip.ro-c-mitico { background: var(--ro-prism); color: #3a0a22; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); }
.ro-tile.ro-r-mitico {
  --ro-f: var(--ro-mit); --ro-bg: var(--ro-mit-bg);
  box-shadow: inset 0 0 0 2.5px var(--ro-mit), inset 0 0 0 4.5px rgba(87, 224, 200, .5), 0 3px 0 rgba(28, 26, 23, .1), 0 0 18px -6px rgba(255, 95, 162, .55);
}
.avatar-cell.ro-cell-mitico { box-shadow: inset 0 0 0 3px var(--ro-mit); }
.ro-sec-h.ro-h-mitico { border-left: 4px solid var(--ro-mit); border-image: var(--ro-prism) 1; color: var(--ro-mit-ink); }
